:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f0f2f5; --border: #e3e6eb;
  --text: #0f1419; --muted: #5f6b7a; --faint: #8a94a3;
  --accent: #4f46e5; --accent-2: #6366f1; --accent-soft: #eef0ff;
  --ok: #16a34a; --ok-soft: #e8f7ee; --warn: #d97706; --warn-soft: #fdf3e2; --bad: #dc2626; --bad-soft: #fdecec;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --radius: 14px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b0d12; --surface: #13161d; --surface-2: #1a1e27; --border: #252a35;
  --text: #e8ebf0; --muted: #9aa3b2; --faint: #6b7483;
  --accent: #818cf8; --accent-2: #a5b4fc; --accent-soft: #1e2140;
  --ok: #4ade80; --ok-soft: #10261a; --warn: #fbbf24; --warn-soft: #2a2110; --bad: #f87171; --bad-soft: #2c1414;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; cursor: pointer; }

/* ---------- layout ---------- */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -.01em; }
.logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), #8b5cf6); }
.logo svg.i { width: 17px; height: 17px; }
.nav { display: flex; gap: 4px; margin-left: 16px; }
.nav button { background: none; border: 0; color: var(--muted); padding: 7px 12px; border-radius: 9px; display: flex; gap: 7px; align-items: center; }
.nav button:hover { background: var(--surface-2); color: var(--text); }
.nav button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.spacer { flex: 1; }
.iconbtn { background: var(--surface); border: 1px solid var(--border); color: var(--muted); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.iconbtn:hover { color: var(--text); }
.updated { color: var(--faint); font-size: 13px; }
main { max-width: 1200px; margin: 0 auto; padding: 24px; }
h1 { font-size: 22px; margin: 4px 0 18px; letter-spacing: -.02em; }
h2 { font-size: 15px; margin: 28px 0 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.stat .value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; }
.stat .sub { color: var(--faint); font-size: 13px; }
.card-head { display: flex; align-items: flex-start; gap: 10px; }
.card-head .title { font-weight: 650; font-size: 16px; }
.card-head .meta { color: var(--muted); font-size: 13px; }
.badge { margin-left: auto; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.badge.ok { background: var(--ok-soft); } .badge.warn { background: var(--warn-soft); } .badge.bad { background: var(--bad-soft); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-top: 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; width: 0; transition: width .4s; }
.bar.warn > i { background: var(--warn); } .bar.bad > i { background: var(--bad); }
.meter { margin-top: 12px; font-size: 13px; color: var(--muted); }
.meter .row { display: flex; justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 8px; background: var(--surface-2); color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.chip.off::before { background: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
td { padding: 12px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
.table-card { padding: 0; overflow-x: auto; }
.paid { display: inline-flex; gap: 8px; align-items: center; }
.paid input { font: inherit; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; }
.journal-day { margin-bottom: 14px; }
.journal-day .date { font-weight: 650; margin-bottom: 8px; }
.md { font-size: 14px; color: var(--text); }
.md h3 { font-size: 14px; margin: 12px 0 6px; color: var(--muted); }
.md ul { margin: 0; padding-left: 18px; } .md li { margin: 3px 0; }
.md code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.empty { color: var(--faint); padding: 18px; text-align: center; }
.btn { background: var(--accent); color: #fff; border: 0; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.hidden { display: none !important; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50; }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 600px at 20% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.auth .card { width: 100%; max-width: 380px; padding: 28px; }
.auth h1 { margin: 16px 0 4px; }
.auth p.lead { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input { width: 100%; font: inherit; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); outline: none; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input.code { letter-spacing: .4em; font-size: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.auth .btn { width: 100%; padding: 12px; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin-bottom: 8px; }
.qr { background: #fff; padding: 12px; border-radius: 12px; width: 200px; margin: 0 auto 12px; }
.qr svg { display: block; width: 100%; height: auto; }
.secret { text-align: center; font-family: ui-monospace, monospace; font-size: 13px; color: var(--muted); word-break: break-all; margin-bottom: 18px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 760px) {
  .top { padding: 10px 14px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin: 6px 0 0; overflow-x: auto; }
  .updated { display: none; }
  main { padding: 16px 14px; }
  .grid { grid-template-columns: 1fr; }
}

.sel { width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.rot-check { width: 34px; } .rot-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.rot-act { width: 150px; text-align: right; } .rot-done td { opacity: .55; } .rot-done b { text-decoration: line-through; }
textarea.ct { width: 100%; min-height: 230px; font: inherit; font-size: 13px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin: 6px 0; }
.nav button, .btn { white-space: nowrap; }
.rot-secret td { border-top: 0; padding-top: 0; }
.rot-in { display: flex; gap: 8px; margin-top: 6px; max-width: 560px; }
.rot-in input { flex: 1; min-width: 0; font: inherit; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.rot-in .btn { padding: 9px 14px; }
tr:has(+ .rot-secret) td { border-bottom: 0; }

/* ---------- CRM: каркас с боковым меню ---------- */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 61px); }
.side { border-right: 1px solid var(--border); background: var(--surface); }
.side .nav { position: sticky; top: 61px; flex-direction: column; margin: 0; padding: 14px 10px; gap: 2px; }
.side .nav button { width: 100%; padding: 9px 12px; }
.shell main { max-width: 1280px; width: 100%; }
@media (max-width: 900px) {
  .shell { display: block; }
  .side { border-right: 0; border-bottom: 1px solid var(--border); position: sticky; top: 57px; z-index: 9; }
  .side .nav { position: static; flex-direction: row; overflow-x: auto; padding: 8px 10px; }
  .side .nav button { width: auto; }
}
.headrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.headrow h1 { margin: 0; }
.headrow .spacer { flex: 1; }
.headrow .btn:last-child { margin-left: auto; }
.headrow .spacer + .btn:last-child { margin-left: 0; }
.search { font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); min-width: 200px; }
.sel.auto { width: auto; }
.sel.mini { padding: 5px 8px; font-size: 13px; margin-top: 10px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.pcard { cursor: pointer; transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--accent); transform: translateY(-1px); }
.pc-line { margin-top: 10px; min-height: 18px; }
.chip.nodot::before { display: none; }
.chip.bad { color: var(--bad); background: var(--bad-soft); } .chip.warn { color: var(--warn); background: var(--warn-soft); } .chip.ok { color: var(--ok); background: var(--ok-soft); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-height: 120px; }
.col-head { font-weight: 650; padding: 4px 6px 10px; display: flex; justify-content: space-between; }
.task { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: pointer; }
.task:hover { border-color: var(--accent); }
.task-title { font-weight: 600; font-size: 14px; }
.task .chips { margin-top: 8px; }
.done-row { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.done-row:last-of-type { border-bottom: 0; }
.done-row > span:nth-child(2) { flex: 1; }
.done-row[data-task] { cursor: pointer; }
.todo { margin: 10px 0; }
.todo-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 14px; cursor: pointer; }
.todo-row input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 1px; flex: none; }
.rot-done span { text-decoration: line-through; opacity: .6; }
.card .title { font-weight: 650; font-size: 16px; }
.kv.left dd { text-align: left; }
.pnotes { margin-top: 12px; color: var(--muted); }
.modal { position: fixed; inset: 0; background: rgba(10,12,18,.45); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal-card { width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal-card .card-head { margin-bottom: 14px; justify-content: space-between; }
.modal-card .iconbtn { font-size: 20px; }
.modal-act { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.modal-act .spacer { flex: 1; }
.btn.danger { color: var(--bad); }
.field select.sel, .field textarea.ct { margin: 0; }
@media (max-width: 760px) { .kanban { grid-template-columns: repeat(4, 85vw); } .grid.two { grid-template-columns: 1fr; } }
.modal textarea.ct { min-height: 90px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; } .stat .value { font-size: 22px; } .headrow .search { min-width: 0; flex: 1; } }
/* проекты — таблица */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; align-items: center; }
.fchip { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.fchip span { color: var(--faint); margin-left: 2px; }
.fchip.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.fsep { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }
.ptable td { vertical-align: top; }
.ptable .prow { cursor: pointer; }
.ptable .prow:hover td { background: var(--surface-2); }
.ptable .grow td { background: var(--surface-2); font-weight: 650; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 12px; }
.ptable .pnext { max-width: 360px; font-size: 14px; }
.ptable .pprog { width: 130px; }
.ptable .pprog .bar { margin-top: 6px; }
.center { text-align: center; }
.small { font-size: 12.5px; margin-top: 3px; }
@media (max-width: 760px) { .ptable th:nth-child(3), .ptable td:nth-child(3), .ptable th:nth-child(5), .ptable td:nth-child(5) { display: none; } .ptable .pprog { width: 80px; } }
.who { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; margin-right: 6px; vertical-align: 1px; letter-spacing: .03em; }
.who.ai { background: linear-gradient(135deg, var(--accent), #8b5cf6); color: #fff; }
.who.me { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.task.is-ai { border-left: 3px solid var(--accent); }
.task-act { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.task-act .sel.mini { margin-top: 0; flex: 1; }
.btn.mini { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.filters.inline { margin: 0; }
.agents { display: grid; gap: 10px; margin-top: 14px; }
.agent { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.agent:hover:not(:disabled) { border-color: var(--accent); }
.agent.best { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.agent:disabled { opacity: .6; cursor: default; }
.ag-right { text-align: right; }
.ag-state { font-size: 13px; font-weight: 600; }
/* проекты: список слева, карточка справа */
.split { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.plist { padding: 12px; position: sticky; top: 76px; max-height: calc(100vh - 92px); display: flex; flex-direction: column; gap: 8px; }
.pl-head { display: flex; gap: 8px; } .pl-head .search { flex: 1; min-width: 0; }
.plist .filters { margin: 0; } .plist .fchip { padding: 4px 9px; font-size: 12px; }
.plist .sel.mini { margin: 0; }
.pl-items { overflow-y: auto; margin: 0 -6px; padding: 0 6px; flex: 1; }
.pgroup { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 4px 4px; }
.pgroup span { color: var(--faint); }
.pitem { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.pitem:hover { background: var(--surface-2); }
.pitem.on { background: var(--accent-soft); }
.pitem.on .pi-name { color: var(--accent); }
.pitem .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--faint); }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
.pi-main { flex: 1; min-width: 0; }
.pi-name { font-weight: 600; font-size: 14px; line-height: 1.35; }
.pi-sub { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-n { font-size: 12px; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 1px 7px; margin-top: 2px; }
.pdetail { min-width: 0; }
.pdetail .grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pempty { padding: 60px 20px; }
.only-mobile { display: none; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .plist { position: static; max-height: none; }
  .split.has-cur .plist { display: none; }
  .split:not(.has-cur) .pdetail { display: none; }
  .only-mobile { display: inline-flex; }
}
/* сворачивание */
.split.pl-hidden { grid-template-columns: minmax(0, 1fr); }
.split.pl-hidden .plist { display: none; }
.headrow .iconbtn { flex: none; font-size: 18px; }
.only-desktop { display: grid; }
@media (max-width: 900px) { .only-desktop { display: none !important; } }
.side { display: flex; flex-direction: column; }
.side-toggle { margin: auto 10px 14px; position: sticky; bottom: 14px; display: flex; gap: 8px; align-items: center; background: none; border: 0; color: var(--faint); padding: 8px 12px; border-radius: 9px; font-size: 13px; }
.side-toggle:hover { background: var(--surface-2); color: var(--text); }
body.side-mini .shell { grid-template-columns: 64px 1fr; }
body.side-mini .side .nav button { font-size: 0; justify-content: center; padding: 10px 0; gap: 0; }
body.side-mini .side .nav button svg { width: 20px; height: 20px; }
body.side-mini .side-toggle span { display: none; }
body.side-mini .side-toggle { justify-content: center; margin: auto 8px 14px; }
body.side-mini .side-toggle svg { transform: rotate(180deg); }
@media (max-width: 900px) { .side-toggle { display: none; } body.side-mini .side .nav button { font-size: inherit; padding: 9px 12px; gap: 7px; } }
/* проекты: список — вторая колонка вплотную к меню, во всю высоту */
body.tab-projects .shell main { max-width: none; margin: 0; padding: 0; }
body.tab-projects .split { gap: 0; grid-template-columns: 310px minmax(0, 1fr); min-height: calc(100vh - 61px); }
body.tab-projects .plist { border-radius: 0; border: 0; border-right: 1px solid var(--border); box-shadow: none; top: 61px; height: calc(100vh - 61px); max-height: none; padding: 14px 12px; }
body.tab-projects .pdetail { padding: 24px 28px; max-width: 1200px; }
body.tab-projects .split.pl-hidden { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) {
  body.tab-projects .split { grid-template-columns: 1fr; min-height: 0; }
  body.tab-projects .plist { height: auto; border-right: 0; }
  body.tab-projects .pdetail { padding: 16px 14px; }
}
.pl-title { display: flex; align-items: center; gap: 8px; font-weight: 650; padding: 2px 4px 4px; }
.pl-title .spacer { flex: 1; }
.iconbtn.sm { width: 30px; height: 30px; border-radius: 8px; font-size: 16px; }
.pgroup { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; padding: 6px 6px; border-radius: 8px; background: var(--surface-2); margin: 10px 0 4px; }
.pgroup .pg-arrow { transition: transform .15s; font-size: 11px; }
.pgroup.closed .pg-arrow { transform: rotate(-90deg); }
.pgroup .pg-n { margin-left: auto; color: var(--faint); }
.pitem { align-items: center; }
.pi-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--muted); }
.pi-ico svg.i { width: 16px; height: 16px; }
.pi-ico.bad { color: var(--bad); background: var(--bad-soft); } .pi-ico.warn { color: var(--warn); background: var(--warn-soft); } .pi-ico.ok { color: var(--ok); background: var(--ok-soft); }
.pi-bar { height: 4px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 5px; }
.pi-bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); }
.pi-bar.ok > i { background: var(--ok); } .pi-bar.warn > i { background: var(--warn); } .pi-bar.bad > i { background: var(--bad); }
.pi-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.pi-pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* дашборд */
.tile { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.tile:hover { border-color: var(--accent); }
.tile .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.dash-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dhead { font-weight: 650; font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dhead.sub { font-size: 14px; margin-top: 18px; }
.dt-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); cursor: pointer; }
.dt-row:hover .dt-title { color: var(--accent); }
.dt-row .who { margin-top: 2px; flex: none; }
.dt-main { flex: 1; min-width: 0; }
.dt-title { font-weight: 600; font-size: 14px; }
.dt-sub { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.dt-sub .chip { margin: 0; }
.prio { color: var(--bad); font-weight: 800; margin-right: 4px; }
.ev-row { display: flex; gap: 14px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }
.ev-date { width: 92px; flex: none; display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.ev-date b { font-size: 15px; color: var(--text); }
.ev-date.bad b { color: var(--bad); } .ev-date.warn b { color: var(--warn); }
.pst { display: flex; flex-wrap: wrap; gap: 8px; }
.pst-item { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 6px 12px 6px 6px; font-size: 13.5px; }
.pst-item:hover { border-color: var(--accent); }
.pst-n { min-width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); }
.pst-n.ok { background: var(--ok-soft); color: var(--ok); } .pst-n.warn { background: var(--warn-soft); color: var(--warn); } .pst-n.bad { background: var(--bad-soft); color: var(--bad); }
.dn-group { padding: 8px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.dn-p { font-weight: 600; margin-bottom: 2px; }
.dn-group ul { margin: 0; padding-left: 18px; color: var(--muted); }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .dash-grid, .dash-grid.two { grid-template-columns: 1fr; } }
.rv-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.rv-row:first-child { border-top: 0; }
.rv-main { flex: 1; min-width: 0; }
.rv-text { font-size: 14.5px; white-space: pre-wrap; }
.rv-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; width: 150px; flex: none; }
.rv-act .sel.mini { margin: 0; }
.rv-closed { opacity: .55; }
.pi-n.rv { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.who.rvb { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 760px) { .rv-row { flex-direction: column; } .rv-act { width: 100%; flex-direction: row; } }
