/* Mobile-first. Big tap targets — this gets used one-handed in a car park. */

:root {
  --bg: #ffffff;
  --fg: #14161a;
  --muted: #616a76;
  --line: #e3e6ea;
  --card: #f6f7f9;
  --accent: #0b6cf0;
  --danger: #c0322b;
  --warn-bg: #fff6e0;
  --warn-fg: #6b4d05;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e8eaee;
    --muted: #97a0ad;
    --line: #262b33;
    --card: #171a20;
    --accent: #4d94ff;
    --danger: #ff6b60;
    --warn-bg: #3a2f10;
    --warn-fg: #ffd98a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.pad { padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
.stack > * + * { margin-top: 12px; }

h1 { font-size: 1.25rem; margin: 0; }
h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em;
     color: var(--muted); margin: 24px 0 8px; }

.bar {
  display: flex; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.bar h1 { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

input, select, textarea, button {
  font: inherit; width: 100%;
  padding: 12px; min-height: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg); color: var(--fg);
}
textarea { min-height: 96px; resize: vertical; }
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }

button { cursor: pointer; border: 1px solid var(--line); background: var(--card); }
button.primary { background: var(--accent); color: #fff; border-color: transparent; font-weight: 600; }
button.ghost { width: auto; background: none; border: none; color: var(--accent); padding: 8px; min-height: 40px; }
button[disabled] { opacity: 0.55; cursor: progress; }

.row { display: flex; gap: 12px; align-items: flex-end; }
.row .grow { flex: 1; }
.field { min-width: 0; }

.check { display: flex; align-items: center; gap: 10px; color: var(--fg); font-size: 0.95rem; }
.check input { width: auto; min-height: 0; }

.list { display: flex; flex-direction: column; gap: 8px; }

.card {
  display: block; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
.card .name { font-weight: 600; }
.card .meta { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.card.overdue { border-left: 4px solid var(--danger); }

.calllink {
  display: block; text-align: center; text-decoration: none;
  background: var(--card); color: var(--accent); font-weight: 600;
  padding: 14px; border-radius: var(--radius); border: 1px solid var(--line);
}

.note {
  background: var(--warn-bg); color: var(--warn-fg);
  padding: 10px 12px; border-radius: var(--radius); font-size: 0.9rem;
}

.error { color: var(--danger); font-size: 0.9rem; margin: 0; }
.empty { color: var(--muted); font-size: 0.9rem; }

/* Inbox cards hold two buttons, so the card itself is a div, not a button. */
.card.static { cursor: default; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.card-actions button { min-height: 40px; padding: 8px 12px; width: auto; flex: 1; }
.card-actions .quiet { color: var(--muted); }
