:root {
  --navy-950: #07162f;
  --navy-900: #0a1d3c;
  --navy-800: #102b54;
  --blue-600: #1769e0;
  --blue-500: #2d7ff0;
  --cyan-400: #50d6eb;
  --slate-950: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --white: #fff;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-width: 320px;
  background: #f7f9fc;
  color: var(--slate-950);
  font-family: Inter, system-ui, -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(520px, 1.06fr) minmax(520px, .94fr);
}

.login-story {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(32px, 4.3vw, 68px);
  background:
    radial-gradient(circle at 90% 13%, rgba(45, 127, 240, .28), transparent 27%),
    linear-gradient(145deg, #0b2348 0%, var(--navy-950) 58%, #061227 100%);
  color: var(--white);
}

.story-grid {
  position: absolute;
  inset: 0;
  opacity: .28;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

.story-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.story-glow--one {
  right: -100px;
  bottom: 7%;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(80, 214, 235, .13);
  box-shadow: 0 0 90px rgba(34, 136, 230, .12), inset 0 0 80px rgba(34, 136, 230, .08);
}

.story-glow--two {
  right: 35px;
  bottom: 18%;
  width: 135px;
  height: 135px;
  background: rgba(80, 214, 235, .05);
  border: 1px solid rgba(80, 214, 235, .16);
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(45,127,240,.95), rgba(21,88,188,.96));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-name {
  margin-left: 13px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.8px;
}

.brand-divider {
  width: 1px;
  height: 24px;
  margin: 0 13px;
  background: rgba(255,255,255,.22);
}

.brand-product {
  color: rgba(255,255,255,.62);
  font-size: 13px;
  font-weight: 600;
}

.story-content {
  position: relative;
  z-index: 1;
  width: min(690px, 100%);
  margin: auto 0;
  padding: 62px 0 52px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #9cb6d8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.45px;
  text-transform: uppercase;
}

.eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan-400);
  box-shadow: 0 0 0 6px rgba(80,214,235,.09), 0 0 18px rgba(80,214,235,.7);
}

.story-content h1 {
  margin: 23px 0 22px;
  max-width: 680px;
  font-size: clamp(38px, 4.1vw, 64px);
  line-height: 1.07;
  letter-spacing: -2.8px;
}

.story-content h1 span {
  color: #71aef8;
  background: linear-gradient(90deg, #8cc2ff, #51d9e7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.story-lead {
  max-width: 620px;
  margin: 0;
  color: #aebfd6;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.72;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: clamp(34px, 5vh, 54px);
}

.feature-item {
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  backdrop-filter: blur(12px);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.feature-item:hover {
  transform: translateY(-2px);
  border-color: rgba(113,174,248,.23);
  background: rgba(255,255,255,.07);
}

.feature-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(75,146,239,.14);
  color: #70b4ff;
}

.feature-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-item strong,
.feature-item small { display: block; }

.feature-item strong {
  color: #f6f9fe;
  font-size: 13px;
  line-height: 1.4;
}

.feature-item small {
  margin-top: 6px;
  color: #8196b3;
  font-size: 10.5px;
  line-height: 1.5;
}

.story-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #7286a3;
  font-size: 11px;
  letter-spacing: .2px;
}

.secure-label { display: inline-flex; align-items: center; gap: 7px; }

.secure-label svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #5ba5ef;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 84px);
  background:
    radial-gradient(circle at 100% 0%, rgba(45,127,240,.055), transparent 30%),
    #f8fafc;
}

.mobile-brand { display: none; }

.login-card { width: min(440px, 100%); }

.welcome-badge {
  display: inline-block;
  margin-bottom: 15px;
  color: var(--blue-600);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.login-header h2 {
  margin: 0;
  color: #111c2e;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.2;
  letter-spacing: -1.25px;
}

.login-header p {
  margin: 13px 0 33px;
  color: var(--slate-500);
  font-size: 13px;
  line-height: 1.7;
}

.login-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid #fecaca;
  border-radius: 11px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.45;
}

.login-error svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.login-card form { display: flex; flex-direction: column; gap: 20px; }

.field-group > label {
  display: block;
  margin-bottom: 8px;
  color: var(--slate-700);
  font-size: 12px;
  font-weight: 650;
}

.input-wrap { position: relative; }

