/* Mobile-first, hand-written. Legible, not designed — real styling comes later.
   Dark mode is the default via prefers-color-scheme; light is the override. */

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --border: #334155;
  --tabbar-h: 3.5rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --accent: #0284c7;
    --border: #e2e8f0;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

.app {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 1.5rem);
  min-height: 100vh;
}

.today__date {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.today__greeting {
  margin: 0.25rem 0 0.75rem;
  font-size: 1.9rem;
}

.today__hint {
  margin: 0;
  color: var(--muted);
}

/* Bottom tab bar */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: none;
}

.tab--todo {
  color: var(--muted);
}

/* Forms */
.auth,
.signout {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth input {
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.auth__error {
  color: #f87171;
  margin: 0;
}

button {
  padding: 0.7rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #04202e;
  background: var(--accent);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.signout button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  align-self: flex-start;
}
