/* Goal OS — Clean Minimalist OLED workspace (Linear / Vercel aesthetic) */

:root {
  --bg: #000000;              /* OLED total black */
  --bg-side: #050505;
  --surface: #0c0c0c;         /* matte card */
  --surface-2: #141414;       /* raised card */
  --border: #1f1f1f;
  --border-2: #27272a;
  --border-strong: #3f3f46;

  --text: #ffffff;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --text-4: #52525b;

  --hover: #161616;             /* light row/card hover lift */
  --hover-soft: rgba(255,255,255,0.05);
  --active: rgba(255,255,255,0.09);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --spring: cubic-bezier(0.2, 0.9, 0.3, 1.15);

  --accent: #5e6ad2;          /* Linear blurple */
  --accent-dim: rgba(94,106,210,0.16);

  --green: #4cb782;
  --red: #eb5757;
  --amber: #f2c94c;
  --blue: #5e6ad2;
  --p-high: #eb5757;
  --p-medium: #f2c94c;
  --p-low: #5e6ad2;
  --p-none: #52525b;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #app { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
}

* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 99px; transition: background 0.15s ease; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
#center-body::-webkit-scrollbar-thumb, .sb-scroll::-webkit-scrollbar-thumb,
#inspector::-webkit-scrollbar-thumb, #m-sheet::-webkit-scrollbar-thumb { background: transparent; }
#center-body:hover::-webkit-scrollbar-thumb, .sb-scroll:hover::-webkit-scrollbar-thumb,
#inspector:hover::-webkit-scrollbar-thumb, #m-sheet:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }

#app { display: flex; height: 100vh; }
.hidden { display: none !important; }

/* ============================= Sidebar ============================= */
#sidebar {
  width: 244px; flex: 0 0 244px;
  background: var(--bg-side);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.sb-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.sb-logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  display: grid; place-items: center; font-size: 15px;
}
.sb-title { font-weight: 650; font-size: 13.5px; }
.sb-sub { font-size: 11px; color: var(--text-3); }
.sb-scroll { flex: 1; overflow-y: auto; padding: 10px 8px 24px; }

.sb-group {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-4);
  padding: 16px 10px 5px;
}
.sb-projects-head { display: flex; justify-content: space-between; align-items: center; }
.sb-projects-head button {
  background: none; border: none; color: var(--text-3);
  font-size: 14px; cursor: pointer; padding: 0 4px; border-radius: 4px;
}
.sb-projects-head button:hover { color: var(--text); background: var(--hover); }

.sb-nav { display: flex; flex-direction: column; gap: 1px; }
.sb-item {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background 120ms ease, color 120ms ease, transform 90ms ease;
}
.sb-item:hover { background: var(--hover-soft); color: var(--text); }
.sb-item:active { transform: scale(0.98); }
.sb-item.active { background: var(--active); color: var(--text); }
.sb-ico { width: 16px; text-align: center; font-size: 12px; color: var(--text-3); flex: 0 0 16px; }
.sb-item.active .sb-ico { color: var(--text); }
.sb-count { margin-left: auto; font-size: 11px; color: var(--text-3); }
.sb-badge {
  margin-left: auto; min-width: 18px; height: 17px; padding: 0 5px;
  border-radius: 9px; background: var(--accent-dim); color: #aab1f5;
  font-size: 10.5px; font-weight: 650; display: grid; place-items: center;
}
.sb-badge:empty, .sb-count:empty { display: none; }
.sb-live {
  margin-left: auto; font-size: 10px; font-weight: 600; color: var(--green);
}
.sb-live:empty { display: none; }
.sb-live::before { content: "● "; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
#new-project-row { padding: 4px 8px; }
#new-project-row input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm); color: var(--text); padding: 6px 9px; font-size: 12.5px;
  outline: none;
}

/* ============================= Center ============================= */
#center { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#center-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 24px 13px; border-bottom: 1px solid var(--border);
}
.ch-left { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
#view-title { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }
.ch-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-right { display: flex; align-items: center; gap: 8px; }

#center-body { flex: 1; overflow-y: auto; padding: 20px 24px 60px; }

.seg {
  display: inline-flex; background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--r-sm); padding: 2px; gap: 1px;
}
.seg button {
  background: none; border: none; color: var(--text-3);
  font: inherit; font-size: 12px; font-weight: 550;
  padding: 4px 10px; border-radius: 4px; cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--active); color: var(--text); }

