:root {
  color-scheme: light;
  --bg: oklch(0.98 0.006 70);
  --surface: oklch(1 0 0);
  --ink: oklch(0.19 0.018 55);
  --muted: oklch(0.47 0.018 55);
  --primary: oklch(0.56 0.13 70);
  --primary-hover: oklch(0.49 0.13 70);
  --accent: oklch(0.42 0.105 218);
  --line: oklch(0.88 0.009 70);
  --focus: oklch(0.67 0.14 218);
  --danger: oklch(0.46 0.17 28);
  --danger-bg: oklch(0.96 0.025 28);
  --white: oklch(1 0 0);
  --shadow: 0 24px 60px oklch(0.19 0.018 55 / 0.11);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); color: var(--ink); }
body {
  min-height: 100vh; min-height: 100svh; margin: 0;
  background:
    linear-gradient(90deg, transparent 0 49.9%, oklch(0.9 0.008 70 / 0.55) 50%, transparent 50.1%) center / 72px 72px,
    linear-gradient(transparent 0 49.9%, oklch(0.9 0.008 70 / 0.55) 50%, transparent 50.1%) center / 72px 72px,
    var(--bg);
  line-height: 1.5; text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.auth-shell { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); }
.auth-panel { width: min(100%, 430px); padding: 34px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 720; letter-spacing: -0.015em; text-decoration: none; }
.brand__mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; background: var(--ink); color: var(--white); }
.brand__mark .shield { fill: currentColor; stroke: none; opacity: 0.16; }
.auth-heading { margin: 34px 0 26px; }
.eyebrow { margin: 0 0 7px; color: var(--accent) !important; font-size: 0.78rem; font-weight: 720; letter-spacing: 0.055em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.65rem, 5vw, 2rem); line-height: 1.16; letter-spacing: -0.04em; text-wrap: balance; }
.auth-heading p:last-child { margin: 11px 0 0; color: var(--muted); font-size: 0.9375rem; text-wrap: pretty; }
.error-message { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 20px; padding: 12px 13px; border: 1px solid oklch(0.83 0.07 28); border-radius: 8px; background: var(--danger-bg); color: var(--danger); font-size: 0.84rem; font-weight: 620; }
.error-message svg { flex: 0 0 auto; margin-top: 1px; }
.auth-form { display: grid; }
.auth-form label { margin-bottom: 7px; color: var(--ink); font-size: 0.875rem; font-weight: 680; }
.auth-form > input, .password-field input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); outline: 0; transition: border-color 160ms ease, box-shadow 160ms ease; }
.auth-form > input { margin-bottom: 19px; padding: 0 13px; }
.password-field { position: relative; }
.password-field input { padding: 0 48px 0 13px; }
.auth-form > input:focus, .password-field:focus-within input { border-color: var(--focus); box-shadow: 0 0 0 3px oklch(0.9 0.05 218); }
.password-toggle { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.password-toggle:hover { background: var(--bg); color: var(--ink); }
.eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }
.submit-button { min-height: 49px; margin-top: 26px; border: 0; border-radius: 8px; background: var(--primary); color: var(--white); cursor: pointer; font-weight: 740; box-shadow: 0 8px 20px oklch(0.4 0.1 70 / 0.2); transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.submit-button:hover { background: var(--primary-hover); transform: translateY(-1px); }
.submit-button:active { transform: translateY(0); }
.security-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 25px; padding-top: 21px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.77rem; }
@media (max-width: 520px) {
  body { background: var(--surface); }
  .auth-shell { display: block; padding-inline: 22px; }
  .auth-panel { margin: 0 auto; padding: 20px 0; border: 0; box-shadow: none; }
  .auth-heading { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; } }
