:root {
  --bg: #0f1420; --panel: #171e2e; --panel2: #1f2940; --line: #2a3550;
  --text: #e8ecf5; --muted: #9aa6c2; --accent: #4da3ff; --green: #3ddc84;
  --amber: #ffb020; --red: #ff5d5d;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.5; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.top { background: var(--panel); border-bottom: 1px solid var(--line); padding: 28px 0 24px; }
.brand { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.brand span { color: var(--accent); }
.top h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -0.5px; }
.sub { margin: 0 0 10px; color: var(--muted); max-width: 720px; }
.disclaimer { margin: 0; font-size: 13px; color: var(--amber); font-weight: 600; }
.tabs { display: flex; gap: 8px; padding-top: 20px; }
.tab { background: var(--panel); color: var(--muted); border: 1px solid var(--line); border-radius: 8px 8px 0 0; padding: 10px 20px; font-size: 15px; cursor: pointer; border-bottom: none; }
.tab.on { background: var(--panel2); color: var(--text); font-weight: 700; border-color: var(--accent); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin: 0 0 24px; }
.card h2 { margin: 24px 0 8px; font-size: 20px; }
.card h2:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; font-size: 14px; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #06121f; font-weight: 700; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
input[type="text"], textarea, select { background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; }
input[type="text"] { flex: 1; min-width: 200px; }
textarea { flex: 1 1 100%; resize: vertical; }
select { cursor: pointer; }
.progress { height: 10px; background: var(--panel2); border-radius: 6px; overflow: hidden; margin: 12px 0 4px; }
.progress-fill { height: 100%; width: 0; background: var(--green); transition: width .3s; }
.check { display: flex; gap: 12px; align-items: flex-start; background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: 8px; padding: 12px 14px; margin: 8px 0; cursor: pointer; }
.check.done { border-left-color: var(--green); }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green); flex-shrink: 0; }
.check .lbl { flex: 1; }
.check .lbl strong { display: block; font-size: 15px; }
.check .lbl .why { font-size: 13px; color: var(--muted); }
.check .ts { font-size: 12px; color: var(--muted); white-space: nowrap; }
.check .crit { font-size: 11px; font-weight: 700; color: var(--accent); font-family: ui-monospace, monospace; }
.refs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; }
.ref { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.ref .rid { font-family: ui-monospace, monospace; font-weight: 700; color: var(--accent); font-size: 13px; }
.ref h3 { margin: 4px 0 6px; font-size: 15px; }
.ref p { margin: 0; font-size: 13px; color: var(--muted); }
.phase { margin: 20px 0 8px; }
.phase > h3 { font-size: 17px; margin: 0 0 4px; display: flex; gap: 10px; align-items: baseline; }
.phase .pcount { font-size: 12px; color: var(--muted); font-weight: 400; }
.timer { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 16px 0; }
.timer .elapsed { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.timer .meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.timer .note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.dbar { height: 10px; background: var(--bg); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.dbar i { display: block; height: 100%; background: var(--green); transition: width .5s; }
.dbar i.warn { background: var(--amber); }
.dbar i.over { background: var(--red); }
.deadline-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.deadline-row input { width: 90px; }
.loglist { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.logentry { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline; }
.logentry .lt { font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; white-space: nowrap; }
.logentry .lx { font-size: 14px; }
.logentry button { background: none; border: none; color: var(--red); cursor: pointer; font-size: 13px; }
.inc-meta { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.status-open { color: var(--red); font-weight: 700; }
.status-closed { color: var(--green); font-weight: 700; }
.foot { margin-top: 32px; padding-bottom: 48px; color: var(--muted); font-size: 13px; }
.foot a { color: var(--accent); }
@media (max-width: 640px) { .logentry { grid-template-columns: 1fr auto; } .logentry .lt { grid-column: 1 / -1; } }
.foot .storage-note { font-size: .8rem; }
