/* =====================================================================
   MADRE SELVA · ms-pro-carbon.css · v1 · 09/10/2026 · PREPARADO, NO DESPLEGADO
   Identidad PRO aprobada (Prompt Maestro §07):
   · Azul noche + dorado SOLO en la L invertida (definida en ms-nav-l.css).
   · Área central PRO: negro/carbón; tarjetas grafito; gráficos e indicadores legibles.
   · IA PRO: avatar/botón/insignia en azul noche + dorado (sin bordó). No se rediseña el avatar.
   · PREMIUM: candado dorado + «Próximamente» al final del menú.
   Solo color y contraste. No toca métricas, filtros, agrupaciones, API, PDF ni permisos (QA RC5 38 PASS).
   Tarjetas: alternativa A «grafito frío» APROBADA por el titular el 09/10/2026 (la B cálida se descartó).
   Se carga después de ms-visual-polish.css. Alcance: html[data-ms-section="pro"] (lo fija la app en #/pro).
   16/10/2026: el centro carbón (secciones 3–6) aplica solo con Apariencia «Oscuro». En «Claro» PRO usa superficies claras; la L azul noche no cambia.
   ===================================================================== */
html[data-ms-section="pro"]{
  --pc-navy-1:#14244A; --pc-navy-2:#0E1A36; --pc-navy-3:#0A1328;
  --pc-gold:#C9A24A; --pc-gold-2:#E3C77E;
  --pc-carbon:#0F1113; --pc-carbon-2:#14171A;
  --pc-card:#1B1E22; --pc-card-2:#22262B; --pc-line:#2E333A;
  --pc-text:#EDEFF2; --pc-text-2:#B4BBC4; --pc-text-3:#8E96A0;
  --pc-sales:#E3C77E; --pc-profit:#7FD1B4; --pc-third:#9DB4E0;
}

/* 1–2 · La L azul noche + dorado (sidebar + topbar) vive en ms-nav-l.css, común a BASE / PRO / PREMIUM. */

/* 3 · Centro carbón ---------------------------------------------------- */
html[data-theme="dark"][data-ms-section="pro"] .ms-main,
html[data-theme="dark"][data-ms-section="pro"] .ms-main > main.page{
  background:var(--pc-carbon) !important; background-image:none !important; color:var(--pc-text) !important; }
