:root {
  --bg: #f4f6f8; --card: #ffffff; --ink: #18212b; --muted: #5b6876; --line: #dbe1e8;
  --brand: #14507a; --brand-ink: #ffffff; --ok: #1d7a46; --warn: #8a5a00; --err: #b3261e;
  --focus: #1a73e8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f151b; --card: #17202a; --ink: #e8edf2; --muted: #9aa8b6; --line: #2a3642;
    --brand: #5aa9e6; --brand-ink: #08202f; --ok: #5cc98a; --warn: #e0b04a; --err: #ff8a80;
    --focus: #8ab4f8;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.bar { background: var(--card); border-bottom: 1px solid var(--line); }
.bar-inner, main { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.bar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
h1 { font-size: 1.15rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0 0 8px; }
main { padding-top: 20px; padding-bottom: 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.row { display: flex; justify-content: space-between; align-items: center; }
.who { font-size: .9rem; color: var(--muted); display: flex; gap: 12px; align-items: center; }

button { font: inherit; cursor: pointer; border-radius: 8px; padding: 8px 14px; border: 1px solid transparent; }
button:focus-visible, .drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
button.secondary { background: transparent; color: var(--brand); border-color: var(--line); }
button.primary { background: var(--brand); color: var(--brand-ink); }
button.danger { background: transparent; color: var(--err); border-color: var(--line); }
button.link { background: none; border: none; color: var(--brand); padding: 0; text-decoration: underline; }
button[disabled] { opacity: .5; cursor: not-allowed; }

.drop { display: block; margin: 16px 0 8px; border: 2px dashed var(--line); border-radius: 10px;
  padding: 28px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-title { display: block; font-weight: 600; color: var(--brand); }

.opt { margin: 14px 0 4px; }
.opt-label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.opt-label input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.opt-label .muted { display: block; font-size: .9rem; }
.notice.danger { border-left-color: var(--err); background: color-mix(in srgb, var(--err) 10%, transparent); margin-top: 10px; }
.badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: .75rem;
  font-weight: 600; border: 1px solid var(--err); color: var(--err); vertical-align: middle; }

.uploads { list-style: none; margin: 8px 0 0; padding: 0; }
.uploads li { padding: 10px 0; border-top: 1px solid var(--line); }
.uploads .name { word-break: break-all; }
progress { width: 100%; height: 8px; margin-top: 6px; accent-color: var(--brand); }
.state-ok { color: var(--ok); } .state-err { color: var(--err); } .state-warn { color: var(--warn); }

table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .95rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .85rem; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.actions { text-align: right; white-space: nowrap; }
td.actions button + button { margin-left: 6px; }
td.name { word-break: break-all; }
.notice { margin: 16px 0 0; padding: 10px 12px; border-left: 4px solid var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); font-size: .9rem; }

#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; }
#toast.show { opacity: 1; }

@media (max-width: 560px) {
  th:nth-child(3), td:nth-child(3) { display: none; }
}
