/* ==========================================================================
 * 06-informe.css · parte 6/11 — Informe: lectura, resaltes, valoración y páginas inicio/empresa
 * Orden de carga obligatorio (reproduce la cascada del styles.css original).
 * No reordenar los <link> ni mover reglas entre partes sin revisar la cascada.
 * ========================================================================== */

/* ── Informe: superficie de lectura tipo documento ────────────── */
.analysis-section:has(#result-preview:not([hidden])) .analysis-title,
.analysis-layout:has(#result-preview:not([hidden])) .upload-panel > .panel-heading {
  display: none;
}
.analysis-layout:has(#result-preview:not([hidden])) .upload-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.result-preview {
  margin-top: 0;
  padding: 30px 34px 28px;
  border: 1px solid var(--line-soft2);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  scroll-margin-top: 82px;
}
.result-heading { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--line-soft); }
.result-heading h1, .result-heading h3 { font-size: 21px; letter-spacing: -.015em; }
.report-block { margin-top: 26px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.report-block:first-child { margin-top: 0; }
.report-block h5 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding-bottom: 9px; border-bottom: 2px solid var(--accent); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.report-block .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.report-block .table-wrap table { min-width: 0; width: 100%; border-collapse: collapse; }
.report-block .table-wrap th { padding: 10px 12px; font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .04em; background: #1f2937; color: #fff; border-right: 1px solid rgba(255, 255, 255, .08); white-space: nowrap; }
.report-block .table-wrap td { padding: 9px 12px; font-size: 12px; color: var(--ink); border-top: 1px solid var(--line-soft); border-right: 1px solid var(--surface-2); }
.report-block .table-wrap tbody tr:nth-child(odd) { background: var(--surface-2); }
.report-block .table-wrap td:first-child { color: var(--ink); font-weight: 700; }
.report-extras { margin: 14px 0 0; font-size: 12px; font-weight: 700; color: var(--ink); }
.report-extras.comps-kpi { display: inline-block; margin-top: 12px; padding: 7px 12px; border: 1px solid #ddd6fe; border-left: 3px solid #7c3aed; border-radius: 6px; background: #f5f3ff; color: #5b21b6; }
.report-extras.comps-kpi + .report-notes { margin-top: 6px; }
.report-notes { max-width: 1080px; margin: 10px 0 0; padding-left: 18px; color: var(--muted-strong); font-size: 12px; line-height: 1.6; }
.report-notes li { margin: 3px 0; }
.report-hint { margin: 18px 0 0; color: var(--muted); font-size: 11px; }
.annual-deepdive-card .shares-chart { max-width: 960px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.analysis-downloads-wrap { position: relative; display: inline-flex; }
.analysis-downloads-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.analysis-downloads-toggle svg { flex-shrink: 0; }
.analysis-downloads-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; min-width: 155px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 28px rgba(15, 23, 42, .18); display: flex; flex-direction: column; gap: 3px; }
.analysis-downloads-menu[hidden] { display: none; }
.download-menu-item { display: flex; align-items: center; width: 100%; padding: 8px 12px; border: none; border-radius: 6px; background: transparent; color: var(--ink); font-size: 12px; font-weight: 600; font-family: inherit; text-align: left; cursor: pointer; transition: background .15s ease, color .15s ease; box-sizing: border-box; white-space: nowrap; }
.download-menu-item:hover { background: var(--accent-faint); color: var(--accent-dark); }
.analysis-version-box { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.analysis-version-badge { display: inline-flex; height: 34px; align-items: center; padding: 0 10px; border: 1px solid var(--accent-mid); border-radius: 8px; background: var(--accent-faint); color: var(--accent-dark); font-size: 11px; font-weight: 700; white-space: nowrap; }
.analysis-versions-wrap { position: relative; }
.analysis-versions-toggle { white-space: nowrap; }
.analysis-versions-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 285px; max-height: 320px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 28px rgba(15, 23, 42, .18); }
.analysis-versions-menu[hidden] { display: none; }
.analysis-version-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px; border-radius: 7px; }
.analysis-version-item + .analysis-version-item { border-top: 1px solid var(--line-soft2); }
.analysis-version-item.active { background: var(--accent-faint); }
.analysis-version-item-data { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.analysis-version-item-data strong { font-size: 11.5px; color: var(--ink); }
.analysis-version-item-data span { font-size: 10px; color: var(--muted); }
.analysis-version-item-actions { display: flex; flex-shrink: 0; gap: 4px; }
.analysis-version-item-actions .row-action { height: 23px; min-width: 26px; padding: 0 7px; }
.analysis-version-item-actions .row-action:disabled { opacity: .45; cursor: default; }
.analysis-versions-empty { padding: 10px; font-size: 11px; color: var(--muted); }
.analysis-version-upgrade { white-space: nowrap; }
.analysis-version-tag { display: inline-flex; align-items: center; height: 17px; margin-left: 5px; padding: 0 5px; border: 1px solid var(--accent-mid); border-radius: 4px; background: var(--accent-faint); color: var(--accent-dark); font-size: 9px; font-weight: 700; vertical-align: 1px; }

/* ── Indicadores y controles de análisis revisado por humano ── */
.analysis-reviewed-badge {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: help;
  user-select: none;
}
.analysis-reviewed-badge svg {
  flex-shrink: 0;
  stroke: #059669;
}
[data-mode="dark"] .analysis-reviewed-badge {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}
[data-mode="dark"] .analysis-reviewed-badge svg {
  stroke: #34d399;
}

.analysis-reviewed-mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 9.5px;
  font-weight: 700;
  vertical-align: 1px;
  cursor: help;
  margin-left: 4px;
  user-select: none;
}
.analysis-reviewed-mini-badge svg {
  stroke: #059669;
}
[data-mode="dark"] .analysis-reviewed-mini-badge {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}
[data-mode="dark"] .analysis-reviewed-mini-badge svg {
  stroke: #34d399;
}

.analysis-reviewed-icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  cursor: help;
  margin-left: 6px;
  vertical-align: middle;
}
.analysis-reviewed-icon-inline svg {
  stroke: currentColor;
}
[data-mode="dark"] .analysis-reviewed-icon-inline {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.analysis-reviewed-admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px dashed var(--line-mid);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-strong);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.analysis-reviewed-admin-toggle:hover {
  border-color: #059669;
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
}
[data-mode="dark"] .analysis-reviewed-admin-toggle:hover {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}
.analysis-reviewed-admin-toggle input[type="checkbox"] {
  accent-color: #059669;
  cursor: pointer;
  width: 14px;
  height: 14px;
}
.analysis-reviewed-admin-toggle[hidden] {
  display: none !important;
}

.filing-version-reviewed-notice {
  margin: 6px 0;
  padding: 7px 10px;
  font-size: 10.5px;
  line-height: 1.35;
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 6px;
}
[data-mode="dark"] .filing-version-reviewed-notice {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
}

/* ── Estilos de Informe y Reglas de Análisis ── */
.report-block .table-wrap td.cell-bold {
  font-weight: 700 !important;
  color: var(--ink) !important;
}
.report-block .table-wrap td.pct-positive {
  color: var(--green-text) !important;
  font-weight: 600;
}
.report-block .table-wrap td.pct-negative {
  color: var(--red-text) !important;
  font-weight: 600;
}

/* Paleta cromática coordinada para cada ajuste y su nota (*1, *2, *3...) */
.highlight-c1, .highlight-adjust { background-color: #fef08a !important; color: #854d0e !important; }
.highlight-c2 { background-color: var(--accent-mid) !important; color: var(--accent-text) !important; }
.highlight-c3 { background-color: var(--green-border) !important; color: var(--green-text-2) !important; }
.highlight-c4 { background-color: #e9d5ff !important; color: #7e22ce !important; }
.highlight-c5 { background-color: #bae6fd !important; color: #0369a1 !important; }
.highlight-c6 { background-color: #fbcfe8 !important; color: #be185d !important; }

.highlight-adjust, [class*="highlight-c"] {
  font-weight: 700 !important;
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-block;
}
.highlight-note {
  font-weight: 700 !important;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 4px;
  display: inline-block;
}

/* El cribador conserva las ocho columnas visibles en pantallas estrechas. */
.screener-block table { min-width: fit-content; }
.result-actions .primary-button { width: auto; }

/* ── Barra de Valoración y Reporte de Errores de Análisis ────── */
.analysis-feedback-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.analysis-rating-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feedback-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted-strong);
}

.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.star-btn {
  background: transparent;
  border: 0;
  padding: 0 2px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--line-mid);
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
}

.star-btn:hover {
  transform: scale(1.18);
}

.star-btn.active,
.star-btn.hovered {
  color: #f59e0b;
}

.rating-summary-text {
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
  font-weight: 500;
}

.report-error-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--line-soft2);
  border-radius: 5px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.report-error-trigger:hover {
  background: var(--red-bg);
  border-color: #fca5a5;
  color: var(--red-text);
}

.report-error-trigger svg {
  flex-shrink: 0;
}

/* Modal de Reporte de Error */
.error-report-modal-backdrop {
  z-index: 9999;
}

.error-report-modal {
  width: min(480px, 95vw);
}

.error-report-modal .modal-title {
  display: flex;
  align-items: center;
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--ink);
}