html[data-theme="dark"][data-ms-section="pro"] body{ background:var(--pc-carbon) !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev{ color:var(--pc-text); }
html[data-theme="dark"][data-ms-section="pro"] .ev h2, html[data-theme="dark"][data-ms-section="pro"] .ev h3{ color:#F4F1EA !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev-hero{ background:linear-gradient(180deg,#181B1F,#14171A) !important; border:1px solid var(--pc-line); color:var(--pc-text) !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev-hero h2{ color:#FFFFFF !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev-hero :is(h1,h2,h3,p,span,strong,b,small,div){ color:var(--pc-text) !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev-hero p{ color:var(--pc-text-2) !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev-hero .ev-eyebrow, html[data-theme="dark"][data-ms-section="pro"] .ev-eyebrow{ color:var(--pc-gold-2) !important; }

/* 4 · Tarjetas grafito + cifras legibles ------------------------------ */
html[data-theme="dark"][data-ms-section="pro"] .ev-card{ background:var(--pc-card) !important; border:1px solid var(--pc-line) !important; color:var(--pc-text) !important;
  box-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 18px 36px -30px rgba(0,0,0,.9) !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev-card h3, html[data-theme="dark"][data-ms-section="pro"] .ev-card a{ color:#F4F1EA !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev-value{ color:#FFFFFF !important; font-variant-numeric:tabular-nums; }
html[data-theme="dark"][data-ms-section="pro"] .ev-card small, html[data-theme="dark"][data-ms-section="pro"] .ev-muted, html[data-theme="dark"][data-ms-section="pro"] .ev-legend{ color:var(--pc-text-2) !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev-charts .ev-card{ background:var(--pc-card-2) !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev table td, html[data-theme="dark"][data-ms-section="pro"] .ev table th{ border-color:var(--pc-line) !important; color:var(--pc-text); }
html[data-theme="dark"][data-ms-section="pro"] .ev-notice{ background:#2A2416 !important; color:#F3E3BC !important; border:1px solid #5A4A22; }
html[data-theme="dark"][data-ms-section="pro"] .ev-bar{ background:var(--pc-sales) !important; }

/* 5 · Filtros y CTA PDF ------------------------------------------------ */
html[data-theme="dark"][data-ms-section="pro"] .ev :is(select,input,button){ background:#121418 !important; color:var(--pc-text) !important; border-color:#3A4048 !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev button.primary{ background:var(--pc-gold) !important; color:#1A1306 !important; border-color:var(--pc-gold) !important; font-weight:700; }
html[data-theme="dark"][data-ms-section="pro"] .ev :is(a,button,input,select):focus-visible{ outline:3px solid var(--pc-gold-2) !important; outline-offset:3px; }

/* 6 · Gráficos: series legibles sobre carbón (solo color del trazo) --- */
html[data-theme="dark"][data-ms-section="pro"] .ev svg [stroke="#123844"]{ stroke:var(--pc-sales); }
html[data-theme="dark"][data-ms-section="pro"] .ev svg [stroke="#509b80"]{ stroke:var(--pc-profit); }
html[data-theme="dark"][data-ms-section="pro"] .ev svg [stroke="#9bd8c2"]{ stroke:var(--pc-profit); }
html[data-theme="dark"][data-ms-section="pro"] .ev svg [stroke="#d7c19a"]{ stroke:var(--pc-third); }
html[data-theme="dark"][data-ms-section="pro"] .ev svg [stroke="#bcc"]{ stroke:#3A4048; }
html[data-theme="dark"][data-ms-section="pro"] .ev svg text{ fill:var(--pc-text-2); }
html[data-theme="dark"][data-ms-section="pro"] .ev-legend span:first-child{ color:var(--pc-sales) !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev-legend span:nth-child(2){ color:var(--pc-profit) !important; }
html[data-theme="dark"][data-ms-section="pro"] .ev-charts .ev-card :is(p,span,small,div){ color:var(--pc-text-2); }

/* 7 · IA PRO: azul noche + dorado (sin bordó). Mismo avatar. --------- */
.pro-ia-btn, .pro-ia-drawer .pro-ia-head, .ms-assist.is-pro .ms-assist-head{
  background:linear-gradient(135deg,#14244A,#0A1328) !important; color:#F4E4BC !important; border-color:rgba(201,162,74,.55) !important; }
.pro-ia-drawer{ border-left-color:rgba(201,162,74,.35) !important; box-shadow:-24px 0 60px -30px rgba(6,12,30,.65) !important; }
/* Solo el avatar de IA PRO (QA 09/10: la regla sin alcance pintaba también el de SELVA IA, que no se toca). */
.pro-ava:not(.selva){ box-shadow:0 0 0 2px #C9A24A, 0 6px 16px -8px rgba(6,12,30,.8) !important; background-color:#0E1A36 !important; }
.pro-ia-status, .pro-ia-badge{ color:#E3C77E !important; }
.pro-ia-compose button[type="submit"], .pro-ia-send{ background:#C9A24A !important; color:#1A1306 !important; }
/* 7b · IA PRO en el asistente compartido: la app usa .ms-assist.mode-pro (la regla de arriba apuntaba a .is-pro y no aplicaba),
   así que el encabezado, la burbuja del usuario y el envío seguían bordó en BASE, PRO y PREMIUM. SELVA IA (.selva) no cambia. */
.ms-assist.mode-pro .ms-assist-head:not(.selva){ background:linear-gradient(135deg,#14244A,#0A1328) !important; color:#F4E4BC !important; border-bottom-color:rgba(201,162,74,.55) !important; }
.ms-assist.mode-pro{ border-left-color:rgba(201,162,74,.35) !important; }
.ms-assist.mode-pro .pro-msg.user:not(.selva) span, .pro-ia-drawer .pro-msg.user:not(.selva) span{ background:#14244A !important; color:#FFF !important; }
.ms-assist.mode-pro .ms-assist-compose button{ background:#C9A24A !important; color:#1A1306 !important; }
.ms-assist.mode-pro .ms-assist-compose input:focus, .pro-ia-compose input:focus{ border-color:#1F3A73 !important; box-shadow:0 0 0 3px rgba(31,58,115,.15) !important; }
.pro-ia-ctx{ background:#EEF2FA !important; color:#1F3A73 !important; border-bottom-color:#DCE3F1 !important; }
.pro-ia-lock svg{ color:#1F3A73 !important; }
.pro-ia-txt small{ color:#5A6B8C !important; }
.ppp-ia{ color:#14244A !important; }
.as-pro{ border-color:rgba(201,162,74,.42) !important; }
.as-pro:hover, .as-pro.is-active{ border-color:rgba(201,162,74,.75) !important; }
.as-pro .as-name{ color:#1F3A73; } /* sobre la L, ms-nav-l.css lo deja dorado (!important) */
.pro-q:not(.selva){ color:#1F3A73; border-color:#D6DEEE; }
.pro-q:not(.selva):hover{ background:#EEF2FA; border-color:#9FB1D6; }
html[data-theme="dark"] .pro-q:not(.selva){ color:#BFD0F0 !important; }
html[data-theme="dark"] .ms-assist.mode-pro .pro-msg.user:not(.selva) span{ background:#1F3A73 !important; }
html[data-theme="dark"] .pro-ia-ctx{ background:#16213A !important; color:#BFD0F0 !important; border-bottom-color:#26355A !important; }

/* 8 · PREMIUM: candado dorado + Próximamente (sin acceso a funciones) - */
.ms-sidebar .side-nav a[href="#/premium"] .ms-soon::before{ content:""; display:inline-block; width:10px; height:11px; margin-right:5px; vertical-align:-1px;
  background:#C9A24A; -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7.5a5 5 0 0 1 10 0V10h1.5A1.5 1.5 0 0 1 20 11.5v9A1.5 1.5 0 0 1 18.5 22h-13A1.5 1.5 0 0 1 4 20.5v-9A1.5 1.5 0 0 1 5.5 10zm2 0h6V7.5a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7.5a5 5 0 0 1 10 0V10h1.5A1.5 1.5 0 0 1 20 11.5v9A1.5 1.5 0 0 1 18.5 22h-13A1.5 1.5 0 0 1 4 20.5v-9A1.5 1.5 0 0 1 5.5 10zm2 0h6V7.5a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center/contain no-repeat; }

@media (prefers-reduced-motion:reduce){ html[data-ms-section="pro"] *{ transition:none !important; } }
