:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #18202f;
  --muted: #697386;
  --line: #d9dee8;
  --accent: #166c7d;
  --accent-dark: #0d4d5a;
  --error: #9f1f1f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.auth-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
}

h1 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: 0;
}

p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  font: inherit;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 108, 125, 0.12);
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.password-row input {
  min-width: 0;
}

.toggle-password {
  width: 72px;
  height: 42px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.toggle-password:hover {
  background: #f4f7fa;
}

button {
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover { background: var(--accent-dark); }
button:disabled { cursor: not-allowed; opacity: 0.65; }

.message {
  margin-top: 12px;
  border: 1px solid #efb4b4;
  border-radius: 8px;
  background: #fff7f7;
  color: var(--error);
  padding: 10px 12px;
  line-height: 1.45;
}

.switch {
  margin-top: 18px;
  margin-bottom: 0;
}

a { color: var(--accent-dark); font-weight: 700; }
