:root { --bg:#f6f7f9; --card:#fff; --text:#1d2330; --muted:#6b7280; --line:#e3e6ea; --accent:#1f5fbf;
  --high:#f4cccc; --medium:#fff2cc; --low:#d9ead3; --done:#cfe2f3; --bad:#c62828; --warn:#e67e22; }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--text); }
main { max-width:980px; margin:0 auto; padding:16px; }
a { color:var(--accent); }
h1 { font-size:22px; margin:0 0 12px; } h2 { font-size:18px; margin:16px 0 8px; }
.top { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; padding:10px 16px; background:#fff; border-bottom:1px solid var(--line); }
.top nav { display:flex; gap:12px; align-items:center; } .top .user { color:var(--muted); display:flex; gap:10px; align-items:center; }
.brand { font-weight:700; text-decoration:none; color:var(--text); }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:16px; margin:12px 0; }
.card.narrow { max-width:420px; margin:40px auto; }
label { display:block; margin:8px 0; } label.check { display:inline-flex; gap:4px; align-items:center; margin:0 8px; }
input, select, textarea { width:100%; padding:9px; border:1px solid var(--line); border-radius:8px; font:inherit; }
input[type=checkbox] { width:auto; } .filters { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; }
.filters input, .filters select { width:auto; min-width:140px; }
.btn { display:inline-block; padding:10px 16px; border:0; border-radius:8px; background:var(--accent); color:#fff; font:inherit; cursor:pointer; text-decoration:none; margin:4px 0; }
.btn.small { padding:6px 12px; } .btn.secondary { background:#6b7280; } .btn.ok { background:#2e7d32; } .btn.danger { background:var(--bad); }
button.link { background:none; border:0; color:var(--accent); cursor:pointer; font:inherit; padding:0; }
form.inline { display:inline; }
.rows { display:flex; flex-direction:column; gap:6px; }
.row { display:grid; grid-template-columns:90px 1fr auto; gap:4px 12px; padding:10px 12px; border-radius:8px; text-decoration:none; color:var(--text); border:1px solid var(--line); }
.row .meta { grid-column:2; color:var(--muted); font-size:13px; } .row .code { font-weight:700; }
.prio-high { background:var(--high); } .prio-medium { background:var(--medium); } .prio-low { background:var(--low); }
.st-done { background:var(--done); } .st-cancelled { background:#eee; color:var(--muted); }
.due.overdue { color:var(--bad); font-weight:700; } .due.soon { color:var(--warn); font-weight:700; }
.tag { display:inline-block; padding:2px 8px; border-radius:10px; background:#e8eef9; font-size:12px; margin-left:6px; }
.tag.bad { background:var(--bad); color:#fff; } .tag.warn { background:var(--warn); color:#fff; }
.fields { display:grid; grid-template-columns:180px 1fr; gap:4px 12px; } .fields dt { color:var(--muted); }
.actions { display:flex; flex-wrap:wrap; gap:8px; } .actions form { display:flex; flex-direction:column; gap:4px; }
.msg { padding:10px 12px; border-radius:8px; background:#e8f5e9; margin:8px 0; } .msg.error { background:#fdecea; }
.hint { color:var(--muted); font-size:13px; } .comment { padding:8px 0; border-bottom:1px solid var(--line); }
.history { width:100%; border-collapse:collapse; font-size:13px; } .history td { border-bottom:1px solid var(--line); padding:4px; vertical-align:top; }
.qr { display:block; width:220px; height:220px; margin:12px auto; }
.files { padding-left:18px; } .pager { text-align:center; }
@media (max-width:600px) { .fields { grid-template-columns:1fr; } .row { grid-template-columns:1fr; } .row .meta { grid-column:1; } .top .user { width:100%; } }
.filters input[type=checkbox] { min-width:0; } .fields dd { margin:0; } .row .tag { justify-self:start; margin-left:0; }
