/* ═══════════════════════════════════════════════
   TAZHEEB — AUTH PAGE STYLES  (Luxury v3)
   Royal Blue #0E2B6F · Gold #D8B06A · Cinzel
═══════════════════════════════════════════════ */

/* ── OUTER PAGE ───────────────────────────────── */
#auth-page {
  position: fixed; inset: 0;
  /* Fallback colour if image is still loading or fails */
  background: #F8F5F0;
  overflow: hidden;
  z-index: 1000;
  font-family: 'Plus Jakarta Sans', 'Lexend', 'Outfit', sans-serif;
  /* Ensure absolute children (frame overlay) resolve against this element */
  isolation: isolate;
}

/* ── FULL-VIEWPORT DECORATIVE FRAME ──────────── */
.auth-frame-overlay {
  /* absolute — so it fills its fixed parent #auth-page correctly */
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  /* ensure it never clips the image */
  overflow: hidden;
}
.auth-frame-img {
  display: block;
  width: 100%; height: 100%;
  /* fill = stretch to match the viewport exactly, no black bars */
  object-fit: fill;
  /* crisp rendering — no blurriness on high-DPI */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* ── PAGE INNER — centers the card ──────────── */
.auth-page-inner {
  position: relative; z-index: 1;
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 24px;
  overflow: hidden;
}

/* ── LOGIN CARD ────────────────────────────────── */
.auth-login-card {
  width: 100%; max-width: 560px;
  padding: 52px 52px 44px;
  border-radius: 30px;
  background: rgba(252, 249, 244, 0.90);
  border: 1.5px solid #CDA45A;
  box-shadow:
    0 32px 80px rgba(14,43,111,0.14),
    0 8px 24px rgba(205,164,90,0.18),
    inset 0 1px 0 rgba(255,255,255,0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  position: relative;
}

/* ── LOGO SECTION ─────────────────────────────── */
.auth-logo-section {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.auth-flower-emblem {
  width: 58px; height: 58px; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(205,164,90,0.45));
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.auth-flower-emblem:hover { transform: rotate(30deg) scale(1.08); }
.auth-brand-heading {
  font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  font-size: 30px; font-weight: 700;
  letter-spacing: 14px;
  color: #0E2B6F;
  text-align: center;
  margin: 0;
  line-height: 1;
  /* Slight gold shimmer on hover */
  transition: color 0.3s;
}

/* ── LUXURY DIVIDER ───────────────────────────── */
.auth-luxury-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 0 auto 14px; width: 220px;
}
.lux-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, #CDA45A, transparent);
}
.lux-ornament {
  font-size: 10px; color: #CDA45A;
  line-height: 1; flex-shrink: 0;
  opacity: 0.85;
}

/* ── WELCOME TEXT ─────────────────────────────── */
.auth-welcome-text {
  text-align: center; font-size: 15px; font-weight: 400;
  color: #6F6F6F; letter-spacing: 0.2px;
  margin: 0 0 22px; line-height: 1.4;
}

/* ── AUTH STEP HELPERS ────────────────────────── */
.auth-step-heading {
  font-size: 15px; font-weight: 700;
  color: #0E2B6F; margin-bottom: 4px; text-align: center;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.auth-step-sub {
  font-size: 12.5px; color: #8A9AAA; text-align: center;
  margin-bottom: 20px; line-height: 1.55; font-weight: 400;
}

/* ── STEP NAV (back + role pill row) ─────────── */
.auth-step-nav {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}

/* ── BACK BUTTON ──────────────────────────────── */
.auth-back-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid rgba(14,43,111,0.18);
  background: transparent;
  color: #6A7E96; font-family: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all 0.22s;
}
.auth-back-btn:hover {
  border-color: #0E2B6F; color: #0E2B6F;
  background: rgba(14,43,111,0.05);
}

/* ── ROLE PILL ────────────────────────────────── */
.selected-role-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 14px; border-radius: 50px;
  background: rgba(14,43,111,0.08);
  border: 1px solid rgba(14,43,111,0.2);
  color: #0E2B6F; font-size: 12px; font-weight: 600;
}