/* ============================= Primitives ============================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 550;
  padding: 6px 12px; border-radius: var(--r-sm); cursor: pointer;
  transition: background 130ms ease, border-color 130ms ease, color 130ms ease, transform 90ms ease;
  white-space: nowrap;
}
.btn:hover { background: var(--hover); border-color: var(--border-strong); color: var(--text); }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: #ededed; border-color: #ededed; color: #0a0a0a; font-weight: 600; }
.btn.primary:hover { background: #ffffff; border-color: #ffffff; }
.btn.primary:active { transform: scale(0.96); }
.btn.accent { background: var(--accent-dim); border-color: rgba(94,106,210,0.4); color: #aab1f5; }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: rgba(235,87,87,0.5); }
.btn.sm { padding: 3px 9px; font-size: 11.5px; }

input, select, textarea {
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm); color: var(--text);
  font: inherit; font-size: 12.5px; padding: 6px 9px; outline: none;
  color-scheme: dark;
}
input, select, textarea { transition: border-color 130ms ease, box-shadow 130ms ease; }
input:focus, select:focus, textarea:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(94,106,210,0.13); }
input::placeholder, textarea::placeholder { color: var(--text-4); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px;
  margin-bottom: 14px;
}
.card-t {
  font-size: 11px; font-weight: 650; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-3); margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center;
}
.empty {
  color: var(--text-4); font-size: 12.5px; text-align: center;
  padding: 40px 20px; border: 1px dashed var(--border-2); border-radius: var(--r-md);
}

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 650; letter-spacing: 0.03em;
  padding: 2px 8px; border-radius: 99px; border: 1px solid var(--border-2);
  color: var(--text-2); text-transform: uppercase; white-space: nowrap;
}
.pill.ok { color: var(--green); border-color: rgba(76,183,130,0.35); }
.pill.warn { color: var(--amber); border-color: rgba(242,201,76,0.35); }
.pill.err { color: var(--red); border-color: rgba(235,87,87,0.35); }
.pill.info { color: #aab1f5; border-color: rgba(94,106,210,0.4); }
.pill.dim { color: var(--text-3); }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--text-3);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 8px; border-radius: 99px; white-space: nowrap;
}
.chip.overdue { color: var(--red); border-color: rgba(235,87,87,0.35); }
.chip.today { color: var(--amber); border-color: rgba(242,201,76,0.35); }

.bar { position: relative; height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; flex: 1; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--text-2); border-radius: 4px; display: block; }
.bar > i.full { background: var(--green); }
.bar-pct { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ============================= Task list ============================= */
.qa-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 4px 8px 4px 14px; margin-bottom: 18px;
  transition: border-color 130ms ease;
}
.qa-row:focus-within { border-color: var(--border-strong); }
.qa-row .qa-plus { color: var(--text-3); font-size: 15px; }
.qa-row input { flex: 1; background: none; border: none; font-size: 13.5px; padding: 8px 0; }
.qa-row select { font-size: 11.5px; padding: 4px 6px; color: var(--text-3); }

.group-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 650; color: var(--text-3);
  padding: 18px 2px 6px;
}
.group-head:first-child { padding-top: 4px; }
.group-head .g-count { color: var(--text-4); font-weight: 500; }
.group-head .g-line { flex: 1; height: 1px; background: var(--border); }

.trow {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 90ms ease;
}
.trow:hover { background: var(--hover); border-color: var(--border); }
.trow:active { transform: scale(0.997); }
.trow.sel { background: var(--active); }
[data-task].kb-focus {
  background: var(--hover); border-color: var(--border-strong);
  box-shadow: inset 2.5px 0 0 var(--accent);
}
.trow.done .t-title { color: var(--text-4); text-decoration: line-through; }

.tcheck {
  width: 17px; height: 17px; flex: 0 0 17px;
  border-radius: 6px; border: 1.5px solid var(--border-strong);
  cursor: pointer; position: relative; display: grid; place-items: center;
  transition: background 140ms ease, border-color 140ms ease, transform 100ms ease;
}
.tcheck:hover { border-color: var(--text-2); transform: scale(1.08); }
.tcheck:active { transform: scale(0.9); }
.tcheck svg { width: 11px; height: 11px; display: block; }
.tcheck svg path {
  stroke: #fff; stroke-width: 2.2; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 14; stroke-dashoffset: 14;
  transition: stroke-dashoffset 160ms ease 40ms;
}
.tcheck.p-high { border-color: var(--p-high); }
.tcheck.p-medium { border-color: var(--p-medium); }
.tcheck.p-low { border-color: var(--p-low); }
.tcheck.checked { background: var(--accent); border-color: var(--accent); }
.tcheck.checked svg path { stroke-dashoffset: 0; }
.t-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.t-title { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-meta { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.t-progress { display: flex; align-items: center; gap: 7px; width: 110px; flex: 0 0 110px; }

/* Board */
.board { display: flex; gap: 12px; align-items: flex-start; }
.b-col {
  flex: 1; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 8px;
}
.b-col-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  padding: 5px 7px 9px;
}
.b-col-head .g-count { margin-left: auto; color: var(--text-4); font-weight: 500; font-size: 11px; }
.b-card {
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm); padding: 9px 11px; margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease, transform 90ms ease;
}
.b-card:hover { border-color: var(--border-strong); background: var(--hover); }
.b-card:active { transform: scale(0.98); }
.b-card.kb-focus { box-shadow: inset 2.5px 0 0 var(--accent); border-color: var(--border-strong); }
.b-card.sel { border-color: var(--accent); }
.b-card .t-title { display: block; white-space: normal; margin-bottom: 6px; }
.b-empty { color: var(--text-4); font-size: 11.5px; text-align: center; padding: 14px 0; }