.input-wrap > svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  fill: none;
  stroke: #8a9aaf;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke .18s ease;
}

.input-wrap input {
  width: 100%;
  height: 54px;
  border: 1px solid #d9e1eb;
  border-radius: 12px;
  outline: none;
  background: var(--white);
  color: var(--slate-950);
  padding: 0 48px 0 48px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(15, 35, 65, .025);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.input-wrap input::placeholder { color: #a7b2c1; font-weight: 400; }

.input-wrap input:hover { border-color: #bdc9d7; }

.input-wrap input:focus {
  border-color: var(--blue-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(45, 127, 240, .11), 0 5px 16px rgba(15, 35, 65, .055);
}

.input-wrap:focus-within > svg { stroke: var(--blue-600); }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8190a4;
  cursor: pointer;
}

.password-toggle:hover { background: var(--slate-100); color: var(--slate-700); }

.password-toggle:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 1px; }

.password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -3px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.remember input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.checkmark {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #c7d1de;
  border-radius: 5px;
  background: #fff;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.checkmark svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .16s ease, transform .16s ease;
}

.remember input:checked + .checkmark {
  border-color: var(--blue-600);
  background: var(--blue-600);
}

.remember input:checked + .checkmark svg { opacity: 1; transform: scale(1); }

.remember input:focus-visible + .checkmark { box-shadow: 0 0 0 3px rgba(45,127,240,.16); }

.submit-button {
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #1769e0, #1357bb);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(23, 105, 224, .22);
  cursor: pointer;
  transition: transform .17s ease, box-shadow .17s ease, filter .17s ease;
}

.submit-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .17s ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.035);
  box-shadow: 0 15px 30px rgba(23, 105, 224, .28);
}

.submit-button:hover svg { transform: translateX(3px); }
.submit-button:active { transform: translateY(0); }
.submit-button:focus-visible { outline: 3px solid rgba(45,127,240,.25); outline-offset: 3px; }

.login-help {
  margin: 26px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
  color: #7c8a9d;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.login-help strong { color: #526176; font-weight: 650; }

.panel-footer {
  position: absolute;
  right: clamp(32px, 5vw, 84px);
  bottom: 25px;
  left: calc(53% + clamp(32px, 5vw, 84px));
  display: flex;
  justify-content: space-between;
  color: #9aa7b7;
  font-size: 9.5px;
}

@media (max-width: 1120px) {
  .login-shell { grid-template-columns: minmax(440px, .9fr) minmax(480px, 1.1fr); }
  .login-story { padding: 40px; }
  .feature-list { grid-template-columns: 1fr; max-width: 430px; gap: 8px; }
  .feature-item { display: flex; align-items: center; gap: 13px; padding: 12px 14px; }
  .feature-icon { width: 32px; height: 32px; margin: 0; flex: 0 0 auto; }
  .feature-item small { margin-top: 2px; }
  .panel-footer { left: calc(47% + clamp(32px, 5vw, 84px)); }
}

@media (max-width: 860px) {
  .login-shell { display: block; }
  .login-story { display: none; }
  .login-panel { min-height: 100svh; justify-content: flex-start; padding: 34px 24px 80px; }
  .mobile-brand {
    width: min(440px, 100%);
    display: flex;
    align-items: center;
    margin-bottom: clamp(46px, 8vh, 78px);
    color: var(--navy-900);
  }
  .mobile-brand .brand-mark { width: 39px; height: 39px; color: #fff; border-radius: 11px; }
  .mobile-brand .brand-mark svg { width: 26px; height: 26px; }
  .mobile-brand .brand-name { margin-left: 11px; font-size: 22px; }
  .mobile-brand .brand-product { margin-left: auto; color: #7d8da2; font-size: 11px; }
  .login-header h2 { font-size: 29px; }
  .panel-footer {
    right: 24px;
    bottom: 20px;
    left: 24px;
    width: auto;
  }
}

@media (max-width: 480px) {
  .login-panel { padding: 24px 20px 72px; }
  .mobile-brand { margin-bottom: 42px; }
  .mobile-brand .brand-product { display: none; }
  .login-header h2 { font-size: 26px; }
  .login-header p { margin-bottom: 27px; }
  .input-wrap input, .submit-button { height: 52px; }
  .panel-footer { right: 20px; left: 20px; justify-content: center; }
  .panel-footer span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
