/* CKS Commercial Command Center — V2 styles.
   Dense but calm business dashboard. Light/dark via [data-theme]. */

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f7faff;
  --sidebar-1: #0f1b2e;
  --sidebar-2: #14233b;
  --sidebar-ink: #dce5f2;
  --sidebar-muted: #8ea3c0;
  --ink: #16203a;
  --muted: #5f6b80;
  --line: #dde3ec;
  --blue: #1357d4;
  --blue-soft: rgba(19, 87, 212, 0.12);
  --shadow: rgba(22, 32, 51, 0.06);
  --good: #0a7a45;
  --good-bg: rgba(10, 122, 69, 0.10);
  --warn: #9a5800;
  --warn-bg: rgba(154, 88, 0, 0.10);
  --danger: #b42318;
  --danger-bg: rgba(180, 35, 24, 0.09);
  --muted-bg: rgba(95, 107, 128, 0.10);
  --radius: 14px;
}

[data-theme="dark"] {
  --bg: #0a0f1d;
  --surface: #111a2c;
  --surface-2: #0e1626;
  --sidebar-1: #070c17;
  --sidebar-2: #0c1424;
  --sidebar-ink: #dde6f4;
  --sidebar-muted: #7e93b2;
  --ink: #e7edf8;
  --muted: #9aa7bd;
  --line: #243349;
  --blue: #6fa3ff;
  --blue-soft: rgba(111, 163, 255, 0.16);
  --shadow: rgba(0, 0, 0, 0.30);
  --good: #5fd39b;
  --good-bg: rgba(95, 211, 155, 0.13);
  --warn: #ffc078;
  --warn-bg: rgba(255, 192, 120, 0.13);
  --danger: #ff8b80;
  --danger-bg: rgba(255, 139, 128, 0.13);
  --muted-bg: rgba(154, 167, 189, 0.13);
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #0a0f1d;
    --surface: #111a2c;
    --surface-2: #0e1626;
    --sidebar-1: #070c17;
    --sidebar-2: #0c1424;
    --sidebar-ink: #dde6f4;
    --sidebar-muted: #7e93b2;
    --ink: #e7edf8;
    --muted: #9aa7bd;
    --line: #243349;
    --blue: #6fa3ff;
    --blue-soft: rgba(111, 163, 255, 0.16);
    --shadow: rgba(0, 0, 0, 0.30);
    --good: #5fd39b;
    --good-bg: rgba(95, 211, 155, 0.13);
    --warn: #ffc078;
    --warn-bg: rgba(255, 192, 120, 0.13);
    --danger: #ff8b80;
    --danger-bg: rgba(255, 139, 128, 0.13);
    --muted-bg: rgba(154, 167, 189, 0.13);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}
a { color: inherit; }
code { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: .85em; background: var(--muted-bg); padding: 1px 5px; border-radius: 5px; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--sidebar-1), var(--sidebar-2));
  color: var(--sidebar-ink);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.brand-mark { font-size: 1.5rem; color: var(--blue); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.05rem; letter-spacing: .02em; }
