:root {
  --bg: #1a1a1a;
  --bg-card: #242424;
  --border: #333333;
  --text: #f2f2f2;
  --text-muted: #a8a8a8;
  --accent: #ea6a2c;
  --accent-dark: #b6531f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3 {
  font-family: "Arial Black", "Archivo Black", sans-serif;
  margin: 0 0 8px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: #101010;
  border-bottom: 1px solid var(--border);
}

.header__logo { height: 48px; }
.header__title { text-align: right; }
.header__title h1 { font-size: 22px; }
.header__title p { margin: 0; color: var(--text-muted); font-size: 13px; }

.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  padding: 24px 32px;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.card__label { font-weight: bold; margin-bottom: 8px; }

label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }

input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 10px 12px;
  background: #1c1c1c;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
}

.input-prefix { display: flex; align-items: center; gap: 6px; background: #1c1c1c; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; }
.input-prefix span { color: var(--text-muted); }
.input-prefix input { border: none; background: transparent; padding: 10px 4px; }

.hint { font-size: 12px; color: var(--text-muted); margin: 6px 0 0; }

.field { margin-bottom: 16px; }
.hidden { display: none; }

.toggle-group { display: flex; align-items: center; gap: 12px; }
.toggle-option { font-size: 14px; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #444; border-radius: 24px; transition: .2s;
}
.slider::before {
  content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.scenario-list { padding-left: 18px; font-size: 13px; }
.scenario-list li { margin-bottom: 6px; }

.funnel { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; }
.funnel--compact .funnel-card { padding: 12px; }

.funnel-card {
  width: 100%; max-width: 480px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 18px; text-align: center;
}
.funnel-card--total { border-color: var(--accent); }
.funnel-card--roas .funnel-card__value { color: var(--accent); font-size: 28px; }
.funnel-card__icon { font-size: 22px; display: block; }
.funnel-card__label { display: block; font-size: 12px; color: var(--text-muted); text-transform: uppercase; margin-top: 6px; }
.funnel-card__value { display: block; font-size: 24px; font-weight: bold; margin-top: 4px; }

.funnel-metric {
  font-size: 12px; color: var(--text-muted);
  background: #1c1c1c; border: 1px solid var(--border); border-radius: 20px;
  padding: 4px 14px;
}
.funnel-metric strong { color: var(--accent); margin-left: 6px; }

.proposta-header { font-size: 14px; color: var(--text-muted); margin: -8px 0 16px; }

.funnel-badge {
  width: 100%; max-width: 480px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--accent); border-radius: 10px;
  padding: 14px;
}
.funnel-badge strong { display: block; color: var(--accent); font-size: 15px; }
.funnel-badge span { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.config-row { margin-bottom: 12px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.checkbox input { width: auto; }

.table-scroll { overflow-x: auto; margin-bottom: 16px; }
.table-scroll .projection-table { margin-bottom: 0; }

.projection-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 13px; }
.projection-table th, .projection-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: right; }
.projection-table th:first-child, .projection-table td:first-child { text-align: left; }
.projection-table tfoot td { font-weight: bold; color: var(--accent); }

.comparativo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .comparativo { grid-template-columns: 1fr; } }
.comparativo__col--highlight { border: 1px solid var(--accent); border-radius: 10px; padding: 8px; }

.badge { background: var(--accent); color: #111; font-size: 11px; font-weight: bold; padding: 3px 8px; border-radius: 12px; margin-left: 8px; }
.badge--muted { background: #444; color: var(--text); }

.deltas { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.delta { background: #1c1c1c; border: 1px solid var(--border); border-radius: 8px; padding: 12px; text-align: center; }
.delta span { display: block; font-size: 12px; color: var(--text-muted); }
.delta strong { display: block; font-size: 16px; color: var(--accent); margin-top: 4px; }

.levers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.lever { background: #1c1c1c; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.lever--active { border-color: var(--accent); }
.lever p { font-size: 13px; color: var(--text-muted); }

.panel { margin: 0; min-width: 0; }

.header__brand { display: flex; align-items: center; }

.results-panel { min-width: 0; }

.comparativo__col { padding: 8px; }

.btn-print {
  display: block; width: 100%; padding: 16px; margin-top: 8px;
  background: var(--accent); color: #111; border: none; border-radius: 10px;
  font-size: 16px; font-weight: bold; cursor: pointer;
}
.btn-print:hover { background: var(--accent-dark); }

.disclaimer { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 10px; }

@media print {
  .form-panel, .btn-print { display: none; }
  body { background: white; color: black; }
  .card, .funnel-card, .delta, .lever, .funnel-metric, .funnel-badge { background: white; border-color: #ccc; }
  .funnel-metric { color: #333; }
  .funnel-badge span { color: #333; }
  .layout { grid-template-columns: 1fr; padding: 0; }
  .proposta-header { color: #333; }
  .table-scroll { overflow: visible; }
}