/* ============================= Control Center ============================= */
.goal-hero {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 14px;
  transition: border-color 130ms ease;
}
.goal-hero:hover { border-color: var(--border-strong); }
.goal-label { font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.goal-title { font-size: 21px; font-weight: 650; letter-spacing: -0.02em; margin: 10px 0 4px; }
.goal-sub { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.goal-grid { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
.goal-kv { min-width: 120px; }
.goal-kv .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-4); margin-bottom: 3px; }
.goal-kv .v { font-size: 13px; font-weight: 550; }
.goal-prog { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px 16px; cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease, transform 90ms ease;
}
.stat:hover { border-color: var(--border-strong); background: var(--hover); }
.stat:active { transform: scale(0.97); }
.stat .v { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.stat .v.green { color: var(--green); } .stat .v.red { color: var(--red); }
.stat .v.amber { color: var(--amber); } .stat .v.acc { color: #aab1f5; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .row2 { grid-template-columns: 1fr; } }

.mini-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 12.5px; transition: background 120ms ease;
}
.mini-row:hover { background: var(--hover); }
.mini-row:active { background: var(--active); }
.mini-row .m-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .m-s { color: var(--text-3); font-size: 11.5px; white-space: nowrap; }

/* ============================= Lists (automations / processes / inbox) ============================= */
.lrow {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 11px 14px; margin-bottom: 8px;
  transition: border-color 130ms ease, background 130ms ease, transform 90ms ease;
}
.lrow.click { cursor: pointer; }
.lrow.click:hover { border-color: var(--border-strong); background: var(--hover); }
.lrow.click:active { transform: scale(0.995); }
.lrow.sel { border-color: var(--accent); background: var(--surface-2); }
.lrow.dim { opacity: 0.55; }
.l-main { flex: 1; min-width: 0; }
.l-t { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-s { font-size: 11.5px; color: var(--text-3); margin-top: 1px; display: flex; gap: 10px; flex-wrap: wrap; }

.switch {
  width: 32px; height: 18px; border-radius: 99px; flex: 0 0 32px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  position: relative; cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--text-3);
  transition: left 160ms var(--spring), background 150ms ease, width 110ms ease;
}
.switch:active::after { width: 15px; }
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on::after { left: 16px; background: #fff; }
.switch.on:active::after { left: 13px; }

.tmr-count { font-family: var(--mono); font-size: 12px; color: var(--amber); }

.rt-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 6px 12px; font-size: 12px; font-weight: 550;
}
.rt-chip .d { width: 7px; height: 7px; border-radius: 50%; }
.rt-chip .d.ok { background: var(--green); }
.rt-chip .d.bad { background: var(--red); }
.rt-chip small { color: var(--text-3); font-weight: 400; }

/* ============================= Discovery ============================= */
.hboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1200px) { .hboard { grid-template-columns: repeat(2, 1fr); } }
.h-col {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 8px; min-height: 120px;
}
.h-card {
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm); padding: 11px 12px; margin-bottom: 6px; cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease, transform 90ms ease;
}
.h-card:hover { border-color: var(--border-strong); background: var(--hover); }
.h-card:active { transform: scale(0.985); }
.h-card.sel { border-color: var(--accent); }
.h-card .hc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.h-card .hc-title { font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.h-card .hc-desc { font-size: 11.5px; color: var(--text-3); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h-card .hc-meta { display: flex; gap: 8px; font-size: 10.5px; color: var(--text-3); margin-top: 7px; flex-wrap: wrap; }
.h-card .hc-actions { display: flex; gap: 6px; margin-top: 9px; }
.h-card .hc-actions .btn { flex: 1; }

/* ============================= Experience ============================= */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.ref-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px 16px;
  transition: border-color 130ms ease;
}
.ref-card:hover { border-color: var(--border-2); }
.ref-card .rc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.ref-card .rc-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
.ref-card .rc-body { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }

/* ============================= Inbox ============================= */
.inbox-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 15px 18px; margin-bottom: 10px;
  transition: border-color 130ms ease, background 130ms ease;
}
.inbox-item:hover { border-color: var(--border-2); background: #0e0e0e; }
.inbox-ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px;
  display: grid; place-items: center; font-size: 14px;
  background: var(--surface-2); border: 1px solid var(--border-2);
}
.inbox-main { flex: 1; min-width: 0; }
.inbox-t { font-size: 13.5px; font-weight: 600; }
.inbox-d { font-size: 12px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }
.inbox-actions { display: flex; gap: 7px; align-items: center; flex: 0 0 auto; }

