/* ============================================================================
   AdminLogin.css — standalone auth pages (Login, EnterLoginCode, ChangePassword)
   Ported from the design handoff (Login Page.html / OTP Verification.html);
   the password-rules checklist (.pwrules) follows the same design language.
   These pages render with Layout = null, so the design tokens live here
   (same values as AdminChrome.css).
   ============================================================================ */
@import url("https://fonts.googleapis.com/css2?family=Assistant:wght@400;500;600;700&family=Rubik:wght@500;600;700&display=swap");

:root {
  --accent: #FAC50C;
  --accent-dark: color-mix(in srgb, var(--accent) 84%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, #fff);
  --accent-softer: color-mix(in srgb, var(--accent) 8%, #fff);
  --accent-ring: color-mix(in srgb, var(--accent) 38%, transparent);
  --accent-ink: color-mix(in srgb, var(--accent) 42%, #1a1400);
  --on-accent: #1d1a10;

  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #eef0f4;
  --line: #e6e8ee;
  --line-strong: #d7dbe3;
  --ink: #181b24;
  --ink-2: #5b6273;
  --ink-3: #9097a6;

  --r-ctl: 10px;
  --font: "Assistant", system-ui, sans-serif;
  --font-head: "Rubik", "Assistant", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; }

.loginpage {
  min-height: 100vh; display: grid; place-items: center; padding: 28px;
  background: var(--surface-2); position: relative; overflow: hidden;
}
/* soft branded background */
.loginpage__bg { position: absolute; inset: 0; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .5; }
.blob--1 { width: 520px; height: 520px; background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 70%); top: -160px; inset-inline-start: -120px; }
.blob--2 { width: 460px; height: 460px; background: radial-gradient(circle at 70% 70%, var(--accent-softer), transparent 70%); bottom: -180px; inset-inline-end: -100px; }

/* ---------- Card ---------- */
.logincard {
  position: relative; z-index: 1;
  width: min(880px, 100%); display: grid; grid-template-columns: 1fr 1.05fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 30px 70px -28px rgba(20,24,34,.4), 0 0 0 1px rgba(20,24,34,.02);
  overflow: hidden;
}

/* brand panel (RTL: right) */
.brandpanel {
  position: relative; padding: 34px 32px; color: var(--on-accent);
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--accent) 70%, #fff) 0%, var(--accent) 42%, var(--accent-dark) 100%);
  display: flex; flex-direction: column; overflow: hidden;
}
.brandpanel__top { display: flex; align-items: center; gap: 11px; }
.brandpanel__mark {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  background: rgba(255,255,255,.92); color: var(--accent-ink);
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 26px;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.35);
}
.brandpanel__name { font-family: var(--font-head); font-weight: 700; font-size: 19px; }
.brandpanel__badge {
  font-family: var(--font); font-size: 11px; font-weight: 700; vertical-align: 3px;
  background: rgba(29,26,16,.16); padding: 2px 7px; border-radius: 6px; margin-inline-start: 3px;
}
.brandpanel__mid { margin-top: auto; padding-top: 60px; }
.brandpanel__headline { font-family: var(--font-head); font-weight: 700; font-size: 27px; margin: 0 0 10px; letter-spacing: -.01em; }
.brandpanel__sub { margin: 0; font-size: 14.5px; font-weight: 500; line-height: 1.6; color: color-mix(in srgb, var(--on-accent) 78%, transparent); max-width: 30ch; }
.brandpanel__deco { position: absolute; bottom: -28px; inset-inline-start: -24px; color: rgba(29,26,16,.13); }

/* form side */
.loginform { padding: 38px 40px; display: flex; flex-direction: column; min-width: 0; }
.loginform__head { margin-bottom: 22px; }
.loginform__title { font-family: var(--font-head); font-weight: 700; font-size: 26px; margin: 0; letter-spacing: -.01em; }
.loginform__hint { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-3); }
.loginform__body { display: flex; flex-direction: column; gap: 16px; }

/* server-side error banner (LoginError / ChangePassError / GlobalError) */
.loginform__error {
  margin: 0 0 16px; padding: 10px 13px; border-radius: var(--r-ctl);
  background: #fdf0ef; border: 1px solid #f3cdc9; color: #c0362c;
  font-size: 13.5px; font-weight: 600;
}

.lfield { display: flex; flex-direction: column; gap: 7px; }
.lfield__label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.lfield__control { position: relative; display: flex; align-items: center; }
.lfield__icon { position: absolute; inset-inline-start: 13px; color: var(--ink-3); pointer-events: none; display: flex; }
.lctl {
  width: 100%; height: 46px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-strong); background: var(--surface-2);
  padding: 0 42px; font-family: var(--font); font-size: 15px; color: var(--ink); outline: none;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.lctl::placeholder { color: var(--ink-3); }
