/* ===================================================
   IBCO Diagnostic App — Styles
   AIxentic · Professional Industrial Theme
   =================================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette */
  --bg: #0b0f1a;
  --bg-card: #131829;
  --bg-card-alt: #1a2035;
  --bg-input: #1e2540;
  --border: #2a3154;
  --border-hover: #3d4e80;
  --text: #e0e4ef;
  --text-dim: #8892b0;
  --text-muted: #5a6580;
  --accent: #4f8cff;
  --accent-glow: rgba(79, 140, 255, .18);
  --accent-hover: #6aa0ff;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --critical: #ef4444;

  /* Dimension colors */
  --dim-estructura: #4f8cff;
  --dim-flujo: #a78bfa;
  --dim-entorno: #34d399;
  --dim-resiliencia: #fbbf24;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;

  /* Transitions */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Background layers — real DOM elements for reliability */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-image {
  background-image: url("./background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.18;
  z-index: 2;
}

.bg-overlay {
  background: radial-gradient(ellipse at top, rgba(10, 16, 26, 0.55), rgba(7, 10, 16, 0.85));
  z-index: 1;
}

/* --- Layout --- */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 3;
}

/* --- Header --- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 26, .85);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 26px;
  width: auto;
  display: block;
}

.header-tag {
  font-size: .78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 14px;
  font-size: .78rem;
  border-radius: var(--radius-sm);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Footer --- */
.app-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
}

/* --- Screens --- */
.screen {
  display: none;
  animation: fadeUp .5s var(--ease);
}

.screen.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Form Hero --- */
.form-hero {
  text-align: center;
  padding: 48px 0 32px;
}

.form-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: .95rem;
  line-height: 1.7;
}

/* --- Question Card --- */
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  margin-bottom: 20px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.question-card:hover {
  border-color: var(--border-hover);
}

.question-card.answered {
  border-color: rgba(79, 140, 255, .35);
  box-shadow: 0 0 0 1px rgba(79, 140, 255, .12);
}

.question-card.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(248, 113, 113, .15);
}

.question-card.next-focus {
  outline: 1px solid rgba(79, 140, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.12);
  transition: box-shadow .35s ease;
}

/* --- Progress Bar --- */
.progress-wrap {
  margin: 18px 0 22px;
}

.progress-label {
  font-size: 12px;
  color: #8ea0c2;
  margin-bottom: 8px;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4f8cff, #6aa5ff);
  border-radius: 999px;
  transition: width .25s ease;
}

.question-card.next-focus {
  outline: 1px solid rgba(79, 140, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.12);
  transition: box-shadow .35s ease;
}

/* Print-only sections — hidden on web */
.print-only {
  display: none;
}

.question-dim {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.question-dim[data-dim="estructura_operativa"] {
  background: rgba(79, 140, 255, .14);
  color: var(--dim-estructura);
}

.question-dim[data-dim="flujo_ineficiencia"] {
  background: rgba(167, 139, 250, .14);
  color: var(--dim-flujo);
}

.question-dim[data-dim="entorno_competitivo"] {
  background: rgba(52, 211, 153, .14);
  color: var(--dim-entorno);
}

.question-dim[data-dim="resiliencia"] {
  background: rgba(251, 191, 36, .14);
  color: var(--dim-resiliencia);
}

.question-dim[data-dim="sector"] {
  background: rgba(255, 255, 255, .08);
  color: var(--text-dim);
}

.question-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 6px;
}

.question-micro {
  font-size: .84rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-style: italic;
}

/* --- Radio Options --- */
.options-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s var(--ease);
  font-size: .92rem;
}

.option-label:hover {
  background: #232a48;
  border-color: var(--border-hover);
}

.option-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: all .2s var(--ease);
  position: relative;
}

.option-label input[type="radio"]:checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--bg-input);
}

.option-label:has(input:checked) {
  background: rgba(79, 140, 255, .08);
  border-color: rgba(79, 140, 255, .3);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6c5ce7);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79, 140, 255, .25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(79, 140, 255, .35);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius);
}

.form-footer {
  text-align: center;
  padding: 24px 0 60px;
}

.form-error {
  color: var(--danger);
  font-size: .88rem;
  margin-bottom: 14px;
}

/* --- Results Screen --- */
.results-header {
  text-align: center;
  padding: 48px 0 24px;
}

.results-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(79, 140, 255, .12);
  color: var(--accent);
  margin-bottom: 12px;
}

.results-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* --- IBCO Score Card --- */
.ibco-card {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.ibco-score-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 1.2s var(--ease), stroke .4s;
}

.ibco-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1;
}

.ibco-value span {
  font-size: 2.2rem;
  font-weight: 800;
}

.ibco-value small {
  font-size: .9rem;
  color: var(--text-dim);
}

.ibco-meta {
  flex: 1;
}

