/* ===== criba_mkt_dash — sistema de diseño (minimalista, Inter, navy CRIBA+) ===== */
@font-face {
  font-family: "InterVar";
  src: url("/static/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --bg:        #f6f5f2;   /* off-white cálido */
  --panel:     #ffffff;
  --ink:       #16283a;   /* navy CRIBA+ (texto fuerte / acción) */
  --ink-soft:  #46535f;
  --muted:     #8b9097;
  --line:      #e7e5e0;   /* hairline */
  --line-2:    #efedea;
  --accent:    #16283a;
  --inside:    #6d2f9c;   /* violeta inside+ (la "AI" del área) */
  --radius:    16px;
  --radius-sm: 11px;
  --sans: "InterVar", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

/* ---------- layout (rail de hubs + panel del hub + contenido) ---------- */
.layout { display: grid; grid-template-columns: 76px 248px 1fr; min-height: 100vh; }
.main { padding: 40px 48px 64px; max-width: 1280px; min-width: 0; }

/* ===== RAIL: barra oscura con los 3 hubs ===== */
.rail {
  background: #0f1d2b; color: #fff;
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 0 20px; position: sticky; top: 0; height: 100vh;
}
.rail-brand { display: block; margin-bottom: 16px; }
.rail-logo { width: 50px; height: auto; display: block; filter: brightness(0) invert(1); opacity: .96; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; width: 100%; align-items: center; }
.rail-div { width: 30px; height: 1px; background: rgba(255,255,255,.13); margin: 7px 0; }
.rail-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-decoration: none; color: rgba(255,255,255,.55); width: 100%; padding: 4px 0;
}
.rail-ico {
  width: 44px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.rail-ico svg { width: 21px; height: 21px; }
.rail-label { font-size: 10px; font-weight: 600; letter-spacing: .01em; }
.rail-item:hover { color: #fff; }
.rail-item:hover .rail-ico { background: rgba(255,255,255,.08); }
.rail-item.on { color: #fff; }
.rail-item.on .rail-ico {
  background: linear-gradient(135deg, var(--inside), #8a44c0); color: #fff;
  box-shadow: 0 3px 12px rgba(109,47,156,.45);
}
.rail-bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rail-iconbtn {
  background: none; border: none; cursor: pointer; color: rgba(255,255,255,.55);
  width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
}
.rail-iconbtn:hover { color: #fff; background: rgba(255,255,255,.08); }
.rail-iconbtn svg { width: 19px; height: 19px; }
.rail-user {
  width: 34px; height: 34px; border-radius: 50%; background: var(--inside); color: #fff;
  font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: filter .15s ease;
}
.rail-user:hover { filter: brightness(1.12); }

/* ===== PANEL: nav del hub activo ===== */
.panel {
  background: var(--bg); border-right: 1px solid var(--line);
  padding: 26px 18px; display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.panel-title { font-size: 16px; font-weight: 800; letter-spacing: -.015em; color: var(--ink); }
.panel-hint { font-size: 12px; color: var(--muted); line-height: 1.5; padding: 4px 10px 0; margin: 0; }

/* ---------- marca ---------- */
.brand { display: flex; flex-direction: column; gap: 7px; text-decoration: none; }
.brand .logo-img { width: 124px; height: auto; }
.brand .logo-text { font-weight: 800; font-size: 24px; letter-spacing: -.01em; color: var(--ink); }
.brand .brand-sub { font-size: 10.5px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); padding-left: 2px; }

/* ---------- eyebrow ---------- */
.eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ---------- nav (3 hubs + acordeón de unidades de negocio) ---------- */
.nav { display: flex; flex-direction: column; gap: 3px; }

/* etiqueta de hub (Report / Brand / Creative): separador de grupo */
.nav-hub {
  font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); padding: 0 10px; margin: 16px 0 5px;
}
.nav .nav-top-link:first-child + .nav-hub,
.nav-hub:first-child { margin-top: 6px; }

/* link de primer nivel (Home, Brand Hub, Creative Hub): mismo peso que un summary de unidad */
.nav-top-link {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 13px;
  padding: 9px 10px; border-radius: 9px; display: block;
}
.nav-top-link:hover { background: var(--line-2); color: var(--ink); }
.nav-top-link.on { background: var(--ink); color: #fff; }

.nav-unit { border: none; border-radius: 10px; }
.nav-unit > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600;
  color: var(--ink-soft); padding: 9px 10px; border-radius: 9px;
}
.nav-unit > summary::-webkit-details-marker { display: none; }
.nav-unit > summary:hover { background: var(--line-2); color: var(--ink-soft); }
.nav-unit > summary::after {
  content: ""; width: 7px; height: 7px; margin-left: 8px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease; opacity: .65;
}
.nav-unit[open] > summary::after { transform: rotate(45deg); }
/* afordancia al desplegar: la unidad abierta se resalta y sus items cuelgan de una guía */
.nav-unit[open] { background: rgba(22,40,58,.025); }
.nav-unit[open] > summary { color: var(--ink); }
.nav-unit[open] > .nav-items { margin-left: 15px; border-left: 1.5px solid var(--line); padding-left: 9px; }

.nav-items { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 8px 6px; }
.nav-sub {
  text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 13px;
  padding: 7px 10px; border-radius: 9px;
}
.nav-sub:hover { background: var(--line-2); }
.nav-sub.on { background: var(--ink); color: #fff; font-weight: 600; }
.nav-sub.muted { color: var(--muted); font-style: italic; }
.nav-sub.muted.on { color: #fff; font-style: normal; }
.nav-top { margin-bottom: 4px; }

/* inside+ como capa principal de la unidad: pill con degradé violeta */
.nav-inside-pill {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 9px 11px; margin: 2px 0 5px; border-radius: 11px;
  background: linear-gradient(135deg, rgba(109,47,156,.15), rgba(109,47,156,.04));
  border: 1px solid rgba(109,47,156,.28);
  transition: background .15s ease, box-shadow .15s ease;
}
.nav-inside-pill-logo { height: 19px; width: auto; display: block; }
.nav-inside-pill span { font-size: 12.5px; font-weight: 600; color: var(--inside); letter-spacing: -.01em; }
.nav-inside-pill:hover { background: linear-gradient(135deg, rgba(109,47,156,.22), rgba(109,47,156,.07)); }
.nav-inside-pill.on {
  background: linear-gradient(135deg, var(--inside), #8a44c0); border-color: var(--inside);
  box-shadow: 0 2px 10px rgba(109,47,156,.28);
}
.nav-inside-pill.on .nav-inside-pill-logo { filter: brightness(0) invert(1); }
.nav-inside-pill.on span { color: #fff; }

/* sub-menú anidado dentro de una unidad (ej. Performance) */
.nav-sub-unit { border: none; }
.nav-sub-unit > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--ink-soft); font-weight: 500; font-size: 13.5px;
  padding: 8px 10px; border-radius: 9px;
}
.nav-sub-unit > summary::-webkit-details-marker { display: none; }
.nav-sub-unit > summary:hover { background: var(--line-2); }
.nav-sub-unit > summary::after {
  content: ""; width: 6px; height: 6px; margin-left: 8px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease; opacity: .55;
}
.nav-sub-unit[open] > summary::after { transform: rotate(45deg); }
.nav-sub-unit > .nav-items { padding: 2px 0 4px 12px; }

/* ---------- filtros (sidebar) ---------- */
.filters { display: flex; flex-direction: column; gap: 18px; border-top: 1px solid var(--line); padding-top: 22px; }
.field label { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 8px; letter-spacing: .02em; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  font-family: var(--sans); font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
  padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: .12s;
}
.seg button:hover { border-color: var(--ink); }
.seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; }
.check input { accent-color: var(--ink); width: 15px; height: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; padding: 6px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); user-select: none;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* barra de filtros en línea (Data Analytics — mismo lugar/estilo que Ads) */
.filterbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 4px 0 24px; }
.daterange-inline { display: flex; align-items: center; gap: 8px; }
.dateinput {
  font-family: var(--sans); font-size: 12.5px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
  padding: 6px 10px; border-radius: 9px;
}

/* badge de conexión (ej. "Conectado con Meta") */
.conn-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-soft);
  border: 1px solid var(--line); background: var(--panel);
  padding: 6px 12px; border-radius: 999px;
}
.conn-badge.off { color: var(--muted); }
.conn-badge .conn-logo { height: 14px; width: auto; display: block; }
.conn-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #2f9e44;
  box-shadow: 0 0 0 3px rgba(47, 158, 68, .18);
}
.conn-dot.off { background: var(--muted); box-shadow: none; }

/* lista de tareas del home (board de Monday por rol — grupo General, lista plana) */
.task-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.task-row:last-child { border-bottom: none; }
.task-date { flex: 0 0 46px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.task-name { color: var(--ink-soft); font-size: 14px; flex: 1; }
.task-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.board-monday { height: 14px; width: auto; vertical-align: middle; margin-left: 5px; }
.task-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: 0 0 24px; display: block; }
.task-avatar-ph {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; font-size: 10px; font-weight: 600;
}

/* desplegable de subelementos (subitems de Monday) */
.task-caret {
  flex: 0 0 16px; width: 16px; height: 16px; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 11px; line-height: 1; transition: color .12s;
}
.task-caret:hover { color: var(--ink); }
.task-caret-empty { cursor: default; }
.task-subcount {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  background: var(--line-2); color: var(--muted); font-size: 11px; font-weight: 600;
}
.task-subs { padding-left: 30px; }
.task-subrow { padding: 8px 0; }
.task-subrow .task-name { font-size: 13px; color: var(--muted); }

/* secciones de métricas en la Home */
.home-section { font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); margin: 30px 0 2px; }
.home-subsection { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 16px 0 10px; }
.home-subsection small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.home-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px; margin-bottom: 6px; max-width: 820px;
}
/* Cards parejas: el label puede ocupar 2 líneas (con el logo de Meta) sin desalinear
   los valores, que quedan siempre apoyados abajo. */
