:root {
  --bg: #f6f7f9;
  --panel: #fff;
  --border: #e3e6ea;
  --text: #16191d;
  --muted: #6b7280;
  --accent: #1f6f4a;
  --accent-soft: #e8f3ed;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --warn-soft: #fffaeb;
  --warn-border: #f5d491;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

/* Author display rules below would otherwise beat the UA's [hidden] rule. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 26px 20px 60px; }

header.page { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
header.page h1 { margin: 0; font-size: 21px; letter-spacing: -0.015em; }
.sub { margin: 5px 0 0; color: var(--muted); font-size: 13px; max-width: 62ch; }

.banner { padding: 11px 14px; border-radius: 9px; margin-bottom: 16px; font-size: 13.5px; }
.banner.mock { background: var(--warn-soft); border: 1px solid var(--warn-border); }
.banner.error { background: var(--danger-soft); border: 1px solid #fda29b; color: var(--danger); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 13px 15px; }
.stat .label { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.stat .value { font-size: 23px; font-weight: 600; margin-top: 3px; letter-spacing: -0.02em; }

.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.group { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--panel); }
.group button { border: none; border-right: 1px solid var(--border); border-radius: 0; background: transparent; }
.group button:last-child { border-right: none; }
.group button.active { background: var(--accent); color: #fff; }
.group button.active:hover { background: var(--accent); }

button, select, input[type="text"] {
  font: inherit; color: var(--text); background: var(--panel);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 11px;
}
button { cursor: pointer; }
button:hover { background: var(--accent-soft); }
select:focus, input:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }
.right { text-align: right; }
td.right { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.empty { color: var(--muted); font-style: italic; text-align: center; padding: 26px; }

.cust-name { font-weight: 500; }
.cust-email, .muted { color: var(--muted); font-size: 12.5px; }
.items { font-size: 12.5px; color: var(--muted); max-width: 30ch; }
.items strong { color: var(--text); font-weight: 500; }

.links { display: flex; flex-direction: column; gap: 3px; font-size: 13px; white-space: nowrap; }
.links a { color: var(--accent); text-decoration: none; }
.links a:hover { text-decoration: underline; }

.status-cell { min-width: 260px; }
.status-cell select { width: 100%; margin-bottom: 5px; }
.status-cell input { width: 100%; }
.status-cell .saved { font-size: 11.5px; color: var(--muted); margin-top: 3px; min-height: 15px; }
.status-cell .saved.pending { color: var(--accent); }
.status-cell .saved.failed { color: var(--danger); }

tr[data-status="Called – Recovered"] { background: #f4fbf7; }
tr[data-status="Called – Declined"] { opacity: 0.72; }

.note { margin-top: 22px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
code { background: #eef0f3; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ---------- login ---------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 28px; width: 100%; max-width: 380px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
}
.login-card h1 { margin: 0; font-size: 19px; letter-spacing: -0.015em; }
.login-card .sub { margin: 3px 0 20px; color: var(--muted); font-size: 13px; }
.login-step { display: flex; flex-direction: column; gap: 7px; }
.login-step label { font-weight: 500; font-size: 13px; }
.login-step .hint { color: var(--muted); font-size: 12.5px; margin: 0 0 4px; }

.phone-input { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.phone-input .prefix { display: flex; align-items: center; padding: 0 10px; background: #f2f4f6; color: var(--muted); font-size: 13.5px; border-right: 1px solid var(--border); }
.phone-input input { border: none; border-radius: 0; flex: 1; padding: 9px 11px; letter-spacing: 0.02em; }
.phone-input input:focus { outline: none; }
.phone-input:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }

.otp-input { font-size: 20px; letter-spacing: 0.35em; text-align: center; padding: 10px; font-variant-numeric: tabular-nums; }

button.primary { background: var(--accent); color: #fff; border-color: var(--accent); padding: 9px 14px; font-weight: 500; margin-top: 4px; }
button.primary:hover:not(:disabled) { background: #1a5c3e; }
button.primary:disabled { opacity: 0.6; cursor: default; }
button.link { background: none; border: none; color: var(--accent); padding: 4px 0; font-size: 12.5px; }
button.link:hover:not(:disabled) { background: none; text-decoration: underline; }
button.link:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.row { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }

/* signed-in chip in the board header */
.session { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
