/* ==========================================================================
 * 04-empresa.css · parte 4/11 — Empresa: cribador, perfil y gráfico de métricas
 * Orden de carga obligatorio (reproduce la cascada del styles.css original).
 * No reordenar los <link> ni mover reglas entre partes sin revisar la cascada.
 * ========================================================================== */

/* ── Cribador (screener) ───────────────────────────────────────── */
.screener-section { padding: 27px 28px 28px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--topbar-height) + 10px); }
.screener-search { display: flex; max-width: 560px; height: 42px; align-items: center; gap: 8px; margin-bottom: 14px; padding: 0 6px 0 12px; border: 1px solid var(--line-mid); border-radius: 6px; background: var(--surface); }
.screener-search svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: #6a7784; stroke-linecap: round; stroke-width: 2; }
.screener-search input { flex: 1; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.screener-search input::placeholder { color: #9ba1a7; }
.screener-search .primary-button { min-width: 110px; min-height: 32px; }
.screener-error { margin: 0 0 12px; padding: 9px 11px; border: 1px solid var(--red); border-radius: 4px; background: var(--red-bg); color: var(--red); font-size: 11px; line-height: 1.45; }
.screener-loading { margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.screener-company-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 4px 0 14px; }
.screener-company-head h3 { margin: 5px 0 2px; font-size: 21px; color: var(--ink-3); }
.screener-company-head h3 .ticker-chip { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 700; vertical-align: middle; }
.screener-company-head .section-subtitle { margin: 0; }
.screener-controls { display: flex; align-items: center; gap: 10px; }
.screener-currency { display: inline-grid; height: 30px; place-items: center; padding: 0 12px; border: 1px solid var(--line-mid); border-radius: 6px; color: var(--muted-strong); font-size: 11px; font-weight: 700; }
.screener-period-toggle { display: flex; overflow: hidden; border: 1px solid var(--line-mid); border-radius: 6px; }
.screener-period-toggle button { min-height: 30px; padding: 0 14px; border: 0; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 700; }
.screener-period-toggle button.active { background: var(--surface); color: var(--ink-3); box-shadow: inset 0 -2px 0 var(--accent); }

/* ── Perfil de empresa ─────────────────────────────────────────── */
.company-profile { margin: 3px 0 17px; }
.profile-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.profile-section-heading h4 { margin: 4px 0 0; color: var(--ink-3); font-size: 17px; }
.profile-source { color: var(--muted-2); font-size: 9px; text-align: right; }
.profile-quote-card { display: flex; min-height: 112px; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; padding: 15px 18px; border: 1px solid var(--accent-mid); border-radius: 5px; background: var(--accent-faint); }
.profile-quote-copy { display: flex; min-width: 170px; flex-direction: column; gap: 3px; }
.profile-label { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.profile-price { color: var(--ink); font-family: Georgia, serif; font-size: 27px; font-weight: 400; letter-spacing: -.02em; }
.profile-price-change { min-height: 16px; font-size: 12px; font-weight: 700; }
.profile-price-change.positive { color: var(--green); }
.profile-price-change.negative { color: var(--red); }
.profile-quote-copy small { color: var(--muted-2); font-size: 9px; }
.profile-sparkline { width: min(430px, 55%); height: 78px; overflow: visible; }
.profile-sparkline-line { fill: none; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.profile-sparkline-area { fill: rgba(56, 173, 79, .09); stroke: none; }
.profile-sparkline.negative .profile-sparkline-line { stroke: var(--red); }
.profile-sparkline.negative .profile-sparkline-area { fill: rgba(240, 75, 67, .08); }
.profile-card-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.profile-card, .profile-description-card { border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); }
.profile-card { padding: 14px 16px 9px; }
.profile-card h5, .profile-description-card h5 { display: flex; align-items: center; gap: 5px; margin: 0 0 9px; color: var(--ink-3); font-size: 14px; }
.profile-info-dot { display: inline-grid; width: 14px; height: 14px; place-items: center; border: 1px solid #9da3a8; border-radius: 50%; color: #7c858c; font-size: 9px; font-weight: 400; }
.profile-list { margin: 0; }
.profile-list > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, auto); align-items: center; gap: 12px; min-height: 28px; border-bottom: 1px solid var(--line-soft); }
.profile-list > div:last-child { border-bottom: 0; }
.profile-list dt, .profile-list dd { min-width: 0; margin: 0; font-size: 11px; line-height: 1.25; }
.profile-list dt { color: var(--ink); font-weight: 700; }
.profile-list dd { overflow-wrap: anywhere; color: #657c98; text-align: right; }
.profile-description-card { margin-top: 12px; padding: 14px 16px 13px; }
.profile-description-card p { margin: 0; color: #657c98; font-size: 11px; line-height: 1.5; }
.screener-tabs { display: flex; gap: 4px; border-bottom: 2px solid #ddd; }
.screener-tab { min-height: 36px; padding: 0 16px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.screener-tab:hover { color: var(--ink-3); }
.screener-tab.active { color: var(--ink-3); box-shadow: inset 0 -2px 0 var(--accent); }
.screener-tab-disabled { color: var(--muted-2); font-weight: 400; }
.screener-advice { display: flex; align-items: center; gap: 4px; margin: 9px 0 7px; padding: 6px 9px; border: 1px solid var(--accent-mid); border-radius: 4px; background: var(--surface-2); color: var(--muted-strong); font-size: 10px; }
.screener-advice strong { color: var(--ink-3); }
.screener-advice-close { margin-left: auto; padding: 0 2px; border: 0; background: transparent; color: var(--ink-3); font-size: 15px; line-height: 1; }
.screener-advice-close:hover { color: var(--accent-dark); }
.screener-block { padding-top: 12px; }
.screener-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 7px; }
.screener-units { color: var(--muted-2); font-size: 10px; }
.screener-period-range { color: var(--muted); font-size: 10px; }
.screener-tools { display: flex; margin-left: auto; border: 1px solid var(--line-mid); border-radius: 3px; overflow: hidden; }
.screener-tools button { min-width: 27px; height: 24px; padding: 0 5px; border: 0; border-right: 1px solid #ddd; background: var(--surface); color: var(--muted-strong); font-size: 10px; }
.screener-tools button:last-child { border-right: 0; }
.screener-tools button.active, .screener-tools button:hover { background: var(--accent-soft); color: var(--accent-text); }
.screener-margins-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; padding: 6px 10px; border: 1px solid #e7e7e7; border-radius: 4px; background: var(--surface-2); }
.screener-margins-bar[hidden] { display: none; }
.screener-margins-label { color: var(--muted-strong); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.screener-margins-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.screener-margin-chip { display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px; border: 1px solid #d5d5d5; border-radius: 12px; background: var(--surface); color: var(--muted-strong); font-size: 10px; font-weight: 500; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.screener-margin-chip:hover { background: var(--accent-faint); border-color: var(--accent); color: var(--ink); }
.screener-margin-chip.active { background: var(--accent-soft); border-color: var(--accent); color: #111; font-weight: 700; }
.margin-chip-dot { display: inline-block; width: 7px; height: 7px; border: 1.5px solid #999; border-radius: 50%; background: transparent; transition: all .12s; }
.screener-margin-chip.active .margin-chip-dot { border-color: var(--accent); background: var(--accent); }
/* Contenedor con barra horizontal con estilo y soporte para arrastrar */
.screener-table-wrap {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: #c4c4c4 #f1f1f1;
  -webkit-overflow-scrolling: touch;
}
.screener-table-wrap::-webkit-scrollbar {
  height: 9px;
}
.screener-table-wrap::-webkit-scrollbar-track {
  background: var(--surface-3);
  border-radius: 4px;
}
.screener-table-wrap::-webkit-scrollbar-thumb {
  background: #c5c5c5;
  border-radius: 4px;
}
.screener-table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
.screener-table-wrap.can-scroll td:not(.sticky-col),
.screener-table-wrap.can-scroll th:not(.sticky-col) {
  cursor: grab;
}
.screener-table-wrap.is-dragging,
.screener-table-wrap.is-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
body.screener-table-dragging {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.screener-block table {
  width: 100%;
  min-width: fit-content;
  max-width: fit-content;
  margin: 0 auto;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.screener-block th {
  padding: 6px 9px;
  border-bottom: 1px solid #bdbdbd;
  background: #1e293b;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  box-sizing: border-box;
}
.screener-block th.sticky-col {
  text-align: left;
}
.screener-block td {
  padding: 5px 9px;
  border-bottom: 1px solid #e4e4e4;
  color: var(--ink-3);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  box-sizing: border-box;
}
.screener-block td.sticky-col {
  color: var(--ink-3);
  font-weight: 400;
  text-align: left;
}
.screener-block th:not(.sticky-col),
.screener-block td:not(.sticky-col) {
  min-width: 90px;
}
.screener-block tbody tr:hover td {
  background: var(--surface-2);
}
.screener-block tbody tr:hover td.sticky-col {
  background: var(--surface-2);
}
.screener-block th.sticky-col,
.screener-block td.sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 330px;
  min-width: 330px;
  max-width: 330px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.screener-block th.sticky-col {
  z-index: 3;
  background: #1e293b;
  color: #fff;
  border-right: 1px solid #334155;
}
.screener-table-wrap.is-scrolled th.sticky-col,
.screener-table-wrap.is-scrolled td.sticky-col {
  box-shadow: 3px 0 6px -2px rgba(0, 0, 0, 0.12);
}
.screener-block tr.emphasis-row td {
  background: var(--accent-faint);
  color: #111;
  font-weight: 700;
}
.screener-block tr.emphasis-row td.sticky-col {
  background: var(--accent-faint);
  color: #111;
  font-weight: 700;
}
.screener-block tr.emphasis-row:hover td,
.screener-block tr.emphasis-row:hover td.sticky-col {
  background: var(--accent-soft);
}
.screener-block tr.section-row td {
  padding-top: 10px;
  padding-bottom: 4px;
  border-bottom: 0;
  color: var(--muted-strong);
  font-weight: 700;
}
.screener-block tr.section-row td.sticky-col,
.screener-block tr.note-row td.sticky-col {
  max-width: none;
}
.screener-block tr.note-row td {
  border-bottom: 0;
  color: var(--muted);
  font-size: 9px;
  font-style: italic;
}
.screener-block tr.derived-row td {
  color: var(--muted-strong);
  font-style: italic;
}
.screener-block tr.derived-row td.sticky-col {
  padding-left: 22px;
}
.screener-block td.negative,
.screener-block tr.emphasis-row td.negative,
.screener-block tr.derived-row td.negative {
  color: var(--red);
}
.screener-block tr[data-metric] td:first-child {
  cursor: pointer;
}
.screener-block table.table-compact td {
  padding-top: 3px;
  padding-bottom: 3px;
}

/* ── Gráfico de métricas (datos financieros) ────────────────── */
.screener-range { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); }
.screener-range-label { color: var(--muted); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.screener-range-inputs { position: relative; width: min(340px, 62%); height: 20px; }
.screener-range-track { position: absolute; top: 7px; left: 0; width: 100%; height: 6px; border-radius: 3px; background: var(--line); }
.screener-range-inputs input[type="range"] { position: absolute; top: 0; left: 0; width: 100%; height: 20px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none; }
#screener-range-min { z-index: 3; }
#screener-range-max { z-index: 2; }
.screener-range-inputs input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); pointer-events: auto; cursor: grab; }
.screener-range-inputs input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); pointer-events: auto; cursor: grab; }
.screener-range-inputs input[type="range"]::-moz-range-track { height: 6px; background: transparent; }
.screener-range-values { color: var(--muted-strong); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.screener-block tbody tr.chart-selected td { background: var(--accent-soft); }
.screener-block tbody tr.chart-selected td.sticky-col { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.screener-block tbody tr.chart-selected:hover td,
.screener-block tbody tr.chart-selected:hover td.sticky-col { background: var(--accent-mid); }
.metric-chart-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; vertical-align: 1px; }
.metric-hint-dot { margin-left: 7px; vertical-align: -2px; cursor: help; }
.metrics-chart-block { position: relative; margin-bottom: 12px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); }
.metrics-chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.metrics-chart-head-left { display: flex; align-items: center; gap: 8px; }
.metrics-chart-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.metrics-compare-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.metrics-compare-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.metrics-compare-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.metrics-company-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border: 1px solid #d4d8de; border-radius: 12px; background: #f4f6f8; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.metrics-company-chip.base-chip { border-color: var(--accent-mid); background: var(--accent-faint); color: var(--accent-text); }
.metrics-company-chip .chip-badge { font-size: 8.5px; font-weight: 700; padding: 1px 4px; border-radius: 4px; background: rgba(185, 103, 0, 0.14); color: var(--accent-text); text-transform: uppercase; }
.metrics-company-chip.loading-chip { opacity: 0.7; border-style: dashed; }
.metrics-company-chip .chip-spinner { font-size: 12px; animation: chipPulse 1s infinite alternate; }
@keyframes chipPulse { from { opacity: 0.3; } to { opacity: 1; } }
.metrics-company-chip-remove { display: grid; width: 14px; height: 14px; place-items: center; border: 0; border-radius: 50%; background: #d6dae0; color: var(--muted-strong); font-size: 11px; line-height: 1; cursor: pointer; padding: 0; margin-left: 2px; transition: all 0.15s ease; }
.metrics-company-chip-remove:hover { background: var(--red-bg); color: var(--red); }
.metrics-compare-add-wrap { position: relative; }
.metrics-compare-add-btn { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border: 1px dashed #b0b8c4; border-radius: 12px; background: var(--surface); color: var(--muted-strong); font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.metrics-compare-add-btn:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--surface-2); }
.metrics-compare-add-btn svg { color: var(--accent); }
.metrics-compare-popover { position: absolute; top: calc(100% + 4px); right: 0; z-index: 50; width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); padding: 8px; }
.metrics-compare-popover[hidden] { display: none; }
.metrics-compare-search-box { display: flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid #d2d6dc; border-radius: 5px; background: var(--surface-2); }
.metrics-compare-search-box svg { flex-shrink: 0; stroke: #888; }
.metrics-compare-search-box input { width: 100%; height: 30px; border: 0; background: transparent; outline: none; font-size: 11.5px; color: var(--ink); }
.metrics-compare-results { margin-top: 6px; max-height: 190px; overflow-y: auto; }
.metrics-compare-results[hidden] { display: none; }
.metrics-compare-result-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 4px; background: transparent; text-align: left; cursor: pointer; font-size: 11px; transition: background 0.1s ease; }
.metrics-compare-result-item:hover { background: var(--surface-3); }
.metrics-compare-res-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-strong); }
.metrics-compare-result-item strong { color: var(--accent-dark); font-size: 11px; flex-shrink: 0; }
.metrics-compare-empty, .metrics-compare-loading, .metrics-compare-hint { padding: 9px 8px; font-size: 11px; color: var(--muted); text-align: center; }
.metrics-chart-placeholder { display: flex; align-items: center; justify-content: center; min-height: 180px; padding: 24px; text-align: center; }
.metrics-chart-placeholder-card { max-width: 440px; padding: 18px 22px; border: 1px dashed #d6dae0; border-radius: 8px; background: var(--surface-2); }
.metrics-chart-placeholder-card .placeholder-icon { font-size: 24px; display: block; margin-bottom: 6px; }
.metrics-chart-placeholder-card strong { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.metrics-chart-placeholder-card p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.screener-compare-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border: 1px solid var(--line-mid); border-radius: 6px; background: var(--surface); color: var(--muted-strong); font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.screener-compare-btn:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--surface-2); }
.screener-compare-btn svg { color: var(--accent); }
.metrics-chart-head h5 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-3); font-size: 14px; }
.metrics-chart-hint { color: var(--muted); font-size: 11px; font-weight: 400; }
.metrics-chart-clear { height: 24px; padding: 0 10px; border: 1px solid var(--line-mid); border-radius: 4px; background: var(--surface); color: var(--muted); font-size: 10px; cursor: pointer; }
.metrics-chart-clear:hover { background: var(--accent-soft); color: var(--accent-text); }
.metrics-chart-legend { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 4px 0 10px; }
.metrics-palette { position: absolute; z-index: 20; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 6px 18px rgba(0, 0, 0, .14); }
.metrics-palette-color { width: 18px; height: 18px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; }
.metrics-palette-color:hover { transform: scale(1.2); }
.metrics-palette-color.active { border-color: var(--ink); }
.metrics-legend-item { display: inline-flex; align-items: center; gap: 7px; padding: 3px 8px 3px 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); font-size: 11px; }
.metrics-swatch { width: 16px; height: 16px; padding: 0; border: 1px solid rgba(0, 0, 0, .18); border-radius: 50%; cursor: pointer; }
.metrics-swatch:hover { transform: scale(1.15); }
.metrics-legend-label { max-width: 230px; overflow: hidden; color: var(--muted-strong); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.metrics-legend-type { padding: 1px 7px; border-radius: 8px; background: #eef1f5; color: #7a8595; font-size: 9.5px; font-weight: 700; }
.metric-cagr-line { fill: none; stroke: #111; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.metric-cagr-label { position: absolute; z-index: 5; padding: 2px 6px; border-radius: 3px; background: #111; color: #fff; font-size: 9.5px; font-weight: 700; line-height: 1.35; white-space: nowrap; transform: translate(-50%, -50%); cursor: grab; }
.metric-cagr-label.dragging { cursor: grabbing; }
.metrics-legend-remove { display: grid; width: 17px; height: 17px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: #e4e6ea; color: var(--muted); font-size: 12px; line-height: 1; cursor: pointer; }
.metrics-legend-remove:hover { background: var(--red-bg); color: var(--red); }
.metrics-legend-visibility { display: grid; width: 17px; height: 17px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.metrics-legend-visibility:hover { background: var(--surface-3); color: var(--ink-3); }
.metrics-legend-visibility.is-hidden { color: var(--muted-2); }
.metrics-legend-item.is-hidden-series { opacity: .6; }
.metrics-legend-item.is-hidden-series .metrics-legend-label { text-decoration: line-through; }
.metrics-legend-item.is-hidden-series .metrics-swatch { opacity: .35; filter: grayscale(1); }
.metrics-legend-toggle-all { height: 22px; margin-left: 2px; padding: 0 10px; border: 1px dashed var(--line-mid); border-radius: 12px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 600; cursor: pointer; }
.metrics-legend-toggle-all:hover { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.metric-favorite-btn { display: inline-grid; width: 18px; height: 18px; margin-right: 5px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #b6bcc6; cursor: pointer; vertical-align: -4px; transition: color .12s, background .12s, transform .12s; }
.metric-favorite-btn:hover { background: var(--red-bg); color: var(--red); transform: scale(1.12); }
.metric-favorite-btn.is-favorite { color: var(--red); }
.metric-favorite-btn.is-favorite svg { fill: currentColor; }
.metric-favorite-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.metrics-chart-body { position: relative; min-height: 300px; }
#metrics-chart { display: block; width: 100%; height: 300px; }
.metrics-chart-head-actions .metrics-chart-fullscreen-btn { width: 24px; height: 24px; border-radius: 4px; }
.metrics-chart-block:fullscreen,
.metrics-chart-block.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 14px 18px 12px;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--surface);
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.metrics-chart-block:fullscreen .metrics-chart-legend,
.metrics-chart-block.is-fullscreen .metrics-chart-legend { max-height: 30vh; overflow-y: auto; }
.metrics-chart-block:fullscreen .metrics-chart-body,
.metrics-chart-block.is-fullscreen .metrics-chart-body { flex: 1 1 auto; min-height: 0; }
.metrics-chart-block:fullscreen #metrics-chart,
.metrics-chart-block.is-fullscreen #metrics-chart { height: 100%; }
.metric-line { fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.metric-dot { fill: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.metrics-chart-tooltip-row { display: flex; align-items: center; gap: 6px; }
.metrics-chart-tooltip-row .metric-legend-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; }
.metrics-chart-tooltip-row b { margin-left: auto; padding-left: 14px; font-family: Georgia, serif; font-size: 12px; font-weight: 400; white-space: nowrap; }