/* ============================= Inspector ============================= */
#inspector {
  width: 430px; flex: 0 0 430px;
  background: var(--bg-side);
  border-left: 1px solid var(--border);
  overflow-y: auto; overscroll-behavior: contain;
  display: none;
}
#inspector.open { display: block; animation: insp-in 200ms var(--ease); }
@keyframes insp-in { from { transform: translateX(18px); opacity: 0; } }
.hidden-panel { display: none; }
#inspector-body { padding: 20px 20px 60px; }

.i-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.i-title {
  flex: 1; background: none; border: none; resize: none;
  font-family: var(--font); font-size: 16px; font-weight: 650; letter-spacing: -0.02em;
  color: var(--text); line-height: 1.35; padding: 0; outline: none; field-sizing: content;
}
.i-close {
  background: none; border: none; color: var(--text-3); font-size: 14px;
  cursor: pointer; padding: 3px 6px; border-radius: 5px;
}
.i-close:hover { background: var(--hover); color: var(--text); }

.i-kv {
  display: grid; grid-template-columns: 92px 1fr; gap: 10px 14px;
  align-items: center; margin-bottom: 20px;
}
.i-kv .k { font-size: 12px; color: var(--text-3); }
.i-kv select, .i-kv input { width: 100%; }

.seg.prio { width: 100%; }
.seg.prio button { flex: 1; }
.seg.prio button.on.high { color: var(--p-high); }
.seg.prio button.on.medium { color: var(--p-medium); }
.seg.prio button.on.low { color: var(--p-low); }

.i-sec { border-top: 1px solid var(--border); padding: 16px 0; }
.i-sec-t {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 650; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-3); margin-bottom: 11px;
}

.wait-banner {
  background: rgba(242,201,76,0.06); border: 1px solid rgba(242,201,76,0.25);
  border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 16px;
  font-size: 12px; color: var(--amber); line-height: 1.5;
}

.dod-row, .sub-row {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 4px; border-radius: 5px; font-size: 12.5px;
}
.sub-row.done .s-t { color: var(--text-4); text-decoration: line-through; }
.dod-mark { width: 15px; text-align: center; font-weight: 700; flex: 0 0 15px; }
.dod-mark.ok { color: var(--green); } .dod-mark.no { color: var(--red); } .dod-mark.na { color: var(--text-4); }
.x-btn {
  margin-left: auto; background: none; border: none; color: var(--text-4);
  cursor: pointer; font-size: 11px; padding: 2px 5px; border-radius: 4px;
  visibility: hidden; opacity: 0; transition: color 120ms ease, background 120ms ease, opacity 120ms ease;
}
.dod-row:hover .x-btn, .sub-row:hover .x-btn, .upd:hover .x-btn { visibility: visible; opacity: 1; }
.x-btn:hover { color: var(--red); background: var(--hover); }
.sub-row, .dod-row { transition: background 120ms ease; }
.sub-row:hover, .dod-row:hover { background: var(--hover-soft); }

.inline-add { display: flex; gap: 6px; margin-top: 8px; }
.inline-add input { flex: 1; font-size: 12px; }

