/* Colors follow the TTS Auth admin console (sage green on warm white, navy bar). */
:root {
  --bg: #f6f5f1;
  --card: #ffffff;
  --ink: #1f2a37;
  --muted: #667085;
  --line: #e4e2db;
  --accent: #6f8f5e;
  --accent-ink: #ffffff;
  --accent-soft: #eef3ea;
  --bar: #1c2733;
  --error: #b42318;
  --error-soft: #fef3f2;
  --warn-soft: #fff8e6;
  --warn-line: #f1d48a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
[hidden] { display: none !important; }
h1 { font-size: 1.35rem; margin: 0 0 12px; }
h2 { font-size: 1.1rem; margin: 0; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.bar { background: var(--bar); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 20px; }
.brand { font-weight: 600; }
.brand span { font-weight: 400; opacity: .75; margin-left: 6px; }
.who { display: flex; gap: 12px; align-items: center; font-size: .9rem; }
.who .link { color: #fff; }

.wrap { max-width: 920px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 20px; }
#view-app { display: grid; gap: 20px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px; min-width: 0; }
.center { text-align: center; padding: 40px 22px; }
.center .primary { margin: 8px 0 12px; }

button { font: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, .drop:focus-within, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 600; }
.primary:hover { filter: brightness(.95); }
.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; }
.ghost { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; font-size: .85rem; color: var(--ink); white-space: nowrap; }
.ghost:hover { border-color: var(--accent); }

.drop { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 30px 16px; border: 2px dashed var(--line); border-radius: 10px; cursor: pointer; background: var(--bg); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fake-link { color: var(--accent); text-decoration: underline; }
.notice { margin: 12px 0 0; padding: 10px 12px; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 8px; font-size: .9rem; }

.progress { margin-top: 16px; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; margin-bottom: 6px; overflow-wrap: anywhere; }
.progress-track { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .15s; }

.result { margin-top: 16px; padding: 14px; background: var(--accent-soft); border-radius: 8px; }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-row input { flex: 1 1 260px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.error { margin: 16px 0 0; padding: 10px 12px; background: var(--error-soft); color: var(--error); border-radius: 8px; }

.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.list-head input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; width: min(260px, 100%); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
td.name { overflow-wrap: anywhere; min-width: 180px; }
td.name a { color: var(--ink); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.date { white-space: nowrap; color: var(--muted); }
td.act { text-align: right; width: 1%; }
@media (prefers-reduced-motion: reduce) { .progress-fill { transition: none; } }
