/* =============================================
   Mbashr Auth Pages - Premium Styles
   ============================================= */

/* Auth CSS Variables (compatible with main theme) */
:root {
  --color-accent: #50aa66;
  --color-accent-hover: #44975a;
  --color-accent-rgb: 80, 170, 102;
  --color-text: #18181b;
  --color-text-secondary: #5e5e5e;
  --color-text-muted: #94a3b8;
  --color-bg-soft: #f4f4f5;
}

/* ---------- AUTH LAYOUT ---------- */
.auth-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-container {
  width: 100%;
  max-width: 460px;
}

/* ---------- AUTH CARD ---------- */
.auth-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-border);
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary, #50aa66), var(--color-primary-hover, #44975a));
}

.auth-card__header {
  text-align: center;
  margin-bottom: 32px;
}
.auth-card__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: var(--color-primary, #50aa66);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.auth-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-black);
  margin-bottom: 6px;
}
.auth-card__subtitle {
  font-size: 0.9rem;
  color: var(--color-gray-text);
}

/* ---------- AUTH FORM ---------- */
.auth-form__group {
  margin-bottom: 20px;
}
.auth-form__label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 8px;
}
.auth-form__input {
  width: 100%;
  padding: 14px 16px;
  background: var(--color-gray-light);
  border: 2px solid var(--color-gray-border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-black);
  transition: all 0.3s ease;
  outline: none;
}
.auth-form__input:focus {
  border-color: var(--color-black);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
  background: var(--color-white);
}
.auth-form__input::placeholder {
  color: var(--color-gray-text);
}
.auth-form__hint {
  font-size: 0.78rem;
  color: var(--color-gray-text);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* OTP Input */
.otp-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  direction: ltr;
  margin: 24px 0;
}
.otp-input {
  width: 56px;
  height: 64px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--color-gray-border);
  border-radius: 12px;
  background: var(--color-gray-light);
  color: var(--color-black);
  outline: none;
  transition: all 0.3s ease;
  font-family: inherit;
}
.otp-input:focus {
  border-color: var(--color-black);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
  transform: scale(1.05);
  background: var(--color-white);
}
.otp-input.filled {
  border-color: var(--color-black);
  background: var(--color-zinc-50);
}

/* Steps Indicator */
.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.auth-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid var(--color-gray-border);
  color: var(--color-gray-text);
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.auth-step.active {
  background: var(--color-primary, #50aa66);
  border-color: var(--color-primary, #50aa66);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.auth-step.done {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.auth-step-line {
  width: 40px;
  height: 2px;
  background: var(--color-gray-border);
  transition: background 0.3s ease;
}
.auth-step-line.active {
  background: var(--color-primary, #50aa66);
}

/* ---------- AUTH BUTTON ---------- */
.auth-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--color-primary, #50aa66);
  color: var(--color-white);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.auth-btn:hover {
  background: var(--color-primary-hover, #44975a);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--color-gray-text);
}
.auth-footer a {
  color: var(--color-black);
  font-weight: 700;
}
.auth-footer a:hover {
  text-decoration: underline;
}

/* Auth Messages */
.auth-message {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-message--error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: #ef4444;
}
.auth-message--success {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  color: #10b981;
}

/* ---------- MY BOOKINGS PAGE ---------- */
.my-bookings-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}
.my-bookings-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.my-bookings-page__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-black);
  display: flex;
  align-items: center;
  gap: 10px;
}
.my-bookings-page__title svg {
  color: var(--color-gray-text);
}

/* Booking Card */
.booking-item {
  background: var(--color-white);
  border: 1px solid var(--color-gray-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.booking-item:hover {
  border-color: var(--color-black);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.booking-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.booking-item__number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-black);
  background: var(--color-gray-light);
  padding: 4px 12px;
  border-radius: 8px;
  direction: ltr;
}
.booking-item__status {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}
.booking-item__status--pending {
  background: rgba(245,158,11,0.1);
  color: #f59e0b;
}
.booking-item__status--confirmed {
  background: rgba(16,185,129,0.1);
  color: #10b981;
}
.booking-item__status--cancelled {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}

.booking-item__route {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-black);
}
.booking-item__route-arrow {
  color: var(--color-gray-text);
  flex-shrink: 0;
}

.booking-item__details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media(min-width: 640px) {
  .booking-item__details {
    grid-template-columns: repeat(4, 1fr);
  }
}
.booking-item__detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.booking-item__detail-label {
  font-size: 0.75rem;
  color: var(--color-gray-text);
  font-weight: 600;
}
.booking-item__detail-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-black);
}

.booking-item__actions {
  display: flex;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--color-gray-border);
}
.booking-item__cancel-btn {
  padding: 8px 20px;
  background: rgba(239,68,68,0.08);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}
.booking-item__cancel-btn:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
}

/* Empty Bookings */
.bookings-empty {
  text-align: center;
  padding: 60px 20px;
}
.bookings-empty__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--color-gray-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-text);
}
.bookings-empty__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 8px;
}
.bookings-empty__text {
  font-size: 0.9rem;
  color: var(--color-gray-text);
  margin-bottom: 20px;
}
.bookings-empty__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--color-primary, #50aa66);
  color: var(--color-white);
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.bookings-empty__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  color: #fff;
  background: var(--color-primary-hover, #44975a);
}

/* Loading Spinner for auth */
.auth-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}
@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

/* ---------- USER MENU IN HEADER ---------- */
.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-menu__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.user-menu__info {
  display: flex;
  flex-direction: column;
}
.user-menu__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-black);
  line-height: 1.2;
}
.user-menu__links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}
.user-menu__link {
  color: var(--color-gray-text);
  font-weight: 600;
  transition: color 0.15s;
}
.user-menu__link:hover {
  color: var(--color-black);
}
.user-menu__link--danger {
  color: #ef4444;
}
.user-menu__link--danger:hover {
  color: #dc2626;
}
.user-menu__sep {
  width: 1px;
  height: 12px;
  background: var(--color-gray-border);
}

/* Hide user menu on small screens, show in mobile menu instead */
@media (max-width: 767px) {
  .user-menu {
    display: none;
  }
}