.error-report-modal .modal-subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.error-report-modal select:focus,
.error-report-modal textarea:focus {
  outline: 0;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18) !important;
}

/* ── Página Inicio (sin menú lateral) ───────────────────────── */
.home-main { padding-top: var(--topbar-height); }

.home-topbar { justify-content: space-between; }
.home-top-links { display: flex; align-items: center; gap: 4px; padding-left: 16px; }
.home-top-link { display: inline-flex; height: 34px; align-items: center; gap: 7px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted-2); font-size: 12.5px; font-weight: 600; }
.home-top-link:hover { background: #334155; color: #fff; }
.home-top-link.active { background: var(--accent-soft); color: var(--accent-dark); }
.home-top-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }

.search-kbd { display: grid; height: 22px; min-width: 52px; place-items: center; margin-left: auto; margin-right: 11px; padding: 0 7px; border: 1px solid #c9c9c9; border-radius: 4px; background: var(--surface-2); color: #7a7a7a; font-size: 10px; font-weight: 600; }

.home-hero { display: flex; flex-direction: column; align-items: center; padding: 54px 24px 12px; }
.home-brand-row { display: flex; align-items: center; gap: 11px; }
.home-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.home-brand .brand-mark { width: 27px; height: 27px; }
.home-brand strong { font-size: 27px; letter-spacing: -.02em; }
.beta-badge { padding: 4px 9px; border: 1px solid var(--accent-light); border-radius: 20px; background: var(--accent-faint); color: var(--accent-dark); font-size: 10px; font-weight: 700; }
.home-search { width: min(660px, 92%); height: 50px; margin-top: 26px; border: 1px solid var(--line-mid); border-radius: 9px; box-shadow: 0 2px 10px rgba(0, 0, 0, .05); }

.home-menu-section { display: grid; width: min(880px, 92%); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 38px auto 10px; }
.home-menu-card { display: flex; align-items: center; gap: 13px; padding: 19px 17px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 2px 10px rgba(0, 0, 0, .04); color: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.home-menu-card:hover { border-color: var(--accent-light); box-shadow: 0 6px 18px rgba(67, 56, 202, .1); }
.home-menu-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-menu-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-dark); }
.home-menu-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.home-menu-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.home-menu-copy strong { color: var(--ink); font-size: 14.5px; }
.home-menu-copy small { color: var(--soft-muted); font-size: 11px; line-height: 1.45; }
.home-menu-arrow { color: var(--accent-light); font-size: 16px; font-weight: 700; }

