/* Engage Solar — Central de Propostas Comerciais (prefixo epr-) */

body[data-es-panel-active="propostas"] .es-page-heading { display: none; }

/* Recuos vêm de .es-content + .epl-shell, os mesmos do Pipeline Comercial. */
.epr {
  --epr-navy: var(--es-navy, #0b2a5b);
  --epr-blue: var(--es-primary, #2563eb);
  --epr-solar: var(--es-solar, #fbbf24);
  --epr-solar-deep: #d97706;
  --epr-teal: #0d9488;
  --epr-surface: var(--es-surface, #fff);
  --epr-text: var(--es-text, #1e293b);
  --epr-title: #0f172a;
  --epr-muted: var(--es-text-muted, #64748b);
  --epr-border: var(--es-border, #e2e8f0);
  --epr-radius: 14px;
  --epr-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 1.25rem;
  min-width: 0;
  color: var(--epr-text);
  position: relative;
}

.epr-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap;
}

.epr svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Cabeçalho (estrutura .epl-toolbar do Pipeline Comercial) ---------- */
.epr-header { margin-bottom: 0; }
.epr-custom { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.epr-custom[hidden] { display: none; }
.epr-header .epr-field select,
.epr-header .epr-field input { height: 44px; border-radius: 12px; }

/* ---------- Campos e botões ---------- */
.epr-field { display: grid; gap: 0.25rem; font-size: 0.72rem; font-weight: 600; color: var(--epr-muted); }
.epr-field--inline { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; }
.epr-field select,
.epr-field input {
  height: 40px; padding: 0 0.75rem; border: 1px solid var(--epr-border); border-radius: 12px;
  background: #fff; color: var(--epr-text); font-size: 0.88rem; font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.epr-field select:focus-visible,
.epr-field input:focus-visible,
.epr-search:focus-within { outline: none; border-color: var(--epr-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }

.epr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; height: 40px; padding: 0 1rem;
  border-radius: 12px; border: 1px solid transparent; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.epr-btn svg { width: 16px; height: 16px; }
.epr-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.epr-btn:focus-visible,
.epr-header .epl-btn:focus-visible { outline: 2px solid var(--epr-blue); outline-offset: 2px; }
.epr-btn--sm { height: 32px; padding: 0 0.75rem; font-size: 0.8rem; border-radius: 9px; }
.epr-btn--primary { background: var(--epr-blue); color: #fff; }
.epr-btn--primary:hover:not(:disabled) { background: #1d4ed8; }
.epr-btn--ghost { background: #fff; border-color: var(--epr-border); color: var(--epr-title); }
.epr-btn--ghost:hover:not(:disabled) { border-color: #cbd5e1; background: #f8fafc; }

.epr-icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: #475569; cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.epr-icon-btn svg { width: 17px; height: 17px; }
.epr-icon-btn:hover:not(:disabled) { background: #eef4ff; color: var(--epr-blue); border-color: #dbe6fb; }
.epr-icon-btn:focus-visible { outline: 2px solid var(--epr-blue); outline-offset: 1px; }
.epr-icon-btn:disabled { opacity: 0.4; cursor: progress; }

/* ---------- KPIs ---------- */
.epr-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.epr-kpi {
  --epr-accent: var(--epr-blue);
  position: relative; overflow: hidden; display: grid; gap: 0.4rem; align-content: start; min-height: 132px; padding: 1rem 1.1rem;
  border-radius: var(--epr-radius); background: var(--epr-surface); border: 1px solid var(--epr-border); box-shadow: var(--epr-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease; animation: epr-rise 0.4s ease both;
}
.epr-kpi::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--epr-accent);
}
.epr-kpi:hover { border-color: #94a3b8; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }
.epr-kpi[data-tone="navy"] { --epr-accent: var(--epr-navy); }
.epr-kpi[data-tone="blue"] { --epr-accent: var(--epr-blue); }
.epr-kpi[data-tone="solar"] { --epr-accent: #f59e0b; }
.epr-kpi[data-tone="teal"] { --epr-accent: var(--epr-teal); }
.epr-kpi-head { display: flex; align-items: center; gap: 0.55rem; }
.epr-kpi-icon {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  color: var(--epr-accent); background: color-mix(in srgb, var(--epr-accent) 12%, transparent);
}
.epr-kpi[data-tone="solar"] .epr-kpi-icon { color: var(--epr-solar-deep); }
.epr-kpi-icon svg { width: 17px; height: 17px; }
.epr-kpi-label { font-size: 0.78rem; font-weight: 600; color: var(--epr-muted); }
.epr-kpi-value {
  font-size: clamp(1.3rem, 1.9vw, 1.65rem); font-weight: 800; letter-spacing: -0.02em; color: var(--epr-title);
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.epr-kpi[data-tone="blue"] .epr-kpi-value { color: var(--epr-blue); }
.epr-kpi-meta { font-size: 0.8rem; color: var(--epr-text); font-weight: 500; }
.epr-kpi-extra { font-size: 0.74rem; color: var(--epr-muted); }
.epr-kpi[data-tone="solar"] .epr-kpi-extra { color: #92400e; }
.epr-kpi.is-skeleton::before { background: #e2e8f0; }

/* Tooltip */
.epr-tip {
  position: relative; margin-left: auto; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  font-size: 0.7rem; font-weight: 700; font-style: italic; font-family: Georgia, serif; color: var(--epr-muted); background: #f1f5f9; cursor: help;
}
.epr-tip:focus-visible { outline: 2px solid var(--epr-blue); outline-offset: 2px; }
.epr-tip-bubble {
  position: absolute; z-index: 30; right: -8px; top: calc(100% + 8px); width: min(300px, 70vw); padding: 0.7rem 0.8rem; border-radius: 12px;
  background: #0f172a; color: #e2e8f0; font: 500 0.76rem/1.45 var(--es-font, Inter, sans-serif); font-style: normal; text-align: left;
  box-shadow: 0 16px 30px -12px rgba(15, 23, 42, 0.5); opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.epr-tip:hover .epr-tip-bubble,
.epr-tip:focus .epr-tip-bubble { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Cards ---------- */
.epr-card {
  border-radius: var(--epr-radius); background: var(--epr-surface); border: 1px solid var(--epr-border); box-shadow: var(--epr-shadow);
  padding: 1.1rem 1.25rem; min-width: 0;
}
.epr-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.epr-card-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--epr-title); letter-spacing: -0.01em; }
.epr-card-head p { margin: 0.2rem 0 0; font-size: 0.82rem; color: var(--epr-muted); }

.epr-insights { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 0.75rem; }

/* Segmented */
.epr-seg { display: inline-flex; padding: 3px; border-radius: 11px; background: #f1f5f9; }
.epr-seg-btn {
  height: 30px; padding: 0 0.8rem; border: 0; border-radius: 8px; background: transparent; color: var(--epr-muted);
  font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.epr-seg-btn.is-active { background: #fff; color: var(--epr-navy); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.epr-seg-btn:focus-visible { outline: 2px solid var(--epr-blue); outline-offset: 1px; }

/* ---------- Gráfico ---------- */
.epr-chart-summary { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: -0.35rem 0 0.75rem; font-size: 0.82rem; color: var(--epr-text); }
.epr-chart-summary strong { color: #1d4ed8; font-variant-numeric: tabular-nums; }
.epr-chart { position: relative; transition: opacity 0.2s ease; }
.epr-chart-svg { display: block; width: 100%; height: auto; max-height: 300px; overflow: visible; }
.epr-grid { stroke: #edf1f7; stroke-width: 1; }
.epr-grid.is-base { stroke: #cbd5e1; }
.epr-axis { fill: #94a3b8; stroke: none; font-size: 11px; font-weight: 500; font-family: var(--es-font, Inter, sans-serif); }
.epr-bar { stroke: none; transform-box: fill-box; transform-origin: bottom; animation: epr-grow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; transition: opacity 0.15s ease, filter 0.15s ease; }
.epr-bar-hit { fill: transparent; stroke: none; cursor: pointer; outline: none; }
.epr-bar-group.is-current .epr-bar { fill: url(#eprBarGradient); filter: drop-shadow(0 0 0 transparent); }
.epr-bar-group.is-current .epr-axis-x { fill: var(--epr-solar-deep); font-weight: 700; }
.epr-chart:hover .epr-bar-group:not(.is-hover) .epr-bar { opacity: 0.55; }
.epr-bar-group.is-hover .epr-bar { filter: drop-shadow(0 6px 10px rgba(37, 99, 235, 0.35)); }
.epr-bar-hit:focus-visible + .epr-bar { stroke: var(--epr-solar); stroke-width: 2; }
.epr-chart-tooltip {
  position: absolute; top: 0; transform: translate(-50%, -10%); z-index: 5; display: grid; gap: 0.1rem; min-width: 150px; padding: 0.6rem 0.75rem;
  border-radius: 12px; background: #0f172a; color: #fff; font-size: 0.75rem; pointer-events: none; box-shadow: 0 14px 28px -12px rgba(15, 23, 42, 0.55);
}
.epr-chart-tooltip[hidden] { display: none; }
.epr-chart-tooltip span { color: #94a3b8; text-transform: capitalize; }
.epr-chart-tooltip strong { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.epr-chart-tooltip em { font-style: normal; color: #fde68a; }
.epr-chart-skel { display: flex; align-items: flex-end; gap: 4%; height: 220px; padding: 0 0.5rem 0.5rem 3.5rem; border-bottom: 1px solid #e2e8f0; }
.epr-chart-skel .epr-skel { flex: 1; border-radius: 8px 8px 0 0; }

/* ---------- Composição ---------- */
.epr-mix { display: grid; gap: 1.1rem; justify-items: center; }
.epr-donut { position: relative; width: min(190px, 70%); aspect-ratio: 1; }
.epr-donut-svg { width: 100%; height: 100%; transform: rotate(0deg); }
.epr-donut-track { stroke: #eef2f7; }
.epr-donut-arc { transition: stroke-width 0.15s ease; animation: epr-fade 0.6s ease both; }
.epr-donut-arc:hover { stroke-width: 6; }
.epr-donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.epr-donut-center span { font-size: 0.72rem; color: var(--epr-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.epr-donut-center strong { font-size: 1.15rem; color: var(--epr-navy); font-variant-numeric: tabular-nums; }
.epr-mix-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; width: 100%; }
.epr-mix-legend li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.3rem 0.65rem; align-items: center; }
.epr-mix-key { width: 10px; height: 10px; border-radius: 3px; background: var(--epr-key); }
.epr-mix-text { display: grid; min-width: 0; }
.epr-mix-label { font-size: 0.84rem; font-weight: 600; color: var(--epr-text); }
.epr-mix-sub { font-size: 0.74rem; color: var(--epr-muted); }
.epr-mix-nums { display: grid; text-align: right; }
.epr-mix-nums strong { font-size: 0.88rem; font-variant-numeric: tabular-nums; color: var(--epr-navy); }
.epr-mix-nums span { font-size: 0.74rem; color: var(--epr-muted); }
.epr-mix-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.epr-mix-bar span { display: block; height: 100%; border-radius: inherit; animation: epr-slide 0.7s ease both; transform-origin: left; }
.epr-mix-note { margin: 1rem 0 0; padding: 0.6rem 0.75rem; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: 0.78rem; }
.epr-donut-skel { display: grid; justify-items: center; gap: 0.8rem; }

/* ---------- Toolbar e tabela ---------- */
.epr-toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.epr-search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 0.5rem; height: 40px; padding: 0 0.8rem; border: 1px solid var(--epr-border);
  border-radius: 11px; background: #fff; color: var(--epr-muted); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.epr-search svg { width: 17px; height: 17px; flex: none; }
.epr-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 0.88rem; color: var(--epr-text); }

.epr-table-wrap { overflow-x: auto; border: 1px solid #edf1f7; border-radius: 14px; transition: opacity 0.2s ease; }
.epr-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.epr-table thead th {
  position: sticky; top: 0; padding: 0.7rem 0.9rem; background: #f8fafc; text-align: left; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; border-bottom: 1px solid #edf1f7; white-space: nowrap;
}
.epr-table td { padding: 0.8rem 0.9rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; max-width: 240px; }
.epr-table td small { display: block; margin-top: 0.15rem; font-size: 0.72rem; color: var(--epr-muted); }
.epr-table tbody tr { transition: background 0.15s ease; }
.epr-table tbody tr:hover { background: #f8faff; }
.epr-table tbody tr:last-child td { border-bottom: 0; }
.epr-num { text-align: right; white-space: nowrap; }
.epr-amount { font-variant-numeric: tabular-nums; color: var(--epr-navy); }
.epr-unpriced { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 0.74rem; font-weight: 600; }
.epr-date { white-space: nowrap; }
.epr-ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epr-link { padding: 0; border: 0; background: none; color: var(--epr-blue); font: inherit; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.epr-link:hover { text-decoration: underline; }
.epr-link:focus-visible { outline: 2px solid var(--epr-blue); outline-offset: 2px; border-radius: 4px; }
.epr-muted { color: var(--epr-muted); }
.epr-actions-cell { text-align: right; width: 1%; white-space: nowrap; }
.epr-actions { display: inline-flex; gap: 0.15rem; }

.epr-status {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; white-space: nowrap;
}
.epr-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.epr-status[data-tone="draft"] { background: #fef3c7; color: #92400e; }
.epr-status[data-tone="issued"] { background: #dbeafe; color: #1d4ed8; }
.epr-status[data-tone="sent"] { background: #e0e7ff; color: #4338ca; }
.epr-status[data-tone="accepted"] { background: #dcfce7; color: #15803d; }
.epr-status[data-tone="closed"] { background: #f1f5f9; color: #475569; }

.epr-model { display: inline-block; padding: 0.2rem 0.55rem; border-radius: 8px; font-size: 0.74rem; font-weight: 600; border: 1px solid; white-space: nowrap; }
.epr-model[data-model="ESSENTIAL"] { color: #0f766e; border-color: #99f6e4; background: #f0fdfa; }
.epr-model[data-model="EXECUTIVE"] { color: #1e3a8a; border-color: #bfdbfe; background: #eff6ff; }
.epr-model[data-model="TECHNICAL"] { color: #6d28d9; border-color: #ddd6fe; background: #f5f3ff; }

.epr-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.9rem; font-size: 0.82rem; color: var(--epr-muted); }
.epr-pager strong { color: var(--epr-text); }
.epr-pager-ctrl { display: flex; align-items: center; gap: 0.5rem; }
.epr-pager-size { display: flex; align-items: center; gap: 0.4rem; }
.epr-pager-size select { height: 32px; border: 1px solid var(--epr-border); border-radius: 9px; padding: 0 0.4rem; background: #fff; }
.epr-pager-pos { min-width: 3.5rem; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Estados ---------- */
.is-refreshing { opacity: 0.55; pointer-events: none; }
.epr-skel {
  display: block; border-radius: 8px; background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 40%, #eef2f7 80%); background-size: 220% 100%;
  animation: epr-shimmer 1.3s ease-in-out infinite;
}
.epr-skel--sm { height: 12px; width: 45%; }
.epr-skel--md { height: 12px; width: 70%; }
.epr-skel--lg { height: 28px; width: 80%; }
.epr-skel--circle { width: 160px; height: 160px; border-radius: 50%; }
.epr-table-skel { display: grid; gap: 0.6rem; }
.epr-skel-row { display: grid; grid-template-columns: 1fr 2fr 2fr 1fr; gap: 1rem; padding: 0.85rem 0.5rem; border-bottom: 1px solid #f1f5f9; }
.epr-skel-row .epr-skel { width: 100%; }
.epr-empty {
  display: grid; justify-items: center; gap: 0.4rem; padding: 2.5rem 1rem; text-align: center; color: var(--epr-muted); font-size: 0.85rem;
}
.epr-empty svg { width: 52px; height: 52px; color: #93c5fd; stroke-width: 1.5; margin-bottom: 0.3rem; }
.epr-empty strong { color: var(--epr-navy); font-size: 0.98rem; }
.epr-empty .epr-btn { margin-top: 0.6rem; }
.epr-error {
  display: grid; justify-items: start; gap: 0.35rem; padding: 1rem 1.1rem; border-radius: 14px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 0.84rem;
}
.epr-kpis > .epr-error { grid-column: 1 / -1; }

.epr-criteria { border-radius: 14px; background: #fff; border: 1px dashed #cbd5e1; padding: 0.85rem 1.1rem; font-size: 0.8rem; color: var(--epr-muted); }
.epr-criteria summary { cursor: pointer; font-weight: 600; color: var(--epr-navy); }
.epr-criteria dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; margin: 0.8rem 0 0.5rem; }
.epr-criteria dt { font-weight: 600; color: var(--epr-text); }
.epr-criteria dd { margin: 0; }
.epr-criteria p { margin: 0.4rem 0 0; }

.epr-toast {
  position: fixed; z-index: 1200; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem); max-width: min(520px, 90vw);
  padding: 0.75rem 1rem; border-radius: 12px; background: #0f172a; color: #fff; font-size: 0.85rem; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease; box-shadow: 0 18px 36px -14px rgba(15, 23, 42, 0.6);
}
.epr-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Diálogo Nova proposta ---------- */
.epr-dialog-backdrop { position: fixed; inset: 0; z-index: 1100; background: rgba(11, 42, 91, 0.45); backdrop-filter: blur(2px); animation: epr-fade 0.2s ease both; }
.epr-dialog {
  position: fixed; z-index: 1101; left: 50%; top: 12vh; transform: translateX(-50%); width: min(560px, 94vw); max-height: 76vh; overflow: auto;
  display: grid; gap: 0.9rem; padding: 1.3rem; border-radius: 20px; background: #fff; box-shadow: 0 30px 60px -20px rgba(11, 42, 91, 0.5);
  animation: epr-dialog-in 0.25s ease both;
}
.epr-dialog header { display: flex; justify-content: space-between; gap: 0.75rem; }
.epr-dialog h2 { margin: 0; font-size: 1.1rem; color: var(--epr-navy); }
.epr-dialog header p { margin: 0.25rem 0 0; font-size: 0.82rem; color: var(--epr-muted); }
.epr-dialog footer { display: flex; justify-content: flex-end; }
.epr-search--dialog { flex: none; }
.epr-dialog-state { padding: 1.2rem; text-align: center; font-size: 0.85rem; color: var(--epr-muted); }
.epr-dialog-state.is-error { color: #9a3412; }
.epr-opp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.epr-opp {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 0.75rem; padding: 0.7rem 0.85rem; border-radius: 12px;
  border: 1px solid var(--epr-border); background: #fff; text-align: left; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.epr-opp:hover, .epr-opp:focus-visible { border-color: #93c5fd; background: #f8faff; outline: none; }
.epr-opp-name { font-weight: 600; color: var(--epr-navy); font-size: 0.88rem; }
.epr-opp-meta { grid-column: 1; font-size: 0.76rem; color: var(--epr-muted); }
.epr-opp-go { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.76rem; font-weight: 600; color: var(--epr-blue); }
.epr-opp-go svg { width: 14px; height: 14px; }

/* ---------- Animações ---------- */
@keyframes epr-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes epr-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes epr-slide { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes epr-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes epr-dialog-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes epr-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .epr *, .epr *::before, .epr *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1200px) {
  .epr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .epr-insights { grid-template-columns: 1fr; }
  .epr-mix { grid-template-columns: minmax(160px, 220px) 1fr; align-items: center; justify-items: stretch; }
  .epr-donut { width: 100%; }
}

@media (max-width: 760px) {
  .epr-header-actions { width: 100%; }
  .epr-header-actions .epr-field--period { flex: 1 1 100%; }
  .epr-header-actions .epr-field--period select { width: 100%; }
  .epr-header-actions .epl-btn { flex: 1 1 auto; justify-content: center; }
  .epr-custom { flex: 1 1 100%; }
  .epr-custom .epr-field { flex: 1 1 170px; min-width: 0; }
  .epr-custom .epr-field input { flex: 1; min-width: 0; }
  .epr-kpis { grid-template-columns: 1fr; gap: 0.75rem; }
  .epr-kpi { min-height: 0; }
  .epr-card { padding: 1rem; }
  .epr-mix { grid-template-columns: 1fr; justify-items: center; }
  .epr-donut { width: min(180px, 70%); }
  .epr-toolbar .epr-field { flex: 1 1 45%; }
  .epr-toolbar .epr-field select { width: 100%; }
  .epr-table-wrap { border: 0; overflow: visible; }
  .epr-table thead { display: none; }
  .epr-table, .epr-table tbody, .epr-table tr, .epr-table td { display: block; width: 100%; }
  .epr-table tr { margin-bottom: 0.75rem; padding: 0.6rem 0.8rem; border: 1px solid var(--epr-border); border-radius: 14px; background: #fff; }
  .epr-table td { display: grid; grid-template-columns: 7rem minmax(0, 1fr); align-items: center; gap: 0 0.75rem; max-width: none; padding: 0.4rem 0; border: 0; text-align: right; }
  .epr-table td::before { content: attr(data-label); grid-column: 1; grid-row: 1 / span 3; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--epr-muted); text-align: left; }
  .epr-table td > * { grid-column: 2; min-width: 0; justify-self: end; }
  .epr-table td.epr-actions-cell { width: auto; text-align: right; }
  .epr-criteria dl { grid-template-columns: 1fr; }
  .epr-dialog { top: 6vh; }
}
