:root {
  --bg: #10191b;
  --bg-2: #142022;
  --surface: #1b292b;
  --surface-2: #233438;
  --border: #344649;
  --border-soft: #293b3e;
  --text: #f4f0e8;
  --text-2: #c4cbc5;
  --text-3: #9baaa5;
  --accent: #f2b277;
  --accent-soft: #f2b27722;
  --green: #85d7b0;
  --green-soft: #85d7b01c;
  --yellow: #f0ca72;
  --yellow-soft: #f0ca721d;
  --red: #fa8d83;
  --red-soft: #fa8d831e;
  --purple: #c6a9e9;
  --cyan: #79d6d4;
  --radius: 16px;
  --radius-sm: 10px;
  --scale: 1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* Modo presentación: sube tipografía y contraste para proyectar */
body.present { font-size: 15.5px; --text-2: #c3ccdd; --text-3: #93a1b8; }
body.present .metric .val { font-size: 29px; }
body.present .strip-val { font-size: 32px; }
body.present .tagline { font-size: 13.5px; }
body.present .view { padding: 26px 30px 80px; }

#app { display: grid; grid-template-columns: 268px 1fr; height: 100vh; overflow: hidden; }

/* ---------- Sidebar ---------- */
.sidebar {
  border-right: 1px solid var(--border-soft);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 40;
}

.brand { display: flex; gap: 11px; align-items: center; padding: 18px 18px 14px; }
.brand-logo {
  width: 34px; height: 34px; flex: none; object-fit: contain;
  border-radius: 9px; background: #16262a;
}
.brand-logo.lg { width: 52px; height: 52px; border-radius: 13px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 14.5px; letter-spacing: .2px; }
.brand-text span { font-size: 12px; color: var(--text-3); }

/* El cliente al que sirve la demo: se muestra aparte de la marca del producto. */
.brand-client {
  display: flex; align-items: center; gap: 9px; margin: 0 18px 6px;
  padding: 8px 11px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border-soft);
}
.client-logo { width: 22px; height: 22px; flex: none; object-fit: contain; border-radius: 5px; }
.brand-client div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.client-label { font-size: 10px; color: var(--text-3); letter-spacing: .3px; text-transform: uppercase; }
.brand-client strong { font-size: 12px; color: var(--text-2); }

.nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid transparent;
  color: var(--text-2); font-size: 13.5px; text-align: left; width: 100%;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--text); border-color: #4f8cff44; }
.nav-item.touring { animation: ring 1.4s ease infinite; }
@keyframes ring {
  0%, 100% { box-shadow: 0 0 0 0 #4f8cff66; }
  50% { box-shadow: 0 0 0 5px #4f8cff00; }
}
.nav-item .ico { width: 17px; height: 17px; flex: none; opacity: .95; }
.nav-item .dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex: none; }
.nav-sep { height: 1px; background: var(--border-soft); margin: 8px 10px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-3); padding: 8px 12px 4px; }

.sidebar-foot { border-top: 1px solid var(--border-soft); padding: 12px 14px; max-height: 40%; display: flex; flex-direction: column; }
.live-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-3); margin-bottom: 9px; }
.live-feed { overflow-y: auto; display: flex; flex-direction: column; gap: 9px; }
.live-item { font-size: 12px; line-height: 1.45; color: var(--text-2); border-left: 2px solid var(--border); padding-left: 9px; }
.live-item.new { animation: slideIn .35s ease; border-left-color: var(--accent); }
.live-item b { color: var(--text); font-weight: 600; }
.live-item time { display: block; color: var(--text-3); font-size: 11px; margin-top: 2px; }
.live-item .feed-mod { display: inline-flex; align-items: center; gap: 5px; }
.live-item .feed-mod i { width: 6px; height: 6px; border-radius: 50%; }

@keyframes slideIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 #35c98a88; animation: pulse 2s infinite; display: inline-block; flex: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 #35c98a88; }
  70% { box-shadow: 0 0 0 7px #35c98a00; }
  100% { box-shadow: 0 0 0 0 #35c98a00; }
}

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 18px 26px 15px; border-bottom: 1px solid var(--border-soft);
  background: var(--bg-2);
}
.topbar-left { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.crumb { font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; letter-spacing: .3px; }
.title-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.topbar h1 { margin: 0; font-size: 23px; letter-spacing: -.2px; }
.tagline { font-size: 12.5px; color: var(--accent); font-weight: 500; }
.topbar p { margin: 5px 0 0; font-size: 13px; color: var(--text-2); max-width: 640px; line-height: 1.45; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex: none; }

.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  display: grid; place-items: center; transition: color .12s, border-color .12s;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--text); border-color: #4f8cff66; }
.icon-btn.on { color: var(--accent); border-color: #4f8cff66; background: var(--accent-soft); }
.icon-btn.off { color: var(--text-3); border-color: var(--border-soft); background: transparent; }
.mobile-only { display: none; }

.demo-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .7px;
  color: var(--yellow); background: var(--yellow-soft); border: 1px solid #e8b93e44;
  padding: 5px 9px; border-radius: 999px; white-space: nowrap;
}

.candidate { display: flex; gap: 10px; align-items: center; }
.candidate .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text-2); }
.candidate strong { display: block; font-size: 13px; }
.candidate span { font-size: 11.5px; color: var(--text-3); }
.clock { text-align: right; }
.clock strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.clock span { font-size: 11.5px; color: var(--text-3); }
.live-badge { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .8px; color: var(--green); background: var(--green-soft); border: 1px solid #35c98a44; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }

.view { overflow-y: auto; padding: 24px 26px 70px; flex: 1; }

/* ---------- Layout helpers ---------- */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.spacer { flex: 1; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .9px; color: var(--text-3); margin: 6px 0 0; font-weight: 600; }
.section-sub { font-size: 12.5px; color: var(--text-3); margin: 4px 0 0; }

@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; width: 280px;
    transform: translateX(-102%); transition: transform .22s ease;
  }
  body.nav-open .sidebar { transform: none; }
  .mobile-only { display: grid; }
  .topbar { flex-wrap: wrap; padding: 14px 16px; }
  .topbar-right { gap: 8px; }
  .candidate, .clock { display: none; }
  .view { padding: 16px 16px 80px; }
  .g2, .g4 { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) { .demo-badge { display: none; } }

