/* Shared auth pages — register & login */
:root {
  --orange: #FF6B35;
  --orange-d: #E55A2B;
  --blue: #0077B6;
  --navy: #040465;
  --navy-deep: #0a0a40;
  --hero-label: #8be9fd;
  --green: #138808;
  --white: #FFFFFF;
  --offwhite: #F8F9FA;
  --dark: #212529;
  --muted: #6C757D;
  --border: #DEE2E6;
  --error: #DC3545;
  --success: #28A745;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --header-h: 80px;
}

.auth-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--offwhite);
}

.auth-brand {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
  padding: clamp(40px, 6vw, 64px) clamp(32px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 100% 0%, rgba(255, 107, 53, 0.14) 0%, transparent 58%),
    radial-gradient(ellipse 55% 45% at 0% 100%, rgba(0, 119, 182, 0.16) 0%, transparent 52%);
  pointer-events: none;
}

.auth-brand::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(139, 233, 253, 0.06);
  pointer-events: none;
}

.auth-brand-logo {
  font-family: 'Yatra One', cursive;
  font-size: clamp(28px, 4vw, 36px);
  margin-bottom: 24px;
  display: block;
  color: var(--orange);
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}

.auth-brand-logo span { color: var(--orange); }

.auth-brand-headline {
  font-family: 'Yatra One', cursive;
  font-size: clamp(28px, 4.5vw, 40px);
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--white);
  position: relative;
  z-index: 1;
}

.auth-brand-headline span { color: var(--orange); }

.auth-brand > p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.75;
  max-width: 380px;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.auth-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 4px;
}

.auth-perks li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s, border-color 0.2s;
}

.auth-perks li:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: rgba(255, 107, 53, 0.25);
}

.auth-perks li::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f00c";
  width: 28px;
  height: 28px;
  background: rgba(255, 107, 53, 0.18);
  border: 1px solid rgba(255, 107, 53, 0.35);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #ffb899;
  flex-shrink: 0;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--white);
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card-header { margin-bottom: 28px; }

.auth-card-header h1,
.auth-card-header h2 {
  font-size: 26px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.auth-card-header p {
  font-size: 14px;
  color: var(--muted);
}

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 6px;
}

.auth-field input,
.auth-field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.auth-field select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236C757D' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.auth-field input.error,
.auth-field select.error {
  border-color: var(--error);
}

.auth-field-hint {
  font-size: 12px;
  color: var(--error);
  margin-top: 4px;
  display: none;
}

.auth-field-hint.show { display: block; }

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap input {
  padding-right: 48px;
}

.auth-toggle-pw {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.auth-toggle-pw:hover {
  color: var(--orange);
  background: var(--offwhite);
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--orange);
  flex-shrink: 0;
  cursor: pointer;
}

.auth-check a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
}

.auth-check a,
.auth-check a:hover { text-decoration: none; }

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 0;
}

.auth-forgot {
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.auth-forgot:hover { color: var(--orange); }

.auth-btn-primary {
  width: 100%;
  padding: 14px 20px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  position: relative;
  margin-top: 4px;
}

.auth-btn-primary:hover:not(:disabled) {
  background: var(--orange-d);
}

.auth-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-btn-primary .auth-spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
  margin: 0 auto;
}

.auth-btn-primary.loading .auth-btn-text { visibility: hidden; }
.auth-btn-primary.loading .auth-spinner { display: block; position: absolute; left: 50%; top: 50%; margin: -11px 0 0 -11px; }

@keyframes authSpin { to { transform: rotate(360deg); } }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--dark);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-btn-google:hover {
  border-color: #dadce0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  background: var(--offwhite);
}

.auth-btn-google svg { flex-shrink: 0; }

.auth-footer-text {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

.auth-footer-text a {
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-text a:hover { color: var(--blue); }

.auth-alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 4px;
  display: none;
}

.auth-alert.show { display: block; }
.auth-alert.error { background: #fde8ea; color: var(--error); border: 1px solid #f5c2c7; }
.auth-alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* Mobile brand bar */
.auth-mobile-brand {
  display: none;
  text-align: center;
  padding: 20px 16px 0;
  background: var(--white);
}

.auth-mobile-brand .logo-text {
  font-family: 'Yatra One', cursive;
  font-size: 22px;
  color: var(--dark);
}

.auth-mobile-brand .logo-text span { color: var(--orange); }

@media (max-width: 960px) {
  .auth-page {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-brand { display: none; }

  .auth-mobile-brand { display: block; }

  .auth-form-panel {
    padding: 24px 20px 48px;
    align-items: flex-start;
  }

  .auth-card { max-width: 100%; }
}

@media (max-width: 480px) {
  .auth-card-header h1,
  .auth-card-header h2 { font-size: 22px; }
  .auth-field input,
  .auth-field select { font-size: 16px; /* prevents iOS zoom */ }
  .auth-form-panel { padding: 16px 16px 40px; }
}
