:root {
  color-scheme: light;
  --bg: oklch(0.972 0.006 238);
  --surface: oklch(1 0 0);
  --surface-subtle: oklch(0.986 0.004 238);
  --fg: oklch(0.245 0.024 247);
  --muted: oklch(0.515 0.022 244);
  --border: oklch(0.894 0.011 239);
  --accent: oklch(0.615 0.118 194);
  --accent-hover: oklch(0.555 0.118 194);
  --focus-ring: oklch(0.82 0.09 194);
  --sidebar: oklch(0.235 0.034 248);
  --sidebar-fg: oklch(0.955 0.008 238);
  --sidebar-muted: oklch(0.735 0.018 242);
  --danger: oklch(0.55 0.19 27);
  --danger-soft: oklch(0.965 0.025 27);
  --font-ui: "Geist", "Segoe UI Variable", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--fg);
  background: var(--bg);
  font: 14px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(520px, 1.22fr);
}

.login-context {
  min-height: 100%;
  padding: clamp(32px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  color: var(--sidebar-fg);
  background: var(--sidebar);
}

.login-brand,
.login-mobile-brand {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.login-context-copy {
  max-width: 460px;
  margin: auto 0;
}

.login-kicker {
  margin: 0 0 12px;
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-context h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.login-context-copy > p:last-child {
  max-width: 48ch;
  margin: 20px 0 0;
  color: var(--sidebar-muted);
  font-size: 15px;
  line-height: 1.6;
}

.login-context-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--sidebar-muted);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.login-context-status span,
.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--accent);
}

.login-workspace {
  min-width: 0;
  padding: 40px clamp(24px, 7vw, 104px);
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(100%, 440px);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.login-mobile-brand {
  display: none;
  margin-bottom: 32px;
}

.system-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.system-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.login-intro {
  margin: 8px 0 28px;
  color: var(--muted);
}

form {
  display: grid;
  gap: 16px;
}

.login-field {
  display: grid;
  gap: 7px;
}

label {
  color: var(--fg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  color: var(--fg);
  background: var(--surface);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

input::placeholder {
  color: var(--muted);
}

input:hover {
  border-color: oklch(0.79 0.018 239);
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 88px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 80px;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 0 8px 8px 0;
  color: var(--fg);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
}

.password-toggle:hover {
  color: var(--fg);
  background: var(--surface-subtle);
}

.password-toggle:focus-visible,
.login-submit:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.login-error {
  padding: 10px 12px;
  border: 1px solid oklch(0.85 0.08 27);
  border-radius: 8px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 12px;
  font-weight: 550;
}

.login-submit {
  min-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--surface);
  background: var(--accent);
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.login-submit:hover {
  color: var(--surface);
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.64;
}

.login-submit svg {
  flex: 0 0 auto;
}

footer {
  margin-top: 28px;
  padding-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.footer-code {
  margin-left: auto;
  font-family: "Geist Mono", "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.04em;
}

@media (max-width: 880px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-context {
    min-height: auto;
    padding: 24px clamp(20px, 6vw, 48px);
  }

  .login-context-copy,
  .login-context-status {
    display: none;
  }

  .login-workspace {
    padding: 32px 20px;
  }
}

@media (max-width: 520px) {
  body {
    background: var(--surface);
  }

  .login-context {
    display: none;
  }

  .login-workspace {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 20px;
    align-items: start;
  }

  .login-panel {
    padding: 24px 0;
    border: 0;
  }

  .login-mobile-brand {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
