:root {
  --bg: #f4f6f5; --panel: #fff; --ink: #1c2b27; --muted: #6b7a75; --line: #e1e7e4;
  --brand: #0f6b57; --brand-ink: #fff; --brand-soft: #e3f2ed; --warn: #b45309; --warn-soft: #fef3c7;
  --bad: #b91c1c; --bad-soft: #fee2e2; --side: #12332b; --side-ink: #cfe3dc;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1513; --panel: #16201d; --ink: #e6efeb; --muted: #8fa19a; --line: #26342f;
    --brand: #34b394; --brand-ink: #06231b; --brand-soft: #173a31; --warn-soft: #3a2c0c; --bad-soft: #3d1717; --side: #0a1f1a; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.side .logo { font-weight: 700; font-size: 16px; color: #fff; padding: 4px 10px 14px; }
.side small { text-transform: uppercase; letter-spacing: .06em; font-size: 10px; opacity: .6; padding: 12px 10px 4px; }
.side a { color: var(--side-ink); padding: 7px 10px; border-radius: 6px; display: flex; justify-content: space-between; }
.side a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.side a.on { background: rgba(255,255,255,.14); color: #fff; }
.side .me { margin-top: auto; padding: 10px; font-size: 12px; border-top: 1px solid rgba(255,255,255,.12); }
.side .me button { background: none; border: 0; color: var(--side-ink); cursor: pointer; padding: 0; text-decoration: underline; }
.badge { background: var(--bad); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; }
main { padding: 24px 28px; max-width: 1200px; width: 100%; }
h1 { margin: 0 0 4px; font-size: 22px; } h2 { font-size: 14px; margin: 0; }
.sub { color: var(--muted); margin-bottom: 18px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.btn { background: var(--brand); color: var(--brand-ink); border: 0; padding: 7px 14px; border-radius: 7px; cursor: pointer; font-weight: 600; }
.btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--bad); color: #fff; }
.grid { display: grid; gap: 14px; } .g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } .g2 { grid-template-columns: 3fr 2fr; }
@media (max-width: 900px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; } .g2 { grid-template-columns: 1fr; } main { padding: 16px; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card h2 { margin-bottom: 10px; display: flex; justify-content: space-between; }
.stat b { font-size: 26px; display: block; } .stat span { color: var(--muted); }
.row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); align-items: center; }
.row:first-of-type { border-top: 0; } .row small, .muted { color: var(--muted); }
.pill { background: var(--brand-soft); color: var(--brand); padding: 1px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; } tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--brand-soft); }
.progress { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 6px; } .progress i { display: block; height: 100%; background: var(--brand); }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { background: none; border: 1px solid transparent; padding: 5px 12px; border-radius: 16px; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; }
.col { background: var(--brand-soft); border-radius: 10px; padding: 10px; min-height: 240px; }
.col h2 { margin-bottom: 8px; } .col.over { outline: 2px dashed var(--brand); }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; margin-bottom: 8px; cursor: grab; }
.kcard small { display: block; color: var(--muted); }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 10; padding: 16px; }
.modal { background: var(--panel); border-radius: 12px; padding: 20px; width: min(520px, 100%); max-height: 90vh; overflow: auto; }
.modal h2 { font-size: 17px; margin-bottom: 12px; }
label { display: block; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
input, select, textarea { width: 100%; margin-top: 3px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.login { max-width: 340px; margin: 12vh auto; } .err { color: var(--bad); margin: 8px 0; }
.empty { text-align: center; color: var(--muted); padding: 24px; }
.check { width: 16px; height: 16px; margin: 0; }
.done { text-decoration: line-through; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
