/* Dark by default: this is used in a dim kids-ministry room and inside a
   phone WebView, where a white screen is genuinely unpleasant. */
:root {
  --bg: #14161a;
  --panel: #1c1f26;
  --panel-2: #232730;
  --line: #2e333e;
  --ink: #e8eaf0;
  --ink-dim: #9aa3b2;
  --accent: #4c8dff;
  --good: #35c491;
  --warn: #f5a524;
  --bad: #f2545b;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

.wrap { max-width: 780px; margin: 0 auto; padding: 16px 14px 64px; }

header.app {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; border-bottom: 1px solid var(--line);
  background: var(--panel); position: sticky; top: 0; z-index: 10;
}
header.app h1 { font-size: 16px; margin: 0; flex: 1; font-weight: 600; }

h2 { font-size: 15px; margin: 22px 0 10px; color: var(--ink-dim);
     text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}

label { display: block; font-size: 12px; color: var(--ink-dim);
        margin-bottom: 5px; font-weight: 600; letter-spacing: .03em; }

input, select {
  width: 100%; padding: 10px 11px; font-size: 15px;
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* 16px minimum stops iOS/Android zooming the page on focus */
@media (max-width: 520px) { input, select { font-size: 16px; } }

button {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 10px 14px; border-radius: 8px;
  background: var(--panel-2); color: var(--ink); border: 1px solid var(--line);
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger  { color: var(--bad); }
button.icon    { padding: 7px 10px; min-width: 38px; }
button:disabled { opacity: .45; cursor: not-allowed; }

.row { display: flex; gap: 8px; align-items: center; }
.row.wrap-r { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spacer { flex: 1; }

.activity { border: 1px solid var(--line); border-radius: var(--radius);
            padding: 12px; margin-bottom: 10px; background: var(--panel-2); }
.activity .head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.activity .head input { flex: 1; }
.activity .opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .activity .opts { grid-template-columns: repeat(4, 1fr); } }

.pill { font-size: 11px; padding: 3px 8px; border-radius: 99px;
        border: 1px solid var(--line); color: var(--ink-dim); white-space: nowrap; }
.pill.protected { color: var(--warn); border-color: var(--warn); }

.timeline { font-variant-numeric: tabular-nums; }
.timeline .t-row { display: flex; gap: 10px; padding: 8px 10px;
                   border-bottom: 1px solid var(--line); align-items: baseline; }
.timeline .t-row:last-child { border-bottom: 0; }
.timeline .t-time { color: var(--ink-dim); min-width: 108px; font-size: 13px; }
.timeline .t-name { flex: 1; }
.timeline .t-adj  { font-size: 13px; }
.adj-cut  { color: var(--warn); }
.adj-add  { color: var(--accent); }

.banner { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.banner.ok   { background: rgba(53,196,145,.12); border: 1px solid var(--good); color: var(--good); }
.banner.warn { background: rgba(245,165,36,.12); border: 1px solid var(--warn); color: var(--warn); }
.banner.bad  { background: rgba(242,84,91,.12);  border: 1px solid var(--bad);  color: var(--bad); }

.muted { color: var(--ink-dim); font-size: 13px; }
.hidden { display: none !important; }

.login { max-width: 340px; margin: 12vh auto; }
.login h1 { font-size: 20px; margin: 0 0 6px; }
