:root {
  --bg: #384959;
  --deep: #202d39;
  --deep-soft: #283b49;
  --surface: #425466;
  --surface-soft: #304252;
  --ink: #f4f6f8;
  --muted: #cbd3db;
  --muted-soft: #c0cad4;
  --line: rgba(158, 171, 184, .35);
  --accent: #82bdec;
  --accent-bright: #9ccfff;
  --green: #63c7a1;
  --amber: #e3b35b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(440px, .84fr); }
.story-panel {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(28px, 4.2vw, 66px);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(145deg, rgba(32,45,57,.98), rgba(48,66,82,.96)),
    var(--deep);
  border-right: 1px solid rgba(255,255,255,.08);
}
.story-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .2;
  background-image: radial-gradient(rgba(158,171,184,.35) .7px, transparent .7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
.story-glow { position: absolute; border-radius: 999px; filter: blur(4px); pointer-events: none; }
.glow-one { width: 540px; height: 540px; right: -250px; top: -210px; background: radial-gradient(circle, rgba(105,174,230,.22), transparent 67%); }
.glow-two { width: 420px; height: 420px; left: -220px; bottom: -230px; background: radial-gradient(circle, rgba(99,199,161,.15), transparent 67%); }

.login-brand, .mobile-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.login-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent-bright), var(--accent));
  border:1px solid rgba(255,255,255,.22);
  box-shadow: 0 12px 30px rgba(105,174,230,.26);
}
.login-brand-mark svg { width:38px; height:38px; overflow:visible; }
.login-brand-mark .logo-letter { fill:none; stroke:#1f2b36; stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round; }
.login-brand-mark .logo-flow { fill:none; stroke:#285e6d; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.login-brand-mark .logo-node { fill:#1f2b36; stroke:#bdddff; stroke-width:1; }
.login-brand-mark .node-end { fill:#19765f; }
.login-brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.login-brand-copy strong { font-size: 18px; letter-spacing: -.025em; }
.login-brand-copy strong em { color:var(--accent-bright); font-style:normal; font-weight:780; }
.login-brand-copy small { color: var(--muted-soft); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; margin-top: 5px; }

.story-copy { position: relative; z-index: 2; max-width: 700px; margin-top: clamp(56px, 8vh, 106px); }
.secure-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid rgba(99,199,161,.28);
  border-radius: 999px;
  background: rgba(99,199,161,.08);
  color: #a9e2ce;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.secure-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(99,199,161,.1); }
.story-copy h1 { margin: 19px 0 14px; font-size: clamp(36px, 4.15vw, 62px); line-height: 1.04; letter-spacing: -.045em; font-weight: 760; }
.story-copy p { margin: 0; color: var(--muted); max-width: 610px; font-size: clamp(14px, 1.25vw, 18px); line-height: 1.65; }

.visual-frame { position: relative; z-index: 2; width: min(100%, 760px); margin-top: clamp(36px, 6vh, 70px); filter: drop-shadow(0 30px 50px rgba(0,0,0,.28)); }
.market-visual { display: block; width: 100%; height: auto; }
.visual-labels text { fill: #9eabb8; font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.flow-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.flow-one { stroke: url(#lineGradient); stroke-width: 3; stroke-dasharray: 12 8; animation: flowDash 5s linear infinite; }
.flow-two { stroke: #82bdec; stroke-opacity: .28; stroke-width: 1.5; stroke-dasharray: 5 10; animation: flowDash 7s linear infinite reverse; }
.candles line { stroke: #63c7a1; stroke-width: 2; }
.candles rect { x: -6px; fill: rgba(99,199,161,.2); stroke: #63c7a1; stroke-width: 2; rx: 2px; }
.candles .down line { stroke: #e3b35b; }
.candles .down rect { fill: rgba(227,179,91,.18); stroke: #e3b35b; }
.data-node > circle:first-child { fill: #273d4a; stroke: #82bdec; stroke-width: 2; }
.node-core { fill: #82bdec; }
.data-node { animation: nodeFloat 4.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.node-b { animation-delay: -.9s; }.node-c { animation-delay: -1.8s; }.node-d { animation-delay: -2.7s; }
.travel-dot { fill: #8ec7f3; }
.travel-one { offset-path: path("M76 278 C145 224 191 249 248 194 S363 137 421 178 S540 217 646 94"); animation: travel 7s linear infinite; }
.travel-two { fill: #63c7a1; offset-path: path("M76 299 C148 272 194 287 248 239 S360 190 422 216 S543 261 646 154"); animation: travel 9s linear infinite -3s; }
.quote-card rect { fill: rgba(32,45,57,.78); stroke: rgba(130,189,236,.32); }
.quote-card text { dominant-baseline: middle; }
.quote-pair { fill: #cbd3db; font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.quote-value { fill: #f4f6f8; font-size: 22px; font-weight: 760; }
.quote-change { fill: #63c7a1; font-size: 12px; font-weight: 750; }
.pulse-ring circle { fill: none; stroke: #69aee6; transform-origin: center; animation: pulse 3s ease-out infinite; }
.pulse-ring circle:last-child { animation-delay: 1.5s; }

.story-points { position: relative; z-index: 2; display: flex; gap: 22px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); font-size: 13px; font-weight: 680; }
.story-points span { display: inline-flex; align-items: center; gap: 8px; }
.point-dot { width: 8px; height: 8px; border-radius: 50%; flex:0 0 8px; }.point-dot.green { background: var(--green); }.point-dot.blue { background: var(--accent); }.point-dot.amber { background: var(--amber); }
.operations-strip { position:relative; z-index:2; margin-top:28px; padding:16px; border:1px solid rgba(158,171,184,.2); border-radius:14px; background:rgba(38,57,70,.6); box-shadow:0 16px 35px rgba(0,0,0,.12); }
.operations-strip-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:0 2px 12px; }
.operations-strip-heading span { color:var(--ink); font-size:12px; font-weight:760; letter-spacing:.025em; }
.operations-strip-heading small { color:var(--muted-soft); font-size:10px; letter-spacing:.08em; text-transform:uppercase; }
.operations-strip-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.operations-item { display:flex; align-items:flex-start; gap:9px; min-width:0; padding:11px 10px; border:1px solid rgba(158,171,184,.16); border-radius:10px; background:rgba(255,255,255,.025); }
.operations-icon { width:27px; height:27px; flex:0 0 27px; display:grid; place-items:center; color:var(--accent-bright); border:1px solid rgba(130,189,236,.28); border-radius:8px; background:rgba(130,189,236,.08); }
.operations-icon svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.operations-item > span:last-child { min-width:0; }
.operations-item strong, .operations-item small { display:block; }
.operations-item strong { color:var(--ink); font-size:10.5px; line-height:1.3; }
.operations-item small { margin-top:4px; color:var(--muted-soft); font-size:9.5px; line-height:1.35; }

.form-panel {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 72px);
  background:
    radial-gradient(circle at 85% 7%, rgba(105,174,230,.13), transparent 28%),
    linear-gradient(160deg, #384959, #334553);
}
.mobile-brand { display: none; align-self: flex-start; margin-bottom: 42px; }
.login-card { width: min(100%, 430px); }
.form-heading { margin-bottom: 33px; }
.eyebrow { display: block; margin-bottom: 12px; color: var(--accent-bright); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.form-heading h2 { margin: 0 0 9px; font-size: clamp(31px, 3vw, 42px); line-height: 1.1; letter-spacing: -.04em; }
.form-heading p { margin: 0; color: var(--muted); font-size: 14px; }

form label { display: inline-block; margin: 0 0 9px; color: #e7ebef; font-size: 13.5px; font-weight: 720; }
.password-label { display: flex; justify-content: space-between; align-items: center; margin-top: 21px; }
.password-label label { margin-bottom: 9px; }
.password-label span { color: var(--muted-soft); font-size: 12px; }
.field-wrap { position: relative; }
.field-wrap > svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted-soft);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.field-wrap input {
  width: 100%;
  height: 56px;
  padding: 0 47px 0 45px;
  border: 1px solid rgba(158,171,184,.45);
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: rgba(48,66,82,.78);
  font-size: 16px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.field-wrap input::placeholder { color: var(--muted-soft); }
.field-wrap input:hover { border-color: rgba(130,189,236,.55); }
.field-wrap input:focus { border-color: var(--accent); background: rgba(48,66,82,.95); box-shadow: 0 0 0 4px rgba(105,174,230,.13); }
.show-password {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  color: var(--muted-soft);
  background: transparent;
  cursor: pointer;
}
.show-password:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.show-password svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.login-error { min-height: 22px; margin: 9px 0 5px; color: #ffb3b8; font-size: 11.5px; }
form.shake { animation: formShake .28s ease-out; }
.sign-in-button {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--accent);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #1f2b36;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  box-shadow: 0 12px 28px rgba(105,174,230,.2);
  font-weight: 780;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform .12s, box-shadow .16s, filter .16s;
}
.sign-in-button:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 16px 34px rgba(105,174,230,.28); }
.sign-in-button:active { transform: translateY(0); }
.sign-in-button:disabled { opacity: .68; cursor: wait; transform: none; }
.sign-in-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.sign-in-button:hover svg { transform: translateX(2px); }
.sign-in-button.loading svg { animation: buttonPulse .8s ease-in-out infinite alternate; }

.security-note { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 22px; color: var(--muted-soft); font-size: 11.5px; }
.security-note svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: var(--green); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.access-assurance { margin-top:24px; padding:15px 16px; border:1px solid rgba(158,171,184,.24); border-radius:13px; background:rgba(48,66,82,.48); }
.access-assurance-heading { display:flex; align-items:center; gap:11px; }
.access-assurance-icon { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; color:var(--green); border:1px solid rgba(99,199,161,.26); border-radius:9px; background:rgba(99,199,161,.08); }
.access-assurance-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.access-assurance-heading strong, .access-assurance-heading small { display:block; }
.access-assurance-heading strong { color:var(--ink); font-size:12.5px; }
.access-assurance-heading small { margin-top:3px; color:var(--muted-soft); font-size:10.5px; line-height:1.35; }
.assurance-points { display:grid; grid-template-columns:1fr 1.55fr 1.2fr; gap:8px; margin-top:13px; padding-top:12px; border-top:1px solid rgba(158,171,184,.16); }
.assurance-points span { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:9.5px; line-height:1.3; }
.assurance-points i { width:5px; height:5px; flex:0 0 5px; border-radius:50%; background:var(--green); }
.login-footer { position: absolute; left: 38px; right: 38px; bottom: 25px; display: flex; justify-content: space-between; color: var(--muted-soft); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }

@keyframes flowDash { to { stroke-dashoffset: -80; } }
@keyframes nodeFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes travel { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes pulse { 0% { opacity: .75; scale: .65; } 80%,100% { opacity: 0; scale: 1.35; } }
@keyframes buttonPulse { to { transform: translateX(4px); } }
@keyframes formShake { 25% { transform: translateX(-4px); } 55% { transform: translateX(3px); } 80% { transform: translateX(-2px); } }

@media (max-width: 1020px) {
  .login-shell { grid-template-columns: minmax(0, 1fr) minmax(410px, .92fr); }
  .story-panel { padding: 32px; }
  .story-copy { margin-top: 68px; }
  .story-copy h1 { font-size: 40px; }
  .visual-frame { margin-top: 42px; }
  .operations-strip { padding:13px; }
  .operations-strip-grid { grid-template-columns:1fr; }
  .operations-item { align-items:center; padding:8px 9px; }
  .operations-item small { margin-top:2px; }
}

@media (max-width: 780px) {
  .login-shell { display: block; min-height: 100vh; }
  .story-panel { display: none; }
  .form-panel { min-height: 100vh; justify-content: flex-start; padding: 28px 22px 78px; }
  .mobile-brand { display: flex; }
  .login-card { margin: auto 0; }
  .form-heading { margin-bottom: 28px; }
  .login-footer { left: 22px; right: 22px; }
  .access-assurance { display:none; }
}

@media (max-width: 420px) {
  .form-panel { padding-inline: 18px; }
  .mobile-brand { margin-bottom: 30px; }
  .form-heading h2 { font-size: 32px; }
  .login-footer { left: 18px; right: 18px; }
  .security-note { align-items: flex-start; text-align: left; }
}

@media (min-width: 781px) and (max-height: 800px) {
  .story-panel { padding-block: 28px; }
  .story-copy { margin-top: 34px; }
  .story-copy h1 { margin-block: 14px 10px; font-size: 38px; }
  .story-copy p { font-size: 14px; line-height: 1.5; }
  .visual-frame { width: min(100%, 540px); margin-top: 22px; }
  .story-points { margin-top: 16px; }
  .operations-strip, .access-assurance { display: none; }
  .form-panel { padding-block: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