.ev-item { display: flex; gap: 10px; padding: 8px 4px; font-size: 12px; border-bottom: 1px solid var(--border); }
.ev-item:last-child { border-bottom: none; }
.lvl {
  font-size: 10px; font-weight: 750; padding: 1px 6px; border-radius: 4px;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text-3);
  height: fit-content; font-family: var(--mono);
}
.lvl.E2, .lvl.E3 { color: var(--green); border-color: rgba(76,183,130,0.35); }
.lvl.E1 { color: #aab1f5; border-color: rgba(94,106,210,0.4); }
.ev-main { flex: 1; min-width: 0; }
.ev-src { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-sub { font-size: 11px; color: var(--text-4); }
.ev-hash { font-family: var(--mono); font-size: 10px; color: var(--text-4); }

.upd { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.upd:last-child { border-bottom: none; }
.upd-head { display: flex; gap: 8px; align-items: baseline; font-size: 11px; color: var(--text-4); margin-bottom: 4px; }
.upd-head .a { color: var(--text-2); font-weight: 600; }
.upd-head .k-tag { text-transform: uppercase; letter-spacing: 0.05em; font-size: 9.5px; }
.upd-metrics { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 5px; }
.md-body { color: var(--text-2); line-height: 1.6; font-size: 12.5px; user-select: text; }
.md-body h1,.md-body h2,.md-body h3 { color: var(--text); margin: 12px 0 6px; font-size: 14px; }
.md-body h4,.md-body h5,.md-body h6 { color: var(--text); margin: 10px 0 4px; font-size: 12.5px; }
.md-body p { margin: 6px 0; }
.md-body ul,.md-body ol { padding-left: 18px; margin: 6px 0; }
.md-body code { font-family: var(--mono); font-size: 11.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.md-body pre { background: var(--surface-2); border: 1px solid var(--border-2); padding: 10px 12px; border-radius: var(--r-sm); overflow-x: auto; margin: 8px 0; }
.md-body pre code { background: none; padding: 0; }
.md-body a { color: #aab1f5; }
.md-body blockquote { border-left: 2px solid var(--border-strong); padding-left: 12px; color: var(--text-3); margin: 8px 0; }
.upd-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: #aab1f5; font-size: 11.5px; text-decoration: none;
  padding: 3px 9px; border: 1px solid var(--border-2); border-radius: 99px; margin: 2px 4px 2px 0;
}
.upd-link:hover { border-color: var(--accent); }

.i-danger { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 8px; }

.lead-row {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm); padding: 9px 11px; margin-bottom: 6px; font-size: 12px;
}
.lead-row input[type=checkbox] { margin-top: 3px; accent-color: var(--accent); }
.lead-co { font-weight: 600; }
.lead-meta { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.verdict {
  border: 1px solid var(--border-2); border-radius: var(--r-md);
  padding: 12px 14px; margin-bottom: 14px; font-size: 12px;
}
.verdict.pass { border-color: rgba(76,183,130,0.4); }
.verdict.fail { border-color: rgba(235,87,87,0.4); }
.verdict .v-head { font-weight: 650; font-size: 11px; letter-spacing: 0.04em; margin-bottom: 8px; }
.verdict.pass .v-head { color: var(--green); }
.verdict.fail .v-head { color: var(--red); }
.verdict textarea { width: 100%; min-height: 80px; font-size: 12px; line-height: 1.5; resize: vertical; }

/* ============================= Toasts ============================= */
#toasts {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  display: flex; align-items: center; gap: 9px;
  background: #161616; border: 1px solid var(--border-strong);
  color: var(--text); font-size: 12.5px; font-weight: 550;
  padding: 10px 16px 10px 13px; border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.65);
  max-width: min(380px, 84vw);
  transform: translateY(10px); opacity: 0;
  transition: transform 220ms var(--spring), opacity 160ms ease;
}
.toast-item.in { transform: translateY(0); opacity: 1; }
.toast-item.out { transform: translateX(14px); opacity: 0; }
.toast-item .t-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: var(--text-3); }
.toast-item.success .t-dot { background: var(--green); box-shadow: 0 0 8px rgba(76,183,130,0.55); }
.toast-item.warn .t-dot { background: var(--amber); box-shadow: 0 0 8px rgba(242,201,76,0.5); }
.toast-item.error .t-dot { background: var(--red); box-shadow: 0 0 8px rgba(235,87,87,0.55); }
.toast-item.info .t-dot { background: var(--accent); box-shadow: 0 0 8px rgba(94,106,210,0.55); }

/* ============================= Skeleton shimmer ============================= */
.skel {
  position: relative; overflow: hidden;
  background: var(--surface-2); border-radius: var(--r-sm);
}
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.055) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: skel-shimmer 1.35s ease-in-out infinite;
}
@keyframes skel-shimmer { to { transform: translateX(100%); } }
.skel-row { height: 38px; margin-bottom: 8px; }

