/* ════════════════════════════════════════════════════════════════
   AUTH — splash-grade login & OTP design system
   Namespaced (auth-, lg-) so nothing leaks into the app shell.
   JS contract kept in markup: #loginScreen #signInCard #otpCard
   #loginUser #loginPass #togglePassword #loginError
   #otpInputs/.otp-input #btnVerifyOtp #btnResendOtp #btnBackToLogin
   ════════════════════════════════════════════════════════════════ */

@keyframes lgRise   { from { opacity:0; transform:translateY(26px);} to { opacity:1; transform:none;} }
@keyframes lgSlideL { from { opacity:0; transform:translateX(-34px);} to { opacity:1; transform:none;} }
@keyframes lgSlideR { from { opacity:0; transform:translateX(34px);} to { opacity:1; transform:none;} }
@keyframes lgOrb    { 0%,100%{transform:translate(0,0) scale(1);} 33%{transform:translate(28px,-38px) scale(1.12);} 66%{transform:translate(-24px,26px) scale(.94);} }
@keyframes lgPulseRing { 0%{box-shadow:0 0 0 0 rgba(201,162,39,.45);} 70%{box-shadow:0 0 0 16px rgba(201,162,39,0);} 100%{box-shadow:0 0 0 0 rgba(201,162,39,0);} }

/* ── Screen ── */
.auth-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(.75rem, 2.5vw, 2rem);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(6,44,32,.92), rgba(13,110,79,.86) 46%, rgba(9,58,42,.93)),
    url('../assets/logo/bg.jfif') center/cover no-repeat fixed;
}
.auth-screen .orb { position:absolute; border-radius:50%; pointer-events:none; }
.orb-a { width:460px; height:460px; top:-160px; right:-120px;
         background:radial-gradient(circle at 30% 30%, rgba(201,162,39,.35), transparent 65%);
         animation:lgOrb 16s ease-in-out infinite; }
.orb-b { width:380px; height:380px; bottom:-140px; left:-110px;
         background:radial-gradient(circle at 60% 40%, rgba(255,255,255,.14), transparent 62%);
         animation:lgOrb 19s ease-in-out infinite reverse; }
.orb-c { width:240px; height:240px; top:38%; left:55%;
         background:radial-gradient(circle at 40% 40%, rgba(18,135,95,.5), transparent 60%);
         animation:lgOrb 13s ease-in-out 2s infinite; }

.auth-shell {
  position:relative; z-index:1;
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(360px,470px);
  gap:clamp(1rem,3vw,3rem);
  width:min(1180px,100%);
  border-radius:26px;
  box-shadow:0 40px 90px rgba(0,0,0,.35);
}

