:root {
  color-scheme: dark;
  --bg: #070a14;
  --panel: rgba(10, 15, 29, .88);
  --line: rgba(148, 163, 184, .2);
  --muted: #8994aa;
  --text: #f5f7ff;
  --cyan: #69d2ff;
  --violet: #8b8cff;
  --danger: #fda4af;

  /* Precision Radii Tokens */
  --radius-panel: 10px;
  --radius-field: 6px;
  --radius-btn: 6px;
  --radius-badge: 4px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh; margin: 0; color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  background: radial-gradient(circle at 18% 18%, rgba(88, 91, 255, .16), transparent 32%), radial-gradient(circle at 82% 75%, rgba(50, 196, 255, .12), transparent 28%), #070a14;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.login-atmosphere {
  position: fixed; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}
.skip-link { position: fixed; z-index: 10; top: -4rem; left: 1rem; padding: .7rem 1rem; color: #08101e; background: #fff; }
.skip-link:focus { top: 1rem; }
.login-shell { width: min(1180px, calc(100% - 2rem)); min-height: 100vh; margin: auto; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(380px, .72fr); align-items: center; gap: clamp(3rem, 8vw, 7rem); padding: 3rem 0; }
.login-intro { min-width: 0; }
.brand { width: fit-content; display: inline-flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none; }
.brand svg { width: 2.75rem; fill: url(#logo-gradient); }
.brand .orbit, .brand .mark { fill: none; stroke: url(#logo-gradient); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand span { display: grid; gap: .1rem; }
.brand strong { font-family: Outfit, sans-serif; font-size: 1.3rem; letter-spacing: .05em; }
.brand small { color: #748198; font-size: .52rem; letter-spacing: .12em; }
.intro-copy { margin-top: clamp(4rem, 10vh, 7rem); }
.eyebrow { display: flex; align-items: center; gap: .6rem; color: #aeb7ca; font-size: .68rem; font-weight: 700; letter-spacing: .14em; }
.eyebrow span { width: 1.8rem; height: 1px; background: var(--cyan); }
h1 { max-width: 760px; margin: 1rem 0 1.2rem; font: 700 clamp(2.8rem, 6vw, 5.2rem)/.98 Outfit, sans-serif; letter-spacing: -.05em; }
h1 em { color: transparent; font-style: normal; background: linear-gradient(90deg, #aab2ff, #69d2ff, #c083ff); background-clip: text; }
.intro-copy > p:last-child { max-width: 650px; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.login-benefits { max-width: 690px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin: 3rem 0 0; padding: 0; list-style: none; }
.login-benefits li { display: flex; gap: .8rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.login-benefits i { color: var(--cyan); font: normal 700 .65rem Outfit, sans-serif; }
.login-benefits span { display: grid; gap: .35rem; color: #7f8ba2; font-size: .72rem; line-height: 1.5; }
.login-benefits strong { color: #dce3f2; font-size: .78rem; }
.login-panel { position: relative; padding: clamp(1.25rem, 3.5vw, 1.85rem); background: linear-gradient(145deg, rgba(15,22,40,.94), rgba(7,11,22,.96)); border: 1px solid rgba(148,163,184,.22); border-radius: var(--radius-panel); box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.04); backdrop-filter: blur(24px); }
.login-panel::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: linear-gradient(135deg, rgba(139,140,255,.45), transparent 35%, rgba(82,199,255,.26)); filter: blur(8px); opacity: .4; }
.demo-badge { width: fit-content; display: flex; align-items: center; gap: .45rem; padding: .3rem .5rem; color: #b9f1d6; background: rgba(16,185,129,.08); border: 1px solid rgba(52,211,153,.22); border-radius: var(--radius-badge); font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.demo-badge span { width: .42rem; height: .42rem; background: #34d399; border-radius: 50%; box-shadow: 0 0 10px #34d399; }
.login-panel header { margin: 1.2rem 0 1.5rem; }
.login-panel header p { margin: 0 0 .35rem; color: var(--cyan); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.login-panel h2 { margin: 0 0 .55rem; font: 700 clamp(1.65rem, 4vw, 2.15rem) Outfit, sans-serif; }
.login-panel header span { color: var(--muted); font-size: .78rem; line-height: 1.5; }
form { display: grid; gap: .7rem; }
label, .label-row { color: #cbd5e1; font-size: .72rem; font-weight: 600; }
.label-row { display: flex; align-items: center; justify-content: space-between; margin-top: .45rem; }
.field { min-height: 2.75rem; display: flex; align-items: center; gap: .65rem; padding: 0 .85rem; background: rgba(3,7,18,.52); border: 1px solid rgba(100,116,139,.4); border-radius: var(--radius-field); transition: border-color .18s, box-shadow .18s; }
.field:focus-within { border-color: rgba(105,210,255,.72); box-shadow: 0 0 0 3px rgba(56,189,248,.1); }
.field.is-invalid { border-color: rgba(251,113,133,.75); }
.field svg { width: 1rem; fill: none; stroke: #64748b; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.field input { width: 100%; min-width: 0; padding: .65rem 0; color: #eef2ff; background: transparent; border: 0; outline: 0; }
.field input::placeholder { color: #4d596f; }
.password-toggle { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; flex: 0 0 auto; color: #7f8ba2; cursor: pointer; background: transparent; border: 0; border-radius: .4rem; }
.password-toggle:hover, .password-toggle:focus-visible { color: var(--cyan); background: rgba(56,189,248,.08); outline: none; }
.password-toggle svg { width: 1.05rem; stroke: currentColor; }
.text-button { padding: 0; color: #8bcfff; cursor: pointer; background: none; border: 0; font-size: .68rem; }
.text-button:hover, .text-button:focus-visible { color: #d8f3ff; text-decoration: underline; outline: none; }
.remember { width: fit-content; display: flex; align-items: center; gap: .5rem; margin: .35rem 0; color: #8d99ae; cursor: pointer; font-weight: 500; }
.remember input { accent-color: #7477ff; }
.form-message { min-height: 1.1rem; margin: 0; color: var(--danger); font-size: .7rem; }
.submit-button { min-height: 2.75rem; display: flex; align-items: center; justify-content: center; gap: .8rem; color: #fff; cursor: pointer; background: linear-gradient(100deg, #696cff, #4baee9); border: 0; border-radius: var(--radius-btn); font-weight: 700; box-shadow: 0 10px 24px rgba(77,93,238,.22); transition: transform .18s, filter .18s; }
.submit-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.submit-button:focus-visible { outline: 2px solid #dbeafe; outline-offset: 3px; }
.submit-button:disabled { cursor: wait; opacity: .7; }
.demo-access { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-top: 1.2rem; padding: .65rem .85rem; color: #7f8ba2; background: rgba(3,7,18,.38); border: 1px dashed rgba(100,116,139,.34); border-radius: var(--radius-field); font-size: .62rem; }
.demo-access span { margin-right: auto; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.demo-access code { padding: .25rem .35rem; color: #cbd5e1; background: rgba(100,116,139,.12); border-radius: 3px; }
.register-copy { margin: 1.2rem 0 .9rem; color: #78859a; text-align: center; font-size: .7rem; }
.back-link { display: block; color: #738096; text-align: center; text-decoration: none; font-size: .68rem; }
.back-link:hover, .back-link:focus-visible { color: #cbd5e1; }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 20; max-width: min(360px, calc(100% - 2rem)); padding: .85rem 1rem; color: #dbeafe; background: rgba(15,23,42,.98); border: 1px solid rgba(96,165,250,.35); border-radius: var(--radius-field); box-shadow: 0 16px 42px rgba(0,0,0,.4); font-size: .75rem; }
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; gap: 2.5rem; padding: 1.5rem 0 3rem; }
  .intro-copy { margin-top: 3rem; }
  .login-benefits { display: none; }
}
@media (max-width: 520px) {
  .login-shell { width: min(100% - 1rem, 460px); }
  h1 { font-size: clamp(2.4rem, 13vw, 3.4rem); }
  .intro-copy > p:last-child { font-size: .86rem; }
  .brand small { font-size: .46rem; }
  .login-panel { padding: 1.25rem; border-radius: .9rem; }
  .demo-access span { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }


/* UI/UX polish */
:where(button, a, input):focus-visible { outline: 2px solid #7dd3fc; outline-offset: 3px; }
.field, .submit-button { min-height: 3.5rem; }
.text-button, .back-link { min-height: 2.75rem; display: inline-flex; align-items: center; }
.back-link { justify-content: center; }
.login-panel header span, .intro-copy > p:last-child { text-wrap: pretty; }
@media (max-width: 860px) {
  .login-shell { width: min(680px, calc(100% - 2rem)); }
  .login-intro { text-align: center; }
  .brand { margin-inline: auto; }
  .intro-copy { margin-top: 2.5rem; }
  .intro-copy > p:last-child { margin-inline: auto; }
}
@media (max-width: 520px) {
  .login-shell { width: min(100% - 1rem, 460px); padding-top: 1rem; }
  .intro-copy { margin-top: 2rem; }
  .login-panel header { margin: 1.1rem 0 1.35rem; }
  .demo-access { display: grid; grid-template-columns: 1fr; align-items: start; }
  .demo-access code { overflow-wrap: anywhere; }
}
