/* Dashboard ejecutivo — adaptado de docs/Maqueta_Dashboard_Talentus.html,
   escopado bajo .exec-dashboard para no afectar el resto del panel. */
.exec-dashboard {
  --navy: #1B2D55; --navy2: #2A4A8A; --gold: #F5A800;
  --bg: #F0F4FA; --card: #fff; --line: #E2E8F4; --ink: #1e293b; --ink2: #64748B; --ink3: #94a3b8;
  --ok: #16A34A; --bad: #DC2626;
  --s1: #3B72D9; --s2: #E8920C; --s3: #12A59E; --s4: #8B5CF6; --s5: #E11D74;
  --shadow: 0 1px 2px rgba(27,45,85,.06), 0 8px 24px rgba(27,45,85,.07);
  --shadow-h: 0 2px 4px rgba(27,45,85,.08), 0 16px 36px rgba(27,45,85,.14);
  --heat0: #EAF0FB; --heat1: #B9CCF0; --heat2: #7DA1E3; --heat3: #3B72D9; --heat4: #1B2D55;
  --grid: #E8EDF6; --hi3: #fff; --hi4: #fff;
  font-size: 14px; color: var(--ink);
}
[data-mud-color-scheme="dark"] .exec-dashboard {
  --bg: #0B1327; --card: #121D38; --line: #22305A; --ink: #E6ECFA; --ink2: #9AA9C9; --ink3: #6B7BA3;
  --s1: #5B8CF0; --s2: #F5B31A; --s3: #2DD4BF; --s4: #A78BFA; --s5: #F472B6;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-h: 0 2px 4px rgba(0,0,0,.5), 0 16px 36px rgba(0,0,0,.5);
  --heat0: #16244A; --heat1: #223D7A; --heat2: #2F5BB5; --heat3: #5B8CF0; --heat4: #BCD0FA; --grid: #1d2a4d; --hi4: #0B1327;
}
.exec-dashboard { background: var(--bg); padding: 16px; border-radius: 12px; }
.exec-dashboard .hero { border-radius: 20px; padding: 22px 26px; background: linear-gradient(135deg, #1B2D55 0%, #2A4A8A 100%); color: #fff; border-top: 3px solid var(--gold); position: relative; overflow: hidden; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
/* pointer-events: none — ver mismo bug/fix en tal-admin.css
   (docs/VALIDACION-EXPORTS.md, 2026-11-05): sin esto, este óvalo decorativo
   se come los clics de los botones Excel/PDF/Metas del hero. */
.exec-dashboard .hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(245,168,0,.35), transparent 65%); animation: exec-float 7s ease-in-out infinite; pointer-events: none; }
@keyframes exec-float { 50% { transform: translate(-20px,16px); } }
.exec-dashboard .hero h1 { font-size: 24px; letter-spacing: -.01em; margin: 0; }
.exec-dashboard .hero p { color: #c6d3f2; margin-top: 4px; font-size: 13px; }
.exec-dashboard .chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 11px; font-size: 12px; background: rgba(255,255,255,.14); color: #fff; }
.exec-dashboard .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: exec-pulse 2s infinite; }
@keyframes exec-pulse { 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
/* Mismo aviso de frescura que tal-admin.css (ahora rojo, umbral de 2h — ver
   DataFreshnessThresholdHours, "Ingesta real por API" 2026-10-31). */
.exec-dashboard .chip.stale { background: rgba(220,38,38,.22); border: 1px solid rgba(220,38,38,.6); }
.exec-dashboard .chip.stale .dot { background: #DC2626; animation: none; box-shadow: none; }
/* Botones Excel/PDF/Metas del encabezado — blanco sólido sobre el degradado
   navy del hero para contraste AA garantizado (un outline semitransparente
   se veía apagado/poco legible). */
.exec-dashboard .hero .hero-action-btn.mud-button-root {
  background: #fff !important; color: var(--navy) !important; font-weight: 700;
  border: 1px solid rgba(255,255,255,.6);
}
.exec-dashboard .hero .hero-action-btn.mud-button-root:hover { background: #eef2fb !important; }
.exec-dashboard .hero .hero-action-btn .mud-icon-root { color: var(--navy) !important; }
/* Selectores de filtro con el mismo lenguaje visual de las tarjetas
   (borde + radio), no la línea inferior por defecto de MudBlazor. */
.exec-dashboard .filters .exec-select .mud-input-outlined {
  border-radius: 12px; background: var(--card);
}
.exec-dashboard .filters .exec-select .mud-input-outlined-border {
  border-color: var(--line) !important; border-radius: 12px;
}
.exec-dashboard .filters .exec-select:hover .mud-input-outlined-border { border-color: var(--navy2) !important; }
.exec-dashboard .filters { display: flex; gap: 10px; align-items: center; margin: 18px 0; flex-wrap: wrap; }
.exec-dashboard .seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.exec-dashboard .seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; cursor: pointer; color: var(--ink2); font: inherit; transition: all .2s; }
.exec-dashboard .seg button.on { background: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(27,45,85,.3); }
.exec-dashboard .egrid { display: grid; gap: 16px; }
.exec-dashboard .kpis { grid-template-columns: repeat(6, minmax(0,1fr)); }
.exec-dashboard .ecard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; animation: exec-up .6s both; }
.exec-dashboard .ecard:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
@keyframes exec-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.exec-dashboard .kpi .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; margin-bottom: 10px; }
.exec-dashboard .kpi .v { font-size: 27px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.exec-dashboard .kpi .l { color: var(--ink2); font-size: 12px; margin-top: 2px; }
.exec-dashboard .delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 8px; margin-top: 8px; }
.exec-dashboard .delta.up { color: #0f7a37; background: rgba(22,163,74,.12); }
.exec-dashboard .delta.down { color: #b42318; background: rgba(220,38,38,.12); }
.exec-dashboard .delta.neutral { color: var(--ink2); background: var(--grid); }
.exec-dashboard .spark { height: 30px; width: 100%; margin-top: 8px; }
.exec-dashboard .spark path { fill: none; stroke-width: 2; stroke-linecap: round; }
.exec-dashboard .row2 { grid-template-columns: 2fr 1fr; margin-top: 16px; }
.exec-dashboard .row3 { grid-template-columns: 1fr 1fr 1fr; margin-top: 16px; }
.exec-dashboard .row4 { grid-template-columns: 1.2fr 1fr; margin-top: 16px; }
.exec-dashboard h3 { font-size: 14.5px; display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.exec-dashboard h3 small { font-weight: 400; color: var(--ink2); font-size: 12px; }
.exec-dashboard .legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink2); margin-bottom: 6px; }
.exec-dashboard .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.exec-dashboard svg text { font-family: inherit; fill: var(--ink2); font-size: 11px; }
.exec-dashboard .bar { display: grid; grid-template-columns: 130px 1fr 46px; align-items: center; gap: 10px; margin: 9px 0; font-size: 12.5px; }
.exec-dashboard .bar .t { height: 12px; border-radius: 7px; background: var(--grid); overflow: hidden; }
.exec-dashboard .bar .t i { display: block; height: 100%; border-radius: 7px; width: 0; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.exec-dashboard .bar b { text-align: right; font-variant-numeric: tabular-nums; }
.exec-dashboard .ring { display: grid; place-items: center; position: relative; }
.exec-dashboard .ring svg { transform: rotate(-90deg); }
.exec-dashboard .ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.exec-dashboard .ring .c { position: absolute; text-align: center; }
.exec-dashboard .ring .c b { font-size: 22px; display: block; letter-spacing: -.02em; }
.exec-dashboard .heat { display: grid; gap: 4px; font-size: 11.5px; }
.exec-dashboard .heat div { padding: 9px 4px; text-align: center; border-radius: 8px; transition: transform .15s; cursor: default; }
.exec-dashboard .heat .h { color: var(--ink2); padding: 4px; font-size: 10.5px; font-weight: 600; }
.exec-dashboard .heat .r { text-align: left; color: var(--ink); padding-left: 2px; font-weight: 600; }
.exec-dashboard .heat div.cell:hover { transform: scale(1.12); position: relative; z-index: 1; box-shadow: var(--shadow-h); }
.exec-dashboard .att { list-style: none; padding: 0; margin: 0; }
.exec-dashboard .att li { display: flex; gap: 12px; align-items: center; padding: 11px 10px; border-radius: 12px; cursor: pointer; transition: background .2s, transform .2s; text-decoration: none; color: inherit; }
.exec-dashboard .att li:hover { background: var(--bg); transform: translateX(3px); }
.exec-dashboard .att .b { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; }
.exec-dashboard .att small { display: block; color: var(--ink2); }
.exec-dashboard .att .go { margin-left: auto; color: var(--ink3); }
.exec-dashboard .ai { margin-top: 16px; border-radius: 18px; padding: 18px 20px; background: linear-gradient(135deg, rgba(139,92,246,.10), rgba(59,114,217,.10)); border: 1px solid var(--line); box-shadow: var(--shadow); }
.exec-dashboard .ai .go-btn { border: 0; cursor: pointer; color: #fff; font: 600 13px inherit; padding: 10px 16px; border-radius: 12px; background: linear-gradient(135deg,#8B5CF6,#3B72D9); box-shadow: 0 6px 18px rgba(99,102,241,.35); transition: transform .15s, box-shadow .2s; }
.exec-dashboard .ai .go-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(99,102,241,.45); }
.exec-dashboard .ai .go-btn:active { transform: scale(.97); }
.exec-dashboard .ai .out { margin-top: 14px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.exec-dashboard .ai .out p { line-height: 1.55; margin: 0 0 8px; }
.exec-dashboard .ai .out ol { padding-left: 18px; line-height: 1.6; margin: 0; }
.exec-dashboard .ai .out li { margin-bottom: 6px; }
.exec-dashboard .ai .meta { font-size: 11.5px; color: var(--ink2); margin-top: 8px; }
.exec-dashboard .empty-note { color: var(--ink2); font-size: 12.5px; font-style: italic; padding: 8px 0; }
@media (max-width: 1200px) { .exec-dashboard .kpis { grid-template-columns: repeat(3,1fr); } .exec-dashboard .row2, .exec-dashboard .row3, .exec-dashboard .row4, .exec-dashboard .ai .out { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .exec-dashboard .kpis { grid-template-columns: repeat(2,1fr); } }
@media (prefers-reduced-motion: reduce) { .exec-dashboard * { animation: none !important; transition: none !important; } }
