/* ============================================================
   MERION — AUTH PROTOTYPE
   Two layout shells (split / center) × light/dark, one flow.
   ============================================================ */

.auth-root { min-height: 100vh; background: var(--background); color: var(--foreground);
  font-family: var(--ui-font); display: flex; flex-direction: column; }

/* ---------- floating controls (theme + layout) ---------- */
.auth-controls { position: fixed; top: 18px; right: 18px; z-index: 50; display: flex; gap: 10px;
  background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px; box-shadow: var(--shadow-sm); }
.auth-seg { display: inline-flex; background: var(--secondary); border-radius: 999px; padding: 3px; }
.auth-seg button { border: none; background: transparent; cursor: pointer; font-family: var(--ui-font);
  font-size: 12.5px; font-weight: 600; color: var(--muted-foreground); padding: 6px 12px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; transition: .14s ease; }
.auth-seg button .ic { font-size: 15px; }
.auth-seg button[data-active="true"] { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-sm); }

/* ============================================================
   SPLIT SHELL — brand panel + form column
   ============================================================ */
.split-shell { flex: 1; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); min-height: 100vh; }
.split-form { display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 40px; }
.split-form .auth-screen { width: 100%; max-width: 400px; }

/* brand panel — always deep gunmetal with cyan signature */
.split-brand { position: relative; overflow: hidden; background: #050F13; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; padding: 48px; isolation: isolate; }
.split-brand .bp-wordmark { position: relative; z-index: 2; }
.split-brand .bp-body { position: relative; z-index: 2; max-width: 460px; }
.split-brand .bp-kicker { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #00FFD4; margin-bottom: 18px; }
.split-brand .bp-tagline { font-size: 46px; font-weight: 700; line-height: 1.04; letter-spacing: -.02em; margin: 0 0 20px; }
.split-brand .bp-text { font-size: 16px; font-weight: 300; line-height: 1.8; letter-spacing: .02em;
  color: rgba(255,255,255,.72); margin: 0; }
.split-brand .bp-foot { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.split-brand .bp-foot .ic { font-size: 15px; color: #00FFD4; }

/* compass watermark + neon glow */
.split-brand .bp-mark { position: absolute; z-index: 1; right: -120px; top: 50%; transform: translateY(-50%);
  width: 620px; height: 620px; opacity: .5; }
.split-brand .bp-glow { position: absolute; z-index: 0; width: 520px; height: 520px; border-radius: 50%;
  right: -160px; top: 18%; background: radial-gradient(circle, rgba(0,255,212,.20), transparent 62%); filter: blur(8px); }
.split-brand .bp-rings { position: absolute; z-index: 0; inset: 0; opacity: .5;
  background-image: radial-gradient(circle at 78% 42%, transparent 0, transparent 158px, rgba(0,255,212,.10) 159px, transparent 161px),
    radial-gradient(circle at 78% 42%, transparent 0, transparent 238px, rgba(0,255,212,.07) 239px, transparent 241px),
    radial-gradient(circle at 78% 42%, transparent 0, transparent 318px, rgba(0,255,212,.05) 319px, transparent 321px); }

/* ============================================================
   CENTER SHELL — single focused card
   ============================================================ */
.center-shell { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 24px; position: relative; overflow: hidden; }
.center-shell .cs-bg { position: absolute; inset: 0; z-index: 0; }
[data-theme="light"] .center-shell { background:
  radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--brand) 8%, var(--background)), var(--background) 60%); }
[data-theme="dark"] .center-shell { background:
  radial-gradient(110% 70% at 50% -8%, color-mix(in srgb, var(--brand) 14%, var(--background)), var(--background) 58%); }
.center-shell .cs-mark { position: absolute; z-index: 0; top: 50%; left: 50%; width: 760px; height: 760px;
  transform: translate(-50%, -50%); opacity: .04; pointer-events: none; }
.center-wordmark { position: relative; z-index: 2; margin-bottom: 26px; }
.center-card { position: relative; z-index: 2; width: 100%; max-width: 428px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 38px 36px;
  box-shadow: var(--shadow); }
.center-card .auth-screen { width: 100%; }
.center-foot { position: relative; z-index: 2; margin-top: 24px; font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted-foreground); }