.brand-text small { color: var(--sidebar-muted); font-size: .72rem; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 10px; text-decoration: none;
  color: var(--sidebar-ink); font-weight: 600; font-size: .88rem;
}
.nav a span { width: 18px; text-align: center; opacity: .8; }
.nav a:hover { background: rgba(255, 255, 255, 0.06); }
.nav a.active { background: var(--blue); color: #fff; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, 0.08); margin: 12px 4px; }
.nav-secondary { display: flex; flex-direction: column; gap: 2px; }
.nav-secondary a { padding: 7px 11px; border-radius: 9px; text-decoration: none; color: var(--sidebar-muted); font-size: .82rem; }
.nav-secondary a:hover { color: var(--sidebar-ink); background: rgba(255, 255, 255, 0.05); }
.sidebar-foot { margin-top: auto; padding: 10px 8px 2px; font-size: .72rem; color: var(--sidebar-muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 28px 8px; gap: 16px;
}
.topbar-title h1 { margin: 0; font-size: 1.5rem; letter-spacing: -.02em; }
.topbar-title p { margin: 2px 0 0; }
.content { padding: 12px 28px 28px; display: flex; flex-direction: column; gap: 18px; }
.footer { padding: 8px 28px 22px; font-size: .76rem; }

/* Generic */
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.xsmall { font-size: .72rem; }
.strong { font-weight: 700; }
.link { color: var(--blue); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }
h2 { font-size: 1.02rem; margin: 0; letter-spacing: -.01em; }
.empty { color: var(--muted); padding: 10px 2px; font-style: italic; }
.block-text { margin: 8px 0 0; }
.path { font-family: ui-monospace, Consolas, monospace; font-size: .76rem; overflow-wrap: anywhere; color: var(--muted); }

/* KPI cards */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: 0 6px 20px var(--shadow);
}
.kpi-filter { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.kpi-filter:hover { transform: translateY(-1px); border-color: var(--blue); box-shadow: 0 8px 24px var(--shadow); }
.kpi-filter:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.kpi-action { margin-top: 8px; color: var(--blue); font-size: .74rem; font-weight: 760; }
.kpi-label { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.kpi-value { font-size: 1.9rem; font-weight: 760; line-height: 1.1; margin-top: 6px; }
.kpi-hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.kpi-danger .kpi-value { color: var(--danger); }
.kpi-warn .kpi-value { color: var(--warn); }
.kpi-good .kpi-value { color: var(--good); }

/* Panels and grids */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 6px 20px var(--shadow); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-2 > div { display: flex; flex-direction: column; gap: 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table thead th { text-align: left; padding: 9px 10px; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); }
.table tbody td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: var(--surface-2); }
.table.compact tbody td, .table.compact thead th { padding: 7px 8px; }
.table tr.done td { opacity: .55; }
td.obj, td.next { max-width: 280px; }
td.next { color: var(--ink); }
.score { display: inline-block; min-width: 30px; text-align: center; font-weight: 760; padding: 2px 7px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; border: 1px solid var(--line); background: var(--muted-bg); color: var(--ink); white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge.muted { background: var(--muted-bg); color: var(--muted); border-color: transparent; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }

/* Readiness bar */
.ready { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--muted); }
.ready-bar { width: 70px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ready-bar span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }

/* Row cards (dashboard) */
.row-card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface-2); }
.row-card:hover { border-color: var(--blue); }
.row-card-top { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.row-card-title { font-weight: 700; }
.row-card-sub { font-size: .82rem; }
.row-card-next { margin-top: 6px; color: var(--blue); font-size: .82rem; font-weight: 600; }

/* Next action box */
.next-action-box { border-left: 4px solid var(--blue); background: var(--surface); border: 1px solid var(--line); border-left-width: 4px; border-radius: 12px; padding: 12px 14px; }

/* Definition lists */
.kv { display: grid; grid-template-columns: minmax(120px, 0.6fr) 1fr; gap: 4px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: .8rem; }
.kv dd { margin: 0; }

/* Forms */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input[type="text"] { min-width: 240px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label, .filters label.check { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.form-grid label.full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.inline-form input[type="text"], .inline-form select { min-width: 150px; }
.inline-form input[type="text"] { flex: 1; }
.row-form select { padding: 3px 6px; font-size: .78rem; }

input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-soft); border-color: var(--blue); }
textarea { resize: vertical; }
.check { flex-direction: row !important; align-items: center; gap: 6px !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 13px; border-radius: 9px; font-weight: 650; font-size: .85rem; text-decoration: none; }
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--muted); }

/* Collapsible */
.collapse { display: none; }
.collapse.open { display: block; }

/* Logs / notes */
.notes-log { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .82rem; max-height: 320px; overflow: auto; }
.note-list, .art-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.note-list li { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.art-list li { padding: 4px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .sidebar { width: 64px; }
  .brand-text, .nav a span + *, .nav-secondary, .sidebar-foot { display: none; }
  .nav a { justify-content: center; }
}


.btn.mini { padding: 3px 7px; font-size: .72rem; border-radius: 7px; }
.skip-link {
  position: absolute; left: 12px; top: 8px; transform: translateY(-160%);
  background: var(--blue); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 1000;
}
.skip-link:focus { transform: translateY(0); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #ffbf47; outline-offset: 2px;
}
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.table-scroll .table { min-width: 1100px; }
.table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.score-why { max-width: 170px; color: var(--muted); }
.compact-kv { grid-template-columns: minmax(100px, .45fr) 1fr; }
.date-table td { min-width: 110px; }
.date-table td:first-child { min-width: 260px; }

/* Expanded filter bar */
.filters-grid { gap: 8px 8px; }
.filters-grid select, .filters-grid input[type="text"] { font-size: .82rem; }
.active-filter-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); box-shadow: 0 3px 12px var(--shadow); }