/* ============================= Empty states ============================= */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 64px 24px;
  border: 1px dashed var(--border-2); border-radius: var(--r-lg);
}
.empty-state .es-ico {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  display: grid; place-items: center; margin-bottom: 15px; color: var(--text-3);
}
.empty-state .es-ico svg { width: 21px; height: 21px; }
.empty-state .es-t { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.empty-state .es-s { font-size: 12.5px; color: var(--text-3); max-width: 340px; line-height: 1.55; margin-bottom: 16px; }
.empty-state .es-s:last-child { margin-bottom: 0; }

/* ============================= Modals & overlays ============================= */
#qc-overlay, #kbd-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 18vh 16px 16px;
  opacity: 0; transition: opacity 160ms ease;
}
#qc-overlay.show, #kbd-overlay.show { opacity: 1; }
.modal-card {
  width: min(480px, 100%);
  background: #101010; border: 1px solid var(--border-2);
  border-radius: var(--r-lg); padding: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.75);
  transform: translateY(10px) scale(0.98);
  transition: transform 180ms var(--spring);
}
#qc-overlay.show .modal-card, #kbd-overlay.show .modal-card { transform: none; }
.modal-t { font-size: 13px; font-weight: 650; color: var(--text-2); margin-bottom: 13px; }
#qc-title { width: 100%; font-size: 14px; padding: 9px 11px; margin-bottom: 10px; }
.modal-row { display: flex; gap: 7px; flex-wrap: wrap; }
.modal-row select { flex: 1; min-width: 100px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; }
.modal-hint { font-size: 11px; color: var(--text-4); }

kbd {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 6px; color: var(--text-2); white-space: nowrap;
}
.kbd-list { display: flex; flex-direction: column; }
.kbd-list > div {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 2px; font-size: 12.5px; color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.kbd-list > div:last-child { border-bottom: none; }
.kbd-list .keys { min-width: 96px; display: flex; gap: 4px; flex: 0 0 96px; }

#kbd-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 44;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-2);
  color: var(--text-3); font: inherit; font-size: 13px; font-weight: 650;
  cursor: pointer; display: grid; place-items: center;
  transition: color 130ms ease, border-color 130ms ease, background 130ms ease, transform 90ms ease;
}
#kbd-fab:hover { color: var(--text); border-color: var(--border-strong); background: var(--hover); }
#kbd-fab:active { transform: scale(0.9); }

/* ============================= Scrim & mobile sheet ============================= */
#scrim {
  position: fixed; inset: 0; z-index: 46;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 200ms ease;
}
#scrim.show { opacity: 1; pointer-events: auto; }

#mnav, #m-sheet { display: none; }

:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* ============================= Mobile (≤860px) ============================= */
@media (max-width: 860px) {
  /* Sidebar is replaced by the bottom navigation bar. */
  #sidebar { display: none; }

  /* Header controls wrap below the title instead of overflowing. */
  #center-header { flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px; }
  .ch-right { flex-wrap: wrap; }
  #center-body { padding: 14px 14px 96px; }

  /* Task rows wrap meta chips under the title; kanban scrolls in-place. */
  .trow { flex-wrap: wrap; }
  .t-main { flex: 1 1 100%; }
  .t-meta { flex-wrap: wrap; flex-shrink: 1; }
  .t-progress { width: auto; flex: 1 1 110px; }
  .qa-row { flex-wrap: wrap; }
  .qa-row input { flex: 1 1 100%; }
  .board { overflow-x: auto; }
  .b-col { min-width: 220px; }

  /* Card grids collapse to one column. */
  .hboard { grid-template-columns: 1fr; }
  .ref-grid { grid-template-columns: 1fr; }

  /* List/inbox rows wrap their trailing actions. */
  .lrow { flex-wrap: wrap; }
  .inbox-item { flex-wrap: wrap; }
  .inbox-actions { flex: 1 1 100%; }

  /* ---- Bottom navigation bar ---- */
  #mnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: rgba(6,6,6,0.9); backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--border);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  #mnav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; color: var(--text-4);
    font: inherit; font-size: 9.5px; font-weight: 600; letter-spacing: 0.02em;
    padding: 6px 0 4px; border-radius: 9px; cursor: pointer; position: relative;
    transition: color 130ms ease, transform 90ms ease;
  }
  #mnav button .mi { font-size: 17px; line-height: 1; }
  #mnav button.active { color: var(--text); }
  #mnav button:active { transform: scale(0.92); }
  #mnav .mn-badge {
    position: absolute; top: 1px; left: calc(50% + 6px);
    min-width: 16px; height: 15px; padding: 0 4px; border-radius: 8px;
    background: var(--accent); color: #fff;
    font-size: 9px; font-weight: 700; display: grid; place-items: center;
  }
  #mnav .mn-badge:empty { display: none; }

  /* ---- "More" bottom sheet ---- */
  #m-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 49;
    background: #0a0a0a; border-top: 1px solid var(--border-2);
    border-radius: 18px 18px 0 0;
    padding: 8px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    max-height: 72vh; overflow-y: auto;
    transform: translateY(105%);
    transition: transform 260ms cubic-bezier(0.32, 0.72, 0.24, 1);
  }
  #m-sheet.show { transform: translateY(0); }
  #m-sheet::before {
    content: ""; display: block; margin: 4px auto 10px;
    width: 36px; height: 4px; border-radius: 99px; background: var(--border-strong);
  }
  .ms-group {
    font-size: 10.5px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-4); padding: 10px 10px 4px;
  }
  .ms-item {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 10px; border-radius: 9px;
    color: var(--text-2); font-size: 13.5px; font-weight: 550; cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
  }
  .ms-item:active { background: var(--hover); color: var(--text); }
  .ms-item .ms-on { margin-left: auto; color: var(--accent); font-size: 9px; }

  /* ---- Inspector as a swipeable bottom sheet ---- */
  #inspector {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; height: 88vh; flex: none; z-index: 48;
    border-left: none; border-top: 1px solid var(--border-2);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -18px 60px rgba(0,0,0,0.7);
    display: block; visibility: hidden;
    transform: translateY(104%);
    transition: transform 280ms cubic-bezier(0.32, 0.72, 0.24, 1), visibility 0s 280ms;
  }
  #inspector.open {
    visibility: visible; transform: translateY(0);
    transition: transform 280ms cubic-bezier(0.32, 0.72, 0.24, 1);
    animation: none;
  }
  #inspector::before {
    content: ""; position: sticky; top: 7px; display: block;
    margin: 7px auto -11px; width: 38px; height: 4.5px;
    border-radius: 99px; background: var(--border-strong); z-index: 2;
  }
  #inspector-body { padding-top: 22px; }

  #kbd-fab { bottom: 78px; }
  #qc-overlay, #kbd-overlay { padding-top: 12vh; }
  #toasts { bottom: 76px; }
}