.scrim {
  position: fixed; inset: 0; background: #000000aa; z-index: 35;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
body.nav-open .scrim { opacity: 1; pointer-events: auto; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 15px; border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px; font-weight: 600; letter-spacing: .3px; color: var(--text-2);
}
.card-head .head-note { font-size: 11.5px; color: var(--text-3); font-weight: 400; }
.card-body { padding: 15px; }
.collapse-body { display: none; }
.card.open .collapse-body { display: block; }
.collapse-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  background: transparent; border: none; color: var(--text-2); text-align: left;
  padding: 12px 15px; font-size: 12.5px; font-weight: 600;
}
.collapse-toggle .chev { transition: transform .18s; color: var(--text-3); }
.card.open .collapse-toggle .chev { transform: rotate(90deg); }
.card.open .collapse-toggle { border-bottom: 1px solid var(--border-soft); }
/* Tarjeta plegable: el encabezado es el botón y el contenido se abre debajo,
   así que el cuerpo no repite el aire superior de una tarjeta normal. */
.collapsible > .collapse-body > .card-body { padding-top: 4px; }

.metric { display: flex; flex-direction: column; gap: 4px; }
.metric .val { font-size: 27px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.metric .lbl { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.metric .sub { font-size: 11.5px; color: var(--text-3); }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.muted-2 { color: var(--text-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; color: var(--text); }
.lh { line-height: 1.55; }

/* ---------- Semáforos (COMANDO) ---------- */
/* ---------- Franja de estado (COMANDO) ---------- */
.strip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border-soft); }
.strip-cell {
  background: var(--surface); border: none; text-align: left; color: inherit;
  padding: 15px 16px; display: flex; flex-direction: column; gap: 8px;
  transition: background .12s;
}
.strip-cell:hover { background: #182031; }
.strip-cell:hover .strip-go { color: var(--accent); }
.strip-top { display: flex; align-items: center; gap: 7px; }
.strip-label { font-size: 11px; letter-spacing: .8px; font-weight: 700; color: var(--text-3); }
.strip-go { margin-left: auto; font-size: 11px; color: transparent; transition: color .12s; }
.strip-val { font-size: 30px; font-weight: 700; letter-spacing: -.8px; font-variant-numeric: tabular-nums; line-height: 1; }
.strip-val .unit { font-size: 14px; color: var(--text-3); font-weight: 500; margin-left: 3px; }
.strip-meta { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.strip-bar { margin-top: auto; }
.strip-foot { font-size: 11.5px; color: var(--text-3); }
@media (max-width: 1080px) { .strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .strip-grid { grid-template-columns: 1fr; } }

/* ---------- Botón de información y tooltip ---------- */
.info {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-3);
  font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1;
  padding: 0;
}
.info:hover, .info:focus { color: var(--accent); border-color: #4f8cff77; outline: none; }
.tooltip {
  position: fixed; z-index: 90; width: 290px; pointer-events: none;
  background: #1b2231; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 13px; font-size: 12px; color: var(--text-2); line-height: 1.5;
}
.tooltip.hidden { display: none; }
.tooltip strong { display: block; font-size: 12.5px; color: var(--text); margin-bottom: 5px; }
.tooltip .tt-row { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--border-soft); }
.tooltip .tt-k { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; display: block; margin-bottom: 2px; }

/* ---------- Overlays (portada / ayuda / recorrido) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: #06080daa; backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  overflow-y: auto;
}
.overlay.hidden { display: none; }
.intro-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px;
  padding: 30px 32px; max-width: 720px; width: 100%;
  animation: pop .22s ease;
}
.help-card { max-width: 620px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.intro-top { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.intro-name { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.intro-tag { font-size: 13.5px; color: var(--text-2); }
.intro-lead { font-size: 13.5px; color: var(--text-2); line-height: 1.65; margin: 0 0 20px; }
.intro-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.intro-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.intro-item strong { display: block; font-size: 12.5px; margin-bottom: 4px; }
.intro-item span { font-size: 11.5px; color: var(--text-3); line-height: 1.45; }
.intro-campaign {
  display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; margin-bottom: 12px;
}
.intro-warn {
  font-size: 12px; color: var(--yellow); background: var(--yellow-soft);
  border: 1px solid #e8b93e44; border-radius: 10px; padding: 11px 13px; line-height: 1.5; margin-bottom: 20px;
}
.intro-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.intro-hint { font-size: 12px; color: var(--text-3); margin-top: 14px; line-height: 1.5; }
@media (max-width: 720px) { .intro-grid { grid-template-columns: 1fr; } .intro-card { padding: 22px 20px; } }

/* ---------- Recorrido guiado ---------- */
.tour {
  position: fixed; z-index: 95; left: 50%; transform: translateX(-50%);
  bottom: 22px; width: min(760px, calc(100vw - 40px));
  background: var(--bg-2); border: 1px solid #4f8cff55; border-radius: 14px;
  padding: 15px 18px 14px; animation: pop .22s ease;
}
.tour.hidden { display: none; }
.tour-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tour-step { font-size: 11px; text-transform: uppercase; letter-spacing: .9px; color: var(--accent); font-weight: 700; }
.tour-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.tour-text { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0 0 14px; }
.tour-foot { display: flex; align-items: center; gap: 10px; }
.tour-dots { display: flex; gap: 6px; flex: 1; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.tour-dots i.on { background: var(--accent); }

/* ---------- Table ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); font-weight: 600; padding: 9px 11px; border-bottom: 1px solid var(--border); }
table.tbl td { padding: 10px 11px; border-bottom: 1px solid var(--border-soft); color: var(--text-2); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:hover td { background: #ffffff05; }
table.tbl td.strong, table.tbl td .strong { color: var(--text); font-weight: 600; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }
.tbl-note { font-size: 11.5px; color: var(--text-3); margin-top: 10px; line-height: 1.5; }
/* Fila de la tabla que el KPI está contando (p. ej. grupo sin actividad >48h). */
tr.row-alert > td { background: #e5484d0f; box-shadow: inset 3px 0 0 var(--red); }

/* ---------- Brief ---------- */
.brief-block { border-left: 2px solid var(--border); padding: 2px 0 2px 13px; margin-bottom: 15px; }
.brief-block.ayer { border-color: var(--green); }
.brief-block.hoy { border-color: var(--accent); }
.brief-block.riesgo { border-color: var(--red); }
.brief-block h4 { margin: 0 0 7px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-3); }
.brief-block ul { margin: 0; padding-left: 17px; }
.brief-block li { margin-bottom: 6px; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.brief-block li b { color: var(--text); }
.reco { background: var(--accent-soft); border: 1px solid #4f8cff44; border-radius: var(--radius-sm); padding: 13px 15px; }
.reco .tag { font-size: 11px; text-transform: uppercase; letter-spacing: .9px; color: var(--accent); font-weight: 700; }
.reco p { margin: 7px 0 11px; font-size: 13.5px; color: var(--text); line-height: 1.5; }
.reco-actions { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kcol { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 11px; min-height: 240px; }
.kcol h4 { margin: 2px 4px 11px; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--text-3); display: flex; justify-content: space-between; gap: 8px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px; margin-bottom: 9px; transition: border-color .12s; }
.kcard:hover { border-color: #4f8cff55; }
.kcard .t { font-size: 13px; color: var(--text); line-height: 1.4; margin-bottom: 9px; }
.kcard .m { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kcard .m .tiny { color: var(--text-3); }
.kcard .actions { display: flex; gap: 6px; margin-top: 9px; }
@media (max-width: 1180px) { .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .kanban { grid-template-columns: 1fr; } }

/* ---------- Heatmap ---------- */
.heat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.heat-cell { border-radius: var(--radius-sm); padding: 11px; border: 1px solid var(--border); background: var(--surface-2); }
.heat-cell .n { font-size: 12.5px; font-weight: 600; color: var(--text); }
.heat-cell .v { font-size: 19px; font-weight: 700; margin-top: 4px; }
.heat-cell .s { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.heat-cell.g1 { background: #1a2b22; border-color: #2b4a3a; }
.heat-cell.g2 { background: #2b2a1a; border-color: #4a4526; }
.heat-cell.g3 { background: #2b1c1e; border-color: #4a2c2f; }
@media (max-width: 860px) { .heat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Feed ---------- */
.feed { display: flex; flex-direction: column; gap: 0; max-height: 480px; overflow-y: auto; }
.feed-item { padding: 12px 4px; border-bottom: 1px solid var(--border-soft); }
.feed-item:last-child { border-bottom: none; }
.feed-item .top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.feed-item .who { font-size: 12.5px; font-weight: 600; color: var(--text); }
.feed-item .when { font-size: 11.5px; color: var(--text-3); margin-left: auto; }
.feed-item .txt { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.feed-item .meta { display: flex; gap: 8px; margin-top: 7px; flex-wrap: wrap; align-items: center; }
.feed-item.alert { background: var(--red-soft); border-radius: var(--radius-sm); padding: 12px; margin: 6px 0; border-bottom-color: transparent; }

/* ---------- Progress / bars ---------- */
.bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.bar > i.green { background: var(--green); }
.bar > i.yellow { background: var(--yellow); }
.bar > i.red { background: var(--red); }
.bar-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.bar-row .lbl { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.bar-row .lbl b { color: var(--text); font-variant-numeric: tabular-nums; }
.bar-row .hint { font-size: 11.5px; color: var(--text-3); }

/* ---------- Chats / WA ---------- */
.wa-toggle {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  background: var(--accent); color: #06101f; border: none; font-weight: 700; font-size: 13px;
  padding: 12px 17px; border-radius: 999px; display: flex; align-items: center; gap: 8px;
}
.wa-dot { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.wa-dot.zero { display: none; }

.wa {
  position: fixed; right: 20px; bottom: 20px; z-index: 61;
  width: 360px; height: 570px; max-height: calc(100vh - 40px);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
  animation: slideUp .2s ease;
}
.wa.hidden { display: none; }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.wa-head { display: flex; align-items: center; gap: 10px; padding: 13px 15px; background: #10151f; border-bottom: 1px solid var(--border); }
.wa-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #06101f; display: grid; place-items: center; font-weight: 800; }
.wa-head-text { display: flex; flex-direction: column; line-height: 1.3; }
.wa-head-text strong { font-size: 13px; }
.wa-head-text span { font-size: 11.5px; color: var(--green); }
.wa-close { margin-left: auto; background: transparent; border: none; color: var(--text-3); font-size: 23px; line-height: 1; }
.wa-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; background: #0c1017; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg.bot { background: var(--surface-2); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; color: var(--text-2); }
.msg.me { background: var(--accent); color: #06101f; align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 500; }
.msg .msg-time { display: block; font-size: 10.5px; opacity: .6; margin-top: 4px; }
.msg.typing { color: var(--text-3); font-style: italic; }
.wa-quick { display: flex; gap: 6px; padding: 9px 12px 0; flex-wrap: wrap; background: #0c1017; }
.wa-chip { font-size: 11.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); }
.wa-chip:hover { border-color: var(--accent); color: var(--text); }
.wa-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: #0c1017; }
.wa-form input { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 10px 14px; color: var(--text); font-size: 12.5px; outline: none; }
.wa-form input:focus { border-color: var(--accent); }
.wa-form button { background: var(--green); border: none; color: #06101f; font-weight: 700; border-radius: 999px; padding: 0 16px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 18px; right: 20px; z-index: 80; display: flex; flex-direction: column; gap: 9px; width: 340px; }
.toasts.paused { opacity: .45; }
.toast { position: relative; background: #161d2a; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 32px 12px 14px; animation: toastIn .25s ease; }
.toast.green { border-left-color: var(--green); }
.toast.red { border-left-color: var(--red); }
.toast.yellow { border-left-color: var(--yellow); }
.toast.purple { border-left-color: var(--purple); }
.toast strong { display: block; font-size: 12.5px; margin-bottom: 3px; }
.toast span { font-size: 12px; color: var(--text-2); line-height: 1.45; }
.toast-close { position: absolute; top: 8px; right: 9px; background: transparent; border: none; color: var(--text-3); font-size: 17px; line-height: 1; padding: 2px 4px; }
.toast-close:hover { color: var(--text); }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.toast.out { opacity: 0; transform: translateX(18px); transition: opacity .3s, transform .3s; }
@media (max-width: 620px) { .toasts { width: calc(100vw - 32px); right: 16px; top: 12px; } }

/* ---------- Crisis ---------- */
.crisis-banner {
  display: flex; align-items: center; gap: 14px; padding: 15px 17px;
  background: var(--red-soft); border: 1px solid #f2545b55; border-radius: var(--radius); margin-bottom: 15px;
  animation: pop .2s ease;
}
.crisis-banner .ico { width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #1a0b0c; display: grid; place-items: center; font-weight: 800; flex: none; }
.crisis-banner h3 { margin: 0 0 4px; font-size: 14.5px; }
.crisis-banner p { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }

/* ---------- Piezas de contenido (VOZ) ---------- */
.piece { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: 13px; }
.piece .ph { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }
.piece .body { font-size: 13px; color: var(--text); line-height: 1.55; background: #0d1219; border: 1px solid var(--border-soft); border-radius: 8px; padding: 11px; white-space: pre-wrap; }
.piece .foot { display: flex; gap: 14px; margin-top: 11px; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.piece .foot b { color: var(--text-2); font-weight: 600; }
.piece.approved { border-color: #35c98a44; }
.piece.rejected { opacity: .55; }
.piece.flash { animation: flash 1.1s ease; }
@keyframes flash {
  0% { box-shadow: 0 0 0 0 #35c98a99; }
  100% { box-shadow: 0 0 0 12px #35c98a00; }
}
.row-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.row-line:last-child { border-bottom: none; }
.row-line.flash { animation: flash 1.1s ease; border-radius: 8px; }

/* ---------- Leyendas y gráficas ---------- */
.chart-wrap { width: 100%; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 9px; font-size: 11.5px; color: var(--text-3); }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.chart-caption { font-size: 11.5px; color: var(--text-3); margin-top: 7px; line-height: 1.5; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 9px; font-size: 11.5px; color: var(--text-3); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
.pill.green { color: var(--green); border-color: #35c98a44; background: var(--green-soft); }
.pill.yellow { color: var(--yellow); border-color: #e8b93e44; background: var(--yellow-soft); }
.pill.red { color: var(--red); border-color: #f2545b44; background: var(--red-soft); }
.pill.blue { color: var(--accent); border-color: #4f8cff44; background: var(--accent-soft); }
.pill.purple { color: var(--purple); border-color: #a97bff44; background: #a97bff1f; }

.btn {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 7px 13px; border-radius: 8px; font-size: 12.5px; transition: background .12s, border-color .12s;
}
.btn:hover { background: #232c3d; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #06101f; font-weight: 600; }
.btn.primary:hover { background: #6a9dff; }
.btn.danger { color: var(--red); border-color: #f2545b44; background: var(--red-soft); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }
.dot.blue { background: var(--accent); }
.dot.purple { background: var(--purple); }

.empty { padding: 26px; text-align: center; color: var(--text-3); font-size: 12.5px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #232c3d; border-radius: 9px; }

/* Identidad Órbita: un tablero de trabajo con la calidez de una sala de campaña. */
html, body { font-family: "Aptos", "Segoe UI", system-ui, sans-serif; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sidebar { background: linear-gradient(160deg, #182a2b 0%, #112021 70%); border-right-color: #3c514d; }
.brand { padding: 23px 21px 20px; gap: 14px; }
.brand-logo { width: 42px; height: 42px; border-radius: 11px; background: #16262a; }
.brand-logo.lg { width: 60px; height: 60px; border-radius: 14px; }
.brand-text strong { font-family: Georgia, serif; font-size: 20px; font-weight: 500; letter-spacing: -.6px; }
.brand-text span { margin-top: 3px; font-size: 11px; }
.brand-client { margin: 0 21px 8px; padding: 9px 12px; }
.client-logo { width: 24px; height: 24px; }
.brand-client strong { font-size: 12.5px; }
.nav { padding: 10px 12px; gap: 5px; }
.nav-item { position: relative; min-height: 56px; gap: 13px; padding: 9px 12px; font-size: 12px; border-radius: 10px; }
.nav-item .ico { width: 19px; height: 19px; color: var(--text-3); }
.nav-item .nav-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nav-copy strong { font-size: 12px; letter-spacing: .9px; font-weight: 700; }
.nav-copy small { font-size: 11px; color: var(--text-3); letter-spacing: 0; }
.nav-item:hover { background: #2a3c3d; }
.nav-item.active { background: #33413c; border-color: #9f70544d; box-shadow: inset 3px 0 var(--accent); }
.nav-item.active .ico, .nav-item.active .nav-copy strong { color: var(--accent); }
.nav-item.active .nav-copy small { color: #d3c6b4; }
.nav-label { padding-left: 13px; color: #b3bcb3; }
.sidebar-foot { background: #102021; max-height: 35%; }
.topbar { align-items: center; padding: 20px 28px 19px; background: #152325; border-bottom-color: #35494b; }
.crumb { color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; font-size: 10px; margin-bottom: 7px; }
.topbar h1 { font-family: Georgia, serif; font-size: 29px; font-weight: 400; letter-spacing: -.8px; }
.tagline { color: #dbbd9e; font-size: 12px; }
.topbar p { font-size: 12px; }
.icon-btn { background: transparent; border-color: #425454; border-radius: 50%; }
.icon-btn:hover, .icon-btn.on { border-color: var(--accent); color: var(--accent); }
.candidate { border-left: 1px solid #3b4d4b; padding-left: 16px; }
.candidate .avatar { background: #4e5548; color: #f8dfbe; border-color: #8a806b; }
.view { padding: 26px 28px 80px; background: radial-gradient(circle at 96% 0%, #263a37 0, transparent 28%), var(--bg); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: #cfd8cf; font-size: 11px; letter-spacing: 1.4px; margin-top: 12px; }
.section-title span { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-3); }
.card { border-color: #3a4d4d; box-shadow: 0 8px 20px #08121322; }
.card-head { padding: 15px 18px; color: var(--text); font-size: 12px; letter-spacing: .15px; }
.card-body { padding: 18px; }
.metric .val, .strip-val { font-family: Georgia, serif; font-weight: 400; }
.strip-grid { background: #3b4e4b; }
.strip-cell { min-height: 163px; padding: 18px; }
.strip-cell:hover { background: #2a3b3a; }
.strip-label { color: var(--text-2); }
.strip-go { color: #c9aa87; }
.strip-foot { color: var(--text-3); }
.btn { border-radius: 9px; }
.btn:hover { background: #344647; }
.btn.primary, .wa-toggle, .msg.me { color: #1c2927; }
.btn.primary:hover { background: #ffd0a0; }
.pill.blue { color: var(--accent); border-color: #f2b27755; }
.reco { border-color: #9f76565c; border-radius: var(--radius); padding: 20px; background: linear-gradient(140deg, #3a3930, #253531); }
.reco .tag { color: var(--accent); }
.info:hover, .info:focus { border-color: var(--accent); }
.tooltip, .tour, .toast { background: #243334; }
.intro-card { background: #1b2c2d; border-color: #56706b; box-shadow: 0 25px 90px #03090999; }
.intro-name { font-family: Georgia, serif; font-weight: 400; font-size: 29px; }
.intro-item { background: #243535; border-color: #425955; }

.command-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); gap: 24px; overflow: hidden; min-height: 285px; padding: 26px; margin: 0 0 26px; border: 1px solid #92775e80; border-radius: 20px; background: radial-gradient(circle at 20% 115%, #485545 0, transparent 42%), linear-gradient(115deg, #2d413d 0%, #263937 54%, #1e302f 100%); box-shadow: 0 20px 40px #07131244; }
.command-hero::before, .command-hero::after { content: ""; position: absolute; pointer-events: none; border: 1px solid #f2b2772b; border-radius: 50%; width: 470px; height: 470px; left: -115px; bottom: -365px; }
.command-hero::after { width: 330px; height: 330px; left: -45px; bottom: -295px; border-color: #f2b27740; }
.command-hero-main, .hero-queue { position: relative; z-index: 1; }
.command-hero-main { display: flex; flex-direction: column; align-items: flex-start; }
.hero-eyebrow { display: flex; align-items: center; gap: 9px; color: #efc8a4; text-transform: uppercase; letter-spacing: 1.4px; font-size: 10px; font-weight: 700; }
.hero-signal { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #f2b27727; }
.hero-divider { color: #87a097; }
.command-hero h2 { margin: 19px 0 10px; font: 400 clamp(30px, 3.3vw, 48px)/1.08 Georgia, serif; letter-spacing: -1.4px; }
.command-hero h2 em { font-weight: 400; color: var(--accent); }
.command-hero p { max-width: 510px; margin: 0; color: #d5ddd2; font-size: 13px; line-height: 1.55; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: auto; padding-top: 19px; font-size: 11px; color: #b7c9bb; }
.hero-meta span + span::before { content: "·"; margin-right: 14px; color: var(--accent); }
.hero-queue { background: #172726da; border: 1px solid #6b786679; border-radius: 14px; padding: 8px 15px; align-self: center; }
.hero-queue-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 9px 1px 11px; text-transform: uppercase; letter-spacing: 1px; font-size: 10px; font-weight: 700; color: var(--accent); }
.hero-queue-head span:last-child { color: #aebeb1; font-weight: 500; letter-spacing: 0; text-transform: none; }
.hero-queue button { display: flex; align-items: center; gap: 13px; width: 100%; padding: 11px 0; background: none; color: var(--text); border: 0; border-top: 1px solid #3d514a; text-align: left; }
.hero-queue button:hover strong, .hero-queue button:hover b { color: var(--accent); }
.hero-queue button > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.hero-queue button strong { font-size: 12px; font-weight: 600; }
.hero-queue button small { color: #a8b6aa; font-size: 10.5px; }
.hero-queue button b { font-size: 17px; font-weight: 400; color: #cba98a; }
.queue-number { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; color: #f8d5ad; background: #64503b; font: 17px Georgia, serif; }
.queue-number.alert { color: #ffb2a8; background: #613e3b; }

@media (max-width: 1180px) { .command-hero { grid-template-columns: 1fr; } .hero-meta { margin-top: 0; } }
@media (max-width: 860px) { .topbar { padding: 14px 16px; } .view { padding: 16px 16px 80px; } .command-hero { padding: 22px; } .section-title { flex-wrap: wrap; } }
@media (max-width: 620px) { .command-hero { padding: 19px; gap: 20px; } .hero-meta span + span::before { display: none; } .topbar-right { flex-wrap: wrap; } .hero-queue { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .pulse, .nav-item.touring { animation: none; } }

/* VOZ: estudio de muestras, cuentas y cola de revisión. */
.voz-intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 26px 28px; margin-bottom: 18px; border: 1px solid #6f5b70; border-radius: 18px; background: radial-gradient(circle at 96% -20%, #633663 0, transparent 30%), linear-gradient(125deg, #30243d, #203232 70%); }
.voz-eyebrow { display: block; color: #f4cf90; text-transform: uppercase; letter-spacing: 1.5px; font-size: 10px; font-weight: 700; }
.voz-intro h2 { margin: 10px 0 8px; font: 400 clamp(28px, 3vw, 40px)/1.12 Georgia, serif; letter-spacing: -.8px; }
.voz-intro p { max-width: 600px; margin: 0; color: #d7d5d2; font-size: 13px; line-height: 1.5; }
.voz-intro-status { min-width: 165px; padding: 12px 16px; border-left: 1px solid #a98f9c88; display: flex; flex-direction: column; gap: 3px; }
.voz-intro-status strong { font: 30px Georgia, serif; color: #ffdd93; }
.voz-intro-status span { font-size: 11px; color: #d2c8d0; }
.voz-workspace { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .9fr); gap: 16px; align-items: start; }
.voz-studio, .voz-accounts { min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.voz-section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; }
.voz-section-head h3 { margin: 6px 0 0; font: 400 21px Georgia, serif; }
.voz-note { color: var(--text-3); font-size: 10.5px; text-align: right; }
.voz-samples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.voz-sample { min-width: 0; border: 1px solid #67526c; border-radius: 13px; background: #241f31; overflow: hidden; }
.voz-sample-preview { position: relative; display: grid; place-items: center; width: 100%; height: 220px; padding: 10px; background: radial-gradient(circle at 50% 25%, #6d4678, #271d35 72%); border: none; border-bottom: 1px solid #67526c; overflow: hidden; }
.voz-sample-preview img { width: auto; max-width: 100%; height: 100%; object-fit: contain; box-shadow: 0 8px 25px #0b071a88; transition: transform .2s; }
.voz-sample-preview:hover img { transform: scale(1.035); }
.voz-play { position: absolute; display: grid; place-items: center; width: 47px; height: 47px; border-radius: 50%; background: #fff200; color: #4c1457; box-shadow: 0 5px 20px #15051a99; font-size: 18px; padding-left: 3px; }
.voz-sample-info { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px; padding: 13px; }
.voz-sample-info > div { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.voz-sample-info strong { font-size: 12px; }
.voz-sample-info small { color: #bcb0c3; font-size: 10.5px; }
.voz-sample-info .btn { white-space: nowrap; }
.voz-disclaimer { margin: 13px 0 0; color: var(--text-3); font-size: 11px; line-height: 1.45; }
.voz-account-count { padding: 5px 9px; border-radius: 999px; background: var(--green-soft); border: 1px solid #85d7b055; color: var(--green); font-size: 11px; white-space: nowrap; }
.voz-account-list { border-top: 1px solid var(--border); }
.voz-account { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.voz-account-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1px solid var(--account-color); border-radius: 10px; color: var(--account-color); background: #121e22; font-size: 10px; font-weight: 800; }
.voz-account-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.voz-account-copy strong { font-size: 12px; }
.voz-account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; color: var(--text-3); }
.account-state { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-size: 10px; }
.account-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.account-state.on { color: var(--green); }
.account-state.on::before { background: var(--green); }
.account-toggle { padding: 5px 8px; border: 1px solid #576765; border-radius: 999px; background: #283636; color: var(--text-2); font-size: 10.5px; }
.account-toggle:hover { border-color: var(--accent); }
.voz-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 18px 0 24px; border-block: 1px solid var(--border); }
.voz-summary div { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; }
.voz-summary div + div { border-left: 1px solid var(--border); }
.voz-summary strong { font: 30px Georgia, serif; color: var(--accent); }
.voz-summary span { color: var(--text-2); font-size: 12px; }
.virtual-section { margin-bottom: 18px; padding: 19px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.virtual-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 16px; border: 1px solid var(--border-soft); border-radius: 11px; background: #172728; overflow: hidden; }
.virtual-kpis > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 14px 16px; }
.virtual-kpis > div + div { border-left: 1px solid var(--border-soft); }
.virtual-kpis strong { color: var(--accent); font: 25px Georgia, serif; white-space: nowrap; }
.virtual-kpis span { color: var(--text-2); font-size: 10.5px; }

/* --- Granja de cuentas --- */
.farm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.farm-account { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid var(--border-soft); border-left: 3px solid var(--pc); border-radius: 12px; background: #1a2b2d; }
.farm-head { display: flex; align-items: flex-start; gap: 11px; }
.farm-avatar { width: 56px; height: 56px; flex: none; border-radius: 14px; border: 1px solid var(--border); object-fit: cover; background: #122022; }
.farm-id { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.farm-id strong { display: flex; align-items: center; gap: 6px; font-size: 12.5px; line-height: 1.2; }
.farm-handle { color: var(--text-3); font-size: 10.5px; font-family: ui-monospace, monospace; }
.farm-redes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.rp { display: inline-grid; place-items: center; min-width: 21px; height: 17px; padding: 0 5px; border-radius: 5px; font-size: 9px; font-weight: 700; letter-spacing: .4px; border: 1px solid transparent; }
.rp.ig { color: #e79ac0; background: #e79ac01a; border-color: #e79ac03d; }
.rp.x { color: #cfd6da; background: #cfd6da14; border-color: #cfd6da33; }
.rp.tk { color: #66cfcb; background: #66cfcb1a; border-color: #66cfcb3d; }
.rp.wa { color: #85d7b0; background: #85d7b01a; border-color: #85d7b03d; }
.ia-mark { display: inline-grid; place-items: center; padding: 1px 5px; border-radius: 4px; border: 1px solid #c6a9e966; background: #c6a9e91f; color: var(--purple); font-size: 8.5px; font-weight: 800; letter-spacing: .5px; }
.farm-state { flex: none; padding: 3px 8px; border-radius: 20px; border: 1px solid var(--border); color: var(--text-3); font-size: 9.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.farm-state.on { border-color: #85d7b055; background: var(--green-soft); color: var(--green); }
.farm-bio { flex: 1; margin: 12px 0; color: var(--text-2); font-size: 11px; line-height: 1.5; }
.farm-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 11px; border-bottom: 1px solid var(--border-soft); color: var(--text-3); font-size: 10px; }
.farm-facts b { color: var(--text-2); font-weight: 650; }
.farm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 11px 0; }
.farm-stats span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.farm-stats b { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.farm-stats small { color: var(--text-3); font-size: 9px; line-height: 1.2; }
.farm-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 11px; border-top: 1px solid var(--border-soft); }
.farm-foot small { color: var(--green); font-size: 9.5px; line-height: 1.3; }

/* --- Publicaciones de muestra --- */
.post-filtros { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.post-filtros button { display: flex; align-items: center; gap: 6px; padding: 7px 13px; border: 1px solid var(--border); border-radius: 20px; background: #172728; color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.post-filtros button b { color: var(--text-3); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.post-filtros button:hover { border-color: var(--accent); color: var(--text); }
.post-filtros button.on { border-color: var(--accent); background: #f2b2772e; color: var(--accent); box-shadow: inset 0 0 0 1px #f2b2773d; }
.post-filtros button.on b { color: var(--accent); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 13px; align-items: start; }
.post { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border-soft); border-radius: 13px; background: #161f2b; overflow: hidden; }
.post-x { background: #151a22; }
.post-ig { background: #1b1720; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 13px 14px 0; }
.post-avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; object-fit: cover; background: #122022; }
.post-ig .post-avatar { border-radius: 50%; }
.post-who { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.post-who strong { display: flex; align-items: center; gap: 5px; font-size: 11.5px; }
.post-who span { color: var(--text-3); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-red { flex: none; }
.post-text { margin: 11px 14px 0; color: var(--text); font-size: 12px; line-height: 1.55; }
.post-tag { color: var(--cyan); }
.post-media { display: block; width: 100%; margin-top: 12px; padding: 0; border: 0; background: #0d1719; cursor: zoom-in; }
.post-media img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.post-media-vacia { display: grid; place-items: center; aspect-ratio: 1 / 1; margin-top: 12px; border: 0; background: repeating-linear-gradient(45deg, #131e20, #131e20 11px, #162325 11px, #162325 22px); color: var(--text-3); font-size: 10.5px; }
.post-eng { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 14px 0; padding-top: 11px; border-top: 1px solid #ffffff12; }
.post-eng span { display: flex; align-items: center; gap: 5px; color: var(--text-3); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.post-eng svg { width: 14px; height: 14px; flex: none; }
.post-eng span:nth-child(3) svg { color: #e5728a; }
.post-ig-bar { display: flex; align-items: center; gap: 15px; padding: 12px 14px 0; }
.post-ig-bar svg { width: 17px; height: 17px; color: var(--text-2); }
.post-ig-bar .ig-like svg { color: #e5728a; }
.post-ig-bar .ig-vistas { margin-left: auto; color: var(--text-3); font-size: 10px; font-variant-numeric: tabular-nums; }
.post-ig-likes { padding: 9px 14px 0; font-size: 11.5px; }
.post-ig-likes b { font-variant-numeric: tabular-nums; }
.post-ig-caption { margin: 6px 14px 0; color: var(--text); font-size: 11.5px; line-height: 1.5; }
.post-ig-caption strong { margin-right: 4px; font-weight: 650; }
.post-ig-eng { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 9px 14px 0; color: var(--text-3); font-size: 10px; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; padding: 10px 14px 13px; border-top: 1px solid #ffffff0f; }

.mini-avatar { width: 22px; height: 22px; flex: none; border-radius: 50%; object-fit: cover; background: #122022; }
.virtual-narrative .mini-avatar { width: 20px; height: 20px; }
.virtual-narratives { display: grid; gap: 9px; }
.virtual-narrative { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(360px, .95fr); align-items: center; gap: 18px; padding: 15px 17px; border: 1px solid var(--border-soft); border-radius: 10px; background: #1a2a2b; }
.virtual-narrative-main { min-width: 0; }
.virtual-narrative h4 { margin: 5px 0 9px; font-size: 13px; font-weight: 650; }
.virtual-narrative-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--text-3); font-size: 10.5px; }
.virtual-narrative-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.virtual-narrative-stats span { display: flex; flex-direction: column; gap: 3px; }
.virtual-narrative-stats b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.virtual-narrative-stats small { color: var(--text-3); font-size: 9.5px; line-height: 1.25; }
.virtual-activity { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.virtual-activity-item { min-width: 0; padding: 14px; border: 1px solid var(--border-soft); border-radius: 10px; background: #1a2a2b; }
.virtual-activity-top { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 11px; }
.virtual-activity-top .tiny { margin-left: auto; }
.virtual-activity-item > strong { font-size: 11px; }
.virtual-activity-item p { min-height: 38px; margin: 7px 0 12px; color: var(--text-2); font-size: 11px; line-height: 1.45; }
.virtual-activity-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.virtual-activity-foot > span:first-child { color: var(--text-3); font-size: 10px; }
.media-dialog { width: min(920px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 1px solid #7b637e; border-radius: 18px; background: #162527; color: var(--text); box-shadow: 0 30px 80px #020608bb; overflow: auto; }
.media-dialog::backdrop { background: #030708cc; backdrop-filter: blur(5px); }
.media-dialog-head { display: flex; justify-content: space-between; gap: 16px; padding: 21px 24px 16px; }
.media-dialog-head h2 { margin: 6px 0; font: 400 26px Georgia, serif; }
.media-dialog-head p { margin: 0; color: var(--text-2); font-size: 12px; }
.media-close { align-self: start; width: 34px; height: 34px; flex: none; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 22px; }
.media-stage { display: grid; place-items: center; min-height: 230px; padding: 12px 24px; background: #0d1719; }
.media-stage img, .media-stage video { display: block; max-width: 100%; max-height: min(68vh, 660px); border-radius: 8px; }
.media-stage video { width: min(100%, 600px); background: #26172c; }
.media-dialog-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 24px 20px; color: var(--text-3); font-size: 11px; }
@media (max-width: 1180px) { .voz-workspace { grid-template-columns: 1fr; } }
@media (max-width: 1180px) { .farm-grid, .virtual-activity { grid-template-columns: repeat(2, minmax(0, 1fr)); } .virtual-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .virtual-kpis > div + div { border-left: 0; } .virtual-kpis > div { border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); } }
@media (max-width: 860px) { .virtual-narrative { grid-template-columns: 1fr; } }
@media (min-width: 861px) and (max-width: 1180px) { .topbar { flex-wrap: wrap; } .topbar-right { width: 100%; justify-content: flex-end; } }
@media (max-width: 640px) { .voz-intro { align-items: start; flex-direction: column; padding: 21px; } .voz-intro-status { padding: 0 0 0 12px; } .voz-samples { grid-template-columns: 1fr; } .voz-sample-preview { height: 260px; } .voz-account { flex-wrap: wrap; } .voz-account-copy { flex-basis: calc(100% - 50px); } .account-state { margin-left: 44px; } .voz-summary { grid-template-columns: 1fr; } .voz-summary div + div { border-left: 0; border-top: 1px solid var(--border); } .media-dialog-foot { align-items: flex-start; flex-direction: column; } }
@media (max-width: 640px) { .virtual-section { padding: 15px; } .virtual-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .farm-grid, .virtual-activity { grid-template-columns: 1fr; } .virtual-narrative-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .post-grid { grid-template-columns: 1fr; } .farm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Búsqueda de funciones y navegación por tareas. */
.find-launch { display: flex; align-items: center; gap: 9px; margin: 0 12px 10px; padding: 9px 11px; border: 1px solid #50625b; border-radius: 9px; background: #243735; color: var(--text-2); text-align: left; font-size: 11.5px; }
.find-launch:hover { border-color: var(--accent); color: var(--text); }
.find-launch svg { width: 16px; height: 16px; flex: none; }
.find-launch span { flex: 1; }
.find-launch kbd { border: 1px solid #5d6e66; border-radius: 4px; padding: 2px 4px; color: var(--text-3); font-size: 10px; font-family: inherit; white-space: nowrap; }
.nav-copy strong { font-size: 12.5px; letter-spacing: .1px; }
.nav-copy small { font-size: 10.5px; }
.nav-count { display: grid; place-items: center; min-width: 22px; height: 22px; margin-left: auto; padding: 0 5px; border-radius: 7px; background: var(--yellow-soft); border: 1px solid #f0ca7255; color: var(--yellow); font-size: 11px; font-weight: 700; }
.hero-find { margin-top: 13px; padding: 0; border: 0; background: transparent; color: #d9e1d6; font-size: 11.5px; text-align: left; }
.hero-find span { color: var(--accent); font-weight: 700; }
.hero-find:hover span { text-decoration: underline; }
.strip-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.strip-cell { min-width: 0; }
[id^="inicio-"], [id^="ops-"], [id^="voz-"], [id^="control-"], [id^="comunidad-"] { scroll-margin-top: 18px; }
.find-dialog { width: min(650px, calc(100vw - 24px)); max-height: min(760px, calc(100vh - 24px)); padding: 0; border: 1px solid #6b7d72; border-radius: 17px; background: #18282a; color: var(--text); box-shadow: 0 28px 90px #020809c9; overflow: hidden; }
.find-dialog::backdrop { background: #030809bb; backdrop-filter: blur(4px); }
.find-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 22px 22px 17px; }
.find-head h2 { margin: 6px 0 0; font: 400 27px Georgia, serif; }
.find-input-wrap { display: flex; align-items: center; gap: 10px; margin: 0 22px 14px; padding: 11px 13px; border: 1px solid #708272; border-radius: 11px; background: #101f20; color: var(--accent); }
.find-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #f2b27720; }
.find-input-wrap span { font-size: 22px; line-height: 1; }
.find-input-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.find-input-wrap input::placeholder { color: var(--text-3); }
.find-results { max-height: min(480px, 57vh); overflow-y: auto; padding: 0 14px 12px; }
.find-result { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 20px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 7px; background: transparent; color: var(--text); text-align: left; }
.find-result:hover, .find-result:focus-visible { background: #2a3d3b; }
.find-result span { display: flex; flex-direction: column; gap: 3px; }
.find-result strong { font-size: 12.5px; }
.find-result small { color: var(--text-3); font-size: 11px; }
.find-result b { color: var(--accent); font-size: 17px; font-weight: 400; }
.find-empty { padding: 24px; color: var(--text-2); text-align: center; font-size: 12px; }
.find-foot { display: flex; justify-content: space-between; gap: 10px; padding: 11px 22px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 10.5px; }
@media (max-width: 1180px) { .strip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .strip-grid { grid-template-columns: 1fr; } .find-foot span { display: none; } }
::-webkit-scrollbar-track { background: transparent; }
