:root {
  --bg: #121212; --panel: #1b1b1b; --panel-2: #232323; --line: #2f2f2f;
  --text: #ececec; --muted: #9a9a9a; --accent: #e8b23a; --accent-ink: #1a1405;
  --red: #e5675b; --green: #5fb67a; --blue: #6ea8fe;
  --radius: 10px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f4f3ef; --panel: #ffffff; --panel-2: #f7f6f2; --line: #e2dfd6;
          --text: #1d1d1b; --muted: #6b6a66; --accent: #c98f10; --accent-ink: #fff; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: inherit; }
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.layout { background: linear-gradient(to right, var(--panel) 220px, var(--bg) 220px); }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; align-self: start; }
.brand { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 2px; }
.nav { margin-top: 22px; display: flex; flex-direction: column; gap: 2px; }
.nav a { text-decoration: none; padding: 8px 10px; border-radius: 8px; color: var(--muted); display: flex; justify-content: space-between; }
.nav a:hover, .nav a.on { background: var(--panel-2); color: var(--text); }
.nav .badge { background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 600; }
.nav h6 { margin: 16px 10px 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.side .me { position: absolute; bottom: 16px; left: 14px; right: 14px; font-size: 13px; color: var(--muted); }
.main { padding: 26px 32px 60px; max-width: 1100px; }
h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 28px 0 10px; }
.sub { color: var(--muted); margin-bottom: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.task { border-left: 3px solid var(--line); }
.task.money { border-left-color: var(--red); }
.task.cash, .task.partner { border-left-color: var(--accent); }
.task.deadline { border-left-color: var(--blue); }
.task .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.task .t { font-weight: 600; font-size: 16px; margin: 3px 0; }
.task .a { margin-top: 8px; font-size: 14px; }
.task .a b { color: var(--accent); font-weight: 600; }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.pill.red { color: var(--red); border-color: var(--red); }
.pill.green { color: var(--green); border-color: var(--green); }
.pill.gold { color: var(--accent); border-color: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 8px; border-bottom: 1px solid var(--line); }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.click:hover { background: var(--panel-2); cursor: pointer; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; }
form.inline { display: inline; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
input, select, textarea { width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; }
input[type=checkbox] { width: auto; }
textarea { min-height: 60px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > div { flex: 1 1 140px; }
button, .btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
button.ghost, .btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
button.danger { background: transparent; color: var(--red); border: 1px solid var(--red); font-weight: 500; padding: 4px 10px; font-size: 13px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid var(--line); }
.flash.ok { border-color: var(--green); color: var(--green); }
.flash.error { border-color: var(--red); color: var(--red); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text); margin: 4px 0; }
.stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stage { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 13px; }
.stage.done { border-color: var(--green); }
.stage b { display: block; margin-bottom: 4px; }
details summary { cursor: pointer; color: var(--accent); margin: 6px 0; }
.login { max-width: 360px; margin: 12vh auto; }
.empty { text-align: center; color: var(--muted); padding: 40px; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .side .me { position: static; margin-top: 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; } .nav h6 { display: none; }
  .main { padding: 18px 16px 60px; }
  .g2, .g3, .g4, .stages { grid-template-columns: 1fr; }
  .hide-m { display: none; }
}