/* Reason chips column */
td.signals { max-width: 230px; }
td.signals .badge, .badge-row.signals .badge { margin: 0 3px 3px 0; }

/* Artifact presence chips */
.art-flags { display: inline-flex; gap: 4px; align-items: center; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; padding: 2px 7px; border-radius: 6px; font-size: .72rem; font-weight: 700; border: 1px solid var(--line); }
.chip.on { background: var(--good-bg); color: var(--good); border-color: transparent; }
.chip.off { background: var(--muted-bg); color: var(--muted); opacity: 1; }

/* SEACE calendar headline panel + the 3-way classification cell.
   The calendar is the first operational thing on the dashboard, so give it a
   subtle top accent. The classification cell stacks the three distinct
   concepts (etapa / análisis / resultado) without crowding the row. */
.seace-calendar { border-top: 3px solid var(--blue); }
.seace-calendar .calendar-legend { margin: 0 0 10px; }
td.seace-class { white-space: normal; max-width: 200px; }
td.seace-class .badge { margin: 0 0 3px; }

/* Suggested actions / bootstrap bars */
.suggest-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.suggest-title { font-weight: 600; flex: 1; }
.bootstrap-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; }

/* Manager-first SEACE dashboard */
.manager-hero {
  display: flex; justify-content: space-between; gap: 18px; align-items: center;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px;
  box-shadow: 0 8px 24px var(--shadow); border-left: 5px solid var(--blue);
}
.manager-hero h2 { font-size: 1.35rem; margin: 3px 0 4px; }
.eyebrow { color: var(--blue); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 800; }
.hero-actions, .quick-links { display: flex; gap: 8px; flex-wrap: wrap; }
.kpi-row-tight { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.workbench-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.big-head { align-items: flex-start; }
.big-head p { margin: 4px 0 0; }
.project-card-list { display: flex; flex-direction: column; gap: 14px; }
.project-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 245px; gap: 16px;
  border: 1px solid var(--line); border-radius: 16px; padding: 15px;
  background: var(--surface-2); box-shadow: 0 3px 12px var(--shadow);
}
.project-card.priority-danger { border-left: 5px solid var(--danger); }
.project-card.priority-warn { border-left: 5px solid var(--warn); }
.project-card.priority-good { border-left: 5px solid var(--good); }
.project-card.priority-muted { border-left: 5px solid var(--muted); }
.project-card-topline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.project-card h3 { margin: 8px 0 3px; font-size: 1.05rem; }
.project-object {
  margin: 0; color: var(--muted); font-size: .86rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; align-items: center; }
.product-chip-row.compact { margin-top: 4px; gap: 3px; }
.product-chip-row.detail { margin: -4px 0 10px; }
.product-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; font-size: .72rem; font-weight: 760;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); white-space: nowrap;
}
.product-chip.tiny { padding: 1px 5px; font-size: .66rem; gap: 2px; }
.product-chip.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.product-chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.product-chip.muted { background: var(--muted-bg); color: var(--muted); border-color: transparent; }
.product-icon { font-size: 1em; line-height: 1; }
.next-line { margin: 8px 0 0; font-size: .86rem; }
.workflow-rail { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.workflow-rail.detail { margin: 8px 0 14px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
.workflow-caption { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 850; color: var(--muted); margin-right: 2px; }
.workflow-step { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-size: .72rem; font-weight: 760; border: 1px solid var(--line); background: var(--surface); }
.workflow-step.done { background: var(--good-bg); color: var(--good); border-color: transparent; }
.workflow-step.todo { background: var(--muted-bg); color: var(--muted); }
.workflow-dot { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.65); font-size: .68rem; font-weight: 850; }
.detail-subnav { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 2px 8px var(--shadow); }
.detail-subnav a { font-size: .78rem; font-weight: 750; color: var(--blue); text-decoration: none; }
.agent-worker-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--warn-bg); background: var(--warn-bg); color: var(--ink); }
.product-summary { margin-top: 4px; }
.date-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 6px; margin-top: 10px; }
.date-pill { border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; background: var(--surface); }
.date-pill span { display: block; color: var(--muted); font-size: .68rem; text-transform: uppercase; font-weight: 800; letter-spacing: .04em; }
.date-pill strong { display: block; font-size: .76rem; margin-top: 1px; }
.date-pill.danger { border-color: transparent; background: var(--danger-bg); color: var(--danger); }
.date-pill.warn { border-color: transparent; background: var(--warn-bg); color: var(--warn); }
.date-pill.good { border-color: transparent; background: var(--good-bg); color: var(--good); }
.availability-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.file-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px; font-size: .72rem; font-weight: 700; border: 1px solid var(--line); }
.file-chip.on { background: var(--good-bg); color: var(--good); border-color: transparent; }
.file-chip.off { background: var(--muted-bg); color: var(--muted); opacity: .78; }
.project-card-side { display: flex; flex-direction: column; gap: 10px; }
.analysis-status-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.status-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: .82rem; }
.agent-button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.agent-button-grid form { margin: 0; }
.mini-wide { justify-content: center; width: 100%; min-height: 30px; padding: 5px 8px; font-size: .76rem; }
.side-stack { display: flex; flex-direction: column; gap: 18px; }
.date-watch-list, .agent-job-mini-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.date-watch-list li, .agent-job-mini-list li { border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.compact-actions-panel { border-top: 3px solid var(--blue); }
.agent-console { border-top: 3px solid var(--blue); }
.agent-workbench-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.agent-action-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.agent-action-title { font-weight: 750; font-size: .82rem; }
.job-table td.obj, .obj { max-width: 420px; }

@media (max-width: 1320px) {
  .workbench-layout { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); }
}

