/* ============================================================
   NAWI · Centro de Comando (M14) — panel admin (demo)
   Pulso del respaldo, bóveda, minas & custodia, KYC, cumplimiento,
   registro de actividad (estilo SeptiGenesis). Solo admin.
   ============================================================ */
body { display: block; overflow-x: hidden; }
.cmd-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 60px; }

.cmd-top { position: sticky; top: 0; z-index: 50; padding: 0; background: var(--bg, #080C0A); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.cmd-top-inner { max-width: 1400px; margin: 0 auto; width: 100%; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cmd-brand { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; min-width: 0; }
.logo-mark { width: 34px; height: 34px; }
/* La marca es el gesto sigiloso del Fundador (long-press). En movil, si el texto
   es seleccionable, el long-press abre "Copiar/Consultar" y se roba el gesto.
   Bloqueamos seleccion y el callout nativo SOLO en la marca. */
.logo-mark, .cmd-title { -webkit-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }
.cmd-title { font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.cmd-title b { color: var(--gold); font-weight: 400; margin: 0 .1em; }
.admin-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: #2A2010; color: var(--gold-hi); font-size: 11px; font-weight: 600; margin-inline-start: 8px; }
.cmd-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .cmd-right { width: 100%; justify-content: flex-start; }
  .cmd-title { font-size: 17px; }
}
.lang-select { background: var(--panel-3); color: var(--cream); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 7px 11px; font-size: 12px; font-family: var(--font-ui); }
.btn-mini { background: transparent; border: 1px solid var(--em); color: var(--em); border-radius: var(--r-btn); padding: 8px 14px; font-size: 13px; font-weight: 600; text-decoration: none; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: linear-gradient(145deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; }
.kpi .l { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.kpi .v { font-family: var(--font-mono); font-size: 24px; font-weight: 500; color: var(--gold-hi); }
.kpi .v.em { color: var(--em); }

/* Grid de paneles */
.panels { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .panels { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; margin-bottom: 16px; }
.panel h2 { font-family: var(--font-display); font-size: 17px; font-weight: 500; margin-bottom: 4px; }
.panel .psub { font-size: 12px; color: var(--muted); margin-bottom: 16px; }

/* Pulso del respaldo */
.pulse { background: linear-gradient(145deg, #12191400, var(--panel-2)); }
.pulse-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.pulse-num { background: var(--panel-3); border-radius: 12px; padding: 12px; text-align: center; }
.pulse-num .l { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.pulse-num .v { font-family: var(--font-mono); font-size: 18px; color: var(--cream); }
.meter { height: 8px; border-radius: var(--r-pill); background: var(--panel-3); overflow: hidden; }
.meter-fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--em-deep), var(--em)); box-shadow: 0 0 12px var(--em-glow); transition: width 1s ease; }
.backing-flag { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border-radius: var(--r-pill); background: var(--em-deep); color: var(--em); font-size: 12px; font-weight: 600; }
.backing-flag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--em); box-shadow: 0 0 8px var(--em); }

/* Filas / tablas */
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.row:last-child { border-bottom: none; }
.row .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--panel-3); display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-size: 13px; font-weight: 500; }
.row .d { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .r { text-align: end; font-family: var(--font-mono); font-size: 12px; color: var(--cream); }
.tag { display: inline-block; padding: 3px 9px; border-radius: var(--r-pill); font-size: 10px; font-weight: 600; }
.tag.ok { background: var(--em-deep); color: var(--em); }
.tag.warn { background: #2A2010; color: var(--warn); }
.tag.gold { background: #2A2010; color: var(--gold-hi); }
.tag.bad { background: rgba(192,107,90,.18); color: var(--danger); }
.btn-approve { background: linear-gradient(160deg, #2EBF8F, var(--em)); color: #051A12; border: none; border-radius: 10px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.cust-actions { display: flex; justify-content: flex-end; padding: 2px 0 10px; }
.cust-actions .btn-mini { cursor: pointer; }
.row-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.row-cal-btn { background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 9px; padding: 5px 8px; font-size: 13px; line-height: 1; cursor: pointer; color: var(--cream); transition: background .15s, border-color .15s; }
.row-cal-btn:hover { background: #2A2010; border-color: var(--gold-hi); }

/* Actividad (timeline navegable) */
.act { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.act:last-child { border-bottom: none; }
.act .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--panel-3); display: flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
/* min-width:0 deja que el uid/hash largo se ajuste en vez de reventar el ancho */
.act .main { flex: 1; min-width: 0; }
.act .t { font-size: 13px; font-weight: 500; }
/* overflow-wrap:anywhere parte el uid largo a la siguiente línea; no se sale */
.act .crumb { font-size: 11px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; word-break: break-word; }
.act .crumb b { color: var(--em); font-weight: 500; }
.act .time { font-size: 11px; color: var(--muted-2); font-family: var(--font-mono); flex: none; white-space: nowrap; text-align: end; }

/* Análisis IA */
.ai-box { background: linear-gradient(145deg, #14100522, var(--panel-2)); border: 1px solid #2A2010; border-radius: var(--r-card); padding: 18px; }
.ai-box .h { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gold-hi); font-weight: 600; margin-bottom: 10px; }
.ai-box p { font-size: 13px; color: var(--cream); line-height: 1.7; }

/* ---- Sala de Socios (comms) ---- */
.comms { margin-bottom: 16px; }
.comms-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 900px) {
  /* Móvil vertical: cada columna a lo ancho completo, sin quedarse angosta
     respecto a los paneles hermanos (agenda/correo). */
  .comms-grid { grid-template-columns: 1fr; }
  .comms-grid > * { width: 100%; min-width: 0; box-sizing: border-box; }
  .comms-grid > .call { width: 100%; min-width: 0; }
}
.call { background: linear-gradient(160deg, #0F1614, #0A0F0D); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; position: relative; overflow: hidden; }
.call-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { aspect-ratio: 16 / 10; border-radius: 14px; background: radial-gradient(circle at 40% 35%, var(--panel-3), var(--panel)); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.tile.speaking { border-color: var(--em); box-shadow: 0 0 0 1px var(--em), 0 0 18px var(--em-glow); }
.tile .av { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(145deg, var(--em-deep), var(--panel-3)); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 18px; color: var(--cream); margin-bottom: 8px; }
.tile .nm { font-size: 12px; font-weight: 600; }
.tile .fl { position: absolute; top: 8px; inset-inline-start: 10px; font-size: 11px; color: var(--muted); }
.tile .mic { position: absolute; bottom: 8px; inset-inline-end: 10px; font-size: 12px; }
.subtitle-bar { margin-top: 12px; padding: 12px 14px; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line); border-radius: 12px; min-height: 58px; }
.subtitle-bar .who { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--em); margin-bottom: 4px; }
.subtitle-bar .txt { font-size: 15px; color: var(--cream); line-height: 1.4; }
.call-controls { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.dub-select { background: var(--panel-3); color: var(--cream); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 12px; font-size: 12px; font-family: var(--font-ui); }
.dub-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--em); }
.dub-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--em); box-shadow: 0 0 6px var(--em); }
.join-btn { margin-inline-start: auto; background: linear-gradient(160deg, #2EBF8F, var(--em)); color: #051A12; border: none; border-radius: 10px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }

/* Privacidad: switches para apagar grabación/transcripción/IA */
.priv-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.priv-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--em-deep); color: var(--em); font-size: 11px; font-weight: 600; }
.sw { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-pill); cursor: pointer; font-size: 12px; color: var(--muted); user-select: none; }
.sw .knob { width: 34px; height: 18px; border-radius: var(--r-pill); background: var(--panel-3); position: relative; transition: background .2s; flex: none; }
.sw .knob::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.sw.on { color: var(--cream); border-color: var(--em-deep); }
.sw.on .knob { background: var(--em-deep); }
.sw.on .knob::after { transform: translateX(16px); background: var(--em); }
[dir="rtl"] .sw.on .knob::after { transform: translateX(-16px); }
.sw.danger.on .knob { background: #3a1410; }
.sw.danger.on .knob::after { background: var(--danger); }

.tasks { margin-top: 12px; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--em-deep); border-radius: 12px; }
.tasks .h { font-size: 12px; color: var(--gold-hi); font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.task { display: flex; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--cream); }
.task .ck { color: var(--em); }
.tasks .note { font-size: 10px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

.cmd-note { width: 100%; margin: 0 0 16px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--r-card-md); font-size: 12px; color: var(--muted); line-height: 1.6; text-align: center; }
.cmd-note a { color: var(--gold-hi); text-decoration: none; border-bottom: 1px solid var(--line); }
.cmd-note a:hover { color: var(--gold); border-color: var(--gold); }

/* ---- Gate de login ---- */
.auth-gate { position: fixed; inset: 0; z-index: 500; background: #050807; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.auth-card { max-width: 380px; }
.auth-logo { width: 60px; height: 60px; margin: 0 auto 18px; display: block; filter: drop-shadow(0 0 14px rgba(200, 162, 85, .3)); }
.auth-title { font-family: var(--font-display); font-size: 22px; margin-bottom: 10px; }
.auth-title b { color: var(--gold); font-weight: 400; margin: 0 .1em; }
.auth-sub { color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 24px; }
.auth-btn { background: #fff; color: #1a1a1a; border: none; border-radius: 12px; padding: 13px 22px; font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.auth-btn:disabled { opacity: .55; cursor: default; }
.auth-providers { display: flex; flex-direction: column; gap: 10px; }
.auth-providers .auth-btn { width: 100%; }
.auth-btn.apple { background: #000; color: #fff; }
.auth-btn.google { background: #fff; color: #1a1a1a; }
.auth-btn.microsoft { background: #2f2f2f; color: #fff; }
.auth-btn.email { background: var(--gold); color: #1a1405; flex: none; padding: 12px 16px; }
.auth-email-row { display: flex; gap: 8px; margin-top: 4px; }
.auth-email { flex: 1; min-width: 0; background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--cream); font-size: 14px; font-family: var(--font-ui); }
.pass-wrap { position: relative; display: flex; }
.pass-wrap .auth-email { padding-right: 44px; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 6px; }
.auth-connecting { color: var(--gold-hi); font-size: 13px; margin-top: 16px; font-weight: 600; }
.auth-who { color: var(--muted-2); font-size: 12px; margin-top: 16px; font-family: var(--font-mono); }
.auth-link { color: var(--em); font-size: 12px; cursor: pointer; margin-top: 10px; display: none; }

/* ---- Ticker de precios en vivo (oro/g + TRM) ---- */
.cmd-ticker { display: flex; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: 12px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel-3); white-space: nowrap; }
.cmd-ticker .tk { display: flex; align-items: center; gap: 6px; }
.cmd-ticker .tk .lab { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 1px; }
.cmd-ticker .tk .val { color: var(--gold-hi); }
.cmd-ticker .tk .val.em { color: var(--em); }
.cmd-ticker .up { color: var(--em); font-size: 10px; }
.cmd-ticker .down { color: var(--danger); font-size: 10px; }
@media (max-width: 720px) { .cmd-ticker { display: none; } }

/* Botón PDF (oro) */
.btn-mini.gold-btn { border-color: var(--gold); color: var(--gold-hi); }
.btn-mini.gold-btn:hover { background: var(--gold-glow); }

/* Botón de ayuda "?" junto a cada título */
.help-btn { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--gold); background: transparent; color: var(--gold-hi); font-size: 11px; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center; margin-inline-start: 8px; vertical-align: middle; padding: 0; }
.help-btn:hover { background: var(--gold-glow); }

/* Botón "Agendar cita" */
.mini-add { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--em); color: var(--em); border-radius: var(--r-pill); padding: 5px 13px; font-size: 11px; font-weight: 600; margin-bottom: 12px; }
.mini-add:hover { background: var(--em-deep); }

/* Filas clicables */
.row.clk, .act.clk { cursor: pointer; border-radius: 10px; transition: background .15s; }
.row.clk:hover, .act.clk:hover { background: var(--panel-3); }
.tile { cursor: pointer; }

/* ---- Modal reutilizable ---- */
.cmd-modal { position: fixed; inset: 0; z-index: 600; display: none; align-items: center; justify-content: center; padding: 20px; }
.cmd-modal.open { display: flex; }
.cmd-modal-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 4, 0.74); backdrop-filter: blur(6px); }
.cmd-modal-card { position: relative; z-index: 1; width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto; background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); animation: cmdRise .28s cubic-bezier(.16, 1, .3, 1); }
@keyframes cmdRise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.cmd-modal-x { position: absolute; top: 16px; inset-inline-end: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--panel-3); border: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; align-items: center; justify-content: center; }
.cmd-modal-x:hover { color: var(--cream); }
.cmd-modal-title { font-family: var(--font-display); font-size: 19px; font-weight: 500; margin-bottom: 16px; padding-inline-end: 40px; color: var(--gold-hi); }

/* Componentes internos del modal */
.m-kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.m-kv:last-child { border-bottom: none; }
.m-kv .k { color: var(--muted); }
.m-kv .v { color: var(--cream); font-family: var(--font-mono); text-align: end; }
.m-head { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold-hi); margin: 18px 0 8px; }
.m-btn { margin-top: 16px; width: 100%; background: linear-gradient(160deg, #2EBF8F, var(--em)); color: #051A12; border: none; border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 600; }
.m-btn.gold { background: linear-gradient(160deg, var(--gold-hi), var(--gold)); color: #1a1405; }
.m-btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--cream); }
.m-chain { list-style: none; }
.m-chain li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.m-chain li:last-child { border-bottom: none; }
.m-chain .ci { width: 26px; height: 26px; border-radius: 8px; background: var(--panel-3); display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.m-chain .cm { flex: 1; min-width: 0; }
.m-chain .ct { font-size: 12px; color: var(--cream); }
.m-chain .ch { font-size: 10px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-chain .cd { font-size: 10px; color: var(--muted-2); font-family: var(--font-mono); }
.m-doc { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.m-doc:last-child { border-bottom: none; }
.m-doc .dn { flex: 1; color: var(--cream); }
.m-doc .dv { color: var(--em); font-size: 12px; font-weight: 600; }
.m-note { font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 14px; background: var(--panel-3); border-radius: 12px; padding: 12px; }
.m-field { margin-top: 12px; }
.m-field label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.m-field input, .m-field select { width: 100%; background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px; padding: 11px; color: var(--cream); font-family: var(--font-ui); font-size: 14px; }
.m-step { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.m-step:last-child { border-bottom: none; }
.m-step .sd { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; }
.m-step .sd.done { background: var(--em-deep); color: var(--em); }
.m-step .sd.pend { background: var(--panel-3); color: var(--muted); }
.m-step .sm { flex: 1; font-size: 13px; color: var(--cream); }
.m-mail { font-size: 13px; color: var(--cream); line-height: 1.7; }
.m-mail p { margin-bottom: 10px; }
.m-mail .sig { color: var(--muted); font-style: italic; }

/* Banner de datos de demostración (gold/warning) */
.demo-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 16px; border-radius: var(--r-card); background: #2A2010; border: 1px solid var(--gold-hi); color: var(--gold-hi); font-size: 12.5px; font-weight: 600; letter-spacing: .2px; }
.demo-banner-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--gold); box-shadow: 0 0 8px var(--gold); }

/* ---- Costos y Precios (Unit Economics) ---- */
.econ-h { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold-hi); margin: 18px 0 10px; }
.econ-h:first-child { margin-top: 4px; }
.econ-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.econ-field { display: flex; flex-direction: column; gap: 6px; }
.econ-field label { font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); line-height: 1.35; }
.econ-input-wrap { display: flex; align-items: center; gap: 8px; background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.econ-input-wrap:focus-within { border-color: var(--gold-hi); }
.econ-input { flex: 1; min-width: 0; background: transparent; border: none; color: var(--cream); font-family: var(--font-mono); font-size: 14px; padding: 11px 0; outline: none; }
.econ-unit { font-size: 11px; color: var(--muted); font-family: var(--font-mono); flex: none; }
.econ-save { margin-top: 16px; background: linear-gradient(160deg, var(--gold-hi), var(--gold)); color: #1a1405; border: none; border-radius: 12px; padding: 11px 22px; font-size: 14px; font-weight: 600; cursor: pointer; }
.econ-save:hover { filter: brightness(1.05); }

.econ-simrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .econ-simrow { grid-template-columns: 1fr; } }
.econ-breakdown { margin-top: 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; }
.econ-brow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.econ-brow:last-child { border-bottom: none; }
.econ-brow .k { color: var(--muted); }
.econ-brow .v { color: var(--cream); font-family: var(--font-mono); text-align: end; }
.econ-brow.sub .k { padding-inline-start: 12px; color: var(--muted-2); font-size: 12px; }
.econ-brow.total { border-top: 1px solid var(--line); margin-top: 2px; }
.econ-brow.total .k { color: var(--cream); font-weight: 600; }
.econ-brow.total .v { color: var(--gold-hi); font-weight: 600; }
.econ-brow .v.good { color: var(--em); }
.econ-brow .v.bad { color: var(--danger); }
.econ-brow .v.gold { color: var(--gold-hi); }

.econ-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.econ-chip .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.econ-chip.ok { background: var(--em-deep); color: var(--em); }
.econ-chip.ok .dot { background: var(--em); box-shadow: 0 0 8px var(--em); }
.econ-chip.warn { background: #2A2010; color: var(--warn); }
.econ-chip.warn .dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.econ-chip.bad { background: #3a1410; color: var(--danger); }
.econ-chip.bad .dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.econ-bench { list-style: none; margin: 12px 0 0; padding: 0; }
.econ-bench li { font-size: 12px; color: var(--muted); line-height: 1.6; padding-inline-start: 16px; position: relative; }
.econ-bench li::before { content: "•"; position: absolute; inset-inline-start: 2px; color: var(--gold-hi); }
.econ-note { font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 14px; background: var(--panel-3); border-radius: 12px; padding: 12px; }
.econ-note.key { border: 1px solid var(--em-deep); }

/* Tasa VILKA en la vista general (sin $) */
.econ-vilka-rate { padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 12px; color: var(--gold-hi); font-family: var(--font-mono); }
.econ-vilka-rate:last-child { border-bottom: none; }

/* --- Centro del Fundador (sigiloso) --- */
.founder-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.founder-hide-btn { flex: none; background: linear-gradient(160deg, #3a1410, #2A2010); color: var(--gold-hi); border: 1px solid var(--gold); border-radius: var(--r-pill); padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer; letter-spacing: .3px; }
.founder-hide-btn:hover { filter: brightness(1.1); }
.founder-sec-h { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold-hi); margin: 20px 0 10px; }
.founder-empty { font-size: 12px; color: var(--muted); background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.founder-note { font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 10px; background: var(--panel-3); border-radius: 12px; padding: 12px; }
.founder-call { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; margin-bottom: 12px; }
.fc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.fc-title { font-size: 14px; font-weight: 600; color: var(--cream); }
.fc-time { font-size: 11px; color: var(--muted-2); font-family: var(--font-mono); flex: none; }
.fc-block { margin-top: 8px; }
.fc-label { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-hi); margin-bottom: 4px; }
.fc-text { font-size: 13px; color: var(--cream); line-height: 1.6; }
.fc-tasks { list-style: none; margin: 0; padding: 0; }
.fc-tasks li { font-size: 12px; color: var(--cream); line-height: 1.55; padding-inline-start: 16px; position: relative; }
.fc-tasks li::before { content: "▸"; position: absolute; inset-inline-start: 2px; color: var(--em); }
.fc-toggle { margin-top: 10px; background: var(--panel-3); border: 1px solid var(--line-2); color: var(--gold-hi); border-radius: 10px; padding: 7px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.fc-toggle:hover { border-color: var(--gold-hi); }
.fc-transcript { margin-top: 10px; max-height: 240px; overflow-y: auto; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.fc-transcript p { font-size: 12.5px; color: var(--cream); line-height: 1.7; margin: 0 0 8px; }
.fc-transcript p:last-child { margin-bottom: 0; }
.founder-pin-err { font-size: 12px; color: var(--danger); margin-top: 10px; }

/* Menú colapsable del dashboard (salta a secciones). Aditivo, no rompe layout.
   .cmd-top ya es position:sticky → sirve de contenedor para el menú absoluto. */
.nav-menu-btn { cursor: pointer; }
.cmd-nav-menu { position: absolute; z-index: 150; inset-inline-end: 16px; top: 100%; margin-top: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-width: 230px; max-height: 72vh; overflow-y: auto; box-shadow: 0 14px 44px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 2px; }
.cmd-nav-menu[hidden] { display: none; }
.cmd-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: transparent; border: none; border-radius: 8px; color: var(--cream); font-size: 13px; cursor: pointer; text-align: start; width: 100%; font-family: var(--font-ui); }
.cmd-nav-item:hover { background: var(--panel-3); }
.cmd-nav-ic { font-size: 15px; flex: none; }

/* IA de Mercado (análisis del oro) */
.mkt-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mkt-price { font-family: var(--font-mono); font-size: 26px; color: var(--gold-hi); }
.mkt-chg { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.mkt-chg.up { color: var(--em); }
.mkt-chg.down { color: var(--danger); }
.mkt-chg.flat { color: var(--muted); }
.mkt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-bottom: 14px; }
.mkt-stat { background: var(--panel-3); border-radius: 10px; padding: 10px 12px; }
.mkt-stat .k { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.mkt-stat .v { font-family: var(--font-mono); font-size: 14px; color: var(--cream); }
.mkt-signal { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); }
.mkt-signal.promote_savings { background: var(--em-deep); border-color: var(--em); }
.mkt-signal.buy_moment { background: #2A2010; border-color: var(--gold-hi); }
.mkt-signal .sig-h { font-size: 13px; line-height: 1.6; color: var(--cream); }

/* Prospección (leads) */
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.lead-in { background: var(--panel-3); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--cream); font-size: 13px; font-family: var(--font-ui); min-width: 0; }
.lead-form .btn-approve { grid-column: 1 / -1; }
.lead-stage { background: var(--panel-3); border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; font-size: 12px; color: var(--cream); font-family: var(--font-ui); flex: none; }

/* ══════════════ APP SHELL: sidebar (menú) + área de trabajo ══════════════
   Patrón SeptiGenesis: el menú vive a la IZQUIERDA y es lo primero que se ve;
   al elegir un módulo se muestra solo ese en el panel y el menú se colapsa. */
.cc-app { max-width: 1400px; margin: 0 auto; padding: 0 16px 60px; display: grid; grid-template-columns: 248px 1fr; gap: 18px; align-items: start; }
.cc-burger { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-3); border: 1px solid var(--line); color: var(--cream); border-radius: 10px; padding: 8px 12px; height: 38px; font-size: 13px; font-weight: 600; font-family: var(--font-ui); cursor: pointer; flex: none; }
.cc-burger:hover { border-color: var(--em); color: var(--em); }
/* Boton-llave del Fundador: solo visible para el fundador (JS quita [hidden]). */
.cc-founder-key { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: var(--panel-3); border: 1px solid var(--gold); border-radius: 10px; color: var(--gold-hi); cursor: pointer; flex: none; padding: 0; transition: box-shadow .15s, border-color .15s; }
.cc-founder-key[hidden] { display: none; }
.cc-founder-key:hover { border-color: var(--gold-hi); box-shadow: 0 0 0 3px var(--gold-glow); }
.cc-founder-key .nawi-ic svg { width: 22px; height: 22px; }
.cc-side-backdrop { position: fixed; inset: 0; background: rgba(4,7,5,.6); z-index: 90; }
.cc-side-backdrop[hidden] { display: none; }

.cc-sidebar { position: sticky; top: 72px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px; max-height: calc(100dvh - 90px); overflow-y: auto; }
.cc-nav { display: flex; flex-direction: column; gap: 2px; }
.cc-nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; background: transparent; border: none; border-radius: 10px; color: var(--cream); font-size: 13px; font-family: var(--font-ui); text-align: start; cursor: pointer; transition: background .15s, color .15s; }
.cc-nav-item:hover { background: var(--panel-3); }
.cc-nav-item.active { background: var(--em-deep); color: var(--em); font-weight: 600; }
.cc-nav-ico { font-size: 18px; flex: none; width: 26px; text-align: center; }
.cc-nav-lbl { flex: 1; min-width: 0; }
.cc-nav-more { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 6px; padding: 10px 12px; background: transparent; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12.5px; font-family: var(--font-ui); cursor: pointer; }
.cc-nav-more:hover { border-color: var(--em); color: var(--em); }
.cc-nav-more.open { border-style: solid; color: var(--cream); }
.cc-nav-more-wrap { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.cc-nav-more-wrap[hidden] { display: none; }

.cc-work { min-width: 0; }

/* ══════════════ ENCABEZADO: indicadores + precio + gráfica ══════════════ */
.cc-header { margin-bottom: 16px; }
.cc-price-band { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; }
.cc-price-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.cc-price-lbl { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.cc-price-now { font-family: var(--font-mono); font-size: 30px; color: var(--gold-hi); line-height: 1.1; }
.cc-price-now .u { font-size: 15px; color: var(--gold); }
.cc-price-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.cc-price-right { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.cc-chart { width: 100%; height: 72px; display: block; }
.cc-chart-line { fill: none; stroke-width: 2; }
.cc-chart-line.up { stroke: var(--em); }
.cc-chart-line.down { stroke: var(--danger); }
.cc-chart-area { stroke: none; opacity: .14; }
.cc-chart-area.up { fill: var(--em); }
.cc-chart-area.down { fill: var(--danger); }
.spark-axes { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 9px; color: var(--muted); margin-top: 2px; }
.price-src { font-size: 10px; color: var(--muted); text-decoration: underline; margin-top: 4px; align-self: flex-start; }
.price-chg { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.price-chg.up { color: var(--em); }
.price-chg.down { color: var(--danger); }
.price-chg.flat { color: var(--muted); }

/* ══════════════ PANEL: un módulo a la vez ══════════════ */
.cc-module { display: none; }
.cc-module.active { display: block; animation: ccFade .18s ease-out; }
@keyframes ccFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ══════════════ Móvil: el sidebar se vuelve cajón ══════════════ */
@media (max-width: 900px) {
  .cc-app { grid-template-columns: 1fr; padding: 0 14px 60px; }
  .cc-sidebar { position: fixed; z-index: 100; inset-block: 0; inset-inline-start: 0; width: 264px; max-height: none; border-radius: 0; border-inline-start: none; transform: translateX(-102%); transition: transform .22s ease; padding-top: 16px; }
  .cc-sidebar.open { transform: none; }
  .cc-price-band { grid-template-columns: 1fr; }
  .cc-price-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ══════ Sidebar colapsable en ESCRITORIO (☰ Menú da todo el ancho al módulo) */
.cc-app.side-collapsed { grid-template-columns: 0 1fr; }
.cc-app.side-collapsed .cc-sidebar { opacity: 0; pointer-events: none; padding: 0; border: 0; overflow: hidden; }
.cc-app, .cc-sidebar { transition: grid-template-columns .2s ease, opacity .2s ease; }

/* ══════ ENCABEZADO COMPACTO ══════
   Al elegir un módulo el encabezado se encoge a una tira mini PERO VIVA:
   los indicadores, el precio, el % y la gráfica siguen conectados (mismos ids,
   refresco cada 60s). Así el módulo se ve grande sin scrollear. */
.cc-head-toggle { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: none; color: var(--muted); font-size: 11px; font-family: var(--font-ui); cursor: pointer; padding: 2px 0 8px; }
.cc-head-toggle:hover { color: var(--em); }
.cc-head-toggle .chev { font-size: 10px; }

.cc-header.compact .kpis { grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; }
.cc-header.compact .kpi { padding: 8px 10px; border-radius: 10px; }
.cc-header.compact .kpi .l { font-size: 8px; letter-spacing: .8px; margin-bottom: 2px; }
.cc-header.compact .kpi .v { font-size: 14px; }
.cc-header.compact .cc-price-band { padding: 8px 12px; gap: 12px; align-items: center; }
.cc-header.compact .cc-price-now { font-size: 17px; }
.cc-header.compact .cc-price-now .u { font-size: 11px; }
.cc-header.compact .cc-price-lbl { font-size: 8px; }
.cc-header.compact .cc-price-stats { grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 6px; }
.cc-header.compact .mkt-stat { padding: 5px 7px; border-radius: 8px; }
.cc-header.compact .mkt-stat .k { font-size: 7.5px; margin-bottom: 1px; }
.cc-header.compact .mkt-stat .v { font-size: 11px; }
.cc-header.compact .cc-chart { height: 38px; }
.cc-header.compact .spark-axes { font-size: 8px; }
.cc-header.compact .price-src { display: none; }

/* Entrada del Centro del Fundador en el menú (solo tras la Clave) */
.cc-nav-founder { border: 1px solid #2A2010; }
.cc-nav-founder.active { background: #2A2010; color: var(--gold-hi); }

@media (max-width: 900px) {
  .cc-app.side-collapsed { grid-template-columns: 1fr; }
  .cc-header.compact .kpis { grid-template-columns: repeat(3, 1fr); }
}

/* ══════ FIX móvil: el encabezado NO se puede salir del contenedor ══════
   Causas reales del desborde:
   1) Los hijos de un grid traen `min-width:auto` → el contenido los empuja
      fuera de la tarjeta. Se fuerza min-width:0.
   2) `.cc-header.compact .cc-price-stats` (4 columnas) pisaba al media query
      móvil por ir después y tener más especificidad. Aquí se corrige. */
.cc-price-band, .cc-price-band > * { min-width: 0; }
.cc-price-left { min-width: 0; }
.mkt-stat { min-width: 0; }
.mkt-stat .v, .mkt-stat .k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi .v, .kpi .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-chart { max-width: 100%; }

@media (max-width: 900px) {
  /* Compacto en móvil: 2 columnas de stats (no 4) y KPIs que quepan. */
  .cc-header.compact .cc-price-stats,
  .cc-price-stats { grid-template-columns: repeat(2, 1fr); }
  .cc-header.compact .kpis,
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cc-price-band { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .cc-header.compact .kpis, .kpis { grid-template-columns: repeat(2, 1fr); }
  .cc-header.compact .cc-price-stats, .cc-price-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Call center de Prospección (llamar · WhatsApp · correo) */
.lead-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.lead-act { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-3); font-size: 14px; line-height: 1; cursor: pointer; text-decoration: none; }
.lead-act:hover { border-color: var(--em); }
.lead-act.call:hover { border-color: var(--gold-hi); }
.lead-act[disabled] { opacity: .5; cursor: default; }

/* Ficha del prospecto */
.row.clk { cursor: pointer; }
.row.clk:hover { background: var(--panel-3); border-radius: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
/* Separadores de la ficha del prospecto: quiénes son / cómo compran / con qué se vende */
.card-sec { margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.card-sec:first-child { margin-top: 6px; }

/* ============================================================
   SAIS · Informe multi-agente (interactivo + imprimible con membrete)
   ============================================================ */
.sais-acts { display: flex; gap: 8px; margin: 12px 0 14px; flex-wrap: wrap; }
.sais-doc { display: block; }
.sais-loading { padding: 24px 0; text-align: center; }

/* Membrete: en pantalla se ve como cabecera del documento; al imprimir se fija
   arriba y se repite en TODAS las páginas. */
.sais-letterhead { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--line);
  border-radius: 12px; background: linear-gradient(135deg, rgba(201,164,92,.10), transparent 60%); }
.slh-brand { display: flex; align-items: center; gap: 9px; }
.slh-mark { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center;
  justify-content: center; background: linear-gradient(145deg, #c9a45c, #8a6c34); color: #14110b;
  font-weight: 700; font-size: 14px; }
.slh-name { font-family: 'Fraunces', serif; font-size: 15px; letter-spacing: .06em; color: var(--cream); }
.slh-meta { text-align: right; font-size: 10px; color: var(--muted); line-height: 1.5; }
.slh-date { font-family: 'IBM Plex Mono', monospace; }

.sais-verdict { border: 1px solid var(--line); border-left-width: 4px; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 16px; background: rgba(255,255,255,.02); }
.sais-verdict.ok { border-left-color: var(--ok, #3CB478); }
.sais-verdict.warn { border-left-color: var(--gold); }
.sais-verdict.bad { border-left-color: var(--danger); }
.sv-eyebrow { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.sv-focus { font-size: 15px; font-weight: 600; color: var(--cream); line-height: 1.5; margin-bottom: 7px; }
.sv-why { font-size: 12px; color: var(--muted); line-height: 1.65; }

.sais-chart { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; margin-bottom: 12px; }
.sc-ttl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 9px; }
.sc-bar { height: 12px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.sc-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }
.sc-fill.ok { background: linear-gradient(90deg, #c9a45c, #e6cd93); }
.sc-fill.bad { background: linear-gradient(90deg, #a33, #d55); }
.sc-legend { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px;
  font-size: 11px; color: var(--muted); flex-wrap: wrap; }

.sais-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.sais-facts .sf { border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center; min-width: 0; }
.sf-v { font-family: 'IBM Plex Mono', monospace; font-size: 15px; color: var(--cream); }
.sf-k { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; }
.sf.ok .sf-v { color: var(--ok, #3CB478); }
.sf.warn .sf-v { color: var(--gold); }
.sf.bad .sf-v { color: var(--danger); }

.sais-failed { border: 1px solid rgba(200,70,70,.4); background: rgba(200,70,70,.08); color: var(--danger);
  border-radius: 10px; padding: 9px 12px; font-size: 11px; margin-bottom: 12px; line-height: 1.5; }
.sais-sec { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
  border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 18px 0 10px; }

.sais-agent { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.sa-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  background: transparent; border: none; cursor: pointer; text-align: left; }
.sa-head:hover { background: rgba(255,255,255,.03); }
.sa-ic { font-size: 16px; flex: none; }
.sa-ttl { flex: 1; min-width: 0; }
.sa-name { font-size: 12px; font-weight: 600; color: var(--cream); }
.sa-head-line { font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.sa-body { display: none; padding: 0 12px 12px 38px; }
.sais-agent.open .sa-body { display: block; }
.sa-detail { font-size: 12.5px; color: var(--cream); line-height: 1.7; margin-bottom: 10px; opacity: .92; }
.sa-find { display: flex; gap: 7px; font-size: 12px; color: var(--cream); line-height: 1.6; margin-bottom: 6px; }
.sa-bullet { color: var(--gold); flex: none; }
.sais-risks, .sais-plan { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.sais-risk-row, .sais-plan-row { display: flex; gap: 9px; font-size: 12.5px; color: var(--cream); line-height: 1.6; margin-top: 7px; align-items: flex-start; }
.sais-risk-ic { color: var(--gold); flex: none; }
.sais-plan-num { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--em-deep); color: var(--em); font-weight: 700; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.sa-act { display: block; width: 100%; text-align: left; margin-top: 6px; padding: 7px 10px;
  background: rgba(201,164,92,.10); border: 1px solid rgba(201,164,92,.3); border-radius: 8px;
  color: var(--gold); font-size: 11px; cursor: pointer; font-family: inherit; }
.sa-act:hover:not(:disabled) { background: rgba(201,164,92,.2); }
.sa-act:disabled { opacity: .45; cursor: default; }
.sais-note { font-size: 10px; color: var(--muted); line-height: 1.6; margin-top: 14px;
  padding-top: 10px; border-top: 1px solid var(--line); }

@media (max-width: 560px) { .sais-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Informe impreso: membrete en CADA página, en claro ---- */
@media print {
  body { background: #fff !important; }
  .cc-sidebar, .cc-header, .cc-topbar, .sais-acts, .ai-fab, .ai-panel,
  .cc-module:not(.active) { display: none !important; }
  .cc-app, .cc-work, .cc-panel, .panel { display: block !important; background: #fff !important;
    border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }
  /* fixed → el navegador lo repinta en cada página impresa */
  .sais-letterhead { position: fixed; top: 0; left: 0; right: 0; background: #fff !important;
    border: none !important; border-bottom: 1.5px solid #c9a45c !important; border-radius: 0 !important; }
  .sais-doc { padding-top: 62px; }
  .sais-verdict, .sais-chart, .sais-agent, .sais-facts .sf, .sais-letterhead { break-inside: avoid; }
  .sais-agent .sa-body { display: block !important; } /* en papel se ve todo, no colapsado */
  .slh-name, .sv-focus, .sf-v, .sa-name, .sa-find { color: #000 !important; }
  .slh-meta, .sv-why, .sa-head-line, .sc-legend, .sf-k, .sais-note { color: #555 !important; }
  .sais-sec, .sa-bullet { color: #8a6c34 !important; }
  .sais-verdict, .sais-chart, .sais-agent, .sais-facts .sf { border-color: #ddd !important; background: #fff !important; }
  .sa-act { background: #f7f3ea !important; border-color: #e0d5bd !important; color: #6b5325 !important; }
  .sc-bar { background: #eee !important; }
  @page { margin: 14mm; }
}

/* ---- "?" + banner de explicación (todos los módulos) ---- */
.help-q { margin-inline-start: 8px; width: 19px; height: 19px; border-radius: 50%; flex: none;
  background: rgba(201,164,92,.12); border: 1px solid rgba(201,164,92,.4); color: var(--gold-hi);
  font-size: 11px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0;
  vertical-align: middle; font-family: inherit; }
.help-q:hover { background: rgba(201,164,92,.28); }
.mod-banner { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px;
  padding: 9px 12px; border-radius: 10px; background: rgba(201,164,92,.07);
  border: 1px solid rgba(201,164,92,.22); }
.mb-ic { flex: none; font-size: 12px; line-height: 1.5; }
.mb-txt { font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.help-body { padding: 2px 0; }
.help-eyebrow { font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px; }
.help-text { font-size: 13px; line-height: 1.75; color: var(--cream); white-space: pre-line; }

/* ---- Separadores de grupo del menú ---- */
.cc-nav-grp { padding: 14px 12px 5px; font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2, #6b6b63); font-weight: 600; }
.cc-nav-grp:first-child { padding-top: 4px; }
.cc-sidebar.side-collapsed .cc-nav-grp { display: none; }

/* ---- Monitoreo de accesos (Centro del Fundador) ---- */
.fa-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 20px 0 10px; flex-wrap: wrap; }
.fa-ttl { font-family: var(--font-display); font-size: 15px; font-weight: 500; color: var(--cream); }
.fa-head .btn-mini { cursor: pointer; }
.fa-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.fa-tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center; min-width: 0; }
.fa-tile-v { font-family: var(--font-mono); font-size: 18px; color: var(--gold-hi); }
.fa-tile-k { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }
.fa-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 6px; }
.fa-row { display: grid; grid-template-columns: 1.5fr 1.3fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.fa-row:last-child { border-bottom: none; }
.fa-th { background: rgba(255,255,255,.03); font-size: 9px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); }
.fa-c1, .fa-c2 { min-width: 0; }
.fa-name { font-size: 12.5px; font-weight: 600; color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-mail { font-size: 10px; color: var(--muted); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-where { font-size: 12px; color: var(--gold-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-counts { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.fa-c3 { font-size: 11px; color: var(--muted); font-family: var(--font-mono); text-align: end; white-space: nowrap; }
.fa-sec { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
  border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 18px 0 8px; }
.fa-feed { max-height: 320px; overflow-y: auto; }
.fa-ev { display: flex; align-items: center; gap: 9px; padding: 7px 2px; border-bottom: 1px solid var(--line-2); }
.fa-ev:last-child { border-bottom: none; }
.fa-ev-ic { flex: none; width: 16px; text-align: center; color: var(--muted); font-size: 12px; }
.fa-ev-ic.in { color: var(--em); }
.fa-ev-m { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.fa-ev-who { color: var(--cream); font-weight: 600; }
.fa-ev-t { flex: none; font-size: 10px; color: var(--muted-2); font-family: var(--font-mono); }
@media (max-width: 560px) {
  .fa-row { grid-template-columns: 1.4fr 1fr; }
  .fa-c3 { grid-column: 1 / -1; text-align: start; }
}

/* ---- KPIs que no se desbordan --------------------------------------------
   El valor iba a 24px fijo: "41.000,00 US$" no cabe en una celda de 150px y se
   salía de la tarjeta. Tipografía fluida + min-width:0 (los hijos de un grid
   traen min-width:auto por defecto, que es justo lo que impide encoger). */
.kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.kpi { min-width: 0; overflow: hidden; }
.kpi .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi .v {
  font-size: clamp(15px, 4.2vw, 24px);
  min-width: 0;
  overflow-wrap: anywhere; /* si aun así no cabe, parte la línea en vez de salirse */
  line-height: 1.25;
}
@media (max-width: 420px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 14px 12px; }
}
/* Teléfono/WhatsApp del prospecto, a la vista en la fila */
.lead-tel { font-size: 11px; color: var(--gold-hi); font-family: var(--font-mono); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Elegir cómo se contacta al prospecto (IA o humano) ---- */
.call-num { font-family: var(--font-mono); font-size: 18px; color: var(--gold-hi);
  text-align: center; margin: 6px 0 16px; }
.call-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start;
  padding: 13px 14px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 12px;
  background: transparent; cursor: pointer; font-family: inherit; text-decoration: none; }
.call-opt:hover { border-color: var(--gold-hi); background: rgba(201,164,92,.07); }
.call-opt.ai { border-color: rgba(201,164,92,.45); background: rgba(201,164,92,.08); }
.co-ic { flex: none; font-size: 18px; width: 22px; text-align: center; }
.co-m { min-width: 0; }
.co-t { font-size: 13px; font-weight: 600; color: var(--cream); }
.co-d { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
/* La fila del monitoreo se puede abrir */
.fa-row.clk { cursor: pointer; }
.fa-row.clk:hover { background: rgba(255,255,255,.03); }
/* La marca NAWI donde antes había un emoji robot */
.ai-mark { vertical-align: -3px; margin-inline-end: 6px; }
.nav-mark { width: 15px; height: 15px; vertical-align: middle; }
/* Academia: editor de lecciones */
.field textarea { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px; color: var(--cream);
  font-size: 13px; font-family: inherit; line-height: 1.6; resize: vertical; }
.field textarea:focus, .field select:focus { outline: none; border-color: var(--gold-hi); }
.field select { width: 100%; background: var(--panel-3); color: var(--cream);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-family: inherit; font-size: 13px; }
.acad-del { flex: none; color: var(--danger); border-color: var(--danger); cursor: pointer; }
/* Academia: barra de herramientas (dictado, IA, adjuntar material).
   Envuelve en varias líneas: en árabe y francés las etiquetas son más largas
   y con nowrap se salían de la tarjeta. */
.acad-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px; }
.acad-tools .btn-mini { cursor: pointer; }
.acad-tools .btn-mini:disabled { opacity: .45; cursor: not-allowed; }
/* Propuesta de la IA: se ve distinta del formulario a propósito — no es lo que
   escribiste, es lo que la máquina sugiere, y no se aplica hasta que lo pidas. */
.acad-ai-box { background: linear-gradient(145deg, #14100522, var(--panel-2));
  border: 1px solid #2A2010; border-radius: var(--r-card); padding: 14px; margin: 10px 0; }
.acad-ai-h { font-size: 12px; color: var(--gold-hi); font-weight: 600; margin: 12px 0 6px; }
.acad-ai-h:first-child { margin-top: 0; }
.acad-ai-body { max-height: 260px; overflow-y: auto; padding-inline-end: 6px; }
.acad-ai-body p { font-size: 12.5px; color: var(--cream); line-height: 1.65; margin: 0 0 10px; }
/* El .psub del panel está scopeado a .panel y el modal no lo es: aquí se le da
   su propio estilo en vez de heredar nada. */
.acad-ai-box .psub { font-size: 12px; color: var(--muted); line-height: 1.55; margin-bottom: 4px; }
.acad-ai-box .psub.bad { color: var(--danger); }
.acad-ai-box .psub.ok { color: var(--em); }
/* .helper vive en app.css, que el Centro de Comando NO carga: sin esto los
   mensajes del editor salían sin estilo. */
.cmd-modal-body .helper { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin: 6px 0; }
.cmd-modal-body .helper.bad { color: var(--danger); }
.cmd-modal-body .helper.ok { color: var(--em); }
/* Material adjunto de la lección */
.acad-media-list { margin-top: 6px; }
.acad-media-list .psub { font-size: 12px; color: var(--muted); }
.acad-media-list .row { display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line-2); }
.acad-media-list .row .main { flex: 1; min-width: 0; }
.acad-media-list .row .main .t { font-size: 12.5px; color: var(--cream);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acad-media-list .row .main .d { font-size: 11px; color: var(--muted); }
.acad-media-list .row .btn-mini { flex: none; cursor: pointer; }
/* Error con salida: dice qué pasó y deja reintentar */
.err-box { padding: 18px 12px; text-align: center; }
.err-msg { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.err-box .btn-mini { cursor: pointer; }
/* CRM: acciones y mensaje sugerido */
.buyer-acts { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.buyer-acts .call-opt { margin-bottom: 0; }
.buyer-msg { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px; color: var(--cream);
  font-size: 13px; font-family: inherit; line-height: 1.6; resize: vertical; }
.buyer-msg:focus { outline: none; border-color: var(--gold-hi); }

/* ---- Trazabilidad del lote: hash clickeable + certificado ---- */
.hash-link { display: inline-block; margin-top: 4px; padding: 3px 8px; background: rgba(201,164,92,.10);
  border: 1px solid rgba(201,164,92,.35); border-radius: 999px; color: var(--gold-hi);
  font-family: var(--font-mono); font-size: 10px; cursor: pointer; }
.hash-link:hover { background: rgba(201,164,92,.22); }
.cert-badge { width: 52px; height: 52px; margin: 4px auto 10px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 26px; font-weight: 700; }
.cert-badge.ok { background: var(--em-deep); border: 2px solid var(--em); color: var(--em); }
.cert-badge.bad { background: rgba(192,107,90,.18); border: 2px solid var(--danger); color: var(--danger); }
.cert-status { text-align: center; font-size: 14px; font-weight: 600; margin-bottom: 14px; color: var(--cream); }
.cert-status.ok { color: var(--em); }
.cert-status.bad { color: var(--danger); }
.cert-k { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 10px; }
.cert-hash { font-family: var(--font-mono); font-size: 10px; color: var(--gold-hi); word-break: break-all;
  background: rgba(201,164,92,.07); border: 1px solid rgba(201,164,92,.22); border-radius: 8px;
  padding: 9px; margin: 5px 0 12px; line-height: 1.6; }
.cert-note { font-size: 10px; color: var(--muted); line-height: 1.6; }

/* ── Reposición de inventario ─────────────────────────────── */
.inv-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.inv-card { background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.inv-card .inv-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.inv-card .inv-v { font-family: var(--font-mono); font-size: 20px; font-weight: 500; margin-top: 4px; }
.inv-card.ok .inv-v { color: var(--em); }
.inv-card.low .inv-v { color: var(--danger); }
.inv-card.warn .inv-v { color: var(--gold); }
.inv-status { border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.inv-status.ok { background: rgba(39,160,120,.10); border: 1px solid var(--em-deep); color: var(--cream); }
.inv-status.low { background: rgba(192,107,90,.12); border: 1px solid var(--danger); color: var(--cream); }
.inv-status.warn { background: rgba(201,164,92,.12); border: 1px solid var(--gold); color: var(--cream); }
.inv-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.inv-lbl { font-size: 12px; color: var(--muted); }
.inv-input { width: 120px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-family: var(--font-mono); font-size: 15px; color: var(--cream); outline: none; }
.inv-input:focus { border-color: var(--gold); }
.inv-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 8px 0 8px; }
.inv-order { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.inv-order .inv-om { flex: 1; min-width: 0; font-weight: 500; }
.inv-order .inv-og { font-family: var(--font-mono); color: var(--gold-hi); }
.inv-order .inv-ost { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
@media (max-width: 560px) { .inv-cards { grid-template-columns: 1fr; } }

/* ── Joyerías aliadas ─────────────────────────────────────── */
.jew-form { background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.jew-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.jew-row .jew-main { flex: 1; min-width: 0; }
.jew-row .jew-nm { font-weight: 500; }
.jew-row .jew-sub { font-size: 11px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.jew-st { font-size: 11px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.jew-st.verified { color: var(--em); border-color: var(--em-deep); }
.jew-st.pending { color: var(--warn); border-color: rgba(201,164,92,.4); }
.jew-st.rejected { color: var(--danger); border-color: var(--danger); }

/* ── Exportación B2B ──────────────────────────────────────── */
.exp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.exp-pct { font-family: var(--font-mono); font-size: 24px; font-weight: 500; color: var(--gold-hi); }
.exp-bar { flex: 1; height: 8px; background: var(--panel-3); border-radius: 99px; overflow: hidden; }
.exp-fill { height: 100%; background: linear-gradient(90deg, var(--em), var(--gold)); border-radius: 99px; transition: width .4s; }
.exp-count { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.exp-req { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.exp-chk { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 1.5px solid var(--line); background: var(--panel-2); color: var(--em); font-weight: 700; cursor: pointer; }
.exp-chk.on { background: var(--em-deep); border-color: var(--em); }
.exp-main { flex: 1; min-width: 0; }
.exp-t { font-weight: 500; font-size: 14px; }
.exp-badge { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: var(--warn); border: 1px solid rgba(201,164,92,.4); border-radius: 99px; padding: 1px 6px; margin-inline-start: 8px; }
.exp-d { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 3px; }
.exp-ent { font-size: 10px; color: var(--gold); margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }
.exp-req.on .exp-t { color: var(--em); }
.exp-order-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.exp-badge.st-deposit_paid, .exp-badge.st-in_preparation { color: var(--gold); border-color: rgba(201,164,92,.5); }
.exp-badge.st-docs_ready, .exp-badge.st-dispatched { color: #4e8eff; border-color: rgba(78,142,255,.5); }
.exp-badge.st-delivered { color: var(--em); border-color: var(--em); }
.exp-badge.st-cancelled { color: #ff6b6b; border-color: rgba(255,107,107,.5); }
.exp-status-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.exp-st-btn { font-size: 10px; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); cursor: pointer; white-space: nowrap; }
.exp-st-btn.on { background: var(--em-deep); border-color: var(--em); color: var(--em); font-weight: 700; }
.exp-doc-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.exp-doc-link { font-size: 12px; font-weight: 600; color: var(--gold); text-decoration: none; }
.exp-doc-link:hover { text-decoration: underline; }
.exp-step-main { flex: 1; min-width: 0; }
.exp-docrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; align-items: center; }
.exp-mini { font-size: 11px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--cream); cursor: pointer; }
.exp-mini.gold { border-color: var(--gold); color: var(--gold); }
.exp-mini:disabled { opacity: .6; }
.exp-mini-link { font-size: 11px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--cream); text-decoration: none; }
.exp-review { margin-top: 8px; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); border-left-width: 3px; }
.exp-review.ok { border-left-color: var(--em, #3CB478); }
.exp-review.warn { border-left-color: var(--gold); }
.exp-review.bad { border-left-color: var(--danger, #E5484D); }
.exp-review.neutral { border-left-color: var(--muted); }
.exp-review-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.exp-review.ok .exp-review-badge { color: var(--em, #3CB478); }
.exp-review.warn .exp-review-badge { color: var(--gold); }
.exp-review.bad .exp-review-badge { color: var(--danger, #E5484D); }
.exp-review-exp { font-size: 11px; color: var(--muted); margin-inline-start: 8px; }
.exp-review-sum { font-size: 12px; color: var(--cream); line-height: 1.55; margin-top: 5px; }
.exp-review-flag { font-size: 11.5px; color: var(--danger, #E5484D); margin-top: 4px; }
.exp-disc { font-size: 11px; color: var(--muted); background: rgba(201,164,92,.07); border: 1px solid rgba(201,164,92,.22); border-radius: 8px; padding: 10px; margin: 12px 0 4px; line-height: 1.6; }
.exp-quote { background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.exp-quote-out { margin-top: 12px; }
.exp-qrow { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line-2); }
.exp-qrow .k { color: var(--muted); font-size: 13px; }
.exp-qrow .v { font-family: var(--font-mono); color: var(--gold-hi); font-weight: 500; }

/* ── Inteligencia de Mercado & Pitch (módulo `intel`) ─────────────────────── */
.il-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 16px; }
.il-tab { padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--panel-2);
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.il-tab:hover { color: var(--cream); border-color: var(--gold); }
.il-tab.active { color: var(--obsidian); background: linear-gradient(120deg, var(--gold-hi), var(--gold)); border-color: var(--gold); }
.il-tabbody { margin-top: 4px; }
.il-sec { color: var(--muted); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin: 18px 0 8px; }
.il-card { background: linear-gradient(145deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
  border-radius: var(--r-card-md); padding: 16px; margin: 12px 0; box-shadow: 0 0 0 1px rgba(201,164,92,.05); }
.il-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.il-title { font-family: var(--font-display); color: var(--gold-hi); font-size: 16px; font-weight: 600; }
.il-lead { color: var(--cream); font-size: 13.5px; line-height: 1.6; margin: 4px 0 10px; }
.il-h { color: var(--gold); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; margin: 12px 0 5px; }
.il-p { color: var(--cream); font-size: 13px; line-height: 1.6; }
.il-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.il-chip { background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 4px 10px; font-size: 12px; color: var(--cream); }
.il-list { display: flex; flex-direction: column; gap: 4px; }
.il-li { display: flex; gap: 7px; color: var(--cream); font-size: 13px; line-height: 1.5; }
.il-li .il-dot { color: var(--gold); }
.il-obj { border-left: 2px solid var(--line); padding: 4px 0 4px 10px; margin: 6px 0; }
.il-obj-q { color: var(--gold-hi); font-size: 12.5px; font-weight: 600; }
.il-obj-a { color: var(--cream); font-size: 13px; line-height: 1.55; margin-top: 2px; }
.il-msg { background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  color: var(--cream); font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; margin-bottom: 10px; }
/* Empresa activa: el eje compartido entre los tabs de Inteligencia */
.il-company { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(145deg, var(--panel-2), var(--panel)); border: 1px solid var(--gold);
  border-radius: var(--r-card-md); padding: 12px 14px; margin: 6px 0 4px; box-shadow: 0 0 0 1px rgba(201,164,92,.08); }
.il-company-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.il-company-star { color: var(--gold-hi); font-size: 18px; line-height: 1; }
.il-company-main { min-width: 0; }
.il-company-nm { color: var(--gold-hi); font-family: var(--font-display); font-size: 15px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; }
.il-company-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.il-company-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.il-company-hint { color: var(--muted); font-size: 12.5px; line-height: 1.5; flex: 1 1 200px; }
/* KPIs de factibilidad */
.il-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.il-kpi { background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.il-kpi-k { color: var(--muted); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.il-kpi-v { color: var(--gold-hi); font-size: 15px; font-weight: 600; margin-top: 3px; }
/* Galería de creatividades (Estudio Creativo) */
.il-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.il-thumb { display: block; width: 120px; height: 120px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--gold); background: var(--panel-3); }
.il-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.il-creative-item { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.il-social { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 10px; }
.il-social-ok { color: var(--gold-hi); font-size: 12.5px; font-weight: 600; }
.il-social-hint { color: var(--muted); font-size: 12.5px; line-height: 1.5; flex: 1 1 200px; }
.il-social label { color: var(--cream); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
