/**
 * Sign-in, 2026 design (Emmanuel 2026-10-08: "page is so so so ugly").
 * Split screen: a CINTI OS / Emma brand panel (always navy, both themes — the brand moment) beside a clean sign-in
 * card on the theme canvas. Company name comes from /api/auth/methods (tenantName): every company sees its own.
 * Loaded LAST by admin/login.html; the layout is built by admin/js/login-2026.js. All flows (SSO, password, forgot,
 * set-password, first admin, "who are you?") keep their markup and ids — only the presentation changes.
 */
:root {
  --li-ink: #0b1020;
  --li-accent: #26bdd6;
  --li-radius: 12px;
}
html[data-theme="light"] {
  --li-canvas: #f3f6f9;
  --li-card: #ffffff;
  --li-text: #0e1726;
  --li-dim: #3a4458;
  --li-field: #f6f8fb;
  --li-field-border: #c9d3dd;
  --li-primary: #0b6f86;
  --li-primary-hover: #095b6e;
  --li-card-shadow: 0 0 0 1px rgba(11,16,32,.07), 0 2px 4px rgba(11,16,32,.04), 0 18px 40px -12px rgba(11,16,32,.16);
}
html[data-theme="dark"], html:not([data-theme]) {
  --li-canvas: #0a0f1d;
  --li-card: #111a2e;
  --li-text: #e8edf5;
  --li-dim: #a8b4c8;
  --li-field: #0c1427;
  --li-field-border: #2b3a57;
  --li-primary: #26bdd6;
  --li-primary-hover: #4fcde1;
  --li-card-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 24px 60px -16px rgba(0,0,0,.6);
}

