:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1c2026;
  --muted: #68707d;
  --line: #dfe3e8;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --danger: #c0392b;
  --ok-bg: #e7f6ec;
  --err-bg: #fdecea;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --panel: #1d2128;
    --text: #e6e9ee;
    --muted: #98a1ae;
    --line: #2f353f;
    --accent: #6ea0ff;
    --accent-text: #10131a;
    --danger: #ff7b6b;
    --ok-bg: #173224;
    --err-bg: #3a1c19;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 12px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
header .brand { font-weight: 700; color: var(--text); }
header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-left: auto; }
header form { margin: 0; }
main { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-size: 20px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 28px 0 10px; }
.msg { padding: 10px 12px; border-radius: 8px; margin: 0 0 16px; }
.msg.err { background: var(--err-bg); }
.msg.ok { background: var(--ok-bg); }
.card {
  display: block;
  max-width: 420px;
  margin: 0 auto 20px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.card.wide { max-width: none; }
.card h2 { margin-top: 0; }
label { display: block; margin: 0 0 12px; color: var(--muted); font-size: 13px; }
label.check { color: var(--text); font-size: 15px; }
input:not([type="checkbox"]) {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
input.url { font-family: ui-monospace, Consolas, monospace; font-size: 13px; margin: 0; }
button, .btn {
  display: inline-block;
  padding: 8px 14px;
  font: inherit;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; opacity: 0.9; }
button.link { padding: 0; background: none; color: var(--accent); }
button.link.danger { color: var(--danger); }
form.inline { display: flex; gap: 6px; margin: 0; }
form.inline input { margin: 0; min-width: 120px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 16px; overflow-wrap: anywhere; }
.crumbs span { color: var(--muted); }
table.files {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
table.files th, table.files td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.files tr:last-child td { border-bottom: 0; }
table.files th { font-size: 13px; color: var(--muted); font-weight: 600; }
td.name { overflow-wrap: anywhere; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.date, th.date { white-space: nowrap; color: var(--muted); }
td.act { text-align: right; white-space: nowrap; }
td.act form { margin: 0; }
td.empty { color: var(--muted); text-align: center; padding: 28px 12px; }
tr.dim { opacity: 0.55; }
.hint { color: var(--muted); font-size: 13px; }
@media (max-width: 600px) {
  td.date, th.date { display: none; }
  table.files th, table.files td { padding: 9px 8px; }
}