/* ── INTRO MODULE CARDS (Step 0) ──────────────── */
.intro-module-cards {
  display: flex; gap: 12px; justify-content: center;
  margin-top: 4px;
}
.intro-module-card {
  flex: 1; max-width: 110px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 12px 16px; border-radius: 18px;
  border: 1.5px solid rgba(205,164,90,0.22);
  background: rgba(255,255,255,0.68);
  box-shadow: 0 2px 12px rgba(205,164,90,0.1), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  user-select: none; position: relative;
}
.intro-module-active {
  cursor: pointer;
  border-color: rgba(205,164,90,0.45);
  background: rgba(255,250,240,0.88);
}
.intro-module-active:hover {
  transform: translateY(-4px);
  border-color: #CDA45A;
  box-shadow: 0 12px 32px rgba(205,164,90,0.3), inset 0 1px 0 rgba(255,255,255,1);
}
.intro-module-active:hover .intro-module-flower {
  transform: rotate(18deg) scale(1.12);
  filter: drop-shadow(0 4px 10px rgba(205,164,90,0.55));
}
.intro-module-inactive {
  cursor: default; opacity: 0.5; filter: grayscale(20%);
}
.intro-module-icon-wrap { position: relative; }
.intro-module-flower {
  width: 44px; height: 44px; object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(205,164,90,0.35));
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.intro-module-label {
  font-size: 12.5px; font-weight: 700; color: #24314D;
  letter-spacing: 0.2px; text-align: center;
}
.intro-module-tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 50px;
  background: rgba(120,130,145,0.12);
  color: #8A9AAA; font-size: 10px; font-weight: 600;
}
.intro-module-enter {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 10px; border-radius: 50px;
  background: rgba(14,43,111,0.1); border: 1px solid rgba(14,43,111,0.22);
  color: #0E2B6F; font-size: 10.5px; font-weight: 600;
  transition: all 0.2s;
}
.intro-module-active:hover .intro-module-enter {
  background: rgba(14,43,111,0.18); color: #0A1D4A;
}

/* ── ROLE CARDS (Step 1) ──────────────────────── */
.role-cards { display: flex; gap: 14px; }
.role-card {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: 22px 14px 18px; border-radius: 16px;
  border: 1.5px solid rgba(205,164,90,0.28);
  background: rgba(255,255,255,0.72);
  cursor: pointer; transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  user-select: none; -webkit-user-select: none;
  box-shadow: 0 2px 12px rgba(205,164,90,0.1), inset 0 1px 0 rgba(255,255,255,0.9);
}
.role-card:hover {
  border-color: #CDA45A; background: rgba(255,255,255,0.95);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(205,164,90,0.26), inset 0 1px 0 rgba(255,255,255,1);
}
.role-card.selected {
  border-color: #CDA45A; background: rgba(255,248,230,0.96);
  box-shadow: 0 0 0 3px rgba(205,164,90,0.22), 0 8px 24px rgba(205,164,90,0.2);
}
.role-flower {
  width: 44px; height: 44px; object-fit: contain; margin-bottom: 10px;
  filter: drop-shadow(0 2px 6px rgba(205,164,90,0.35));
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.role-card:hover .role-flower, .role-card.selected .role-flower {
  transform: scale(1.12) rotate(18deg);
  filter: drop-shadow(0 4px 10px rgba(205,164,90,0.55));
}
.role-card-name {
  font-size: 14px; font-weight: 700; color: #0E2B6F; letter-spacing: 0.3px;
}

/* ── LOGIN FORM (Step 2) ──────────────────────── */
.auth-form-body { display: flex; flex-direction: column; gap: 12px; }
.auth-form-body .form-group { margin: 0; }

/* 58px tall inputs — warm white, gold focus */
.auth-form-body .form-input {
  height: 58px;
  background: #FFFFFF;
  border: 1px solid #DCC9A5;
  color: #24314D; padding: 0 16px 0 46px; font-size: 14px;
  border-radius: 14px; outline: none;
  transition: border-color 0.22s, box-shadow 0.22s;
  width: 100%; box-sizing: border-box; font-family: inherit;
}
.auth-form-body .form-input::placeholder { color: #A8B4BF; }
.auth-form-body .form-input:focus {
  border-color: #D8B06A;
  box-shadow: 0 0 0 4px rgba(216,176,106,0.15);
  background: #FFFDF8;
}

/* Icon inside input */
.auth-form-body .input-icon {
  color: #B8C0C8; left: 16px;
}
.auth-form-body .input-icon-wrap:focus-within .input-icon {
  color: #D8B06A;
}

/* ── SIGN IN BUTTON ───────────────────────────── */
.auth-signin-btn {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 22px;
  background: #0E2B6F;
  border: none; border-radius: 14px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 700;
  letter-spacing: 0.5px; color: #D8B06A;
  box-shadow: 0 6px 24px rgba(14,43,111,0.32);
  transition: background 0.22s, transform 0.18s, box-shadow 0.22s;
  width: 100%; margin-top: 4px;
}
.auth-signin-btn:hover {
  background: #0A1D4F;
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(14,43,111,0.40);
}
.auth-signin-btn:active { transform: translateY(0); }
.signin-label {
  flex: 1; text-align: center;
  /* nudge slightly left to visually center against the arrow */
  padding-left: 24px;
}
.signin-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(216,176,106,0.18); border: 1px solid rgba(216,176,106,0.35);
  color: #E7C98F; flex-shrink: 0;
  transition: background 0.2s;
}
.auth-signin-btn:hover .signin-arrow {
  background: rgba(216,176,106,0.32);
}

/* ── FORGOT PASSWORD (cosmetic) ───────────────── */
.auth-forgot-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  margin-top: 6px;
}
.auth-forgot-link {
  font-size: 12.5px; color: #D8B06A; font-weight: 500;
  cursor: default; letter-spacing: 0.2px; opacity: 0.9;
}
.auth-forgot-ornament {
  font-size: 9px; color: #D8B06A; opacity: 0.6; letter-spacing: 4px;
}

