/* Sign-in page. The app's own stylesheet is behind the login, so the colour
   tokens are repeated here — same values as styles.css, light and dark. */

:root {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --line: #e3e2da;
  --ink: #1d2721;
  --muted: #5f6b64;
  --accent: #1f5c46;
  --accent-soft: #dff0e7;
  --warn-bg: #fae4e0;
  --warn-ink: #6d2a1f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 35, 28, .06), 0 6px 20px rgba(20, 35, 28, .05);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121614;
    --surface: #1a201d;
    --line: #2b332e;
    --ink: #e8eee9;
    --muted: #9aa8a0;
    --accent: #7fd0ab;
    --accent-soft: #1d3a2e;
    --warn-bg: #3b221d;
    --warn-ink: #f0bdb1;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans Tamil", "Latha", system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

[hidden] { display: none !important; }

.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.card {
  width: 100%;
  max-width: 380px;
  padding: 26px 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 14px;
}

h1 { font-size: 1.3rem; margin: 0 0 14px; line-height: 1.3; }

label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

input {
  font: inherit;
  font-size: 1.1rem;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
#code { letter-spacing: .3em; font-variant-numeric: tabular-nums; }

.hint { font-size: .8rem; color: var(--muted); margin: 6px 0 16px; }
.who { color: var(--muted); margin: -8px 0 14px; font-variant-numeric: tabular-nums; }
.status { color: var(--muted); }

button {
  font: inherit;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--surface);
  font-weight: 700;
  cursor: pointer;
}
button:disabled { opacity: .6; cursor: progress; }
button.link {
  width: auto;
  margin-top: 12px;
  padding: 4px 0;
  background: transparent;
  color: var(--muted);
  font-weight: 400;
}
button.link:hover { color: var(--accent); }

.error {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: .92rem;
}

.foot { margin-top: 18px; font-size: .8rem; color: var(--muted); text-align: center; }