/* ============================= Elite motion & FX ============================= */
.rise-in { animation: rise-in 320ms var(--ease) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

#fx-canvas {
  position: fixed; inset: 0; z-index: 120;
  pointer-events: none;
}

/* Ambient cursor-tracking glow on hero / stat cards */
.goal-hero, .stat { position: relative; overflow: hidden; isolation: isolate; }
.goal-hero::before, .stat::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; pointer-events: none;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%),
    rgba(94,106,210,0.16), rgba(94,106,210,0.045) 45%, transparent 68%);
  opacity: 0; transition: opacity 320ms ease;
}
.goal-hero:hover::before, .stat:hover::before { opacity: 1; }
.goal-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.045) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 900ms ease;
}
.goal-hero:hover::after { transform: translateX(120%); }

/* Checkbox completion pop */
.tcheck.popped { animation: check-pop 260ms var(--spring); }
@keyframes check-pop { 0% { transform: scale(0.7); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* Drag & drop */
[draggable="true"] { user-select: none; }
.dragging { opacity: 0.38; transform: scale(0.985); border-style: dashed !important; border-color: var(--border-strong) !important; }
.trow.drop-top { box-shadow: inset 0 2.5px 0 var(--accent); }
.trow.drop-bot { box-shadow: inset 0 -2.5px 0 var(--accent); }
.b-card.drop-top { box-shadow: inset 0 2.5px 0 var(--accent); }
.b-card.drop-bot { box-shadow: inset 0 -2.5px 0 var(--accent); }
.b-col.col-hot, .h-col.col-hot { border-color: var(--accent); background: rgba(94,106,210,0.05); }
.trow[draggable], .b-card[draggable], .h-card[draggable] { cursor: grab; }
.trow[draggable]:active, .b-card[draggable]:active, .h-card[draggable]:active { cursor: grabbing; }

/* Live pulse — breathing neon dot */
.live-pulse {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); margin-right: 5px; vertical-align: 1px;
  animation: live-breathe 1.7s ease-in-out infinite;
}
.live-pulse.lg { width: 8px; height: 8px; margin-right: 7px; }
@keyframes live-breathe {
  0%, 100% { box-shadow: 0 0 3px rgba(76,183,130,0.7), 0 0 0 0 rgba(76,183,130,0.35); opacity: 1; }
  50% { box-shadow: 0 0 9px rgba(76,183,130,0.9), 0 0 0 5px rgba(76,183,130,0); opacity: 0.72; }
}

/* System health ring */
.stat.health { display: flex; align-items: center; gap: 12px; }
.stat.health .ring { width: 46px; height: 46px; flex: 0 0 46px; transform: rotate(-90deg); }
.ring .ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 4.5; }
.ring .ring-fg { fill: none; stroke-width: 4.5; stroke-linecap: round; transition: stroke-dashoffset 700ms var(--ease), stroke 400ms ease; }
.stat.health .v { font-size: 20px; }