/* ── ERROR TEXT ───────────────────────────────── */
.auth-error {
  color: #C84040; font-size: 12px; margin: 0; min-height: 16px; font-weight: 500;
}

/* ── PASSWORD CHANGE OVERLAY ──────────────────── */
.pw-change-overlay {
  display: none; position: fixed; inset: 0; z-index: 600;
  background: rgba(14,43,111,0.35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
  padding: 20px;
}
.pw-change-overlay.open { display: flex; }
.pw-change-card {
  background: rgba(252,249,244,0.97);
  border: 1.5px solid #CDA45A;
  border-radius: 22px; padding: 36px 32px;
  width: 100%; max-width: 420px;
  box-shadow: 0 28px 72px rgba(14,43,111,0.22), 0 4px 16px rgba(205,164,90,0.14);
  animation: fadeInUp 0.28s ease;
}
.pw-security-banner {
  background: linear-gradient(135deg, rgba(14,43,111,0.08), rgba(14,43,111,0.04));
  border: 1.5px solid rgba(14,43,111,0.2);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 24px;
  color: #0E2B6F; font-size: 13px; line-height: 1.55;
}
.pw-security-banner strong { display: block; margin-bottom: 4px; font-size: 13.5px; }
.pw-change-card .form-input {
  height: 52px;
  background: #FFFFFF; border: 1px solid #DCC9A5;
  color: #24314D; border-radius: 12px;
}
.pw-change-card .form-input:focus {
  border-color: #D8B06A;
  box-shadow: 0 0 0 3px rgba(216,176,106,0.15);
}
.pw-change-error { color: #C84040; font-size: 12px; min-height: 18px; font-weight: 500; }

/* ── FADE-IN ANIMATION ────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 640px) {
  .auth-login-card {
    padding: 36px 28px 32px;
    border-radius: 22px; max-width: 95vw;
  }
  .auth-brand-heading { font-size: 24px; letter-spacing: 10px; }
  .auth-flower-emblem { width: 46px; height: 46px; }
  .auth-form-body .form-input { height: 52px; }
  .auth-signin-btn { height: 52px; }
  .intro-module-cards { gap: 8px; }
  .intro-module-card { padding: 16px 9px 13px; max-width: 96px; }
  .intro-module-flower { width: 36px; height: 36px; }
}
@media (max-width: 400px) {
  .auth-login-card { padding: 28px 20px 24px; }
  .auth-brand-heading { font-size: 21px; letter-spacing: 8px; }
}