/* ── Brand pane ── */
.brand-pane {
  color:#fff;
  padding:clamp(1.4rem,3vw,2.3rem);
  display:flex; flex-direction:column; gap:1rem;
  border-radius:26px 0 0 26px;
  background:
    linear-gradient(160deg, rgba(8,52,38,.74), rgba(10,61,46,.6)),
    url('../assets/logo/bodaboda.jpg') center/cover no-repeat;
  animation:lgSlideL .7s cubic-bezier(.22,.9,.3,1) both;
}
.brand-head { display:flex; align-items:center; gap:.85rem; }
.brand-mark {
  width:56px; height:56px; border-radius:16px; object-fit:cover;
  background:#fff; padding:2px;
  box-shadow:0 6px 18px rgba(0,0,0,.35);
}
.brand-head strong { font-size:1.05rem; letter-spacing:.02em; }
.brand-head strong em { color:#f0d060; font-style:normal; }
.brand-head small { display:block; font-size:.72rem; opacity:.75; margin-top:2px; }

.brand-hero h2 {
  font-size:clamp(1.55rem,2.6vw,2.15rem);
  line-height:1.14; font-weight:800; letter-spacing:-.02em;
  margin:.35rem 0 .45rem;
}
.gold-dot { color:#f0d060; }
.brand-hero p { max-width:46ch; opacity:.88; font-size:.95rem; }
.hero-shot {
  width:100%; height:150px; object-fit:cover;
  border-radius:16px; margin-top:.85rem;
  box-shadow:0 18px 40px rgba(0,0,0,.38);
  border:1px solid rgba(255,255,255,.18);
}
.brand-feats {
  list-style:none;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(175px,1fr));
  gap:.65rem;
  margin-top:auto;
}
.brand-feats li {
  display:flex; gap:.65rem; align-items:flex-start;
  background:rgba(255,255,255,.09);
  border:1px solid rgba(255,255,255,.16);
  backdrop-filter:blur(10px);
  border-radius:14px;
  padding:.68rem .75rem;
  transition:transform .25s ease, background .25s ease;
}
.brand-feats li:hover { transform:translateY(-3px); background:rgba(255,255,255,.15); }
.fico {
  flex-shrink:0;
  width:34px; height:34px; border-radius:11px;
  display:grid; place-items:center;
  background:linear-gradient(145deg,#c9a227,#a5841c);
  color:#0a3d2e; font-size:.9rem;
  box-shadow:0 6px 14px rgba(0,0,0,.3);
}
.brand-feats b { display:block; font-size:.8rem; }
.brand-feats small { display:block; font-size:.7rem; opacity:.78; line-height:1.35; }
.brand-foot {
  text-align:center; font-size:.8rem; font-style:italic;
  color:#f0d060; letter-spacing:.03em;
}
.brand-foot { text-align:center; font-size:.8rem; font-style:italic; color:#f0d060; letter-spacing:.03em; }

/* ── Right side / cards ── */
.auth-side { display:grid; align-content:center; justify-items:center; }
.auth-card {
  width:100%; max-width:430px;
  background:rgba(255,255,255,.97);
  border-radius:22px;
  padding:clamp(1.5rem,3vw,2.3rem);
  box-shadow:0 30px 70px rgba(0,0,0,.4);
  border:1px solid rgba(255,255,255,.6);
  animation:lgSlideR .7s cubic-bezier(.22,.9,.3,1) both .08s;
}
.auth-card.otp-face { animation-name:lgRise; }

.step-pill {
  float:right;
  font-size:.66rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:#0d6e4f; background:#e8f5ef;
  border:1px solid rgba(13,110,79,.25);
  padding:.28rem .6rem; border-radius:999px;
}
.auth-logo { text-align:center; margin-bottom:1.35rem; }
.auth-logo.tight { margin-bottom:.9rem; }
.auth-logo img {
  width:76px; height:76px; border-radius:24px; object-fit:cover;
  background:#fff; padding:3px;
  border:2px solid #f0d060;
  animation:lgPulseRing 3s ease-in-out infinite;
}
.auth-logo h1 { font-size:1.28rem; font-weight:800; color:#0a3d2e; margin-top:.55rem; letter-spacing:-.01em; }
.tagline { color:#c9a227; font-style:italic; font-size:.78rem; margin-top:.15rem; }

/* Fields */
.f-field { margin-bottom:.95rem; text-align:left; }
.f-field > label {
  display:block; font-size:.72rem; font-weight:800;
  text-transform:uppercase; letter-spacing:.05em;
  color:#64748b; margin-bottom:.4rem;
}
.f-control { position:relative; }
.f-control > i {
  position:absolute; left:.9rem; top:50%; translate:0 -50%;
  color:#9aa7b5; font-size:.88rem; pointer-events:none;
  transition:color .2s ease;
}
.f-control input {
  width:100%;
  padding:.82rem .95rem .82rem 2.55rem;
  font:500 .95rem var(--font);
  color:var(--text);
  background:#f6f9fb;
  border:1.6px solid #dfe7ee;
  border-radius:13px;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.f-control input::placeholder { color:#aab6c2; }
.f-control input:focus {
  outline:none; background:#fff;
  border-color:#12875f;
  box-shadow:0 0 0 4px rgba(18,135,95,.13);
}
.f-control:focus-within > i:first-child { color:#12875f; }
.reveal-btn {
  position:absolute; right:.5rem; top:50%; translate:0 -50%;
  width:34px; height:34px; border:none; cursor:pointer;
  background:#eef3f7; color:#65727f;
  border-radius:9px; font-size:.85rem;
  transition:background .2s, color .2s;
}
.reveal-btn:hover { background:#e8f5ef; color:#0d6e4f; }

/* Remember switch + secured chip */
.f-meta {
  display:flex; align-items:center; justify-content:space-between;
  gap:.75rem; margin:.15rem 0 1.05rem; flex-wrap:wrap;
}
.lg-switch { display:inline-flex; align-items:center; gap:.5rem; cursor:pointer; user-select:none; }
.lg-switch input { position:absolute; opacity:0; pointer-events:none; }
.lg-switch .track {
  width:38px; height:21px; border-radius:999px;
  background:#dbe3ea; position:relative; flex-shrink:0;
  transition:background .25s;
}
.lg-switch .knob {
  position:absolute; top:2.5px; left:3px;
  width:16px; height:16px; border-radius:50%; background:#fff;
  box-shadow:0 2px 5px rgba(0,0,0,.25);
  transition:left .25s cubic-bezier(.4,1.6,.6,1);
}
.lg-switch input:checked + .track { background:#12875f; }
.lg-switch input:checked + .track .knob { left:19px; }
.lg-switch input:focus-visible + .track { outline:2px solid #12875f; outline-offset:2px; }
.sw-label { font-size:.82rem; font-weight:600; color:#54606e; }
.secure-chip {
  font-size:.66rem; font-weight:700; color:#0d6e4f;
  background:#e8f5ef; border-radius:999px;
  padding:.3rem .6rem;
  display:inline-flex; gap:.35rem; align-items:center;
}

/* Submit */
.submit-btn {
  position:relative; overflow:hidden;
  width:100%;
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  padding:.9rem 1rem;
  border:none; border-radius:13px; cursor:pointer;
  font:700 .95rem var(--font); letter-spacing:.02em; color:#fff;
  background:linear-gradient(135deg,#12875f,#0a3d2e);
  box-shadow:0 12px 24px rgba(13,110,79,.35);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.submit-btn i { transition:translate .2s ease; }
.submit-btn:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 16px 30px rgba(13,110,79,.45); }
.submit-btn:hover:not(:disabled) i { translate:3px 0; }
.submit-btn:active:not(:disabled) { transform:none; }
.submit-btn:disabled { opacity:.65; cursor:progress; filter:saturate(.55); }
/* Scoped restyle of the JS-shared error box */
.auth-card .login-error {
  margin-top:.9rem; position:relative; text-align:left;
  padding:.68rem .85rem .68rem 2.35rem;
  background:#fef2f2; border:1.5px solid #fecaca; border-left:4px solid var(--danger);
  border-radius:11px; color:#991b1b;
  font-size:.83rem; font-weight:600; line-height:1.45;
  animation:lgRise .3s ease;
}
.auth-card .login-error::before {
  content:'\f071';
  font-family:'Font Awesome 6 Free'; font-weight:900;
  position:absolute; left:.8rem; top:.72rem;
  color:var(--danger); font-size:.85rem;
}
.auth-card .login-error:empty { display:none !important; }

.auth-alt { margin-top:1.05rem; text-align:center; }
.auth-alt p { font-size:.78rem; color:var(--muted); }
.auth-alt p i { color:var(--gold); }
.link-btn {
  background:none; border:none; cursor:pointer;
  font:700 .84rem var(--font); color:#0d6e4f;
  padding:.3rem .5rem; border-radius:8px;
  transition:color .15s, background .15s;
}
.link-btn:hover:not(:disabled) { color:#0a3d2e; background:#e8f5ef; text-decoration:underline; }
.link-btn:disabled { color:#94a3b8; cursor:not-allowed; text-decoration:none; }

/* ── OTP face ── */
.otp-face { text-align:center; }
.otp-copy { font-size:.87rem; color:#5b6875; margin-bottom:1.05rem; line-height:1.55; }
.otp-copy strong {
  display:inline-block; margin-top:.3rem;
  background:#f0f4f8; border:1px dashed #c7d2dd;
  padding:.22rem .6rem; border-radius:8px;
  font-weight:800; color:#0a3d2e;
}
.otp-board { display:flex; gap:.55rem; justify-content:center; margin-bottom:1.1rem; }
.otp-board .otp-input {
  width:48px; height:58px;
  text-align:center;
  font:800 1.4rem var(--font);
  color:#0a3d2e; caret-color:#12875f;
  background:linear-gradient(180deg,#fff,#f2f6f9);
  border:2px solid #dfe7ee; border-radius:14px;
  transition:border-color .18s ease, box-shadow .18s ease, translate .12s ease;
}
.otp-board .otp-input:focus {
  outline:none; border-color:#12875f; background:#fff;
  box-shadow:0 0 0 4px rgba(18,135,95,.14);
  translate:0 -2px;
}
.otp-board .otp-input:disabled { opacity:.45; cursor:not-allowed; translate:none; }

.dev-note {
  margin-top:1rem; padding:.65rem .8rem;
  border-radius:11px;
  background:#fffaeb; border:1.5px dashed #c9a227; color:#7a5c00;
  font-size:.78rem;
  display:flex; align-items:center; justify-content:center;
  gap:.45rem; flex-wrap:wrap;
}
.dev-note strong { font-weight:800; letter-spacing:.06em; }
.dev-note:empty { display:none !important; }

.otp-actions {
  margin-top:1rem;
  display:flex; align-items:center; justify-content:center; gap:.4rem;
  flex-wrap:wrap;
}
.muted-txt { font-size:.84rem; color:#5b6875; }
.expiry-line {
  margin-top:.7rem; font-size:.76rem; color:var(--muted);
  display:inline-flex; align-items:center; gap:.4rem;
}
.expiry-line strong {
  color:#0d6e4f; background:#e8f5ef;
  padding:.14rem .5rem; border-radius:7px;
  font-variant-numeric:tabular-nums;
}

/* ── Responsive ── */
@media (max-width:1024px){
  .auth-shell { grid-template-columns:1fr; width:min(560px,100%); box-shadow:none; }
  .brand-pane { border-radius:22px 22px 0 0; gap:.85rem; }
  .brand-hero p, .brand-foot { display:none; }
  .hero-shot { height:105px; margin-top:.2rem; }
  .auth-card { border-radius:0 0 22px 22px; }
}
@media (max-width:520px){
  .auth-screen { padding:.55rem; }
  .auth-shell { gap:.6rem; }
  .brand-pane { padding:1rem; }
  .brand-feats { grid-template-columns:1fr 1fr; gap:.5rem; }
  .brand-feats li { padding:.55rem .6rem; }
  .brand-feats small { display:none; }
  .hero-shot { height:86px; }
  .auth-card { padding:1.4rem 1.1rem; }
  .otp-board .otp-input { width:42px; height:52px; font-size:1.18rem; border-radius:11px; }
}
@media (prefers-reduced-motion:reduce){
  .auth-screen *, .auth-screen *::before { animation:none !important; transition:none !important; }
}