/* Sidebar search trigger + footer */
.sb-search {
  margin: 10px 10px 2px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-3); font-size: 12px;
  padding: 6px 10px; cursor: pointer; font-family: var(--font);
  transition: border-color 130ms ease, color 130ms ease, background 130ms ease;
}
.sb-search:hover { border-color: var(--border-strong); color: var(--text-2); background: var(--hover); }
.sb-search .sb-kbd {
  margin-left: auto; font-family: var(--mono); font-size: 10px; font-weight: 600;
  color: var(--text-4); background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 4px; padding: 1px 5px;
}
.sb-foot {
  border-top: 1px solid var(--border); padding: 8px 10px;
  display: flex; align-items: center; gap: 8px;
}
.sb-foot .snd-toggle {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: none; border: none; color: var(--text-3); font: inherit; font-size: 12px;
  padding: 5px 8px; border-radius: var(--r-sm); cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.sb-foot .snd-toggle:hover { background: var(--hover-soft); color: var(--text); }
.sb-foot .snd-toggle .st-ico { font-size: 13px; }
.sb-foot .snd-toggle .st-state { margin-left: auto; font-size: 10px; color: var(--text-4); }

/* Floating sound FAB (next to kbd fab) */
#snd-fab {
  position: fixed; left: 52px; bottom: 16px; z-index: 44;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-2);
  color: var(--text-3); font: inherit; font-size: 13px;
  cursor: pointer; display: grid; place-items: center;
  transition: color 130ms ease, border-color 130ms ease, background 130ms ease, transform 90ms ease;
}
#snd-fab:hover { color: var(--text); border-color: var(--border-strong); background: var(--hover); }
#snd-fab:active { transform: scale(0.9); }
#snd-fab.muted { opacity: 0.55; }

/* Command palette */
#cp-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,0.62); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 14vh 16px 16px;
  opacity: 0; transition: opacity 150ms ease;
}
#cp-overlay.show { opacity: 1; }
.cp-card {
  width: min(560px, 100%);
  background: #111111; border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: 0 28px 90px rgba(0,0,0,0.8);
  overflow: hidden;
  transform: translateY(8px) scale(0.985);
  transition: transform 170ms var(--spring);
}
#cp-overlay.show .cp-card { transform: none; }
#cp-input {
  width: 100%; background: none; border: none; border-bottom: 1px solid var(--border);
  border-radius: 0; font-size: 14.5px; padding: 14px 18px;
}
#cp-input:focus { box-shadow: none; border-bottom-color: var(--border-strong); }
#cp-results { max-height: 340px; overflow-y: auto; padding: 6px; }
.cp-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  color: var(--text-2); font-size: 13px;
}
.cp-item .cp-ico {
  width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  display: grid; place-items: center; font-size: 12px; color: var(--text-3);
}
.cp-item .cp-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-item .cp-s { font-size: 11px; color: var(--text-4); white-space: nowrap; }
.cp-item.sel { background: var(--active); color: var(--text); }
.cp-item.sel .cp-ico { border-color: var(--accent); color: #aab1f5; }
.cp-group { font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-4); padding: 9px 12px 3px; }
.cp-foot {
  display: flex; gap: 14px; align-items: center;
  border-top: 1px solid var(--border); padding: 8px 16px;
  font-size: 10.5px; color: var(--text-4);
}
.cp-empty { padding: 26px 16px; text-align: center; color: var(--text-4); font-size: 12.5px; }

/* Batch selection */
.trow.sel-multi { background: var(--accent-dim); border-color: rgba(94,106,210,0.45); }
.b-card.sel-multi { border-color: var(--accent); background: rgba(94,106,210,0.08); }
#batchbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(8px);
  z-index: 70; display: flex; align-items: center; gap: 8px;
  background: #141414; border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 8px 10px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.75);
  opacity: 0; pointer-events: none;
  transition: opacity 180ms ease, transform 200ms var(--spring);
}
#batchbar.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
#batchbar .bb-count {
  font-size: 12px; font-weight: 650; color: #aab1f5;
  padding: 0 8px 0 4px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
#batchbar .btn { border-color: var(--border); }

@media (max-width: 860px) {
  #batchbar { bottom: 80px; max-width: calc(100vw - 20px); overflow-x: auto; }
  #snd-fab { bottom: 78px; }
  #cp-overlay { padding-top: 9vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .live-pulse { animation: none; box-shadow: 0 0 6px rgba(76,183,130,0.7); }
}
