:root {
  color-scheme: dark;
  --background: #0d0f12;
  --panel: #14171b;
  --line: #2a3037;
  --text: #eef2f6;
  --muted: #a2aab3;
  --accent: #81b5f8;
  --accent-hover: #9bc5fb;
  --accent-ink: #07111d;
  --danger: #ff8585;
  --panel-surface: rgba(20, 23, 27, .94);
  --input-surface: #101317;
  --label: #c6cbd0;
  --shadow: rgba(0, 0, 0, .35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f3f6fa;
  --panel: #ffffff;
  --line: #d3dce6;
  --text: #17212b;
  --muted: #667382;
  --accent: #347fcf;
  --accent-hover: #286db8;
  --accent-ink: #ffffff;
  --danger: #c83d45;
  --panel-surface: rgba(255, 255, 255, .96);
  --input-surface: #ffffff;
  --label: #354352;
  --shadow: rgba(35, 53, 72, .18);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(129, 181, 248, .08), transparent 28rem),
    radial-gradient(circle at 90% 90%, rgba(131, 185, 255, .08), transparent 26rem),
    var(--background);
}

.auth-panel {
  width: min(100%, 380px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-surface);
  box-shadow: 0 30px 80px var(--shadow);
}

label {
  display: block;
  margin: 24px 0 8px;
  color: var(--label);
  font-size: 13px;
  font-weight: 650;
}

label:first-child {
  margin-top: 0;
}

input,
button {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  font: inherit;
}

input {
  padding: 0 14px;
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: var(--input-surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(129, 181, 248, .1);
}

button {
  margin-top: 24px;
  border: 0;
  color: var(--accent-ink);
  background: var(--accent);
  cursor: pointer;
  font-weight: 750;
}

button:hover {
  background: var(--accent-hover);
}

button:focus-visible {
  outline: 2px solid rgba(129, 181, 248, .45);
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: .65;
}

#authError {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
}

#authError.success {
  color: #3b8a42;
}

@media (max-width: 520px) {
  body {
    padding: 18px;
  }

  .auth-panel {
    padding: 28px 22px;
  }
}
