/* Lumina · Pendientes
   Layout: sidebar fija + área de trabajo; tableros tipo kanban, tablas densas y un planner de feed por propiedad.
   Esquinas casi rectas, neutros con sesgo verde bosque, tipografía display solo en títulos. */
/* Lumina · Pendientes — marca Lumina (brandbook): coral #ed6969, negro y blanco; Cerebri Sans.
   Layout: sidebar fija + área de trabajo; tableros, tablas densas y planner de feed por cuenta.
   El coral marca lo activo y lo importante; el negro es la tinta y los botones principales. */
@font-face { font-family: "Cerebri Sans"; src: local("Cerebri Sans"), local("CerebriSans-Regular"), url("/brand/fonts/CerebriSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cerebri Sans"; src: local("Cerebri Sans Bold"), local("CerebriSans-Bold"), url("/brand/fonts/CerebriSans-Bold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
:root {
  --bg: #F7F6F4;
  --surface: #FFFFFF;
  --surface-2: #F0EEEB;
  --ink: #111111;
  --ink-2: #3B3B3B;
  --muted: #6E6B68;
  --line: #E6E3DF;
  --line-2: #D5D1CC;
  --coral: #ED6969;
  --accent: #ED6969;
  --accent-ink: #FFFFFF;
  --accent-soft: #FCE9E9;
  --ok: #2F7A4A;
  --ok-soft: #E1F0E6;
  --warn: #A8650F;
  --warn-soft: #F7EBD8;
  --bad: #B42318;
  --bad-soft: #FBE3E0;
  --shadow: 0 1px 2px rgba(17, 17, 17, .05), 0 8px 24px rgba(17, 17, 17, .07);
  --scrim: rgba(17, 17, 17, .38);

  --f-display: "Cerebri Sans", "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Cerebri Sans", "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r: 3px;
  --side: 248px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F0F0F; --surface: #181818; --surface-2: #222222; --ink: #F3F2F0; --ink-2: #CFCCC8; --muted: #9A9692;
    --line: #2A2A2A; --line-2: #3A3A3A; --coral: #F07C7C; --accent: #F07C7C; --accent-ink: #FFFFFF; --accent-soft: #3A2222;
    --ok: #7CC195; --ok-soft: #1C2E23; --warn: #E0AE5C; --warn-soft: #33281A; --bad: #F2867A; --bad-soft: #3A201C;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.45); --scrim: rgba(0,0,0,.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F0F0F; --surface: #181818; --surface-2: #222222; --ink: #F3F2F0; --ink-2: #CFCCC8; --muted: #9A9692;
  --line: #2A2A2A; --line-2: #3A3A3A; --coral: #F07C7C; --accent: #F07C7C; --accent-ink: #FFFFFF; --accent-soft: #3A2222;
  --ok: #7CC195; --ok-soft: #1C2E23; --warn: #E0AE5C; --warn-soft: #33281A; --bad: #F2867A; --bad-soft: #3A201C;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.45); --scrim: rgba(0,0,0,.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.45 var(--f-body); -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100%; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; padding: 18px 12px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; }
.brand .logo { display: block; width: 104px; color: var(--coral); }
.brand .logo svg { display: block; width: 100%; height: auto; }
.brand b { font: 500 22px/1 var(--f-display); letter-spacing: -.01em; }
.brand span { font: 500 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav-group { display: flex; flex-direction: column; gap: 1px; margin-bottom: 16px; }
.nav-label {
  display: flex; align-items: center; justify-content: space-between;
  font: 600 10.5px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  padding: 6px 10px 8px;
}
.lock { font: 500 9.5px/1 var(--f-mono); letter-spacing: .06em; border: 1px solid var(--line-2); padding: 3px 5px; border-radius: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; border: 0; background: none; border-radius: var(--r); cursor: pointer; text-align: left;
  color: var(--ink-2); text-decoration: none;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.on { background: var(--accent-soft); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--coral); }
.nav-item.on svg { color: var(--coral); opacity: 1; }
.nav-item .count { margin-left: auto; font: 500 11px/1 var(--f-mono); color: var(--muted); }
.nav-item.on .count { color: var(--coral); opacity: 1; }
.nav-item .sw { width: 8px; height: 8px; border-radius: 1px; flex: none; }
.nav-item svg { width: 16px; height: 16px; flex: none; opacity: .8; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who small { color: var(--muted); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  padding: 12px max(24px, env(safe-area-inset-right, 0px)) 12px max(24px, env(safe-area-inset-left, 0px));
}
.search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 10px;
}
.search input { border: 0; background: none; outline: none; padding: 8px 0; width: 100%; }
.search svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.topbar .spacer { flex: 1; }
.page { padding: 28px max(24px, env(safe-area-inset-right, 0px)) 64px max(24px, env(safe-area-inset-left, 0px)); }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font: 700 32px/1.08 var(--f-display); letter-spacing: -.02em; text-wrap: balance; }
.page-head .eyebrow { font: 600 10.5px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.page-head .sub { color: var(--muted); margin-top: 6px; max-width: 62ch; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: var(--r); cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 500;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 12px; cursor: pointer; color: var(--ink-2); font-size: 13px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font: 600 11px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 8px 10px; outline: none; min-width: 0;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.5; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters select.input { width: auto; padding: 6px 8px; font-size: 13px; }

/* ---------- Chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 7px;
  border-radius: 2px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid transparent;
}
.chip .dot { width: 7px; height: 7px; border-radius: 1px; }
.chip.area { background: color-mix(in srgb, var(--c) 13%, var(--surface)); color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.line { background: none; border-color: var(--line-2); }
.prio { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.prio i { width: 3px; background: var(--line-2); border-radius: 1px; }
.prio i:nth-child(1) { height: 5px; } .prio i:nth-child(2) { height: 8px; } .prio i:nth-child(3) { height: 12px; }
.prio[data-p="media"] i:nth-child(-n+2), .prio[data-p="alta"] i, .prio[data-p="baja"] i:nth-child(1) { background: var(--ink-2); }
.prio[data-p="urgente"] i { background: var(--bad); }
.due { font: 500 12px/1 var(--f-mono); color: var(--muted); white-space: nowrap; }
.due.late { color: var(--bad); }
.due.soon { color: var(--warn); }

.av {
  --s: 26px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; overflow: hidden;
  display: inline-grid; place-items: center; font: 600 calc(var(--s) * .38)/1 var(--f-body); letter-spacing: .02em;
  background: color-mix(in srgb, var(--c, #5B6B60) 22%, var(--surface)); color: color-mix(in srgb, var(--c, #5B6B60) 80%, var(--ink));
  border: 1px solid var(--line);
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { --s: 56px; } .av.md { --s: 34px; } .av.sm { --s: 20px; }
.stack-av { display: inline-flex; } .stack-av .av + .av { margin-left: -6px; }

.progress { height: 4px; background: var(--surface-2); border-radius: 1px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--coral); }

/* ---------- Stage stepper ---------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.step { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; text-align: left; cursor: default; min-width: 0; }
.step i { height: 4px; border-radius: 1px; background: var(--line); }
.step span { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.step.done i { background: var(--coral); }
.step.cur i { background: var(--coral); }
.step.cur span { color: var(--ink); font-weight: 600; }
.steps.edit .step { cursor: pointer; }
.steps.edit .step:hover span { color: var(--ink); }
.mini-steps { display: flex; gap: 2px; }
.mini-steps i { width: 12px; height: 3px; border-radius: 1px; background: var(--line-2); }
.mini-steps i.on { background: var(--coral); }

/* ---------- Dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); margin-bottom: 22px; }
.kpi { padding: 16px 18px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi small { display: block; font: 600 10.5px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi b { display: block; font: 600 34px/1.1 var(--f-display); letter-spacing: -.02em; margin-top: 10px; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi.bad b { color: var(--bad); }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-h h3 { margin: 0; font: 600 13px/1 var(--f-body); letter-spacing: .02em; }
.panel-h .muted { margin-left: auto; font-size: 12px; color: var(--muted); }
.panel-b { padding: 6px 16px 14px; }
.area-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 2.2fr) 52px; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.area-row:last-child { border-bottom: 0; }
.area-row:hover .area-name { text-decoration: underline; text-underline-offset: 3px; }
.area-name { display: flex; gap: 8px; align-items: center; font-weight: 500; min-width: 0; }
.area-name > div { min-width: 0; }
.area-name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }
.stackbar { display: flex; height: 10px; background: var(--surface-2); border-radius: 1px; overflow: hidden; }
.stackbar i { height: 100%; }
.pct { font: 500 13px/1 var(--f-mono); text-align: right; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 10px 0 2px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 1px; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item .t { min-width: 0; flex: 1; }
.list-item .t b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .t small { color: var(--muted); font-size: 12px; }
.empty { padding: 28px 8px; text-align: center; color: var(--muted); }

/* ---------- Board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--surface-2); border-radius: var(--r); padding: 8px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.col.drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 4px 2px; }
.col-h b { font-size: 12.5px; font-weight: 600; }
.col-h .num { color: var(--muted); font-size: 12px; }
.col-h .pctl { margin-left: auto; font: 500 10.5px/1 var(--f-mono); color: var(--muted); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 12px;
  display: flex; flex-direction: column; gap: 9px; cursor: pointer; position: relative;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.card[draggable="true"] { cursor: grab; }
.card.dragging { opacity: .4; }
.card .title { font-weight: 500; line-height: 1.35; }
.card .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .meta .r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card.flag-pausa { border-left: 3px solid var(--warn); }
.card.flag-bloqueado { border-left: 3px solid var(--bad); }
.card .thumb { aspect-ratio: 4/5; max-height: 160px; width: 100%; object-fit: cover; border-radius: 2px; background: var(--surface-2); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
table.t { width: 100%; border-collapse: collapse; min-width: 760px; }
table.t th { text-align: left; font: 600 10.5px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { cursor: pointer; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t .tt { font-weight: 500; }
table.t .sub { color: var(--muted); font-size: 12px; }
table.t .group td { background: var(--bg); font: 600 12px/1 var(--f-body); letter-spacing: .04em; cursor: default; }

/* ---------- Drawer / modal ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; animation: fade .15s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: 51;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; animation: slide .2s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); padding-top: max(14px, env(safe-area-inset-top, 0px)); }
.drawer-h .id { font: 500 12px/1 var(--f-mono); color: var(--muted); }
.drawer-h .x { margin-left: auto; }
.drawer-b { padding: 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 20px; }
.drawer-b h2 { margin: 0; font: 700 24px/1.2 var(--f-display); letter-spacing: -.01em; text-wrap: balance; }
.title-edit { font: 700 24px/1.2 var(--f-display); border: 1px solid transparent; background: none; width: 100%; padding: 2px 4px; margin: -3px -5px; border-radius: var(--r); letter-spacing: -.01em; }
.title-edit:hover { border-color: var(--line); }
.title-edit:focus { border-color: var(--accent); outline: none; }
.props { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 14px; align-items: center; }
.props > span { color: var(--muted); font-size: 13px; }
.props select.input, .props input.input { padding: 6px 8px; }
.section-t { font: 600 10.5px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.callout { border: 1px solid var(--line-2); background: var(--accent-soft); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.callout b { font-weight: 600; }
.feed { display: flex; flex-direction: column; gap: 14px; }
.ev { display: flex; gap: 10px; min-width: 0; }
.ev .body { min-width: 0; flex: 1; }
.ev .body small { color: var(--muted); font-size: 12px; }
.ev .body p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ev.sys { color: var(--muted); font-size: 13px; align-items: center; }
.ev.sys .dot { width: 26px; display: grid; place-items: center; }
.ev.sys .dot i { width: 6px; height: 6px; background: var(--line-2); border-radius: 50%; }
.ev.sys b { color: var(--ink-2); font-weight: 500; }
.comment-box { display: flex; gap: 8px; align-items: flex-start; }
.comment-box textarea { min-height: 44px; }

.modal {
  position: fixed; z-index: 51; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(640px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow);
  animation: pop .18s ease;
}
.modal.wide { width: min(980px, calc(100% - 32px)); }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px 0; }
.modal-h h2 { margin: 0; font: 700 22px/1.2 var(--f-display); letter-spacing: -.01em; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 18px 22px; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--bg); position: sticky; bottom: 0; }
.modal-f .l { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, -48%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 80;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r); font-weight: 500; box-shadow: var(--shadow);
  animation: fade .2s ease;
}
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- Parrillas / Grid planner ---------- */
.prop-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
.prop-tab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; white-space: nowrap; font-size: 13px; }
.prop-tab .sw { width: 8px; height: 8px; border-radius: 1px; }
.prop-tab.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.prop-tab.on .sw { box-shadow: 0 0 0 1px color-mix(in srgb, var(--bg) 70%, transparent); }
.planner { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 24px; align-items: start; }
.phone {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; position: sticky; top: 78px;
}
.ig-head { padding: 18px 16px 12px; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: center; }
.ig-av { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 400 28px/1 var(--f-display); padding: 3px; background: var(--c); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--line-2); }
.ig-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.ig-stats b { display: block; font: 600 16px/1.2 var(--f-body); }
.ig-stats span { font-size: 12px; color: var(--muted); }
.ig-bio { padding: 0 16px 12px; font-size: 13px; }
.ig-bio b { display: block; }
.ig-bio p { margin: 2px 0 0; white-space: pre-wrap; color: var(--ink-2); }
.ig-handle { padding: 12px 16px 0; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.ig-stories { display: flex; gap: 12px; padding: 4px 16px 14px; overflow-x: auto; }
.ig-story { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 62px; flex: none; cursor: pointer; border: 0; background: none; padding: 0; }
.ig-story i { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface-2) center/cover; display: block; }
.ig-story span { font-size: 11px; color: var(--muted); max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-tabs { display: flex; border-top: 1px solid var(--line); }
.ig-tabs span { flex: 1; text-align: center; padding: 9px 0; font: 600 10.5px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ig-tabs span.on { color: var(--ink); box-shadow: inset 0 1px 0 var(--ink); }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.tile {
  position: relative; aspect-ratio: 4/5; background: var(--c, var(--surface-2)); overflow: hidden; cursor: pointer;
  border: 0; padding: 0; display: block; width: 100%;
}
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .ph { position: absolute; inset: 0; padding: 30px 10px 30px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; text-align: left; color: #fff; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 100%, #000 0%), color-mix(in srgb, var(--c) 70%, #000)); }
.tile .ph b { font: 400 15px/1.15 var(--f-display); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tile .ph small { font: 500 9.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.tile .badge { position: absolute; top: 6px; right: 6px; font: 600 9px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; background: rgba(0,0,0,.55); color: #fff; padding: 4px 5px; border-radius: 2px; }
.tile .date { position: absolute; left: 6px; bottom: 6px; font: 600 10px/1 var(--f-mono); background: rgba(255,255,255,.9); color: #141A16; padding: 4px 5px; border-radius: 2px; }
.tile .fmt { position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.tile.drag-over { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile.dragging { opacity: .35; }
.tile.add { background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--line-2); }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface); }
.cal-wrap { overflow-x: auto; }
.cal-inner { min-width: 720px; }
.cal .dow { padding: 8px 10px; font: 600 10.5px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.cal .day { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal .day.out { background: var(--bg); }
.cal .day.out .n { opacity: .4; }
.cal .day.today .n { background: var(--coral); color: #fff; }
.cal .day.drop { background: var(--accent-soft); }
.cal .n { font: 500 11.5px/1 var(--f-mono); align-self: flex-start; padding: 3px 5px; border-radius: 2px; }
.cal .ev-chip {
  display: flex; gap: 6px; align-items: center; font-size: 12px; padding: 3px 6px; border-radius: 2px; cursor: pointer;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); border-left: 3px solid var(--c); min-width: 0;
}
.cal .ev-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal .ev-chip img { width: 18px; height: 22px; object-fit: cover; border-radius: 1px; flex: none; }
.cal .ev-chip.done { opacity: .6; }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav b { font: 400 22px/1 var(--f-display); min-width: 170px; text-transform: capitalize; }

.pillars { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pillar-h { display: flex; align-items: baseline; gap: 8px; }
.pillar-h b { font: 400 19px/1.1 var(--f-display); }
.pillar-h .num { margin-left: auto; color: var(--muted); }
.pillar .mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.pillar .mini .tile { aspect-ratio: 4/5; }
.mix { display: flex; height: 26px; border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.mix i { display: grid; place-items: center; font: 600 10px/1 var(--f-mono); color: #fff; min-width: 0; overflow: hidden; }

/* IG post preview inside editor */
.post-edit { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; }
.ig-post { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); align-self: start; position: sticky; top: 0; }
.ig-post .h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 600; font-size: 13px; }
.ig-post .h i { width: 26px; height: 26px; border-radius: 50%; background: var(--c); display: block; }
.ig-post .img { aspect-ratio: 4/5; background: var(--c) center/cover; position: relative; }
.ig-post .img .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 400 20px/1.2 var(--f-display); padding: 20px; text-align: center; }
.ig-post .dots { display: flex; gap: 4px; justify-content: center; padding: 8px 0 0; }
.ig-post .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.ig-post .dots i:first-child { background: var(--accent); }
.ig-post .cap { padding: 10px 12px 14px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ig-post .cap b { margin-right: 6px; }
.ig-post .cap .tags { color: #3b6fb6; }
.media-list { display: flex; gap: 8px; flex-wrap: wrap; }
.media-item { position: relative; width: 72px; aspect-ratio: 4/5; border-radius: 2px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item button { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border: 0; border-radius: 2px; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 12px; line-height: 1; }
.drop-zone { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 14px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; }
.drop-zone.over { border-color: var(--accent); background: var(--accent-soft); }
.linkrow { display: flex; gap: 8px; }
.linkrow a { font-size: 12.5px; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- People ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; gap: 12px; align-items: center; min-width: 0; }
.person .t { min-width: 0; }
.person b { display: block; font-weight: 600; }
.person small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.load { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.load .panel-b { padding-top: 12px; }
.load-n { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 12px; }
.load-n div { border: 1px solid var(--line); border-radius: 2px; padding: 8px; }
.load-n b { display: block; font: 400 24px/1 var(--f-display); }
.load-n small { color: var(--muted); font-size: 11.5px; }

/* ---------- Login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.login-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 20px; }
.login-card h1 { margin: 0; font: 700 38px/1.08 var(--f-display); letter-spacing: -.025em; }
.login-card p { margin: 0; color: var(--muted); }
.login-card .btn { height: 44px; }

.demo-bar { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.demo-bar select { width: auto; padding: 5px 8px; font-size: 12.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cols, .planner { grid-template-columns: minmax(0, 1fr); }
  .phone { position: static; max-width: 460px; }
  .post-edit { grid-template-columns: minmax(0, 1fr); }
  .ig-post { position: static; max-width: 320px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; gap: 4px;
    overflow-x: auto; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--line);
  }
  .brand { padding: 0 10px 0 0; }
  .brand span, .nav-label, .side-foot .who, .nav-item .count, .nav-sub { display: none; }
  .nav-group { flex-direction: row; margin: 0; gap: 2px; }
  .nav-item { white-space: nowrap; width: auto; }
  .side-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
  .topbar { top: 51px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .page { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 28px; }
  .area-row { grid-template-columns: minmax(0, 1fr) 48px; }
  .area-row .stackbar { grid-column: 1 / -1; grid-row: 2; }
  .props { grid-template-columns: 96px minmax(0, 1fr); }
}

/* ---------- Instagram ---------- */
.ig-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ig-tabs span[role="button"] { cursor: pointer; }
.ig-tabs span[role="button"]:hover { color: var(--ink); }
.ig-conn { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.ig-conn.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.ig-conn > div:first-child { min-width: 0; flex: 1 1 220px; }
.ig-conn b { display: block; font-weight: 600; }
.ig-conn small { color: var(--muted); font-size: 12.5px; }
a.tile { text-decoration: none; }
.tile .ig-stat { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: rgba(0,0,0,.5); color: #fff; font: 600 12px/1 var(--f-body); opacity: 0; transition: opacity .15s; }
.tile:hover .ig-stat, .tile:focus-visible .ig-stat { opacity: 1; }
.thumb-sm { width: 34px; aspect-ratio: 4/5; flex: none; border-radius: 2px; overflow: hidden; background: var(--c); }
.thumb-sm img, .thumb-sm video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Editor web ---------- */
.muted { color: var(--muted); }
.ed-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13px; }
.ed-bar a { color: var(--accent); text-underline-offset: 3px; }
.ed-bar .spacer { flex: 1; }
.ed-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.ed-left { display: flex; flex-direction: column; height: calc(100vh - 330px); min-height: 520px; }
.ed-chat { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ed-hello b { font: 400 21px/1.2 var(--f-display); display: block; }
.ed-hello p { color: var(--muted); margin: 6px 0 12px; }
.ed-hello .chip { cursor: pointer; height: auto; padding: 6px 8px; white-space: normal; text-align: left; }
.msg { max-width: 92%; display: flex; flex-direction: column; gap: 6px; }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); padding: 9px 12px; border-radius: 4px; }
.msg.me small { opacity: .75; font-size: 11.5px; }
.msg.ai { align-self: flex-start; background: var(--surface-2); padding: 10px 12px; border-radius: 4px; }
.msg.ai details summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.msg.sys { align-self: center; font-size: 12px; color: var(--muted); text-align: center; }
.msg .btn { align-self: flex-start; }
.thinking { color: var(--muted); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.diff { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.diff .f { font: 600 10.5px/1 var(--f-mono); color: var(--muted); }
.diff pre { margin: 0; padding: 6px 8px; font: 11.5px/1.45 var(--f-mono); white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 2px; max-height: 160px; overflow-y: auto; }
.diff .del { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.diff .add { background: var(--ok-soft); color: var(--ok); }
.ed-compose { border-top: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ed-compose textarea { min-height: 70px; }
.x-mini { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 0 0 2px; font-size: 14px; line-height: 1; }
.ed-pub { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; background: var(--bg); }
.ed-pub > div:first-child { min-width: 0; flex: 1 1 180px; }
.ed-pub b { display: block; font-weight: 600; font-size: 13px; }
.ed-pub small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ed-pub.muted { font-size: 12.5px; }
.ed-right { display: flex; flex-direction: column; height: calc(100vh - 330px); min-height: 520px; }
.ed-right .panel-h { flex-wrap: wrap; }
.ed-stage { flex: 1; background: var(--surface-2); display: flex; justify-content: center; overflow: hidden; }
.ed-stage iframe { border: 0; width: 100%; height: 100%; background: #fff; }
.ed-stage.mobile { padding: 16px 0; }
.ed-stage.mobile iframe { width: 390px; max-width: 100%; border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow); }
@media (max-width: 1100px) {
  .ed-grid { grid-template-columns: minmax(0, 1fr); }
  .ed-left { height: auto; min-height: 0; }
  .ed-chat { max-height: 420px; }
  .ed-right { height: 640px; }
}

/* ---------- Tabla de parrilla ---------- */
table.t.posts { min-width: 1380px; }
table.t.posts tbody tr { cursor: default; }
table.t.posts tbody tr:hover td { background: none; }
table.t.posts td { vertical-align: top; padding: 8px 10px; }
table.t.posts tr.done td { opacity: .62; }
.th-note { display: block; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--muted); opacity: .8; margin-top: 3px; }
.cell-in { width: 100%; min-width: 0; border: 1px solid transparent; background: transparent; border-radius: 2px; padding: 5px 6px; font: inherit; font-size: 13px; color: var(--ink); resize: vertical; }
textarea.cell-in { min-width: 200px; line-height: 1.45; }
textarea.cell-in.tt { min-width: 160px; font-weight: 500; }
select.cell-in { min-width: 120px; cursor: pointer; }
.cell-in:hover { border-color: var(--line); background: var(--surface); }
.cell-in:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.cell-in.saving { border-color: var(--warn); }
button.thumb-sm { border: 0; padding: 0; cursor: pointer; width: 40px; display: block; }
.add-row { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: none; padding: 11px 14px; color: var(--muted); cursor: pointer; font: inherit; }
.add-row:hover { background: var(--surface-2); color: var(--ink); }
a.chip { text-decoration: none; }

/* ---------- Biblioteca ---------- */
.lib-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.crumb { border: 0; background: none; padding: 4px 6px; border-radius: 2px; cursor: pointer; font: 500 14px/1 var(--f-body); color: var(--ink-2); }
.crumb:last-child { color: var(--ink); font-weight: 600; }
.crumb:hover { background: var(--surface-2); }
.crumb-sep { color: var(--muted); }
.lib-newf { display: flex; gap: 8px; max-width: 420px; margin-bottom: 12px; }
.lib-drop { min-height: 240px; border: 1px dashed transparent; border-radius: var(--r); }
.lib-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.lib-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.lib-folder { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.lib-folder:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.lib-folder svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.lib-folder b { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.lib-folder .num { color: var(--muted); font-size: 12px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.lib-grid.sm { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 280px; overflow-y: auto; }
.lib-item { display: flex; flex-direction: column; gap: 4px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; color: var(--ink); min-width: 0; }
.lib-media { position: relative; display: block; aspect-ratio: 4/5; background: var(--surface-2); border-radius: 2px; overflow: hidden; border: 1px solid var(--line); }
.lib-media img, .lib-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-item:hover .lib-media { box-shadow: var(--shadow); }
.lib-item.picked .lib-media { outline: 3px solid var(--accent); outline-offset: -3px; }
.lib-badge, .lib-used { position: absolute; font: 600 9.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 5px; border-radius: 2px; }
.lib-badge { top: 6px; left: 6px; background: rgba(0,0,0,.6); color: #fff; }
.lib-used { bottom: 6px; left: 6px; background: rgba(255,255,255,.92); color: #141A16; }
.lib-name { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-meta { font-size: 11px; color: var(--muted); }
.lib-grid.sm .lib-name, .lib-grid.sm .lib-meta { display: none; }
.lib-detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; }
.lib-view { background: var(--surface-2); border-radius: 2px; display: grid; place-items: center; max-height: 70vh; overflow: hidden; }
.lib-view img, .lib-view video { max-width: 100%; max-height: 70vh; object-fit: contain; display: block; }
.lib-picker { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; }
.lib-picker summary { cursor: pointer; font-size: 13px; font-weight: 500; }
.lib-picker[open] summary { margin-bottom: 10px; }
.drop-zone.busy { opacity: .6; pointer-events: none; }
@media (max-width: 860px) { .lib-detail { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Métricas ---------- */
.kpi .up { color: var(--ok); font-size: 12.5px; }
.kpi .down { color: var(--bad); font-size: 12.5px; }
.met-seg { flex-wrap: wrap; }
.met-seg button { white-space: nowrap; }
.chart-wrap { position: relative; overflow-x: auto; }
.chart { width: 100%; min-width: 520px; height: auto; display: block; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-grid.zero { stroke: var(--line-2); }
.ch-fill { fill: color-mix(in srgb, var(--coral) 45%, var(--surface)); }
.ch-fill.last { fill: var(--coral); }
.ch-fill.neg { fill: color-mix(in srgb, var(--bad) 70%, var(--surface)); }
.ch-bar.hover .ch-fill { fill: var(--coral); }
.ch-bar.hover .ch-fill.neg { fill: var(--bad); }
.ch-x { fill: var(--muted); font: 500 11px var(--f-mono); }
.ch-val { fill: var(--ink-2); font: 600 11px var(--f-mono); }
.ch-na { fill: var(--muted); font: 10px var(--f-body); }
.ch-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 9px; border-radius: 2px; font-size: 12px; white-space: nowrap; box-shadow: var(--shadow); }
.th-sort { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.th-sort.on { color: var(--ink); }

/* ---------- Influencers ---------- */
.inf-form { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.inf-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.inf-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: var(--ink); min-width: 0; }
.inf-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.inf-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.inf-top .t { min-width: 0; flex: 1; }
.inf-top b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inf-top small { color: var(--muted); font-size: 12px; }
img.av { object-fit: cover; }
.score { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 56px; padding: 6px 8px; border-radius: 3px; }
.score b { font: 400 26px/1 var(--f-display); }
.score small { font-size: 10.5px; opacity: .8; }
.score.ok { background: var(--ok-soft); color: var(--ok); }
.score.warn { background: var(--warn-soft); color: var(--warn); }
.score.bad { background: var(--bad-soft); color: var(--bad); }
.score.lg { min-width: 96px; padding: 10px 12px; }
.score.lg b { font-size: 44px; }
.inf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.inf-stats b { display: block; font-weight: 600; }
.inf-stats small { color: var(--muted); font-size: 11.5px; }
.inf-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sbs { display: flex; flex-direction: column; gap: 8px; }
.sb { display: grid; grid-template-columns: 170px minmax(0, 1fr) 54px; gap: 10px; align-items: center; font-size: 13px; }
.sb .progress { height: 6px; }
.sb b { font-size: 12px; text-align: right; }
.inf-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.inf-kv div { border: 1px solid var(--line); border-radius: 2px; padding: 10px; }
.inf-kv small { display: block; color: var(--muted); font-size: 11.5px; }
.inf-kv b { font: 400 22px/1.2 var(--f-display); }
.inf-kv span { display: block; font-size: 11.5px; }
.inf-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 860px) { .inf-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sb { grid-template-columns: 120px minmax(0, 1fr) 48px; } }

/* ---------- Marca en login ---------- */
.login { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); place-items: stretch; padding: 0; }
.login-brand { background: var(--coral); display: grid; place-items: center; min-height: 100%; padding: 32px; }
.login-brand .logo { width: min(260px, 60%); color: #fff; }
.login-brand .logo svg { width: 100%; height: auto; display: block; }
.login .login-card { align-self: center; justify-self: center; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); }
.eyebrow-l { font: 600 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--coral); }
@media (max-width: 760px) { .login { grid-template-columns: minmax(0, 1fr); } .login-brand { min-height: 180px; } }

/* ---------- Inicio tipo periódico ---------- */
.news { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.news-wide { grid-column: 1 / -1; }
.news-main, .news-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.news-posts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 180px); gap: 12px; overflow-x: auto; padding: 10px 0 4px; }
.news-post { display: flex; flex-direction: column; gap: 4px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; color: var(--ink); min-width: 0; }
.np-img { aspect-ratio: 4/5; border-radius: 3px; overflow: hidden; background: linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 60%, #000)); display: grid; place-items: end start; padding: 8px; color: #fff; }
.np-img img, .np-img video { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1; margin: -8px; width: calc(100% + 16px); height: calc(100% + 16px); }
.np-img b { font-size: 12px; font-weight: 600; }
.news-post:hover .np-img { box-shadow: var(--shadow); }
.np-when { font-size: 11px; color: var(--coral); font-weight: 600; }
.np-title { font-weight: 600; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px 0; }
.req-mini div { border: 1px solid var(--line); border-radius: 2px; padding: 6px 8px; }
.req-mini b { display: block; font-size: 18px; font-weight: 600; }
.req-mini small { color: var(--muted); font-size: 11px; }
.num.up { color: var(--ok); } .num.down { color: var(--bad); }
@media (max-width: 1100px) { .news { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Managers ---------- */
.req-pipe { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.req-stage { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 10px 12px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.req-stage b { font-size: 22px; font-weight: 600; }
.req-stage span { font-size: 12px; color: var(--muted); }
.req-stage.on { border-color: var(--coral); box-shadow: inset 0 -3px 0 var(--coral); }
.req-kv b { font: 600 14px/1.3 var(--f-body) !important; }
@media (max-width: 860px) { .req-pipe { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Organigrama ---------- */
.org { overflow-x: auto; padding-bottom: 12px; }
.org ul { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.org > ul { padding-left: 0; }
.org li { position: relative; padding: 6px 0 6px 0; }
.org ul ul li::before { content: ""; position: absolute; left: -16px; top: 0; bottom: 0; border-left: 1px solid var(--line-2); }
.org ul ul li:last-child::before { bottom: calc(100% - 30px); }
.org ul ul li::after { content: ""; position: absolute; left: -16px; top: 30px; width: 14px; border-top: 1px solid var(--line-2); }
.org-card { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 240px; max-width: 360px; }
.org-card .t { min-width: 0; display: flex; flex-direction: column; }
.org-card b { font-weight: 600; }
.org-card small { font-size: 12px; color: var(--ink-2); }
.org-card small.muted { color: var(--muted); }
.org-n { margin-left: auto; font-size: 11px; color: var(--coral); border: 1px solid color-mix(in srgb, var(--coral) 40%, transparent); padding: 2px 6px; border-radius: 2px; }

/* ---------- Sitios web (Hostinger) ---------- */
.web-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.site-list { display: flex; flex-direction: column; padding: 6px; position: sticky; top: 78px; max-height: calc(100vh - 100px); overflow-y: auto; }
.site-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: var(--r); cursor: pointer; text-align: left; font: inherit; color: var(--ink-2); }
.site-item:hover { background: var(--surface-2); }
.site-item.on { background: var(--accent-soft); color: var(--ink); box-shadow: inset 3px 0 0 var(--coral); }
.site-item .t { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.site-item b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-item small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-item .num { margin-left: auto; font-size: 11px; color: var(--coral); }
.site-item .sw { width: 8px; height: 8px; border-radius: 1px; flex: none; }
.site-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.site-head h2 { margin: 0; font: 700 22px/1.2 var(--f-display); }
.site-head a { color: var(--muted); font-size: 12.5px; }
@media (max-width: 960px) { .web-grid { grid-template-columns: minmax(0, 1fr); } .site-list { position: static; max-height: 260px; } }

/* ---------- Estatus con color en la parrilla ---------- */
select.st-sel { font-weight: 600; border-color: transparent; }
select.st-sel[data-st="idea"] { background: var(--surface-2); color: var(--ink-2); }
select.st-sel[data-st="diseno"] { background: #E8EEF8; color: #2F5E8C; }
select.st-sel[data-st="revision"] { background: var(--warn-soft); color: var(--warn); }
select.st-sel[data-st="aprobado"] { background: #EAE6F6; color: #5B4A9A; }
select.st-sel[data-st="programado"] { background: var(--accent-soft); color: #C24848; }
select.st-sel[data-st="publicado"] { background: var(--ok-soft); color: var(--ok); }
:root[data-theme="dark"] select.st-sel[data-st="diseno"] { background: #1D2A3A; color: #8DB4E2; }
:root[data-theme="dark"] select.st-sel[data-st="aprobado"] { background: #27223A; color: #B4A6E8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) select.st-sel[data-st="diseno"] { background: #1D2A3A; color: #8DB4E2; } :root:not([data-theme="light"]) select.st-sel[data-st="aprobado"] { background: #27223A; color: #B4A6E8; } }
.files-cell { display: flex; align-items: center; gap: 4px; min-width: 150px; }
.fc-thumb { width: 30px; aspect-ratio: 4/5; border-radius: 2px; overflow: hidden; background: var(--surface-2); flex: none; }
.fc-thumb img, .fc-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-more { font-size: 11px; color: var(--muted); }
.pick-n { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--coral); color: #fff; display: grid; place-items: center; font: 600 12px/1 var(--f-body); }

/* ---------- Metas y junta ---------- */
.goal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.goal { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.goal + .goal { border-left: 1px solid var(--line); }
.goal-h { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.goal-h small { font: 600 10.5px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.goal > b { font: 600 28px/1.1 var(--f-display); letter-spacing: -.02em; }
.goal .progress { height: 6px; }
.goal-in { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.goal-in .input { padding: 5px 8px; font-size: 13px; width: 110px; }
.goal-in em { font-style: normal; }
.people-score { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.ps { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.ps .t { min-width: 0; display: flex; flex-direction: column; }
.ps small { color: var(--muted); font-size: 12px; }
.posts-fb td { vertical-align: top; }
.fb-cell { min-width: 280px; max-width: 360px; }
details.fb summary { cursor: pointer; font-size: 13px; line-height: 1.4; }
details.fb ul { margin: 4px 0 6px; padding-left: 18px; font-size: 12.5px; }
details.fb p { margin: 2px 0 6px; font-size: 12.5px; }
.fb-h { font: 600 10.5px/1 var(--f-body) !important; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 8px !important; }
.score-mini { display: inline-block; font: 700 11px/1 var(--f-mono); padding: 3px 5px; border-radius: 2px; margin-right: 4px; }
.score-mini.ok { background: var(--ok-soft); color: var(--ok); } .score-mini.warn { background: var(--warn-soft); color: var(--warn); } .score-mini.bad { background: var(--bad-soft); color: var(--bad); }
.junta { display: flex; flex-direction: column; gap: 22px; }
.junta-hero h2 { margin: 6px 0 6px; font: 700 26px/1.2 var(--f-display); letter-spacing: -.015em; text-wrap: balance; }
.junta-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 960px) { .goal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .goal:nth-child(3) { border-left: 0; } .goal:nth-child(n+3) { border-top: 1px solid var(--line); } .junta-cols { grid-template-columns: minmax(0, 1fr); } }

/* Campañas (Meta) */
.field.inline{display:flex;flex-direction:column;gap:4px;min-width:180px}
.field.inline>span{font-size:11.5px;color:var(--muted)}
.camp-types{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px;margin:0 0 16px}
.camp-type{display:flex;flex-direction:column;gap:2px;text-align:left;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);cursor:pointer;font:inherit;color:inherit}
.camp-type b{font-size:13.5px}.camp-type span{font-size:12px;color:var(--muted)}
.camp-type.on{border-color:var(--coral);box-shadow:inset 3px 0 0 var(--coral)}

/* Creator Match a fondo */
.drawer.wide{width:min(760px,100vw)}
.verdict{border:1px solid var(--line);border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:6px;background:var(--panel)}
.verdict.ok{box-shadow:inset 4px 0 0 #2E8B57}.verdict.warn{box-shadow:inset 4px 0 0 #D99A2B}.verdict.bad{box-shadow:inset 4px 0 0 var(--coral)}
.verdict .chip{align-self:flex-start}.verdict p{margin:0;color:var(--ink-2,var(--muted));line-height:1.5}
.yn .yes,.yn .no{border:1px solid var(--line);border-radius:12px;padding:12px 14px}
.yn .yes{background:rgba(46,139,87,.06)}.yn .no{background:rgba(237,105,105,.07)}
.evidence li{display:flex;flex-direction:column;gap:2px;margin-bottom:6px}.evidence li span{color:var(--muted);font-size:12.5px}
.vs{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center}
.vs>div:not(.mid){border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column}
.vs small{color:var(--muted);font-size:12px}.vs b{font-size:20px}.vs span{font-size:12px;color:var(--muted)}.vs .mid{color:var(--muted);font-size:12px}
.hist{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.hist>div{border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:2px}
.hist small{color:var(--muted);font-size:11.5px}.hist b{font-size:18px}.hist span{font-size:11.5px;color:var(--muted)}
.hist .ok b{color:#2E8B57}.hist .bad b{color:var(--coral)}.hist .warn b{color:#B07A12}
.results{border-top:1px solid var(--line);padding-top:14px}

.btn.primary:hover:not(:disabled) { background: #E05858; border-color: #E05858; }
.prop-tab.on .sw, .prop-tab.on .num { color: inherit; opacity: .9; }
.prop-tab.on .sw { box-shadow: 0 0 0 1.5px #fff; }

/* Análisis a fondo de publicaciones */
.pcards { display: flex; flex-direction: column; gap: 14px; padding-top: 14px !important; }
.pcard { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.pcard.top { box-shadow: inset 3px 0 0 var(--ok); } .pcard.bottom { box-shadow: inset 3px 0 0 var(--coral); }
.pcard-h { display: flex; gap: 12px; align-items: flex-start; }
.pcard-h .t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pcard-h .t small { color: var(--muted); font-size: 12px; }
.thumb-md { width: 64px; height: 80px; flex: none; border-radius: 4px; background: var(--c); overflow: hidden; display: block; }
.thumb-md img { width: 100%; height: 100%; object-fit: cover; }
.rels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.rel { font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; color: var(--ink-2); }
.rel.up { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .rel.down { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.why-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.why-list li { padding-left: 18px; position: relative; line-height: 1.45; }
.why-list li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.why-list li.g::before { content: '+'; color: var(--ok); } .why-list li.b::before { content: '−'; color: var(--bad); }
.pcard .fb-cell { max-width: none; min-width: 0; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.fb-cta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.fb-deep { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.fb-deep ul { margin: 2px 0 6px; padding-left: 18px; } .fb-deep p { margin: 0 0 4px; }
.fb-sum { display: flex; gap: 6px; align-items: baseline; }
.fb-why { line-height: 1.5; color: var(--ink-2); }
.fb-bd { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 6px 0; }
.fb-bd > div { border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.fb-bd small { font: 600 10.5px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fb-bd span { font-size: 12.5px; line-height: 1.45; }
.fb-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fb-rw { background: var(--accent-soft); border-radius: 4px; padding: 8px 10px; font-style: italic; }
.fb-deep .btn { align-self: flex-start; margin-top: 4px; }
.cmp { margin-bottom: 22px; }
.cmp-head { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 10px; }
.cmp-grid .g, .cmp-grid .b { border-radius: var(--r); padding: 10px 12px; } .cmp-grid .g { background: var(--ok-soft); } .cmp-grid .b { background: var(--bad-soft); }
@media (max-width: 760px) { .fb-2, .cmp-grid { grid-template-columns: 1fr; } }

/* Calendario de colaboraciones */
.col-ev { cursor: pointer; }
.col-ev.cont { opacity: .75; border-left-width: 1px; }
.col-ev b { font-weight: 600; }
.col-out { font-size: 11px; color: var(--muted); padding: 1px 6px; cursor: pointer; }
.col-out::before { content: '↦ '; }
.col-t .late { color: var(--bad); font-weight: 600; }
.col-t tr.muted-row td { opacity: .5; }
.page-head .seg { align-self: flex-end; }

/* KPIs: el número se ajusta al ancho de su cuadro para que nunca se encime */
.kpi { container-type: inline-size; }
.kpi b { font-size: clamp(20px, 17cqi, 34px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { line-height: 1.25; }

.kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .kpis.k5, .kpis.k3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis .kpi + .kpi { border-left: 0; } .kpis .kpi { border-bottom: 1px solid var(--line); } }

/* Formulario público y seguimiento */
.pub { min-height: 100vh; background: var(--bg); }
.pub-h { display: flex; align-items: center; gap: 14px; padding: 18px max(16px, calc(50% - 360px)); border-bottom: 1px solid var(--line); background: var(--surface); }
.pub-h .logo svg { height: 22px; width: auto; display: block; }
.pub-b { max-width: 720px; margin: 0 auto; padding: 28px 16px 60px; display: flex; flex-direction: column; gap: 18px; }
.pub-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.pub-card h1 { font: 600 26px/1.15 var(--f-display); margin: 0; letter-spacing: -.01em; }
.pub-card h2 { font: 600 17px/1.2 var(--f-display); margin: 0; }
.pub-card > p { margin: 0; color: var(--ink-2); }
.pub-link { display: flex; gap: 8px; } .pub-link .input { flex: 1; min-width: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.pub-steps { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pub-steps li { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.pub-steps i { height: 6px; border-radius: 3px; background: var(--line); }
.pub-steps li.done i { background: var(--coral); opacity: .55; } .pub-steps li.on i { background: var(--coral); } .pub-steps li.on span { color: var(--ink); font-weight: 600; }
.feed-i { border-left: 2px solid var(--line); padding: 4px 0 10px 12px; } .feed-i p { margin: 4px 0; font-size: 13px; } .feed-i small { color: var(--muted); font-size: 12px; }
.login-or { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .pub-steps span { font-size: 10.5px; } .pub-link { flex-direction: column; } }

.col-l { font: 600 9.5px/1 var(--f-mono); font-style: normal; background: #F7CAC5; color: #7A2E27; padding: 2px 4px; border-radius: 2px; margin-right: 6px; letter-spacing: 0; }
.field .hint { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* Pendientes por persona */
.duties .duty-who { margin-bottom: 10px; }
.duties .duty-who .av { margin-right: 6px; }
.duty-f { flex-wrap: wrap; margin-bottom: 12px; }
.duty-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.duty-col { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.duty-col-h { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.duty-col-h .row { flex-wrap: wrap; }
.duty-col .btn { align-self: flex-start; margin-top: 6px; }
.list-item.duty { gap: 10px; }
.list-item.duty.late .t b { color: var(--bad); }
.duty-k { font: 600 9.5px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; border-radius: 2px; flex: none; width: 96px; text-align: center; background: var(--surface-2); color: var(--ink-2); }
.duty-k.k-req { background: var(--accent-soft); color: #B64343; }
.duty-k.k-post { background: #EAF1EC; color: #3C6B4F; }
.duty-k.k-web { background: #E7EEF4; color: #2F5E8C; }
.duty-k.k-campana { background: #F3ECE2; color: #8A5A1F; }
.duty-k.k-rqn { background: #EFEAF6; color: #5B4A9A; }
.duty-k.k-collab { background: #FBEFE6; color: #A0522D; }

.duty-list { max-height: 520px; overflow: auto; margin-right: -6px; padding-right: 6px; }

/* Community Management */
.cm-t td { vertical-align: top; }
.cm-t tr.late td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.cm-msg { font-size: 13.5px; line-height: 1.45; margin-bottom: 6px; white-space: pre-wrap; }
.cm-late { color: var(--bad); font-weight: 600; }
.cm-reply { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.cm-reply textarea { width: 100%; min-height: 56px; }
.cm-thread { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding: 10px; background: var(--bg); border-radius: var(--r); max-height: 320px; overflow: auto; }
.cm-b { align-self: flex-start; max-width: 85%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px 12px 12px 3px; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.cm-b.mine { align-self: flex-end; background: var(--accent-soft); border-color: transparent; border-radius: 12px 12px 3px 12px; }
.cm-b small { color: var(--muted); font-size: 11px; }

/* Pendientes del equipo: una fila por persona que se abre y se cierra */
.duty-acc { display: flex; flex-direction: column; gap: 8px; }
.duty-p { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.duty-p-h { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: var(--r); }
.duty-p-h:hover { background: var(--bg); }
.duty-p-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.duty-p-name small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.duty-p-h .row { flex-wrap: wrap; justify-content: flex-end; }
.duty-chev { font-size: 20px; color: var(--muted); transition: transform .15s; line-height: 1; }
.duty-p.open .duty-chev { transform: rotate(90deg); }
.duty-p.open { border-color: var(--line-2); }
.duty-p .duty-list { padding: 0 14px 10px; max-height: 560px; }
@media (max-width: 640px) { .duty-p-h { flex-wrap: wrap; } .duty-p-h .row { margin-left: 0 !important; } }

/* Editor web: arrastrar y pegar fotos */
.ed-left { position: relative; }
.ed-left.over { outline: 2px dashed var(--coral); outline-offset: -6px; background: var(--accent-soft); }
.ed-left.over::after { content: 'Suelta las fotos para subirlas a la carpeta del sitio'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 600; color: #B64343; pointer-events: none; }
.ed-drop-hint { font-size: 12px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); padding: 8px 10px; }
.ed-folder { width: auto; height: 30px; padding: 2px 8px; font-size: 12.5px; }

/* Barra de publicación del editor */
.ed-pubbar-wrap { position: sticky; top: 0; z-index: 5; margin-bottom: 12px; }
.ed-pubbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 13px; }
.ed-pubbar.ready { border-color: var(--coral); background: var(--accent-soft); box-shadow: var(--shadow); }
.ed-pubbar.busy { background: var(--warn-soft); }
.ed-pubbar-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ed-pubbar-t small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: s; font-size: 12px; color: var(--muted); }
.ed-steps li { counter-increment: s; display: flex; align-items: center; gap: 5px; }
.ed-steps li::before { content: counter(s); width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); font-weight: 600; font-size: 11px; }
.ed-steps li + li::after { content: ''; }
.ed-steps li.on { color: var(--ink); } .ed-steps li.on::before { background: var(--coral); color: #fff; }
.ed-steps li.done::before { content: '✓'; background: var(--ok-soft); color: var(--ok); }
.ed-pubbar .ed-steps { flex-basis: 100%; }
.ed-pubbar-t { min-width: 200px; }

/* Parrillas: la vista del feed (Grid) va aparte */
.p-views { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.p-views-sep { width: 1px; height: 26px; background: var(--line-2); }
.grid-btn { display: inline-flex; align-items: center; gap: 6px; }
.grid-btn svg { width: 16px; height: 16px; }
.grid-btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.tile .badge.sched { display: inline-flex; align-items: center; gap: 4px; background: var(--coral); color: #fff; text-transform: none; letter-spacing: 0; font: 600 10px/1 var(--f-body); padding: 4px 6px; }
.tile .badge.sched svg { width: 11px; height: 11px; }

/* Vista del feed: se baja como el perfil de Instagram */
.ig-grid.feed-scroll { max-height: 640px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.ig-tabs span svg { width: 16px; height: 16px; vertical-align: -3px; }
.feed-end { text-align: center; font-size: 11.5px; color: var(--muted); margin: 10px 0 4px; }

/* Traer de Drive / Canva */
.import-row { display: flex; gap: 6px; }
.import-row .input { flex: 1; min-width: 0; }
.import-status:empty { display: none; }
.import-status { font-size: 12.5px; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); color: var(--ink-2); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.import-status.ok { background: var(--ok-soft); color: var(--ok); } .import-status.bad { background: var(--bad-soft); color: var(--bad); } .import-status.warn { background: var(--warn-soft); color: var(--warn); }

/* Reporte del mes (Métricas) */
.mr { margin-bottom: 22px; }
.mr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mr-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 4px; container-type: inline-size; min-width: 0; }
.mr-card small { font: 600 10.5px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mr-card b { font: 600 clamp(20px, 15cqi, 30px)/1.1 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-card span { font-size: 12px; color: var(--muted); } .mr-card .up { color: var(--ok); } .mr-card .down { color: var(--bad); }
.mr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.aud { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.aud-h { display: block; font: 600 10.5px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.aud-row { display: grid; grid-template-columns: 110px 1fr 52px; gap: 8px; align-items: center; font-size: 12.5px; margin-bottom: 6px; }
.aud-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; } .aud-bar i { display: block; height: 100%; background: var(--coral); }
.aud-row b { text-align: right; font-size: 12px; }
.aud-gender { display: flex; gap: 16px; align-items: center; }
.donut { width: 110px; height: 110px; border-radius: 50%; background: conic-gradient(var(--coral) 0 var(--f), #9AA29C var(--f) 100%); position: relative; flex: none; }
.donut::after { content: ''; position: absolute; inset: 26px; border-radius: 50%; background: var(--surface); }
.aud-g { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 6px; } .aud-g b { margin-left: 4px; }
.aud-g i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); } .aud-g i.f { background: var(--coral); } .aud-g i.m { background: #9AA29C; }
.aud-empty { margin-top: 16px; font-size: 12.5px; }
@media (max-width: 900px) { .mr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mr-cols, .aud { grid-template-columns: 1fr; } }

/* Metas y KPIs manuales */
.goal .goal-h { position: relative; }
.goal .goal-h .x-mini { margin-left: 4px; }
.goal-ins { display: grid; grid-template-columns: 1fr; gap: 6px; }
.goal.custom .goal-ins { grid-template-columns: 1fr 1fr; }
.goal-add { border-style: dashed !important; display: flex; }
.goal-add-btn { flex: 1; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-2); font: inherit; padding: 18px; text-align: center; }
.goal-add-btn b { font-size: 26px; color: var(--coral); line-height: 1; }
.goal-add-btn small { color: var(--muted); font-size: 12px; }
.goal-add form { width: 100%; }
.goal.custom .goal-in { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.goal.custom .goal-in .input { width: 100%; }
.goal-add { border: 1.5px dashed var(--line-2) !important; outline: 0 !important; }

/* Plan del siguiente mes */
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.plan-sug { font-size: 11.5px; color: var(--muted); }
.link { border: 0; background: none; padding: 0; color: #B64343; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; }
.plan-kpi { display: grid; grid-template-columns: 1.6fr .7fr .8fr 1fr auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.plan-kpis { display: flex; flex-direction: column; gap: 10px; }
.plan-kpis > div { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; } .plan-kpis p { margin: 4px 0; font-size: 13px; } .plan-kpis small { color: var(--muted); font-size: 12px; }
.plan-weeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.plan-weeks > div { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; } .plan-weeks small { color: var(--muted); font-size: 12px; }
.plan-weeks ul { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; }
.plan-actions { flex-wrap: wrap; gap: 8px; }
@media (max-width: 1100px) { .plan-grid { grid-template-columns: 1fr; } .plan-kpi { grid-template-columns: 1fr 1fr; } }

.plan-hero { border: 1.5px solid var(--coral); border-radius: var(--r); padding: 14px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 10px; }
.plan-hero-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .plan-hero-h b { font-size: 15px; } .plan-hero-h span { font-size: 12px; }
.plan-hero-b { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start; }
.plan-hero-r { background: var(--surface); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.plan-hero-r small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; } .plan-hero-r b { font-size: 24px; } .plan-hero-r span { font-size: 12px; color: var(--muted); }
.plan-hist { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-hist span { background: var(--surface); border-radius: var(--r); padding: 6px 10px; display: flex; flex-direction: column; font-size: 12px; min-width: 96px; }
.plan-hist small { color: var(--muted); } .plan-hist em { font-style: normal; color: var(--muted); font-size: 11.5px; } .plan-hist em.ok { color: var(--ok); } .plan-hist em.bad { color: var(--bad); }
.plan-more summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 4px 0; }
.growth-t .gt-in { width: 110px; padding: 5px 8px; font-size: 13px; }
.growth-t .up { color: var(--ok); } .growth-t .down { color: var(--bad); }
@media (max-width: 700px) { .plan-hero-b { grid-template-columns: 1fr; } }

.goal-ro { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.goal-ro b { font-size: 14px; } .goal-ro small { color: var(--muted); font-size: 11.5px; }

/* Historial de cambios */
.aud-t td{vertical-align:top}
.aud-t .aud-day td{background:var(--bg-soft,#faf7f6);font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:600;padding-top:9px;padding-bottom:9px}
.aud-time{white-space:nowrap;color:var(--muted);width:56px}
.aud-who{display:flex;align-items:center;gap:8px;white-space:nowrap}
.aud-title{font-weight:600;margin-top:3px}
.aud-act{text-transform:none}
.aud-act.bad{background:#fde8e8;color:#b42318}.aud-act.ok{background:#e7f6ec;color:#1e7b3a}.aud-act.warn{background:#fff4e0;color:#9a5b00}
.aud-ch{margin:0;padding:0;list-style:none;display:grid;gap:4px;font-size:13px}
.aud-ch s{color:var(--muted)}
.aud-date{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted)}
.aud-date .input{width:auto}

/* Reporte del equipo */
.tr-t tbody tr{cursor:pointer}
.tr-t .tr-bad{color:var(--bad,#b42318);font-weight:600}
.tr-d{display:block;font-size:11px;font-weight:500;color:var(--muted);font-family:var(--f-sans,inherit)}
.tr-d.ok{color:#1e7b3a}.tr-d.bad{color:#b42318}
.tr-list{display:grid;gap:12px}
.tr-card{padding:0;overflow:hidden}
.tr-h{display:flex;align-items:center;gap:12px;width:100%;background:none;border:0;padding:14px 16px;text-align:left;cursor:pointer;font:inherit;color:inherit}
.tr-h:hover{background:var(--accent-soft,#fdeeee)}
.tr-name{display:flex;flex-direction:column;flex:1;min-width:0}
.tr-name small{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-pills{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.tr-pills span{font-size:11.5px;padding:3px 8px;border-radius:999px;background:var(--bg-soft,#f5f2f1);white-space:nowrap}
.tr-pills .ok{background:#e7f6ec;color:#1e7b3a}.tr-pills .bad{background:#fde8e8;color:#b42318}.tr-pills .warn{background:#fff4e0;color:#9a5b00}
.tr-chev{color:var(--muted);width:14px}
.tr-b{padding:4px 16px 16px;border-top:1px solid var(--line)}
.tr-b .section-t{margin:16px 0 8px}
.tr-ks{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.tr-k{border:1px solid var(--line);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:2px;min-width:0}
.tr-k small{font-size:11.5px;color:var(--muted)}
.tr-k b{font-size:20px;line-height:1.2}
.tr-k span{font-size:12px;color:var(--muted)}
.tr-ai{background:var(--accent-soft,#fdeeee);border-radius:10px;padding:12px 14px;margin-top:12px}
.tr-ai p{margin:0 0 6px}
.tr-next{margin-top:8px!important;font-size:13px}
.tr-late{margin:0;padding-left:18px;display:grid;gap:4px;font-size:13px}
@media (max-width:820px){.tr-ks{grid-template-columns:repeat(2,minmax(0,1fr))}.tr-pills{display:none}}
.tr-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.tr-actions .input{width:auto}

.tr-score{display:inline-flex;align-items:baseline;gap:6px;padding:3px 9px;border-radius:999px;background:var(--bg-soft,#f5f2f1);white-space:nowrap}
.tr-score b{font-size:15px}.tr-score small{font-size:11px;color:inherit;opacity:.85}
.tr-score.g-A{background:#e7f6ec;color:#1e7b3a}.tr-score.g-B{background:#eef6e4;color:#3f6b12}.tr-score.g-C{background:#fff4e0;color:#9a5b00}.tr-score.g-D{background:#fdebdc;color:#a3460b}.tr-score.g-E{background:#fde8e8;color:#b42318}.tr-score.none{color:var(--muted)}
.tr-score.big{flex-direction:column;align-items:flex-start;gap:0;border-radius:12px;padding:10px 14px}
.tr-score.big b{font-size:34px;line-height:1.05}.tr-score.big small{font-size:12.5px}
.tr-sc{display:grid;grid-template-columns:170px 1fr;gap:16px;align-items:start;border:1px solid var(--line);border-radius:10px;padding:12px}
.tr-sc-l{display:flex;flex-direction:column;gap:6px}
.tr-sc-parts{display:grid;gap:7px}
.tr-part{display:grid;grid-template-columns:200px 1fr 34px;gap:10px;align-items:center;font-size:13px}
.tr-part span{display:flex;flex-direction:column}.tr-part span small{font-size:11px;color:var(--muted)}
.tr-part i{height:7px;border-radius:9px;background:var(--bg-soft,#f2eeed);overflow:hidden;display:block}
.tr-part em{display:block;height:100%;border-radius:9px}.tr-part em.ok{background:#3aa65c}.tr-part em.warn{background:#e8a33a}.tr-part em.bad{background:#e05a4f}
.tr-part.na{opacity:.5}.tr-part b{text-align:right}
@media (max-width:820px){.tr-sc{grid-template-columns:1fr}.tr-part{grid-template-columns:130px 1fr 30px}}
