/* =========================================================
   Kashi Anandwan — admin auth pages (login, forgot password)
   Tokens mirror ui-demo/assets/css/style.css
   ========================================================= */

:root {
  --bg: #fffdf8;
  --bg-soft: #fff7ec;
  --bg-tint: #f8fafc;
  --card: #ffffff;
  --border: #f1e6d6;
  --border-strong: #f3c9a8;

  --crimson: #c1121f;
  --orange: #ff6b35;
  --saffron: #e8590c;
  --gold: #f4a300;
  --green: #15803d;

  --ink: #1a1a1a;
  --heading: #141a2e;
  --text: #374151;
  --muted: #6b7280;
  --dim: #9ca3af;

  --grad: linear-gradient(90deg, #c1121f 0%, #ff6b35 100%);
  --grad-text: linear-gradient(90deg, #e8590c 0%, #f4a300 100%);

  --shadow-sm: 0 1px 2px rgba(20, 26, 46, .04), 0 2px 8px rgba(20, 26, 46, .04);
  --shadow-lg: 0 24px 50px -18px rgba(193, 18, 31, .25);
  --shadow-btn: 0 8px 20px -6px rgba(193, 18, 31, .45);

  --radius: 20px;
  --font-display: "Playfair Display", "Tiro Devanagari Hindi", Georgia, serif;
  --font-body: "Inter", "Noto Sans Devanagari", system-ui, sans-serif;
  --font-deva: "Tiro Devanagari Hindi", "Noto Sans Devanagari", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--text);
  background:
    radial-gradient(circle at 50% 0, rgba(253, 184, 19, .07), transparent 45%),
    radial-gradient(circle at 0 100%, rgba(255, 107, 53, .05), transparent 40%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--saffron); text-decoration: none; font-weight: 600; }
a:hover { color: var(--crimson); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
h1, h2 { margin: 0; line-height: 1.2; color: var(--heading); }
.deva { font-family: var(--font-deva); }
[hidden] { display: none !important; }

/* ---------- Split layout ---------- */
.auth { min-height: 100dvh; display: grid; }
.auth-side {
  position: relative; overflow: hidden; display: none;
  background: var(--grad); color: #fff; padding: 48px;
}
.auth-side::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
}
.auth-side::after {
  content: "ॐ"; position: absolute; right: -40px; bottom: -90px;
  font-family: var(--font-deva); font-size: 420px; line-height: 1; color: rgba(255, 255, 255, .09);
}
.auth-side-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-side .brand { gap: 18px; }
.auth-side .brand img { width: 96px; height: 96px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .9), 0 12px 30px rgba(0, 0, 0, .22); }
.auth-side .brand-text strong { background: none; color: #fff; -webkit-text-fill-color: #fff; font-size: 30px; }
.auth-side .brand-text small { color: #ffe1c8; font-size: 12px; margin-top: 6px; }
.auth-side h2 { font-family: var(--font-display); color: #fff; font-size: 2.4rem; max-width: 420px; }
.auth-side h2 .deva { display: block; font-size: 1.4rem; color: #ffe1c8; margin-bottom: 10px; font-weight: 400; }
.auth-side p { color: rgba(255, 255, 255, .88); max-width: 400px; margin: 14px 0 0; }
.auth-side-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }

/* Feature highlights on the brand panel */
.perks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; max-width: 420px; }
.perks li {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.perks .ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--crimson); }
.perks .ico svg { width: 20px; height: 20px; }
.perks b { display: block; font-size: 14px; color: #fff; line-height: 1.3; }
.perks small { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .8); line-height: 1.4; }

.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card {
  position: relative; overflow: hidden;
  width: 100%; max-width: 440px; padding: 28px 22px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--grad); }

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(232, 89, 12, .25); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 20px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-text small { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--saffron); font-weight: 700; margin-top: 3px; }
.auth-card .brand { margin-bottom: 24px; gap: 14px; }
.auth-card .brand img { width: 64px; height: 64px; }
.auth-card .brand-text strong { font-size: 22px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700;
  color: var(--crimson); padding: 6px 12px; border-radius: 999px; background: #fff4ee; border: 1px solid #ffd9c7;
}
.eyebrow::before { content: "✦"; color: var(--orange); font-size: 12px; }
.auth-title { font-family: var(--font-display); font-size: 1.75rem; margin: 14px 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 22px; font-size: .95rem; }
.auth-sub b { color: var(--ink); word-break: break-all; }
.auth-copy { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12px; color: var(--dim); text-align: center; }

/* ---------- Developer credit ---------- */
.credit {
  display: inline-flex; align-items: baseline; gap: 5px; flex-wrap: wrap; justify-content: center;
  font-size: 12.5px; font-weight: 500; letter-spacing: .01em; text-transform: none; line-height: 1.4;
}
.credit-brand { position: relative; font-weight: 700; padding-bottom: 1px; }
.credit-brand::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.credit:hover .credit-brand::after, .credit:focus-visible .credit-brand::after { transform: scaleX(1); }