@media (max-width: 900px) {
  .project-card { grid-template-columns: 1fr; }
  .project-card-side { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .manager-hero { flex-direction: column; align-items: flex-start; }
  .project-card-side { display: flex; }
  .agent-button-grid { grid-template-columns: 1fr; }
}

/* Bulk classify bar + pager. */
.bulk-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 10px; margin-bottom: 10px;
  border: 1px solid var(--line); border-left: 3px solid var(--blue, #2563eb);
  border-radius: var(--radius); background: var(--surface);
  position: sticky; top: 0; z-index: 20;
}
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 12px; }

/* Fechas — prórroga alert strip. */
.prorroga-alert { border-left: 3px solid var(--warn, #b7791f); margin-bottom: 14px; }
.prorroga-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.prorroga-list li { font-size: 0.86rem; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* Nuevos — the morning triage inbox. */
.inbox-list { display: flex; flex-direction: column; gap: 10px; }
.inbox-card {
  display: flex; justify-content: space-between; gap: 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; background: var(--surface);
}
.inbox-main { min-width: 0; flex: 1; }
.inbox-check { display: flex; align-items: flex-start; padding-top: 4px; }
.inbox-title { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.inbox-objeto { margin: 4px 0 6px; font-size: 0.86rem; color: var(--text); }
.inbox-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inbox-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; justify-content: center; }
.inbox-actions .btn { min-width: 120px; font-size: 0.8rem; }
.inbox-empty { text-align: center; padding: 40px 20px; }
@media (max-width: 760px) {
  .inbox-card { flex-direction: column; }
  .inbox-actions { flex-direction: row; }
  .inbox-actions .btn { min-width: 0; }
}

/* En juego — pursued projects with the analysis ladder. */
.juego-list { display: flex; flex-direction: column; gap: 12px; }
.juego-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.juego-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.juego-progress { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.progress-track { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; min-width: 90px; }
.progress-fill { height: 100%; background: var(--good, #2f855a); border-radius: 3px; transition: width 0.4s ease; }
.ladder { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ladder-step { display: flex; align-items: center; gap: 4px; }
.ladder-chip { white-space: nowrap; }
.ladder-arrow { color: var(--muted); font-size: 0.75rem; }
.pending-group { display: inline-flex; gap: 4px; }

/* Quick-classify row on Hoy cards (one-click triage decisions). */
.quick-classify { display: flex; gap: 6px; margin-bottom: 8px; }
.quick-classify .inline-form { display: inline; }
.quick-classify .btn.mini { padding: 3px 9px; font-size: 0.74rem; }
.good-btn { border-color: var(--good); color: var(--good); }
.good-btn:hover { background: var(--good-bg); }
.danger-btn { border-color: var(--danger); color: var(--danger); }
.danger-btn:hover { background: var(--danger-bg); }

/* Flash toast (set by _redirect via cks_flash cookie, rendered by app.js). */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-left: 3px solid var(--good, #2f855a);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shadow);
  padding: 10px 18px;
  font-size: 0.88rem;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