/* ── layout ─────────────────────────────────────────────────────────────── */
body.li-on {
  display: block !important; height: auto !important; min-height: 100vh; margin: 0;
  background: var(--li-canvas) !important; background-image: none !important; color: var(--li-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.li-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.li-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; position: relative; }

/* ── brand panel ────────────────────────────────────────────────────────── */
.li-brand {
  position: relative; overflow: hidden; color: #eaf2fb;
  display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px;
  background:
    radial-gradient(900px 600px at 10% 0%, rgba(38,189,214,.32), transparent 60%),
    radial-gradient(800px 700px at 100% 100%, rgba(59,91,219,.30), transparent 60%),
    linear-gradient(160deg, #0b1020 0%, #0f1d3d 55%, #0b2a3d 100%);
}
.li-brand::after {   /* faint grid, like the rest of CINTI OS */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 30%, #000 30%, transparent 75%);
}
.li-brand > * { position: relative; z-index: 1; }
.li-mark { display: flex; align-items: center; gap: 12px; font-weight: 650; letter-spacing: .01em; font-size: 15px; }
.li-mark svg { width: 34px; height: 34px; flex: 0 0 34px; }
.li-mark small { display: block; font-weight: 500; font-size: 12px; color: #a9bdd6; letter-spacing: 0; }
.li-hero h2 { margin: 0 0 12px; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; color: #fff; }
.li-hero p { margin: 0; max-width: 440px; font-size: 16px; line-height: 1.55; color: #c3d2e6; }
.li-orb {
  width: 76px; height: 76px; border-radius: 50%; margin-bottom: 28px;
  background: radial-gradient(circle at 35% 30%, #bff3fb 0%, #26bdd6 32%, #0b6f86 62%, #0b2a3d 100%);
  box-shadow: 0 0 0 10px rgba(38,189,214,.08), 0 0 60px rgba(38,189,214,.45);
}
@media (prefers-reduced-motion: no-preference) { .li-orb { animation: li-breathe 5s ease-in-out infinite; } }
@keyframes li-breathe { 50% { box-shadow: 0 0 0 14px rgba(38,189,214,.06), 0 0 80px rgba(38,189,214,.6); } }
.li-foot { font-size: 12px; color: #9fb2cc; display: flex; gap: 14px; flex-wrap: wrap; }

/* ── the card ───────────────────────────────────────────────────────────── */
body.li-on .login-box {
  position: relative; width: min(420px, 100%); padding: 36px 32px 28px !important; text-align: left !important;
  background: var(--li-card) !important; border: 0 !important; border-radius: 18px !important;
  box-shadow: var(--li-card-shadow) !important; -webkit-backdrop-filter: none; backdrop-filter: none;
}
body.li-on .login-box .logo-orb { display: none; }
body.li-on .login-box h1 { color: var(--li-text) !important; font-size: 26px !important; font-weight: 700 !important; letter-spacing: -.02em !important; margin: 0 0 6px !important; }
body.li-on .login-box .subtitle { color: var(--li-dim) !important; font-size: 14px !important; margin: 0 0 26px !important; }
body.li-on .login-box [data-cinti-theme-slot] { top: 18px !important; right: 18px !important; }

body.li-on .sso-btn {
  height: 46px; padding: 0 16px !important; margin-bottom: 10px !important; border-radius: 10px !important;
  font-size: 14.5px !important; font-weight: 600 !important; gap: 12px !important;
  background: var(--li-field) !important; color: var(--li-text) !important;
  border: 1px solid var(--li-field-border) !important; box-shadow: 0 1px 2px rgba(11,16,32,.05);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
html[data-theme="light"] body.li-on .sso-btn { background: #fff !important; }
body.li-on .sso-btn:hover { border-color: var(--li-primary) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--li-primary) 16%, transparent); }
body.li-on .sso-btn[data-not-configured="1"] { opacity: .55 !important; }
body.li-on .sso-btn[data-not-configured="1"]::after {
  content: "not set up" !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important;
  background: transparent !important; color: var(--li-dim) !important; padding: 0 !important; margin-left: 4px !important; font-size: 12px !important;
}

/* "or" divider before the password form */
body.li-on #password-form > div[data-i18n="login.signInPassword"] {
  display: flex !important; align-items: center; gap: 12px; margin: 18px 0 14px !important;
  font-size: 12px !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--li-dim) !important; font-weight: 500;
}
body.li-on #password-form > div[data-i18n="login.signInPassword"]::before,
body.li-on #password-form > div[data-i18n="login.signInPassword"]::after { content: ""; flex: 1; height: 1px; background: var(--li-field-border); }

body.li-on .login-box input[type="text"], body.li-on .login-box input[type="password"], body.li-on .login-box input[type="email"], body.li-on .login-box textarea {
  height: 46px; padding: 0 14px !important; border-radius: 10px !important; font-size: 14.5px !important; margin-bottom: 10px !important;
  background: var(--li-field) !important; color: var(--li-text) !important; border: 1px solid var(--li-field-border) !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}
body.li-on .login-box textarea { height: auto; padding: 10px 14px !important; }
body.li-on .login-box input::placeholder { color: color-mix(in srgb, var(--li-dim) 85%, transparent); }
body.li-on .login-box input:focus { outline: none; border-color: var(--li-primary) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--li-primary) 22%, transparent); }

/* primary buttons: solid brand */
body.li-on #pw-submit, body.li-on #fg-submit, body.li-on #sp-submit, body.li-on #fa-submit, body.li-on #access-req .ar-send {
  height: 46px; border-radius: 10px !important; font-size: 14.5px !important; font-weight: 650 !important; margin-top: 4px;
  background: var(--li-primary) !important; border: 0 !important; color: #fff !important;
  box-shadow: 0 1px 2px rgba(11,16,32,.12), inset 0 1px 0 rgba(255,255,255,.18);
}
html[data-theme="dark"] body.li-on #pw-submit, html[data-theme="dark"] body.li-on #fg-submit, html[data-theme="dark"] body.li-on #sp-submit,
html[data-theme="dark"] body.li-on #fa-submit, html[data-theme="dark"] body.li-on #access-req .ar-send { color: #04202a !important; }
body.li-on #pw-submit:hover, body.li-on #fg-submit:hover, body.li-on #sp-submit:hover, body.li-on #fa-submit:hover { background: var(--li-primary-hover) !important; }

body.li-on .pw-link { color: var(--li-primary) !important; font-weight: 500; }
html[data-theme="light"] body.li-on .pw-link { color: #0e5f73 !important; }
body.li-on .loading { color: var(--li-dim) !important; font-size: 13px !important; }
body.li-on .error { font-size: 13px !important; }
body.li-on .admin-note { font-size: 12.5px !important; color: var(--li-dim) !important; margin-top: 22px !important; text-align: center; }
body.li-on :focus-visible { outline: 2px solid var(--li-primary); outline-offset: 2px; }

/* ── phone / narrow ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .li-shell { grid-template-columns: 1fr; }
  .li-brand { padding: 22px 20px 26px; min-height: 0; }
  .li-hero h2 { font-size: 26px; margin-bottom: 6px; }
  .li-hero p { font-size: 14px; }
  .li-orb { width: 44px; height: 44px; margin: 18px 0 14px; }
  .li-foot { display: none; }
  .li-main { padding: 20px 16px 40px; align-items: flex-start; }
  body.li-on .login-box { padding: 28px 20px 22px !important; }
}