.home-kpis .kpi { display: flex; flex-direction: column; }
.home-kpis .kpi .k-label { min-height: 2.5em; line-height: 1.25; }
.home-kpis .kpi .k-value { margin-top: auto; }
/* chip de comparativa vs. período anterior */
.kpi-delta { margin-top: 7px; font-size: 11.5px; font-weight: 700; display: flex; align-items: baseline; gap: 5px; }
.kpi-delta span { font-weight: 500; color: var(--muted); font-size: 10.5px; }
.kpi-delta.up { color: #2f9e44; }
.kpi-delta.down { color: #e03131; }
.kpi-delta.flat { color: var(--muted); }
.kpi-loading { color: var(--muted); font-size: 13px; }

/* ---------- Social Media (Instagram) ---------- */
.ig-account { display: flex; align-items: center; gap: 14px; margin: 4px 0 22px; }
.ig-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: 0 0 52px; }
.ig-avatar-ph { background: var(--line-2); display: block; }
.ig-acc-name { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.ig-acc-user { font-size: 13px; color: var(--muted); text-decoration: none; }
.ig-acc-user:hover { color: var(--ink); }
.kpi .k-value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }

.ig-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ig-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; background: var(--panel); transition: box-shadow .15s, border-color .15s;
}
.ig-card:hover { border-color: var(--ink-2, #c2ccd5); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.ig-thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--line-2); }
.ig-thumb-ph { aspect-ratio: 1 / 1; background: var(--line-2); }
.ig-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.ig-card-top { display: flex; align-items: center; justify-content: space-between; }
.ig-tag { font-size: 11px; font-weight: 600; color: #fff; background: var(--ink); padding: 2px 8px; border-radius: 999px; }
.ig-date { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ig-cap { font-size: 13px; color: var(--ink-soft); margin: 0; line-height: 1.4; min-height: 2.6em; }
.ig-metrics { display: flex; flex-wrap: wrap; gap: 10px 14px; border-top: 1px solid var(--line-2); padding-top: 9px; }
.ig-m { font-size: 12px; color: var(--muted); }
.ig-m b { color: var(--ink); font-weight: 700; }

/* rendimiento por tipo */
.ig-bt-head, .ig-bt-row {
  display: grid; grid-template-columns: 90px 70px 1fr 90px; align-items: center; gap: 14px;
}
.ig-bt-head { font-size: 11px; color: var(--muted); font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.ig-bt-row { padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--ink-soft); }
.ig-bt-row:last-child { border-bottom: none; }
.ig-bt-label { font-weight: 600; color: var(--ink); }
.ig-bt-bar { position: relative; display: flex; align-items: center; gap: 8px; }
.ig-bt-bar i { display: block; height: 8px; border-radius: 999px; background: var(--ink); min-width: 2px; }
.ig-bt-bar b { font-weight: 600; color: var(--ink); font-size: 12.5px; white-space: nowrap; }

/* demografía de la audiencia */
.ig-demo { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px 30px; }
.ig-demo-block h4 { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.ig-demo-row { display: grid; grid-template-columns: 92px 1fr 38px; align-items: center; gap: 10px; margin-bottom: 8px; }
.ig-demo-label { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-demo-bar { background: var(--line-2); border-radius: 999px; height: 8px; overflow: hidden; }
.ig-demo-bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.ig-demo-pct { font-size: 12px; color: var(--muted); text-align: right; }

/* Performance → Google Analytics: lista de páginas más vistas */
.ga-page-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 64px; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ga-page-row:last-child { border-bottom: none; }
.ga-page-label { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ga-page-bar { background: var(--line-2); border-radius: 999px; height: 8px; overflow: hidden; }
.ga-page-bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.ga-page-val { font-size: 13px; font-weight: 600; color: var(--ink); text-align: right; }

/* inside+ (la "AI" del área): card colapsable con look AI (glow) y efecto "piensa y tipea" */
.inside-card {
  border-left: 3px solid var(--inside);
  background: linear-gradient(180deg, rgba(109,47,156,.05), transparent 70%);
  box-shadow: 0 0 0 1px rgba(109,47,156,.10), 0 0 22px rgba(109,47,156,.10);
  animation: inside-glow 3.6s ease-in-out infinite;
}
@keyframes inside-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(109,47,156,.10), 0 0 18px rgba(109,47,156,.08); }
  50%      { box-shadow: 0 0 0 1px rgba(109,47,156,.18), 0 0 30px rgba(109,47,156,.20); }
}
.inside-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; padding: 0; cursor: pointer; font-family: var(--sans);
}
.inside-logo { height: 20px; width: auto; display: block; }
.inside-label { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.inside-date { font-size: 12px; color: var(--muted); font-weight: 600; }
.inside-loading { margin-left: auto; font-size: 12.5px; color: var(--inside); font-style: italic; animation: inside-fade 1.1s ease-in-out infinite; }
@keyframes inside-fade { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
.inside-card.is-loading .inside-date,
.inside-card.is-loading .inside-cta,
.inside-card.is-loading .inside-chevron { display: none; }
.inside-card:not(.is-loading) .inside-loading { display: none; }
.page-logo { height: 30px; width: auto; display: block; }
.kpi-logo { height: 12px; width: auto; margin-left: 7px; vertical-align: middle; opacity: .85; }
.inside-cta { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--inside); }
.inside-chevron { color: var(--inside); font-size: 16px; line-height: 1; transition: transform .2s; }
.inside-card:not(.is-collapsed) .inside-chevron { transform: rotate(90deg); }
.inside-card:not(.is-collapsed) .inside-cta { opacity: 0; }

.inside-panel { overflow: hidden; max-height: 4000px; transition: max-height .35s ease, opacity .25s ease; opacity: 1; margin-top: 12px; }
.inside-card.is-collapsed .inside-panel { max-height: 0; opacity: 0; margin-top: 0; }

/* navegación entre semanas del análisis */
.inside-weeknav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.inside-week-label { font-size: 12.5px; font-weight: 600; color: var(--muted); min-width: 120px; text-align: center; }
.inside-week-prev, .inside-week-next {
  width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--panel); color: var(--inside); font-size: 15px; line-height: 1;
  cursor: pointer; transition: border-color .15s, background .15s; font-family: var(--sans);
}
.inside-week-prev:hover:not(:disabled), .inside-week-next:hover:not(:disabled) {
  border-color: var(--inside); background: rgba(109,47,156,.06);
}
.inside-week-prev:disabled, .inside-week-next:disabled { opacity: .35; cursor: default; }

/* fase "pensando": chispa + texto con shimmer + puntos animados */
.inside-thinking { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--inside); }
.inside-spark { width: 9px; height: 9px; border-radius: 50%; background: var(--inside); animation: inside-pulse 1s ease-in-out infinite; }
@keyframes inside-pulse { 0%,100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1.1); opacity: 1; } }
.inside-dots::after { content: ""; animation: inside-dots 1.2s steps(4, end) infinite; }
@keyframes inside-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

.inside-body { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.inside-body.is-hidden { display: none; }
.inside-body.inside-typing::after { content: "▍"; color: var(--inside); animation: inside-caret .8s steps(1) infinite; margin-left: 1px; }
@keyframes inside-caret { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.inside-body h4 { font-size: 13.5px; font-weight: 700; color: var(--ink); margin: 16px 0 6px; }
.inside-body h5 { font-size: 12.5px; font-weight: 700; color: var(--inside); margin: 14px 0 4px; }
.inside-body p { margin: 0 0 9px; }
.inside-body ul { margin: 0 0 10px; padding-left: 18px; }
.inside-body li { margin-bottom: 5px; }
.inside-body strong { color: var(--ink); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .inside-card { animation: none; }
  .inside-spark, .inside-dots::after, .inside-body.inside-typing::after { animation: none; }
}

/* pill de estado (agenda de contenidos) */
.status-pill { display: inline-block; color: #fff; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; white-space: nowrap; }

/* ---------- Contenidos: calendario ---------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-month { font-size: 16px; font-weight: 600; color: var(--ink); min-width: 150px; }
.seg-btn {
  font-family: var(--sans); font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
  padding: 6px 12px; border-radius: 9px;
}
.seg-btn:hover { border-color: var(--ink); }
.btn-ghost {
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
  padding: 10px 18px; border-radius: 999px;
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 4px 6px; }
.cal-cell {
  min-height: 96px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px; cursor: pointer; overflow: hidden;
}
.cal-cell:hover { border-color: var(--line-2); box-shadow: 0 1px 6px rgba(0,0,0,.04); }
.cal-empty { background: transparent; border: none; cursor: default; box-shadow: none; }
.cal-today { border-color: var(--ink); }
.cal-daynum { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.cal-today .cal-daynum { color: var(--ink); }
.cal-chip {
  display: flex; align-items: center; gap: 5px; background: var(--bg);
  border-radius: 6px; padding: 3px 6px; margin-bottom: 3px; font-size: 11.5px; color: var(--ink-soft);
}
.cal-chip:hover { background: var(--line-2); }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.chip-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.chip-monday { width: 15px; height: auto; flex: 0 0 15px; display: block; }

/* form de alta */
.cform { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.cform-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.cform-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.cform-grid input, .cform-grid select, .cform-grid textarea {
  font-family: var(--sans); font-size: 13.5px; color: var(--ink);
  border: 1px solid var(--line); background: var(--panel); padding: 8px 10px; border-radius: 9px; text-transform: none; font-weight: 400;
}
.cform-grid input:focus, .cform-grid select:focus, .cform-grid textarea:focus { outline: none; border-color: var(--ink); }
.cform-wide { grid-column: 1 / -1; }
.cform-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.cform-error { background: #fdecec; border: 1px solid #f5c6c6; color: #a12626; font-size: 13px; border-radius: var(--radius-sm); padding: 9px 12px; margin-top: 14px; }

/* panel de detalle */
.cdetail-overlay { position: fixed; inset: 0; background: rgba(20,40,58,.28); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.cdetail { background: var(--panel); border-radius: var(--radius); padding: 24px 26px; width: 100%; max-width: 420px; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.cd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cd-head h3 { margin: 0; font-size: 18px; color: var(--ink); }
.cd-close { background: none; border: none; font-size: 16px; color: var(--muted); cursor: pointer; }
.cd-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.cd-row:last-of-type { border-bottom: none; }
.cd-row span { color: var(--muted); }
.cd-row b { color: var(--ink-soft); font-weight: 600; text-align: right; }
.cd-actions { margin-top: 16px; display: flex; justify-content: flex-end; }

@media (max-width: 900px) { .cform-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Minutas de reunión ---------- */
.minutas { display: flex; flex-direction: column; gap: 16px; }
.min-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.min-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.min-head h3 { margin: 0; font-size: 16px; color: var(--ink); }
.min-date { font-size: 12px; color: var(--muted); }
.min-head-r { display: flex; align-items: center; gap: 12px; }
.min-head-r .chip-monday { width: 22px; }
.min-tag { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.min-del { padding: 6px 12px; font-size: 12px; }

.min-update + .min-update { border-top: 1px solid var(--line-2); margin-top: 14px; padding-top: 14px; }
.min-author { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.min-meta { font-size: 12.5px; color: var(--muted); }
.min-meta b { color: var(--ink-soft); font-weight: 600; }
.min-body { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); white-space: pre-wrap; }
.min-clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.min-more { background: none; border: none; color: var(--ink); font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 6px 0 0; }

.min-replies { margin-top: 12px; padding-left: 14px; border-left: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 12px; }
.min-reply { display: flex; gap: 9px; align-items: flex-start; }
.min-reply .task-avatar { width: 22px; height: 22px; flex: 0 0 22px; }

/* ---------- header ---------- */
.page-title { font-weight: 700; font-size: 30px; letter-spacing: -.02em; margin: 4px 0 2px; color: var(--ink); }
.page-sub { color: var(--muted); font-size: 14px; margin: 0 0 26px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 30px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.kpi .k-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi .k-value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; color: var(--ink); }
.kpi .k-value small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 4px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs button {
  font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--muted);
  background: none; border: none; padding: 11px 4px; margin-right: 18px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button:hover { color: var(--ink-soft); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tab-pane { display: none; }
.tab-pane.on { display: block; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }
.g32 { grid-template-columns: 3fr 2fr; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.card h3 { font-size: 14px; font-weight: 600; margin: 0 0 2px; color: var(--ink); }
.card .card-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; }
.chart { width: 100%; }

/* ---------- alerts ---------- */
.alert { border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13.5px; margin-bottom: 16px; border: 1px solid; }
.alert.warn { background: #fff8ed; border-color: #f3e2c0; color: #7a5a17; }
.alert.info { background: #eef3f8; border-color: #d6e2ee; color: #2f4a63; }
.alert b { font-weight: 600; }

/* ---------- tabla ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .04em; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
tbody td { padding: 12px; border-bottom: 1px solid var(--line-2); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.muted-note { color: var(--muted); font-size: 12.5px; margin-top: 18px; }

/* ---------- home (pantalla principal) ---------- */
.home { max-width: 720px; padding-top: 16px; }
.home-title { font-size: 34px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin: 10px 0 10px; }
.home-msg { color: var(--ink-soft); font-size: 15px; line-height: 1.6; margin: 0 0 30px; max-width: 600px; }
.home-card { max-width: 600px; }
.hitos { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.hitos li { display: flex; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.hitos li:last-child { border-bottom: none; }
.hito-fecha { flex: 0 0 48px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hito-texto { color: var(--ink-soft); font-size: 14px; line-height: 1.5; }

/* ---------- placeholder (stub) ---------- */
.stub { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 36px; max-width: 620px; }
.stub h3 { margin: 0 0 8px; font-size: 16px; }
.stub p { color: var(--ink-soft); line-height: 1.65; margin: 0 0 18px; }
.btn {
  display: inline-block; text-decoration: none; background: var(--ink); color: #fff;
  font-weight: 600; font-size: 13.5px; padding: 11px 20px; border-radius: 999px;
}
.btn.disabled { background: var(--line); color: var(--muted); pointer-events: none; }

/* ---------- usuario en el sidebar ---------- */
.nav-user {
  margin-top: auto; border-top: 1px solid var(--line); padding-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.nav-user-mail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-logout { font-size: 12px; font-weight: 600; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.nav-user-logout:hover { color: var(--ink); text-decoration: underline; }

/* ---------- login / verificación de código ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 36px; width: 100%; max-width: 400px; text-align: left;
}
.auth-logo { width: 120px; height: auto; margin-bottom: 22px; }
.auth-title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin: 0 0 8px; }
.auth-sub { font-size: 14px; color: var(--ink-soft); line-height: 1.55; margin: 0 0 22px; }
.auth-input {
  font-family: var(--sans); font-size: 15px; width: 100%; color: var(--ink);
  border: 1px solid var(--line); background: var(--panel);
  padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 12px;
}
.auth-input:focus { outline: none; border-color: var(--ink); }
.auth-code { text-align: center; letter-spacing: .5em; font-size: 22px; font-weight: 600; }
.auth-btn { width: 100%; text-align: center; border: none; cursor: pointer; padding: 12px 20px; }
.auth-link { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--muted); text-decoration: none; }
.auth-link:hover { color: var(--ink-soft); text-decoration: underline; }
.auth-error {
  background: #fdecec; border: 1px solid #f5c6c6; color: #a12626;
  font-size: 13px; border-radius: var(--radius-sm); padding: 10px 13px; margin-bottom: 16px;
}
.auth-dev {
  background: #eef3f8; border: 1px solid #d6e2ee; color: #2f4a63;
  font-size: 13px; border-radius: var(--radius-sm); padding: 10px 13px; margin-bottom: 16px;
}
.auth-dev b { font-size: 16px; letter-spacing: .12em; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 64px 1fr; }
  .panel { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .g2, .g3, .g32 { grid-template-columns: 1fr; }
  .main { padding: 28px 20px; }
}