/* ============================================================
   SCREEN CONTENT (shared by both shells)
   ============================================================ */
.auth-screen { animation: auth-in .32s cubic-bezier(.16,.84,.44,1) both; }
@keyframes auth-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.auth-head { margin-bottom: 26px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer;
  font-family: var(--ui-font); font-size: 13px; font-weight: 500; color: var(--muted-foreground);
  padding: 0; margin-bottom: 18px; transition: color .14s ease; }
.auth-back:hover { color: var(--foreground); }
.auth-back .ic { font-size: 16px; }
.auth-kicker { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px; }
.auth-title { font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 8px; }
.auth-sub { font-size: 14.5px; font-weight: 300; line-height: 1.6; letter-spacing: .01em;
  color: var(--muted-foreground); margin: 0; }
.auth-sub strong { color: var(--foreground); font-weight: 600; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-row-between .checkbox-row { white-space: nowrap; }
.auth-row-between .auth-link { white-space: nowrap; }
.auth-alt .auth-link { white-space: nowrap; }
.auth-link { background: none; border: none; cursor: pointer; font-family: var(--ui-font); padding: 0;
  font-size: 13.5px; font-weight: 600; color: var(--brand); transition: opacity .14s ease; }
.auth-link:hover { opacity: .78; }
.auth-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.auth-actions .btn { width: 100%; }
.auth-actions a.btn { text-decoration: none; }
.btn-xl { height: 50px; font-size: 15px; border-radius: var(--radius-md); }

.auth-alt { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--muted-foreground); }
.auth-alt .auth-link { font-size: 13.5px; }

/* divider with label */
.auth-divider { display: flex; align-items: center; gap: 14px; color: var(--muted-foreground);
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 6px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* SSO provider button */
.sso-btn { width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--card); border: var(--border-weight,1px) solid var(--border-strong); border-radius: var(--radius);
  font-family: var(--ui-font); font-size: 14px; font-weight: 600; color: var(--foreground); cursor: pointer;
  transition: .14s ease; }
.sso-btn:hover { background: var(--accent); border-color: var(--brand); }
.sso-btn .ic { font-size: 19px; color: var(--brand); }

/* password field */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 42px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center; border: none; background: none; cursor: pointer;
  color: var(--muted-foreground); border-radius: var(--radius); }
.pw-toggle:hover { color: var(--foreground); background: var(--accent); }
.pw-toggle .ic { font-size: 17px; }

/* strength meter */
.strength { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.strength-track { display: flex; gap: 4px; }
.strength-seg { flex: 1; height: 4px; border-radius: 999px; background: var(--border); transition: background .2s ease; }
.strength-lbl { font-size: 12px; font-weight: 500; color: var(--muted-foreground); }

/* OTP input */
.otp-row { display: flex; gap: 10px; justify-content: space-between; }
.otp-box { width: 100%; aspect-ratio: 1 / 1.12; max-width: 56px; text-align: center; font-family: var(--ui-font);
  font-size: 24px; font-weight: 600; color: var(--foreground); background: var(--background);
  border: var(--border-weight,1px) solid var(--input); border-radius: var(--radius); outline: none;
  font-variant-numeric: tabular-nums; transition: border-color .14s ease, box-shadow .14s ease; }
.otp-box:focus { border-color: var(--brand); box-shadow: var(--focus-glow); }
.otp-box[data-filled="true"] { border-color: var(--brand); }

/* success mark */
.auth-success-mark { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); margin-bottom: 20px; }
.auth-success-mark .ic { font-size: 32px; }

/* resend countdown */
.otp-resend { text-align: center; font-size: 13px; color: var(--muted-foreground); margin-top: 16px; }

/* trust row under forms */
.auth-trust { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px;
  font-size: 12px; color: var(--muted-foreground); }
.auth-trust .ic { font-size: 15px; color: var(--brand); }

/* responsive: collapse split to center on small screens */
@media (max-width: 880px) {
  .split-shell { grid-template-columns: 1fr; }
  .split-brand { display: none; }
  .split-form { padding: 80px 24px 48px; }
}
