:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #070a12;
  --panel: rgba(16, 20, 31, 0.82);
  --line: rgba(255, 255, 255, 0.11);
  --muted: #979dad;
  --text: #f5f7ff;
  --accent: #8f9cff;
  --accent-strong: #6f80ff;
  --danger: #ff8a9a;
  --success: #78deb2;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(850px 520px at 17% 0%, rgba(73, 93, 196, 0.17), transparent 67%),
    radial-gradient(700px 450px at 100% 100%, rgba(30, 131, 145, 0.11), transparent 68%),
    var(--bg);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
}

.login-card {
  width: min(100%, 410px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .42), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(18px);
}

.mark {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 28px;
  place-items: center;
  border: 1px solid rgba(147, 158, 255, .34);
  border-radius: 14px;
  color: #aab3ff;
  background: linear-gradient(145deg, rgba(137,151,255,.18), rgba(137,151,255,.04));
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}

.mark svg { width: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.intro { margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px !important; color: #aeb6ff !important; font-size: 11px !important; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0 0 8px; font-size: clamp(26px, 7vw, 32px); line-height: 1.12; letter-spacing: -.035em; }
.intro p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
form { display: grid; }
label { margin: 0 0 8px; color: #c6cad5; font-size: 13px; font-weight: 650; }
input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(4, 7, 13, .55);
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input::placeholder { color: #666d7e; }
input:hover { border-color: rgba(255,255,255,.19); }
input:focus { border-color: var(--accent); background: rgba(6, 9, 17, .85); box-shadow: 0 0 0 4px rgba(111,128,255,.14); }
label:not(:first-child) { margin-top: 20px; }
.password-field { position: relative; }
.password-field input { padding-right: 50px; }
.reveal {
  position: absolute;
  top: 50%; right: 8px;
  transform: translateY(-50%);
  display: grid;
  width: 38px; height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #858c9d;
  background: transparent;
  cursor: pointer;
}
.reveal:hover { color: #c7ccda; background: rgba(255,255,255,.05); }
.reveal svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.status { min-height: 20px; margin: 12px 0 4px; color: var(--danger); font-size: 13px; line-height: 20px; }
.status.success { color: var(--success); }
.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin-top: 5px;
  border: 0;
  border-radius: 12px;
  color: #0c1020;
  background: linear-gradient(135deg, #b4bcff, #7888ff);
  box-shadow: 0 12px 30px rgba(93,108,255,.28);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.submit:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 15px 34px rgba(93,108,255,.35); }
.submit:active:not(:disabled) { transform: translateY(0); }
.submit:disabled { cursor: wait; filter: saturate(.65); }
.spinner { display: none; width: 17px; height: 17px; border: 2px solid rgba(9,13,28,.28); border-top-color: #0c1020; border-radius: 50%; animation: spin .7s linear infinite; }
.submit.loading span:first-child { display: none; }
.submit.loading .spinner { display: block; }
.security-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 24px 0 0; color: #737b8d; font-size: 12px; }
.security-note svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) { .login-card { padding: 28px 22px; border-radius: 18px; } .mark { margin-bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
