:root {
  --bg: #f6f7f9; --card: #fff; --text: #1d2330; --muted: #6b7280;
  --line: #e5e7eb; --accent: #2563eb; --danger: #dc2626;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14161b; --card: #1d2027; --text: #e5e7eb; --muted: #9ca3af; --line: #2d313a; --accent: #60a5fa; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
header { display: flex; align-items: center; gap: 1rem; padding: .8rem 1.5rem; background: var(--card); border-bottom: 1px solid var(--line); }
header h1 { font-size: 1.1rem; margin: 0; cursor: pointer; }
#crumbs { flex: 1; color: var(--muted); }
#crumbs a { color: var(--accent); text-decoration: none; cursor: pointer; }
main { max-width: 1000px; margin: 1.5rem auto; padding: 0 1rem; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
h2 { font-size: 1rem; margin: .3rem 0 .8rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); padding: .4rem; }
td { padding: .45rem .4rem; border-bottom: 1px solid var(--line); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
button, .button { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: .4rem .8rem; font: inherit; cursor: pointer; }
button.link { background: none; color: var(--accent); padding: .2rem .4rem; }
button.danger { color: var(--danger); }
input { font: inherit; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); }
form.inline { display: flex; gap: .5rem; }
#loginForm { display: grid; gap: .8rem; max-width: 320px; }
#loginForm label { display: grid; gap: .3rem; }
.err { color: var(--danger); min-height: 1.2em; margin: 0; }
#drop { border: 2px dashed var(--line); border-radius: 8px; padding: .8rem; text-align: center; color: var(--muted); margin: .2rem 0 .8rem; }
#drop.over { border-color: var(--accent); color: var(--accent); }
.icon { display: inline-block; width: 1.4em; }
dialog { border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); min-width: 520px; }
dialog form { text-align: right; margin-top: 1rem; }
#toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; }
.muted { color: var(--muted); }
