/* ============================================================
   DropinAdmin — Authentication pages (login / sign-up)
   Split layout: navy brand panel + light form panel.
   Reuses tokens & .console motif from site.css.
   Honors .dir-modern / .dir-faithful directions.
   ============================================================ */

.auth-body { min-height: 100vh; background: var(--bg); }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
}

/* ---------- BRAND PANEL ---------- */
.auth-brand {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(40px, 4.5vw, 64px);
}
.auth-brand::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(820px 520px at 14% -8%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 60%),
    linear-gradient(180deg, #0c1322, #0e1626 58%, #0c1322);
}
.auth-brand::after {
  content: "";
  position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(820px 620px at 20% 0%, #000, transparent 76%);
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-brand .brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-head); font-weight: 800; font-size: 21px;
  letter-spacing: -.03em; color: #fff;
}
.auth-brand .brand .mark {
  width: 36px; height: 36px; border-radius: 9px; background: rgba(255,255,255,.06);
  color: #5bff9b; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 15px; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}
.auth-brand .brand b { color: var(--accent); }

.auth-brand-mid { max-width: 460px; }
.auth-brand-mid .eyebrow { color: #6ab4ff; }
.auth-brand-mid .eyebrow::before { color: #6ab4ff; }
.auth-brand-mid h2 {
  color: #fff; font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.1; margin-top: 16px;
}
.auth-brand-mid h2 .hl { color: var(--accent); }
.auth-brand-mid p {
  color: #b9c6d8; font-size: 16px; line-height: 1.6; margin-top: 16px;
}

/* console reused from site.css; sizing tweaks for auth */
.auth-brand .console { margin-top: 28px; }

/* trust mini-row at the bottom of the brand panel */
.auth-trust {
  display: grid; grid-template-columns: repeat(3, auto);
  gap: 30px; align-items: end;
}
.auth-trust .at-v {
  font-family: var(--font-head); font-weight: 800; font-size: 26px;
  color: #fff; letter-spacing: -.02em; line-height: 1;
}
.auth-trust .at-v .u { color: var(--accent); }
.auth-trust .at-l {
  font-size: 12px; color: #8493a8; margin-top: 6px; line-height: 1.4;
}

/* ---------- FORM PANEL ---------- */
.auth-main {
  display: flex; flex-direction: column;
  padding: clamp(28px, 4vw, 52px) clamp(24px, 4vw, 56px);
  background: var(--bg);
}
.auth-topbar {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; font-size: 14px; color: var(--ink-3);
}
.auth-topbar a { color: var(--accent); font-weight: 700; }
.auth-topbar a:hover { text-decoration: underline; }
.auth-topbar .back {
  margin-right: auto; color: var(--ink-3); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.auth-topbar .back:hover { color: var(--ink); text-decoration: none; }

.auth-card {
  width: 100%; max-width: 432px;
  margin: auto;
  padding-block: 40px;
}
.auth-head { margin-bottom: 28px; }
.auth-head .kicker {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.auth-head h1 {
  font-size: clamp(28px, 3vw, 34px); margin-top: 12px;
  letter-spacing: -.02em;
}
.auth-head p { color: var(--ink-2); font-size: 15.5px; margin-top: 10px; }

/* ---------- FIELDS ---------- */
.auth-form { display: grid; gap: 17px; }
.field { display: grid; gap: 7px; }
.field > label {
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}
.field > label .opt { font-weight: 500; color: var(--ink-3); font-size: 12.5px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .lead-ico {
  position: absolute; left: 15px; color: var(--ink-3); font-size: 14px;
  pointer-events: none;
}
.input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 11px; padding: 13px 15px; transition: .16s ease;
}
.input::placeholder { color: var(--ink-3); }
.input.has-lead { padding-left: 43px; }
.input.has-trail { padding-right: 46px; }
.input:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}
.input:focus + .lead-ico, .input-wrap:focus-within .lead-ico { color: var(--accent); }

.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: none; background: transparent;
  color: var(--ink-3); border-radius: 8px; display: grid; place-items: center;
  font-size: 14px; transition: .15s;
}
.pw-toggle:hover { color: var(--ink); background: var(--bg-2); }

/* validation states */
.field.is-error .input { border-color: #e0564f; }
.field.is-error .input:focus { box-shadow: 0 0 0 4px rgba(224,86,79,.14); }
.field.is-valid .input { border-color: #2bbf7e; }
.field-msg {
  font-size: 12.5px; display: none; align-items: center; gap: 6px; margin-top: 1px;
}
.field-msg i { font-size: 11px; }
.field.is-error .field-msg.err { display: flex; color: #d8483f; }
.field.is-valid .field-msg.ok { display: flex; color: #1f9d68; }

/* password strength meter */
.strength { margin-top: 9px; display: none; }
.field.show-strength .strength { display: block; }
.strength-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.strength-bars span {
  height: 5px; border-radius: 999px; background: var(--line);
  transition: background .2s ease;
}
.strength-label {
  font-size: 12px; color: var(--ink-3); margin-top: 7px;
  font-family: var(--font-mono); letter-spacing: .02em;
}
.strength-label b { color: var(--ink-2); font-weight: 700; }
.strength[data-score="1"] .strength-bars span:nth-child(-n+1) { background: #e0564f; }
.strength[data-score="2"] .strength-bars span:nth-child(-n+2) { background: #f0a92e; }
.strength[data-score="3"] .strength-bars span:nth-child(-n+3) { background: #3aa3ff; }
.strength[data-score="4"] .strength-bars span:nth-child(-n+4) { background: #2bbf7e; }

/* row: remember + forgot */
.field-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 2px;
}
.checkline { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.checkline input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkline .box {
  width: 19px; height: 19px; border: 1.5px solid var(--line); border-radius: 6px;
  background: var(--surface); display: grid; place-items: center;
  color: #fff; font-size: 10px; transition: .15s; flex: none;
}
.checkline .box i { opacity: 0; transform: scale(.5); transition: .15s; }
.checkline input:checked + .box { background: var(--accent); border-color: var(--accent); }
.checkline input:checked + .box i { opacity: 1; transform: none; }
.checkline input:focus-visible + .box { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.checkline .lbl { font-size: 13.5px; color: var(--ink-2); }
.forgot { font-size: 13.5px; font-weight: 700; color: var(--accent); }
.forgot:hover { text-decoration: underline; }

.auth-form .btn { margin-top: 6px; }

/* terms line (signup) */
.terms { display: flex; gap: 10px; align-items: flex-start; }
.terms .lbl { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.terms .lbl a { color: var(--accent); font-weight: 600; }
.terms .lbl a:hover { text-decoration: underline; }
.terms .box { margin-top: 1px; }

/* swap line at bottom */
.auth-swap {
  text-align: center; font-size: 14.5px; color: var(--ink-2);
  margin-top: 26px;
}
.auth-swap a { color: var(--accent); font-weight: 700; }
.auth-swap a:hover { text-decoration: underline; }

/* alert box (global errors) */
.auth-alert[hidden] { display: none; }
.auth-alert {
  display: flex; gap: 11px; align-items: flex-start;
  background: color-mix(in srgb, #e0564f 9%, var(--surface));
  border: 1px solid color-mix(in srgb, #e0564f 30%, var(--line));
  border-radius: 11px; padding: 13px 15px; margin-bottom: 22px;
  font-size: 13.5px; color: #b23f38; line-height: 1.5;
}
.auth-alert i { margin-top: 2px; color: #e0564f; }

/* ============================================================
   FAITHFUL DIRECTION — light brand panel like the faithful hero
   ============================================================ */
.dir-faithful .auth-brand {
  background: linear-gradient(180deg, #eaf3ff, #f6faff);
  color: var(--ink);
}
.dir-faithful .auth-brand::before {
  background: radial-gradient(720px 480px at 16% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%);
}
.dir-faithful .auth-brand::after {
  background-image:
    linear-gradient(rgba(20,40,80,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,40,80,.045) 1px, transparent 1px);
}
.dir-faithful .auth-brand .brand { color: var(--ink); }
.dir-faithful .auth-brand .brand .mark { background: var(--navy); }
.dir-faithful .auth-brand-mid h2 { color: var(--ink); }
.dir-faithful .auth-brand-mid p { color: var(--ink-2); }
.dir-faithful .auth-trust .at-v { color: var(--ink); }
.dir-faithful .auth-trust .at-l { color: var(--ink-3); }
.dir-faithful .auth-head .kicker { color: var(--ink-3); }
.dir-faithful .auth-card .btn { border-radius: 7px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand {
    min-height: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 20px 40px;
    padding: 24px clamp(20px, 5vw, 40px);
  }
  .auth-brand-mid, .auth-brand .console { display: none; }
  .auth-trust { margin-left: auto; gap: 22px; }
  .auth-trust .at-v { font-size: 20px; }
  .auth-main { min-height: auto; }
  .auth-card { padding-block: 28px; }
}
@media (max-width: 560px) {
  .auth-trust { display: none; }
  .auth-topbar .back span { display: none; }
  .auth-main { padding: 22px; }
  .field-row { flex-direction: row; }
}