.ibco-level {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 14px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.ibco-level.band-0 {
  background: rgba(52, 211, 153, .15);
  color: var(--success);
}

.ibco-level.band-1 {
  background: rgba(251, 191, 36, .15);
  color: var(--warning);
}

.ibco-level.band-2 {
  background: rgba(248, 113, 113, .15);
  color: var(--danger);
}

.ibco-level.band-3 {
  background: rgba(239, 68, 68, .18);
  color: var(--critical);
}

.ibco-explain {
  font-size: .9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.ibco-sub {
  font-size: 13px;
  color: #8ea0c2;
  margin-top: 6px;
  max-width: 620px;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.card-economic .economic-range {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--success);
  margin-bottom: 6px;
}

.card-economic .economic-note {
  font-size: .84rem;
  color: var(--text-dim);
}

/* Drivers */
.drivers-list {
  padding-left: 0;
  list-style: none;
  counter-reset: driver;
}

.drivers-list li {
  counter-increment: driver;
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: .93rem;
  line-height: 1.5;
}

.drivers-list li:last-child {
  border-bottom: none;
}

.drivers-list li::before {
  content: counter(driver);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(79, 140, 255, .12);
  color: var(--accent);
  font-weight: 700;
  font-size: .82rem;
  flex-shrink: 0;
}

.card-empathic {
  border-left: 3px solid var(--accent);
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-alt));
}

.card-empathic p {
  font-size: .93rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* --- CTA --- */
.cta-block {
  text-align: center;
  padding: 20px 0 60px;
}

.cta-sub {
  margin-top: 12px;
  font-size: .84rem;
  color: var(--text-muted);
}

/* --- Extended Gate --- */
.extended-gate {
  padding: 48px 0 60px;
}

.gate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.gate-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.gate-card>p {
  color: var(--text-dim);
  font-size: .92rem;
  margin-bottom: 24px;
}

.field-group {
  margin-bottom: 18px;
}

.field-group label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.field-group label .req {
  color: var(--danger);
}

.field-group label .rec {
  color: var(--text-muted);
  font-weight: 400;
  font-size: .82rem;
}

.field-group input[type="email"],
.field-group input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font);
  font-size: .92rem;
  transition: border-color .2s var(--ease);
}

.field-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.field-sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.field-note {
  font-size: .85rem;
  color: var(--text-dim);
  margin-bottom: 18px;
}

/* Radio row for R1/R2 */
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-row .option-label {
  flex: 1;
  min-width: 110px;
  justify-content: center;
  text-align: center;
}

/* --- Extended Report --- */
.extended-report {
  padding-bottom: 60px;
  animation: fadeUp .5s var(--ease);
}

/* ── Executive cover ── */
.report-cover {
  padding: 28px 28px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cover-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cover-logo {
  height: 40px;
  width: auto;
  display: block;
}

.cover-meta {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #9aa8c7;
}

.cover-title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  margin: 6px 0 10px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cover-sub {
  text-align: center;
  font-size: 14px;
  color: #b8c3dd;
  margin-bottom: 6px;
}

.cover-conf {
  text-align: center;
  font-size: 12px;
  color: #8ea0c2;
  margin-bottom: 18px;
}

.cover-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 10px 0 16px;
}

.cover-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 10px;
}

.kpi {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.kpi-label {
  font-size: 11px;
  color: #9aa8c7;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 18px;
  font-weight: 700;
  color: #e8eefc;
}

.cover-note {
  font-size: 12px;
  color: #9aa8c7;
  text-align: center;
  margin-top: 10px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  font-style: italic;
}

.cover-footer {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: #9aa8c7;
  opacity: .95;
}

@media (max-width: 720px) {
  .cover-kpis {
    grid-template-columns: 1fr;
  }

  .cover-top {
    justify-content: center;
    flex-direction: column;
  }
}

/* Report sections */
.report-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-muted);
  text-align: right;
}

/* Radar */
.radar-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

#radarCanvas {
  max-width: 100%;
  height: auto;
}

.dimension-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 8px;
}

.dim-leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .84rem;
}

.dim-leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Dimension blocks */
.dim-block {
  margin-bottom: 20px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-alt);
}

.dim-block:last-child {
  margin-bottom: 0;
}

.dim-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.dim-block-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dim-block-title {
  font-weight: 700;
  font-size: .95rem;
}

.dim-block-score {
  margin-left: auto;
  font-weight: 700;
  font-size: .92rem;
}