/* On light backgrounds: muted text, brand name in the saffron gradient */
.credit-light { color: var(--dim); }
.credit-light .credit-brand { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.credit-light .credit-brand::after { background: var(--grad); }

/* On the red brand panel */
.credit-dark { color: rgba(255, 255, 255, .7); }
.credit-dark .credit-brand { color: #fff; }
.credit-dark .credit-brand::after { background: #ffcf9e; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 16px; }
.field label { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.field-row label { margin: 0; }
.field-row a { font-size: 13px; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--dim); pointer-events: none; }
.input {
  width: 100%; min-height: 50px; padding: 12px 16px 12px 46px; border-radius: 12px;
  background: var(--bg-tint); border: 1.5px solid #e5e7eb; color: var(--ink); font-size: 16px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--dim); }
.input:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(255, 107, 53, .14); }
.input.is-invalid { border-color: var(--crimson); background: #fff8f8; }
.input-wrap .input.has-toggle { padding-right: 52px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 40px; height: 40px;
  display: grid; place-items: center; border: 0; background: none; border-radius: 10px; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--crimson); background: #fff4ee; }
.pw-toggle svg { width: 20px; height: 20px; }
.field-error { color: var(--crimson); font-size: 13px; margin: 6px 0 0; }
.field-error:empty { display: none; }
.field-hint { color: var(--muted); font-size: 12px; margin: 6px 0 0; }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--crimson); margin: 0; }

/* ---------- OTP boxes ---------- */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp input {
  width: 100%; aspect-ratio: 1 / 1.1; min-width: 0; text-align: center; font-size: 22px; font-weight: 700; color: var(--heading);
  border-radius: 12px; background: var(--bg-tint); border: 1.5px solid #e5e7eb; transition: border-color .2s, box-shadow .2s, background .2s;
}
.otp input:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(255, 107, 53, .14); }
.otp.is-invalid input { border-color: var(--crimson); background: #fff8f8; }
.otp-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.link-btn { border: 0; background: none; padding: 0; color: var(--saffron); font-weight: 600; cursor: pointer; font-size: 13px; }
.link-btn:hover { color: var(--crimson); }
.link-btn:disabled { color: var(--dim); cursor: not-allowed; }

/* ---------- Steps ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 22px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: #f1e6d6; transition: background .3s; }
.steps span.done { background: var(--grad); }
.step-panel { animation: rise .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 12px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -8px rgba(193, 18, 31, .55); }
.btn-ghost { background: #fff; color: var(--crimson); border: 1.5px solid var(--crimson); }
.btn-ghost:hover { background: var(--crimson); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .7; cursor: default; transform: none; }
.btn[aria-busy="true"] { cursor: progress; } /* only while saving (UI.busy) */
.btn svg { width: 18px; height: 18px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.back-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 14px; }
.back-link svg { width: 16px; height: 16px; }
.center { text-align: center; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; border: 1px solid; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert-error { color: #9f1239; background: #fff1f2; border-color: #fecdd3; }
.alert-success { color: var(--green); background: #f0fdf4; border-color: #bbf7d0; }
.alert-info { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }

.success-mark {
  width: 72px; height: 72px; margin: 4px auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: var(--shadow-btn);
}
.success-mark svg { width: 34px; height: 34px; }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 560px) {
  .auth-card { padding: 36px 34px; }
  .otp { gap: 10px; }
}
/* Desktop: the whole layout fits the screen, no page scroll. */
@media (min-width: 960px) {
  .auth { grid-template-columns: 1.05fr 1fr; height: 100dvh; overflow: hidden; }
  .auth-side { display: block; padding: clamp(28px, 6vh, 56px) clamp(32px, 4.5vw, 64px); }
  .auth-card .brand { display: none; }
  .auth-main { padding: 24px 48px; overflow-y: auto; }
  .auth-copy { display: none; }
}

/* Short laptop screens: tighten vertical rhythm so everything still fits. */
@media (min-width: 960px) and (max-height: 760px) {
  .auth-side .brand img { width: 76px; height: 76px; }
  .auth-side .brand-text strong { font-size: 26px; }
  .auth-side h2 { font-size: 2rem; }
  .auth-side h2 .deva { font-size: 1.2rem; margin-bottom: 6px; }
  .auth-side p { margin-top: 10px; font-size: .95rem; }
  .perks { margin-top: 18px; gap: 8px; }
  .perks li { padding: 8px 12px; }
  .perks .ico { width: 32px; height: 32px; }
  .perks small { display: none; }

  .auth-card { padding: 26px 32px; }
  .auth-title { font-size: 1.55rem; margin: 10px 0 4px; }
  .auth-sub { margin-bottom: 16px; }
  .form-grid { gap: 12px; }
  .input, .btn { min-height: 46px; }
  .alert { margin-bottom: 12px; padding: 10px 12px; }
  .steps { margin-bottom: 16px; }
  .back-link { margin-top: 12px; }
}

@media (min-width: 960px) and (max-height: 600px) {
  .perks { display: none; }
}