.home-analisis-section { padding-top: 14px; }

.home-grid-section { padding: 38px 28px 6px; }
.home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-card { padding: 15px 15px 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.home-card:hover { border-color: var(--accent-light); box-shadow: 0 4px 14px rgba(67, 56, 202, .08); }
.home-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-card-head { display: flex; align-items: center; gap: 11px; }
.home-card-logo { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 6px; color: #fff; font-size: 14px; font-weight: 700; }
.home-card-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 1px; }
.home-card-copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.home-card-copy small { color: var(--soft-muted); font-size: 10.5px; white-space: nowrap; }
.home-card-fav { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #b8b8b8; }
.home-card-fav:hover { background: var(--red-bg); color: var(--red); }
.home-card-fav svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.home-card-fav.active { color: var(--red); }
.home-card-fav.active svg { fill: currentColor; }
.home-card-note { margin-top: 12px; color: var(--soft-muted); font-size: 11px; }
.home-card-quote { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding: 11px 12px; border-radius: 6px; background: var(--surface-soft); }
.home-card-numbers { display: flex; min-width: 0; flex-direction: column; }
.home-card-numbers strong { font-family: Georgia, serif; font-size: 18px; font-weight: 400; white-space: nowrap; }
.quote-arrow { display: inline-block; font-size: 9px; margin-right: 3px; vertical-align: 1px; }
.home-card-numbers small { font-size: 11px; font-weight: 700; white-space: nowrap; }
.home-card-updated { margin-top: 3px; color: #9b9b9b !important; font-size: 9.5px !important; font-weight: 400 !important; }
.home-card-quote .sparkline { width: 108px; height: 46px; margin: 0; }

/* ── Página Empresa ─────────────────────────────────────────── */
.trial-banner { display: flex; align-items: center; gap: 9px; padding: 10px 28px; border-bottom: 1px solid var(--accent-mid); background: var(--accent-faint); color: var(--accent-ink); font-size: 12px; }
.trial-banner svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: var(--accent-dark); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.trial-banner strong { margin-right: 3px; color: var(--accent-ink); }
.company-wrap { padding: 22px 28px 34px; }
.company-loading { margin: 16px 0; color: var(--muted); font-size: 12.5px; }
.company-section { padding-top: 14px; }
.company-wrap .company-section.home-grid-section,
.company-wrap .company-section.portfolio-page-section,
.company-wrap .company-section.home-analisis-section,
.company-wrap .company-section.novedades-page-section,
.company-wrap .company-section.guias-page-section,
.company-wrap .company-section.legal-page-section {
  padding: 0;
  border-top: none;
  background: transparent;
}
.company-wrap .company-section.portfolio-page-section > #portfolio-section {
  max-width: 100%;
}
.company-nav-head {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.company-nav-head:hover {
  background-color: #e5e5e5;
}

.company-head-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 340px); gap: 12px; }
.company-head { display: flex; align-items: center; gap: 14px; padding: 15px 17px; }
.company-logo { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent-dark); font-size: 19px; font-weight: 700; }
.company-logo img, .company-nav-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.company-head-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 6px; }
.company-title-row { display: flex; min-width: 0; align-items: baseline; gap: 10px; }
.company-title-row h1, .company-title-row h2 { margin: 0; overflow: hidden; font-size: 22px; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.company-meta { min-width: 0; overflow: hidden; color: var(--soft-muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.company-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.ticker-select { display: inline-flex; min-height: 27px; align-items: center; gap: 5px; padding: 0 10px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 700; }
.icon-chip { position: relative; display: inline-grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line-mid); border-radius: 5px; background: var(--surface); color: var(--muted); }
.icon-chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.icon-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.icon-chip.active { border-color: var(--red); color: var(--red); }
#company-watch.active svg circle { fill: currentColor; }
.icon-chip .new-badge { position: absolute; top: -8px; right: -10px; margin: 0; }

.favorites-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.favorites-market-table { width: 100%; min-width: 1060px; border-collapse: collapse; table-layout: auto; }
.favorites-market-table th { padding: 8px 10px; border-bottom: 1px solid var(--line-mid); background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 700; text-align: right; white-space: nowrap; text-transform: none; }
.favorites-market-table th:first-child, .favorites-market-table th:nth-child(2) { text-align: left; }
.favorites-market-table td { padding: 5px 10px; border-bottom: 1px solid var(--line-soft); color: var(--muted-strong); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.favorites-market-table tbody tr { cursor: pointer; }
.favorites-market-table tbody tr:hover td { background: var(--accent-faint); }
.favorites-market-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.favorites-market-table td:first-child { display: table-cell; color: var(--ink); text-align: left; }
.favorite-name-cell { min-width: 210px; }
.favorite-flag { display: inline-block; width: 20px; margin-right: 6px; font-size: 14px; line-height: 1; text-align: center; vertical-align: -1px; }
.favorite-company-link, .favorite-symbol-link { color: #1b5a99; font-weight: 700; text-decoration: none; }
.favorite-company-link:hover, .favorite-symbol-link:hover { color: #0e3d6c; text-decoration: underline; }
.favorites-market-table td.positive { color: var(--green); font-weight: 700; }
.favorites-market-table td.negative { color: var(--red); font-weight: 700; }
.favorites-market-table td.favorite-last { font-weight: 700; }
.favorites-market-table td.favorite-last.positive { background: var(--green-bg); }
.favorites-market-table td.favorite-last.negative { background: var(--red-bg); }
.favorites-market-table tbody tr:hover td.favorite-last.positive { background: #cceecf; }
.favorites-market-table tbody tr:hover td.favorite-last.negative { background: #f5cece; }
.favorite-time { display: inline-flex; align-items: center; gap: 5px; }
.favorite-market-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #aaa; }
.favorite-market-dot.open { background: var(--green); }
.favorite-market-dot.closed { background: var(--red); }
.favorite-market-dot.unknown { background: #aaa; }
.favorite-table-fav { display: inline-grid; width: 24px; height: 24px; place-items: center; border: 0; border-radius: 4px; background: transparent; color: var(--red); cursor: pointer; }
.favorite-table-fav:hover { background: var(--red-bg); }
.favorite-table-fav svg { width: 15px; height: 15px; fill: currentColor; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.favorites-empty { padding: 22px 16px; border: 1px dashed var(--line); border-radius: 7px; color: var(--muted); font-size: 12.5px; text-align: center; }

.company-quote { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; cursor: pointer; }
.company-quote:hover { border-color: var(--accent); }
.company-quote:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.company-quote-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.company-quote-copy strong { font-family: Georgia, serif; font-size: 24px; font-weight: 400; white-space: nowrap; }
.company-quote-copy small { font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.quote-sparkline { width: min(190px, 48%); height: 62px; overflow: visible; }

.profile-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 12px; }
.profile-card-block, .chart-block { padding: 16px 18px 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); }
.profile-card-block h5, .chart-block h5 { display: flex; align-items: center; gap: 5px; margin: 0 0 9px; color: var(--ink-3); font-size: 14px; }
.profile-info-block, .profile-desc-block { margin-top: 12px; }
.profile-desc-block p { margin: 0; color: #657c98; font-size: 11.5px; line-height: 1.55; }

.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.chart-head h5 { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.chart-head-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.chart-quote-badge { display: inline-flex; align-items: center; gap: 8px; padding: 3px 9px; background: var(--surface-2); border: 1px solid var(--line-soft2); border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-variant-numeric: tabular-nums; line-height: 1.2; transition: all 0.15s ease; }
.chart-quote-badge.is-hovering { background: var(--accent-faint); border-color: var(--accent); box-shadow: 0 1px 4px rgba(79, 70, 229, 0.14); }
.chart-quote-badge-price { font-family: Georgia, serif; font-size: 15px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 3px; }
.chart-quote-badge-price .quote-arrow { font-size: 9.5px; }
.chart-quote-badge-price.positive { color: var(--green-text); }
.chart-quote-badge-price.negative { color: var(--red-text); }
.chart-quote-badge-change { font-size: 11.5px; font-weight: 600; }
.chart-quote-badge-change.positive { color: var(--green-text); }
.chart-quote-badge-change.negative { color: var(--red-text); }
.chart-quote-badge-date { font-size: 11px; color: var(--muted); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; white-space: nowrap; }
.chart-quote-badge-ma { font-size: 10.5px; font-weight: 600; color: var(--info-text); background: var(--info-bg); border: 1px solid var(--info-border); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.home-card-updated.quote-hovering { color: var(--accent-text) !important; font-weight: 600; }
.chart-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chart-ranges { display: flex; overflow: hidden; border: 1px solid var(--line-mid); border-radius: 6px; }
.chart-ranges button { min-width: 32px; height: 26px; padding: 0 7px; border: 0; border-right: 1px solid #ddd; background: var(--surface); color: var(--muted); font-size: 10.5px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.chart-ranges button:last-child { border-right: 0; }
.chart-ranges button:hover { background: var(--accent-soft); color: var(--accent-text); }
.chart-ranges button.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.chart-tools { display: flex; align-items: center; gap: 5px; }
.chart-tools button { height: 26px; padding: 0 9px; border: 1px solid var(--line-mid); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 10.5px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.chart-tools button:hover { background: var(--accent-soft); color: var(--accent-text); }
.chart-tools button.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.chart-fs { display: grid; width: 28px; padding: 0; place-items: center; }
.chart-fs svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.chart-body { position: relative; min-height: 380px; background: var(--surface-2); border: 1px solid #edf2f7; border-radius: 9px; padding: 8px 10px 4px; margin-bottom: 8px; }
#price-chart { display: block; width: 100%; height: 380px; overflow: visible; }
.chart-line { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.chart-area { fill: url(#company-chart-grad); opacity: 0.85; pointer-events: none; }
.chart-line-dd { stroke: #ef4444; }
.chart-area-dd { fill: rgba(239, 68, 68, 0.16); opacity: 1; }
.pf-chart-panel.is-drawdown .chart-tag, .chart-tag-dd { fill: #ef4444; }
.pf-chart-panel.is-drawdown .chart-ma-control { opacity: 0.45; pointer-events: none; }
.pf-chart-panel.is-drawdown .chart-ma-control .chart-ma-popover { display: none; }
#chart-drawdown-btn.is-loading { opacity: 0.6; pointer-events: none; }
.chart-ma { fill: none; stroke: var(--ma-stroke, #3b82f6); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.chart-ma-control { position: relative; display: flex; align-items: center; gap: 4px; }
.chart-ma-chips { display: flex; align-items: center; gap: 4px; }
.chart-ma-chip { display: inline-flex !important; align-items: center; gap: 5px; height: 26px; padding: 0 8px !important; border: 1px solid var(--line-mid) !important; border-radius: 6px; background: var(--surface) !important; color: var(--muted) !important; font-size: 10.5px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; user-select: none; }
.chart-ma-chip:hover { background: var(--surface-2) !important; color: var(--ink-3) !important; border-color: var(--line-mid) !important; }
.chart-ma-chip.active { background: var(--accent-soft) !important; color: var(--accent-text) !important; border-color: var(--accent-light) !important; font-weight: 700; }
.chart-ma-chip .ma-chip-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.chart-ma-config-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 3px; height: 26px; padding: 0 7px !important; border: 1px solid var(--line-mid) !important; border-radius: 6px; background: var(--surface) !important; color: var(--muted) !important; font-size: 10.5px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.chart-ma-config-btn:hover, .chart-ma-config-btn.is-open { background: var(--accent-soft) !important; color: var(--accent-text) !important; border-color: #f59e0b !important; }
.chart-ma-popover { position: absolute; top: calc(100% + 6px); right: 0; width: 260px; background: var(--surface); border: 1px solid var(--line-soft2); border-radius: 8px; padding: 12px; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08); z-index: 100; font-family: inherit; }
.chart-ma-popover-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--surface-3); font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.chart-ma-popover-close { background: none !important; border: none !important; padding: 0 !important; font-size: 16px; line-height: 1; color: var(--muted-2) !important; cursor: pointer; height: auto !important; }
.chart-ma-popover-close:hover { color: var(--muted-strong) !important; background: none !important; }
.chart-ma-list { display: flex; flex-direction: column; gap: 6px; margin: 9px 0; max-height: 190px; overflow-y: auto; }
.chart-ma-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: 6px; font-size: 11.5px; }
.chart-ma-item-check { cursor: pointer; accent-color: var(--accent); margin: 0; }
.chart-ma-item-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.chart-ma-item-label { color: var(--muted-strong); font-weight: 600; font-size: 11px; }
.chart-ma-item-input { width: 60px; height: 22px; border: 1px solid var(--line-mid); border-radius: 4px; padding: 0 5px; font-size: 11.5px; font-weight: 700; color: var(--ink); text-align: center; margin-left: auto; }
.chart-ma-item-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.chart-ma-item-del { background: none !important; border: none !important; padding: 0 2px !important; height: auto !important; color: var(--line-mid) !important; font-size: 15px; cursor: pointer; line-height: 1; }
.chart-ma-item-del:hover { color: #ef4444 !important; background: none !important; }
.chart-ma-add-row { display: flex; gap: 6px; margin-bottom: 6px; }
.chart-ma-add-input { flex: 1; height: 26px; border: 1px solid var(--line-mid); border-radius: 5px; padding: 0 8px; font-size: 11px; color: var(--ink); }
.chart-ma-add-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.chart-ma-add-submit { height: 26px !important; padding: 0 10px !important; background: var(--accent) !important; color: #fff !important; border: none !important; border-radius: 5px; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chart-ma-add-submit:hover { background: var(--accent-dark) !important; color: #fff !important; }
.chart-ma-quick-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 10px; color: var(--muted); margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--surface-3); }
.chart-ma-quick-presets button { height: 20px !important; padding: 0 5px !important; background: var(--surface-3) !important; border: 1px solid var(--line-soft2) !important; border-radius: 3px; font-size: 10px; color: var(--muted-strong) !important; cursor: pointer; }
.chart-ma-quick-presets button:hover { background: var(--accent-soft) !important; border-color: var(--accent-light) !important; color: var(--accent-text) !important; }
.chart-grid { stroke: var(--surface-3); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.chart-label { fill: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 9.5px; font-variant-numeric: tabular-nums; }
.chart-label-x { text-anchor: middle; font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", Roboto, Ubuntu, sans-serif; font-size: 10px; }
.chart-tag { fill: var(--accent); }
.chart-tag-text { fill: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 10px; font-weight: 700; }
.chart-crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.chart-dot { fill: #fff; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: none; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25)); }
.chart-tooltip { position: fixed; z-index: 2147483647 !important; padding: 10px 14px; border-radius: 8px; background: rgba(15, 23, 42, 0.95); color: #fff; font-size: 11px; line-height: 1.4; pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(4px); }
.chart-tooltip strong { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; font-weight: 700; color: #ffffff; }
.chart-tooltip span { color: var(--muted-2); font-size: 10.5px; }
.chart-block:fullscreen,
.chart-block.is-fullscreen,
.val-chart-block:fullscreen,
.val-chart-block.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 14px 24px 16px !important;
  border-radius: 0 !important;
  background: var(--surface) !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.chart-block:fullscreen .chart-body,
.chart-block.is-fullscreen .chart-body,
.val-chart-block:fullscreen .val-chart-body,
.val-chart-block.is-fullscreen .val-chart-body {
  flex: 1 1 auto;
  min-height: 0;
  height: calc(100vh - 165px);
  display: flex;
  flex-direction: column;
}
.chart-block:fullscreen .company-chart-canvas-inner,
.chart-block.is-fullscreen .company-chart-canvas-inner,
.val-chart-block:fullscreen .company-chart-canvas-inner,
.val-chart-block.is-fullscreen .company-chart-canvas-inner {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: stretch;
}
.chart-block:fullscreen #price-chart,
.chart-block.is-fullscreen #price-chart,
.val-chart-block:fullscreen #val-chart,
.val-chart-block.is-fullscreen #val-chart {
  width: 100%;
  height: 100% !important;
  max-height: calc(100vh - 165px) !important;
  overflow: visible !important;
}
.chart-block:fullscreen .pf-timeline-bar-wrap,
.chart-block.is-fullscreen .pf-timeline-bar-wrap,
.val-chart-block:fullscreen .pf-timeline-bar-wrap,
.val-chart-block.is-fullscreen .pf-timeline-bar-wrap {
  margin-top: 4px;
  flex-shrink: 0;
}
.chart-message { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }

.placeholder-block { padding: 30px 22px; text-align: center; }
.placeholder-block strong { display: block; font-size: 16px; }
.placeholder-block p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }

/* ── Responsive Inicio / Empresa ────────────────────────────── */
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-head-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .home-top-links { padding-left: 8px; }
  .home-top-link { padding: 0 8px; font-size: 11.5px; }
  .home-menu-section { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .home-hero { padding-top: 36px; }
  .home-brand strong { font-size: 22px; }
  .home-brand .brand-mark { width: 22px; height: 22px; }
  .home-grid-section { padding: 26px 15px 4px; }
  .home-grid { grid-template-columns: 1fr; }
  .trial-banner { padding: 9px 15px; }
  .company-wrap { padding: 16px 15px 26px; }
  .company-head { flex-wrap: wrap; }
  .company-title-row { flex-direction: column; gap: 3px; }
  .company-meta { white-space: normal; }
  .chart-body, #price-chart { min-height: 240px; height: 240px; }
  .chart-head { align-items: flex-start; flex-direction: column; }
  .company-quote { align-items: flex-start; flex-direction: column; }
  .quote-sparkline { width: 100%; height: 58px; }
}

/* ── Popover de listas de seguimiento ───────────────────────── */
