:root {
  --bg: #121110;
  --bg2: #1a1815;
  --bg3: #201d19;
  --line: rgba(240,232,214,0.10);
  --cream: #f2ede4;
  --dim: #a89e8c;
  --muted: #736a5c;
  --gold: #d4a843;
  --gold-soft: #ecc66c;
  --green: #4caf7d;
  --red: #d46a4a;
  --r: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--cream); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }

#topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 12px 20px; background: rgba(18,17,16,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
#topbar .brand { font-weight: 700; letter-spacing: .02em; }
#topbar .brand span { color: var(--gold-soft); font-weight: 400; font-style: italic; }
#topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
#topbar nav a { padding: 7px 12px; border-radius: 100px; font-size: .82rem; color: var(--dim); }
#topbar nav a:hover, #topbar nav a.active { background: var(--bg3); color: var(--cream); }
#topbar .who { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 10px; }
#topbar .who button { background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 100px; padding: 5px 12px; font-size: .75rem; cursor: pointer; }

main { max-width: 1400px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { font-size: 1.4rem; margin: 0 0 4px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; color: var(--cream); }
p.sub { color: var(--dim); font-size: .88rem; margin: 0 0 24px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 32px; }
.card {
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; cursor: pointer; transition: border-color .15s, transform .15s;
}
.card:hover { border-color: rgba(212,168,67,.4); transform: translateY(-2px); }
.card .n { font-size: 1.8rem; font-weight: 700; color: var(--gold-soft); }
.card .label { font-size: .78rem; color: var(--dim); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th { text-align: left; padding: 8px 10px; color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: var(--bg2); }
.tag { display: inline-block; padding: 3px 9px; border-radius: 100px; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.tag.rush { background: rgba(212,106,74,.15); color: #e8917a; }
.tag.normal { background: rgba(240,232,214,.06); color: var(--dim); }
.stage-pill { display: inline-block; padding: 4px 10px; border-radius: 100px; background: var(--bg3); border: 1px solid var(--line); font-size: .72rem; }

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
input[type=text], input[type=search], select, textarea {
  background: var(--bg2); border: 1px solid var(--line); color: var(--cream); border-radius: 6px; padding: 8px 12px; font-size: .85rem;
}
select { cursor: pointer; }
button.btn {
  background: var(--gold); color: #15120c; border: none; border-radius: 6px; padding: 8px 16px;
  font-weight: 600; font-size: .85rem; cursor: pointer;
}
button.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--cream); }
button.btn:disabled { opacity: .5; cursor: not-allowed; }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.kanban-col { flex: 0 0 260px; background: var(--bg2); border-radius: var(--r); border: 1px solid var(--line); padding: 10px; max-height: 78vh; overflow-y: auto; }
.kanban-col h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gold-soft); margin: 4px 6px 10px; display: flex; justify-content: space-between; }
.kanban-card { background: var(--bg3); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; font-size: .8rem; }
.kanban-card .pname { font-weight: 600; margin-bottom: 2px; }
.kanban-card .meta { color: var(--muted); font-size: .72rem; display: flex; justify-content: space-between; margin-top: 6px; }

.section { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 16px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: .85rem; margin-bottom: 4px; }
.kv b { color: var(--muted); font-weight: 500; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: .85rem; }
.checklist-item input { width: auto; }
.checklist-item.done { color: var(--muted); text-decoration: line-through; }

.timeline-item { padding: 8px 0; border-left: 2px solid var(--line); padding-left: 14px; margin-left: 4px; font-size: .8rem; }
.timeline-item .when { color: var(--muted); font-size: .7rem; }

.badge-next { background: rgba(212,168,67,.14); color: var(--gold-soft); padding: 4px 10px; border-radius: 6px; font-size: .78rem; font-weight: 600; }
.empty { color: var(--muted); font-size: .85rem; padding: 20px 0; text-align: center; }
