:root { --bg:#1e1f22; --bg2:#2b2d31; --fg:#e6e6e6; --muted:#9aa0a6; --accent:#3b82f6; --border:#3a3c42; }
:root[data-theme="light"] { --bg:#f5f6f8; --bg2:#ffffff; --fg:#1f2329; --muted:#6b7280; --accent:#2563eb; --border:#d7dbe0; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font:14px/1.5 "Segoe UI",system-ui,sans-serif; }
.container { max-width: 680px; margin: 0 auto; padding: 28px 20px 60px; }
h1 { font-size: 20px; }
h2 { font-size: 15px; margin: 0 0 10px; }
section { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.hint { color: var(--muted); font-size: 12px; margin: -4px 0 12px; }
.muted { color: var(--muted); font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.field { margin-bottom: 12px; }
.field label { display: block; margin-bottom: 4px; font-size: 13px; }
input[type=text], input[type=password], input[type=number], select {
  width: 100%; background: var(--bg); color: var(--fg);
  border: 1px solid var(--border); border-radius: 6px; padding: 8px;
}
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.actions { display: flex; align-items: center; gap: 12px; position: sticky; bottom: 0; padding-top: 8px; }
button.primary { background: var(--accent); color: #fff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 14px; }
button.ghost { background: transparent; color: var(--fg); border: 1px solid var(--border); padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.dim { opacity: .45; pointer-events: none; }
.sub { font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
ul.hist { list-style: none; padding: 0; margin: 0 0 8px; max-height: 180px; overflow: auto; }
ul.hist li { padding: 6px 8px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
ul.hist li a { color: var(--accent); text-decoration: none; }
ul.hist li span.muted { font-size: 11px; }