.dim-block p {
  font-size: .9rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* Optimization phases */
.opt-phases {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.opt-phase {
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-alt);
  border-left: 3px solid var(--accent);
}

.opt-phase:nth-child(2) {
  border-left-color: #a78bfa;
}

.opt-phase:nth-child(3) {
  border-left-color: var(--success);
}

.opt-phase h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.opt-phase p {
  font-size: .88rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Report general text */
.report-text {
  font-size: .9rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 12px;
}

.report-text:last-child {
  margin-bottom: 0;
}

.report-final {
  text-align: center;
}

.report-final p {
  font-size: .95rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.final-contact {
  margin-top: 16px;
  font-size: 1.1rem;
}

.final-contact strong {
  color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .form-hero h1 {
    font-size: 1.5rem;
  }

  .ibco-card {
    flex-direction: column;
    text-align: center;
  }

  .question-card {
    padding: 20px;
  }

  .radio-row .option-label {
    min-width: 80px;
    font-size: .82rem;
    padding: 10px 8px;
  }

  .cover-stats {
    flex-direction: column;
    align-items: center;
  }

  .header-tag {
    display: none;
  }
}

/* --- Print (PDF export) --- */
@media print {
  @page {
    margin: 14mm;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .bg-layer {
    display: none !important;
  }

  body * {
    visibility: hidden !important;
  }

  #extended-report,
  #extended-report * {
    visibility: visible !important;
  }

  #extended-report {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
  }

  /* Hide UI controls */
  button,
  .btn,
  input,
  .progress-wrap,
  .app-header,
  .app-footer,
  #screen-form,
  #screen-results,
  #extended-gate,
  .cta-block {
    display: none !important;
  }

  /* Show print-only sections */
  .print-only {
    display: block !important;
  }

  /* Clean look for blocks */
  .report-cover,
  .report-section,
  .card {
    box-shadow: none !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    color: #222 !important;
  }

  /* KEY: never split blocks across pages */
  .report-cover,
  .report-section,
  .dim-block,
  .opt-phase,
  .card,
  .cover-stats {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Headings stay with their content */
  h1,
  h2,
  h3,
  h4,
  .section-title {
    break-after: avoid !important;
    page-break-after: avoid !important;
  }

  .report-badge {
    -webkit-text-fill-color: #4f8cff !important;
  }

  .section-title {
    color: #111 !important;
    border-bottom-color: #ccc !important;
  }

  .report-text,
  .dim-block p,
  .opt-phase p,
  .card-empathic p,
  .section-footer,
  .cover-note {
    color: #444 !important;
  }

  .dim-block,
  .opt-phase {
    background: #f5f5f5 !important;
  }

  .dim-block-title,
  .dim-block-score {
    color: #222 !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .extended-report {
    padding-bottom: 0;
  }

  .radar-wrapper {
    max-width: 380px;
  }

  .radar-wrapper canvas {
    max-width: 380px;
  }

  .final-contact strong {
    color: #4f8cff !important;
  }

  /* Executive cover in print */
  .report-cover {
    background: #fff !important;
    border: 1px solid #e6e6e6 !important;
    border-radius: 12px !important;
    padding: 18px 18px 14px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    margin-top: 18mm !important;
    margin-bottom: 12mm !important;
  }

  .cover-top {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .cover-title {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    background: none !important;
    font-size: 22px !important;
    margin-top: 10px !important;
    margin-bottom: 6px !important;
  }

  .cover-sub,
  .cover-conf,
  .cover-meta,
  .cover-note,
  .cover-footer {
    color: #333 !important;
  }

  .cover-divider {
    background: #e0e0e0 !important;
  }

  .kpi {
    background: #fff !important;
    border: 1px solid #e6e6e6 !important;
    box-shadow: none !important;
  }

  .kpi-value {
    color: #111 !important;
  }

  .kpi-label {
    color: #666 !important;
  }

  .cover-logo {
    height: 54px !important;
    background: #1a2540 !important;
    padding: 10px 22px !important;
    border-radius: 10px !important;
    display: inline-block !important;
  }

  .cover-meta {
    font-size: 10px !important;
    letter-spacing: .18em !important;
  }

  #extended-report {
    position: static !important;
    width: auto !important;
    margin: 0 !important;
  }
}

/* ===============================
   INTRO SCREEN IBCO
================================ */

.intro-hero {
  position: relative;
  min-height: calc(100vh - 60px);
  background: url('./Imagen Inicio.png') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.intro-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 25, 0.78);
}

.intro-content {
  position: relative;
  max-width: 860px;
  padding: 42px 26px;
  color: #ffffff;
}

.intro-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(79, 140, 255, .14);
  color: var(--accent);
  margin-bottom: 14px;
}

.intro-content h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.intro-lead {
  margin: 0 auto 18px;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.7;
  opacity: .92;
}

.intro-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 18px 0 26px;
}

.intro-point {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.92);
}

.intro-foot {
  margin-top: 14px;
  font-size: .82rem;
  color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 640px) {
  .intro-content h1 {
    font-size: 30px;
  }
}

/* FIX: Intro por encima de bg-layers */
#screen-intro {
  position: relative;
  z-index: 10;
}

#screen-intro .intro-hero {
  position: relative;
  z-index: 11;
  /* nombre con espacio: mejor en formato URL */
  background: url("./imagen_inicio.png") center center / cover no-repeat;
}

#screen-intro .intro-content {
  position: relative;
  z-index: 12;
}

#screen-intro .intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 11;
  background: rgba(10, 15, 25, 0.70);
}