.lctl:hover { border-color: var(--ink-3); }
.lctl:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-ring); }
.lctl:focus + .lfield__eye, .lfield__control:focus-within .lfield__icon { color: var(--accent-ink); }
.lfield__eye {
  position: absolute; inset-inline-end: 10px; width: 30px; height: 30px; border: 0; cursor: pointer;
  background: transparent; color: var(--ink-3); border-radius: 7px; display: grid; place-items: center;
  transition: color .14s, background .14s;
}
.lfield__eye:hover { color: var(--ink); background: var(--surface-3); }
.lfield__eye [hidden] { display: none; }
.lfield__eye span { display: flex; }

/* divider */
.ldivider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; margin: 2px 0; }
.ldivider::before, .ldivider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* submit */
.lbtn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; margin-top: 6px; border: 0; border-radius: var(--r-ctl); cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font); font-weight: 700; font-size: 15.5px;
  box-shadow: 0 8px 20px -8px var(--accent-ring);
  transition: background .14s, transform .05s, box-shadow .14s;
}
.lbtn:hover { background: var(--accent-dark); }
.lbtn:active { transform: translateY(1px); }
.lbtn.is-busy { background: var(--accent-dark); cursor: default; }
.lbtn:disabled { opacity: .55; cursor: default; box-shadow: none; }
.lbtn:disabled:hover { background: var(--accent); }
.lbtn__icon { transform: scaleX(-1); display: flex; }
.lspin { width: 17px; height: 17px; border-radius: 50%; border: 2.4px solid rgba(29,26,16,.3); border-top-color: var(--on-accent); animation: lspin .7s linear infinite; }
@keyframes lspin { to { transform: rotate(360deg); } }

.loginform__foot { display: flex; align-items: center; gap: 9px; justify-content: center; margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }
.loginform__foot a { color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.loginform__foot a:hover { text-decoration: underline; }
.loginform__dot { color: var(--line-strong); }

/* ---------- OTP ---------- */
.otp__phone { font-family: var(--font-head); color: var(--ink); font-weight: 600; display: inline-block; }
.otp__edit { color: var(--accent-ink); font-weight: 600; text-decoration: none; margin-inline-start: 8px; font-size: 12.5px; }
.otp__edit:hover { text-decoration: underline; }

.otpboxes { display: flex; gap: 10px; min-width: 0; }
.otpbox {
  flex: 1 1 0; width: 0; min-width: 0; height: 56px; text-align: center;
  border-radius: var(--r-ctl); border: 1.5px solid var(--line-strong); background: var(--surface-2);
  font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--ink);
  outline: none; transition: border-color .14s, box-shadow .14s, background .14s;
  -moz-appearance: textfield;
}
.otpbox::-webkit-outer-spin-button, .otpbox::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.otpbox.is-filled { background: #fff; border-color: var(--accent-ink); }
.otpbox:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-ring); }

.otp__error { font-size: 12.5px; color: #c0362c; margin-top: 2px; }

.otp__resend { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 16px; font-size: 13px; color: var(--ink-3); }
.otp__timer { color: var(--ink-2); font-weight: 600; }
.otp__resendbtn { border: 0; background: transparent; cursor: pointer; color: var(--accent-ink); font-family: var(--font); font-weight: 700; font-size: 13px; padding: 0; }
.otp__resendbtn:hover { text-decoration: underline; }

/* ---------- Password rules checklist (ChangePassword) ---------- */
.pwrules { list-style: none; margin: 0; padding: 11px 13px; display: flex; flex-direction: column; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-ctl); }
.pwrules__item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  transition: color .14s; }
.pwrules__icon { display: flex; width: 16px; height: 16px; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid var(--line-strong); color: transparent; flex-shrink: 0;
  transition: border-color .14s, background .14s, color .14s; }
.pwrules__item.is-ok { color: var(--ink-2); }
.pwrules__item.is-ok .pwrules__icon { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* responsive: stack, hide brand panel decoration */
@media (max-width: 720px) {
  .logincard { grid-template-columns: 1fr; max-width: 440px; }
  .brandpanel { padding: 26px 28px; }
  .brandpanel__mid { padding-top: 22px; }
  .brandpanel__headline { font-size: 22px; }
  .brandpanel__deco { display: none; }
  .loginform { padding: 30px 28px; }
}
