:root {
  color-scheme: dark;
  --bg: #081117;
  --surface: #101b23;
  --surface-2: #16242e;
  --surface-3: #0c171e;
  --text: #f1f7f8;
  --muted: #9eb0b9;
  --line: #273944;
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-ink: #052a25;
  --danger: #fecaca;
  --danger-bg: rgba(248, 113, 113, .11);
  --focus: rgba(45, 212, 191, .18);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 13% 8%, rgba(45, 212, 191, .15), transparent 28rem),
    radial-gradient(circle at 88% 88%, rgba(56, 189, 248, .08), transparent 25rem),
    linear-gradient(145deg, #071016, #0b151c 55%, #081117);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .23;
  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: 40px 40px;
  mask-image: radial-gradient(circle at center, #000, transparent 82%);
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

.login-layout {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(12, 23, 30, .92);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .42);
  backdrop-filter: blur(18px);
}

.login-visual {
  position: relative;
  min-height: 610px;
  padding: clamp(34px, 6vw, 62px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 25% 22%, rgba(45, 212, 191, .18), transparent 18rem),
    linear-gradient(145deg, rgba(22, 36, 46, .96), rgba(8, 17, 23, .98));
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 28px;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(45, 212, 191, .19);
}

.brand-name {
  margin: 0;
  font-weight: 860;
  letter-spacing: -.025em;
}

.brand-domain {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .78rem;
}

.visual-copy { max-width: 520px; }
.eyebrow {
  margin: 0 0 9px;
  color: var(--accent-strong);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.visual-copy h2 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(2.6rem, 6vw, 4.7rem);
  line-height: .98;
  letter-spacing: -.065em;
}

.visual-copy p:last-child {
  max-width: 47ch;
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.chart-decoration {
  height: 120px;
  margin: 34px 0 20px;
  position: relative;
  border-bottom: 1px solid var(--line);
  opacity: .92;
}

.chart-decoration svg { width: 100%; height: 100%; }
.chart-decoration path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 12px rgba(45, 212, 191, .2));
}
.chart-decoration circle { fill: var(--accent); }

.visual-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(8, 17, 23, .44);
  font-size: .75rem;
  font-weight: 720;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, .1);
}

.login-card {
  padding: clamp(34px, 6vw, 54px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(160deg, rgba(16, 27, 35, .98), rgba(10, 20, 27, .98));
}

.login-card h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 2.8rem);
  line-height: 1;
  letter-spacing: -.055em;
}

.intro {
  margin: 15px 0 25px;
  color: var(--muted);
  line-height: 1.6;
}

form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field-label { color: var(--muted); font-size: .79rem; font-weight: 790; }
input, button { font: inherit; }

.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 16, 22, .76);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
  background: rgba(7, 16, 22, .96);
}

input {
  min-width: 0;
  width: 100%;
  border: 0;
  padding: 14px;
  color: var(--text);
  background: transparent;
  outline: none;
}

.password-toggle {
  margin-right: 7px;
  border: 0;
  border-radius: 9px;
  padding: 7px 9px;
  color: var(--muted);
  background: transparent;
  font-size: .73rem;
  font-weight: 800;
  cursor: pointer;
}
.password-toggle:hover { color: var(--text); background: var(--surface-2); }
.password-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.submit-button {
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  padding: 14px 17px;
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 920;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
.submit-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.submit-button:active { transform: translateY(0); }
.submit-button:disabled { cursor: wait; opacity: .68; transform: none; }

.alert {
  margin: 0 0 18px;
  padding: 12px 13px;
  border: 1px solid rgba(248, 113, 113, .34);
  border-radius: 12px;
  color: var(--danger);
  background: var(--danger-bg);
  font-size: .84rem;
  line-height: 1.45;
}

.security-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.55;
}

.security-note strong { color: var(--text); }

@media (max-width: 780px) {
  .login-layout { grid-template-columns: 1fr; max-width: 460px; }
  .login-visual { min-height: auto; padding: 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .visual-copy { margin-top: 44px; }
  .visual-copy h2 { max-width: none; font-size: clamp(2.3rem, 12vw, 3.6rem); }
  .chart-decoration { display: none; }
  .visual-foot { margin-top: 36px; }
  .login-card { padding: 32px 28px 36px; }
}

@media (max-width: 430px) {
  .login-shell { padding: 12px; }
  .login-layout { border-radius: 22px; }
  .login-visual, .login-card { padding-left: 22px; padding-right: 22px; }
  .brand-domain { word-break: break-word; }
}

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