:root { --fg:#1d2330; --muted:#5b6475; --bg:#f4f5f8; --card:#fff; --line:#d9dce4;
  --accent:#1f6feb; --danger:#c62828; --ok:#1b7a3a; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--fg);
  font:16px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; }
main { max-width:640px; margin:0 auto; padding:12px; }
h1 { font-size:1.4rem; margin:.4rem 0; }
h2 { font-size:1.1rem; margin:0; }
.top { display:flex; justify-content:space-between; align-items:center; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:14px; margin:12px 0; }
label { display:block; margin:.6rem 0 .25rem; font-weight:600; }
label.radio { font-weight:400; margin:.3rem 0; }
fieldset { border:1px solid var(--line); border-radius:6px; margin:.8rem 0; }
input[type=text], input[type=password], input[type=file] { width:100%; padding:8px; font:inherit;
  border:1px solid var(--line); border-radius:6px; background:#fff; }
button, .button { font:inherit; padding:8px 14px; border:1px solid var(--line); border-radius:6px;
  background:#fff; color:var(--fg); cursor:pointer; text-decoration:none; display:inline-block; }
button:disabled { opacity:.6; cursor:default; }
button.primary { background:var(--accent); border-color:var(--accent); color:#fff; margin-top:.8rem; }
button.danger { background:var(--danger); border-color:var(--danger); color:#fff; }
button.link { border:0; background:none; color:var(--accent); padding:4px; }
.button { background:var(--accent); border-color:var(--accent); color:#fff; margin-top:.5rem; }
.error { color:var(--danger); }
.ok { color:var(--ok); }
.muted { color:var(--muted); font-size:.9rem; }
[hidden] { display:none !important; }
progress { width:100%; height:14px; }
.history-head { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:4px; }
.history-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; margin-top:8px; font-size:.9rem; }
th, td { text-align:left; padding:6px 6px; border-bottom:1px solid var(--line); vertical-align:top; }
td.actions { white-space:nowrap; }
td.actions button, td.actions a { padding:4px 8px; font-size:.85rem; margin:0 2px 2px 0; }
td.actions a { background:var(--accent); border-color:var(--accent); color:#fff; margin-top:0; }
td.name { word-break:break-all; }
dialog { border:1px solid var(--line); border-radius:8px; max-width:420px; width:calc(100% - 32px); }
dialog::backdrop { background:rgba(0,0,0,.4); }
dialog .actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
