:root {
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #fff2d6;
  --ink: #17191b;
  --ink-2: #4f5559;
  --ink-3: #858b8f;
  --border: #dedbd4;
  --border-strong: #b8b5ae;
  --accent: #f2a31a;
  --accent-soft: #fff0cb;
  --success: #5a9b7a;
  --success-soft: #e0f5ec;
  --warning: #a0742a;
  --danger: #b03060;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-feature-settings: 'ss01', 'cv11';
  min-height: 100vh;
  padding: 24px 16px 80px;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 48%),
    radial-gradient(circle at 95% 0%, rgba(242, 163, 26, 0.13) 0%, transparent 36%);
}

.container { max-width: 1180px; margin: 0 auto; }

/* HEADER */
header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.logo {
  height: 64px;
  width: 192px;
  object-fit: cover;
  object-position: left center;
  padding: 10px 14px;
  background: #17191b;
  border-radius: 8px;
  display: block;
  margin-bottom: 20px;
}
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 500;
}
h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
  font-variation-settings: "opsz" 144;
}
h1 em {
  font-style: normal;
  color: var(--accent);
  font-weight: 400;
}
.lede {
  color: var(--ink-2);
  font-size: 15px;
  max-width: 640px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.view-nav {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.view-nav button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 7px;
  padding: 9px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}
.view-nav button.active {
  background: var(--ink);
  color: var(--bg);
}
.view-nav button:hover:not(.active) {
  background: var(--surface-2);
  color: var(--ink);
}
.view { display: none; }
.view.active { display: block; }

/* LAYOUT */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
}
@media (max-width: 880px) {
  .grid { grid-template-columns: 1fr; gap: 24px; }
}

/* PANELS */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}
.panel.sticky {
  position: sticky;
  top: 24px;
}
@media (max-width: 880px) {
  .panel.sticky { position: static; }
  .panel { padding: 22px; }
}

.btn-save,
.btn-reset {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-family: 'Geist', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.btn-save {
  color: var(--success);
  border-color: var(--success);
}
.btn-save:hover:not(:disabled) {
  background: var(--success-soft);
}
.btn-save:disabled {
  opacity: 0.6;
  cursor: default;
}
.btn-reset {
  color: var(--ink-3);
}
.btn-reset:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(176, 48, 96, 0.05);
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  font-variation-settings: "opsz" 32;
}
.section-sub {
  color: var(--ink-3);
  font-size: 13px;
  margin-bottom: 24px;
}

/* INPUTS */
.input-group { margin-bottom: 18px; }
.input-group.divider {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
}
.input-group.divider .divider-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  gap: 8px;
}
label .left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
label .hint {
  font-weight: 400;
  color: var(--ink-3);
  font-size: 11px;
  cursor: help;
  border-bottom: 1px dotted var(--ink-3);
  flex-shrink: 0;
}

/* UNIT TOGGLE */
.unit-toggle {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.unit-toggle button {
  background: transparent;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-3);
  font-family: inherit;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.15s;
  min-width: 36px;
}
.unit-toggle button.active {
  background: var(--ink);
  color: var(--bg);
}
.unit-toggle button:hover:not(.active) {
  color: var(--ink);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .prefix,
.input-wrap .suffix {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink-3);
  pointer-events: none;
  font-weight: 500;
  transition: opacity 0.15s;
}
.input-wrap .prefix { left: 12px; }
.input-wrap .suffix { right: 12px; }
.input-wrap input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 11px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, padding 0.15s;
  -moz-appearance: textfield;
}
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-wrap.with-prefix input { padding-left: 32px; }
.input-wrap.with-suffix input { padding-right: 32px; }
.input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-wrap.featured input {
  font-size: 22px;
  padding: 16px 16px 16px 40px;
  font-weight: 600;
  background: var(--surface-2);
  border-color: var(--accent);
}
.input-wrap.featured .prefix {
  font-size: 18px;
  left: 16px;
  color: var(--accent);
}

.tip {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 6px;
  line-height: 1.45;
}

/* DUAL HERO COMPARISON */
.dual-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 540px) {
  .dual-hero { grid-template-columns: 1fr; }
}
.hero-card {
  border-radius: 14px;
  padding: 22px 22px 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.2s;
}
.hero-card.recommended {
  background: linear-gradient(135deg, #2d1f5e 0%, #4a3380 100%);
  color: #fdfdc9;
  border-color: transparent;
}
.hero-card.recommended::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(198, 159, 213, 0.35) 0%, transparent 70%);
  pointer-events: none;
}
.hero-card .badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--accent);
  color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
  z-index: 1;
}
.hero-card .scenario-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
  font-weight: 600;
}
.hero-card.recommended .scenario-label {
  color: rgba(253, 253, 201, 0.55);
}
.hero-card .card-explain {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.hero-card.recommended .card-explain {
  color: rgba(253, 253, 201, 0.65);
  border-bottom-color: rgba(253, 253, 201, 0.15);
}
.hero-card .price-block {
  margin-bottom: 16px;
}
.hero-card .price-block-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.hero-card.recommended .price-block-label {
  color: rgba(253, 253, 201, 0.45);
}
.hero-card .price-cheio {
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: line-through;
  margin-bottom: 1px;
  font-weight: 400;
}
.hero-card .price-cheio .price-cheio-de {
  font-size: 11px;
  margin-right: 2px;
}
.hero-card.recommended .price-cheio {
  color: rgba(253, 253, 201, 0.45);
}
.hero-card .price-cheio-row {
  margin-top: 6px;
}
.hero-card .price-cheio-chips-label {
  font-size: 10px;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.hero-card.recommended .price-cheio-chips-label {
  color: rgba(253, 253, 201, 0.4);
}
.hero-card .price-main {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4.5vw, 38px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  margin-bottom: 10px;
}
.hero-card .price-main .currency {
  font-size: 0.55em;
  color: var(--ink-3);
  margin-right: 4px;
  font-weight: 400;
}
.hero-card.recommended .price-main .currency {
  color: rgba(253, 253, 201, 0.6);
}
.hero-card .price-main .cents {
  font-size: 0.55em;
  color: var(--ink-3);
}
.hero-card.recommended .price-main .cents {
  color: rgba(253, 253, 201, 0.6);
}
.hero-card .card-total-block {
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hero-card.recommended .card-total-block {
  border-top-color: rgba(253, 253, 201, 0.2);
}
.hero-card .card-total-label {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.4;
}
.hero-card.recommended .card-total-label {
  color: rgba(253, 253, 201, 0.6);
}
.hero-card .card-total-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.hero-card.recommended .card-total-value {
  color: #fdfdc9;
}

/* ROUND ROW */
.round-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.round-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink-2);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.round-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}
.hero-card.recommended .round-btn {
  border-color: rgba(253,253,201,0.3);
  color: rgba(253,253,201,0.7);
}
.hero-card.recommended .round-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(253,253,201,0.7);
  color: #fdfdc9;
}
.round-suggestions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.round-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.round-chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.round-chip.best {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}
.round-chip.best::after {
  content: '★';
  margin-left: 3px;
  font-size: 8px;
  color: var(--accent);
}
.hero-card.recommended .round-chip {
  background: rgba(255,255,255,0.12);
  border-color: rgba(253,253,201,0.25);
  color: #fdfdc9;
}
.hero-card.recommended .round-chip.best {
  background: rgba(198,159,213,0.35);
  border-color: rgba(198,159,213,0.7);
}
.hero-card.recommended .round-chip:hover {
  background: rgba(198,159,213,0.5);
  border-color: rgba(198,159,213,0.9);
}
.round-applied-note {
  font-size: 10px;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}
.hero-card.recommended .round-applied-note {
  color: rgba(253,253,201,0.5);
}

.verdict {
  background: var(--accent-soft);
  border: 1px solid rgba(194, 65, 12, 0.2);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.55;
}
.verdict strong { color: var(--accent); font-weight: 600; }
.verdict code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255,255,255,0.7);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

/* SCENARIO CARDS */
.scenarios {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}
.scenario {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items: center;
}
@media (max-width: 540px) {
  .scenario {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .scenario .col-gratis, .scenario .col-cobrado {
    grid-column: 2;
    text-align: right;
  }
}
.scenario .icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 11px;
  color: var(--accent);
}
.scenario .info .name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 1px;
}
.scenario .info .detail {
  font-size: 11px;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
}
.scenario .col-gratis, .scenario .col-cobrado {
  text-align: right;
  min-width: 100px;
}
.scenario .col-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
  font-weight: 600;
}
.scenario .col-price {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.scenario .col-price.bad { color: var(--danger); }
.scenario-table-header {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  padding: 0 18px 6px;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.scenario-table-header .h-method { grid-column: 1 / 3; }
.scenario-table-header .h-col { text-align: right; min-width: 100px; }
@media (max-width: 540px) {
  .scenario-table-header { display: none; }
}

/* BREAKDOWN */
.breakdown {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.breakdown-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.breakdown-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
}
.breakdown-tabs button {
  background: transparent;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.15s;
}
.breakdown-tabs button.active {
  background: var(--ink);
  color: var(--bg);
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}
.breakdown-row:last-of-type { border-bottom: none; }
.breakdown-row.total {
  border-top: 1px solid var(--border-strong);
  border-bottom: none;
  margin-top: 6px;
  padding-top: 12px;
  font-weight: 600;
}
.breakdown-row .name { color: var(--ink-2); }
.breakdown-row .val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--ink);
}
.breakdown-row.income .val { color: var(--success); }
.breakdown-row.profit .val { color: var(--accent); font-size: 15px; }

.error-banner {
  background: #f9d8e8;
  border: 1px solid #d490b8;
  color: #6b1040;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.error-banner.show { display: block; }

/* STRATEGY */
.strategy {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.strategy-title {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.strategy-title::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.strategy p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
}
.strategy p + p { margin-top: 10px; }
.strategy code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

/* SALES GOALS */
.goals-grid {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.18fr);
}
@media (max-width: 880px) {
  .goals-grid { grid-template-columns: 1fr; }
}
.goal-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 4px;
}
.goal-toggle button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 8px;
  transition: background 0.15s, color 0.15s;
}
.goal-toggle button.active {
  background: var(--ink);
  color: var(--bg);
}
.goal-toggle button:hover:not(.active) {
  color: var(--ink);
}
.goal-sync {
  margin-top: 14px;
  border-left: 3px solid var(--accent);
  padding: 10px 12px;
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.55;
}
.goal-sync strong { color: var(--ink); }
.goal-hero {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #2d1f5e 0%, #4a3380 100%);
  color: #fdfdc9;
  padding: 26px;
  margin-bottom: 14px;
}
.goal-hero::before {
  content: '';
  position: absolute;
  right: -70px;
  top: -80px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(198, 159, 213, 0.25);
}
.goal-hero-label {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(253, 253, 201, 0.64);
  margin-bottom: 10px;
  font-weight: 600;
}
.goal-hero .price-main {
  position: relative;
  font-family: 'Fraunces', serif;
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  margin-bottom: 14px;
}
.goal-hero .currency,
.goal-hero .cents {
  color: rgba(253, 253, 201, 0.62);
  font-size: 0.55em;
  font-weight: 400;
}
.goal-hero .price-cheio {
  position: relative;
  font-size: 14px;
  color: rgba(253, 253, 201, 0.55);
  text-decoration: line-through;
  margin-bottom: 4px;
  font-weight: 400;
}
.goal-hero .price-cheio .price-cheio-de {
  font-size: 11px;
  margin-right: 2px;
  text-decoration: none;
}
.goal-daily {
  position: relative;
  border-top: 1px dashed rgba(253, 253, 201, 0.22);
  padding-top: 12px;
  font-size: 13px;
  color: rgba(253, 253, 201, 0.72);
}
.goal-daily strong {
  color: #fdfdc9;
  font-family: 'JetBrains Mono', monospace;
}
.goal-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
@media (max-width: 540px) {
  .goal-metrics { grid-template-columns: 1fr; }
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 102px;
}
.metric-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
  font-weight: 600;
}
.metric-card strong {
  display: block;
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.05;
  font-variation-settings: "opsz" 48;
}
.metric-card small {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
  margin-top: 6px;
}
.goal-breakdown {
  margin-bottom: 20px;
}
.market-notes {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--surface);
}
.market-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 8px;
}
.market-notes p {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.55;
}

/* EXPLAINER */
.explainer {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.explainer h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  font-variation-settings: "opsz" 72;
}
.explainer .lede { margin-bottom: 32px; }

.formula {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 28px;
  text-align: center;
}
.formula-eq {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(13px, 2vw, 17px);
  color: var(--ink);
  margin: 12px 0;
  line-height: 1.6;
}
.formula-eq .accent { color: var(--accent); font-weight: 600; }

.explainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.explainer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.explainer-card .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}
.explainer-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 8px;
}
.explainer-card p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}

.footer-note {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 20px 24px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.7;
}
.footer-note strong { color: var(--ink); font-weight: 600; }

/* UTILITIES */
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 420px) { .row-2 { grid-template-columns: 1fr; } }

[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  right: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  width: 240px;
  z-index: 10;
  margin-bottom: 6px;
  font-family: 'Geist', sans-serif;
  letter-spacing: normal;
  text-transform: none;
}

.admin-panel {
  margin: -18px 0 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.admin-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--border);
}
.admin-heading .eyebrow { margin: 0 0 4px; }
.admin-heading .section-title { margin: 0; }
.admin-heading .section-sub { margin: 0; }
.admin-content { padding: 16px 22px 22px; }
.user-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.user-form input {
  width: 190px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font: 12px 'JetBrains Mono', monospace;
  color: var(--ink);
}
.user-form select {
  width: 110px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: 12px 'JetBrains Mono', monospace;
}
.user-form input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.user-form select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.user-message { color: var(--success); font-size: 12px; }
.users-table-wrap { overflow-x: auto; }
.users-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}
.users-table th {
  padding: 10px 9px;
  background: var(--surface-2);
  color: var(--ink-2);
  font: 600 10px 'JetBrains Mono', monospace;
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.users-table td {
  padding: 13px 9px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2);
  white-space: nowrap;
}
.users-table tr:last-child td { border-bottom: 0; }
.users-table td strong { color: var(--ink); font-weight: 600; }
.role-badge, .status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  font: 600 10px 'JetBrains Mono', monospace;
  text-transform: uppercase;
}
.role-badge.admin { background: var(--accent-soft); color: #9b6200; }
.role-badge.viewer { background: #edf0f1; color: var(--ink-2); }
.status-badge.active { background: var(--success-soft); color: var(--success); }
.status-badge.inactive { background: #f9e4e4; color: var(--danger); }
.session-indicator { display: inline-flex; align-items: center; gap: 6px; }
.session-indicator i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.session-indicator.online i { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.user-actions { display: flex; gap: 6px; }
.table-action {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  font: 600 10px 'DM Sans', sans-serif;
}
.table-action:hover { border-color: var(--ink); color: var(--ink); }
.table-action.accent { border-color: var(--accent); color: #9b6200; }
.table-action:disabled { opacity: .5; cursor: wait; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 25, 27, .58);
}
.modal-backdrop[hidden] { display: none; }
.user-modal {
  width: min(100%, 440px);
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .25);
}
.modal-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.modal-heading .eyebrow { margin-bottom: 5px; }
.modal-heading h2 { font: 600 24px 'Space Grotesk', sans-serif; }
.modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.edit-user-form { display: grid; gap: 7px; }
.edit-user-form label { display: block; margin-top: 8px; }
.edit-user-form input, .edit-user-form select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: 13px 'DM Sans', sans-serif;
}
.edit-user-form input:focus, .edit-user-form select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.login-page {
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background-color: #101112;
  background-image: linear-gradient(rgba(16, 17, 18, .28), rgba(16, 17, 18, .42)), url('image/Capa Produto.png');
  background-position: center;
  background-size: cover;
}
.login-shell { width: min(100%, 460px); }
.login-panel {
  padding: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(45, 31, 94, 0.12);
}
.login-logo {
  width: 190px;
  height: 64px;
  object-fit: cover;
  object-position: left center;
  padding: 10px 14px;
  background: #17191b;
  border-radius: 8px;
  margin-bottom: 28px;
}
.login-panel h1 { font-size: clamp(30px, 7vw, 44px); margin-bottom: 10px; }
.login-lede { color: var(--ink-2); margin-bottom: 28px; }
.login-form { display: grid; gap: 8px; }
.login-form label { display: block; margin-top: 8px; }
.login-form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font: 14px 'JetBrains Mono', monospace;
  color: var(--ink);
}
.login-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-button {
  margin-top: 18px;
  padding: 13px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font: 600 12px 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
}
.login-button:disabled { opacity: .6; cursor: wait; }
.login-error { min-height: 20px; color: var(--danger); font-size: 12px; }
@media (max-width: 600px) {
  .login-panel { padding: 28px 22px; }
  .admin-heading { align-items: start; flex-direction: column; }
  .admin-content { padding: 14px; }
  .user-form { align-items: stretch; }
  .user-form input, .user-form select, .user-form button { width: 100%; }
  .users-table { min-width: 0; }
  .users-table thead { display: none; }
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; width: 100%; }
  .users-table tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .users-table tr:last-child { border-bottom: 0; }
  .users-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 0;
    border: 0;
    white-space: normal;
    text-align: right;
  }
  .users-table td::before {
    content: attr(data-label);
    color: var(--ink-3);
    font: 600 10px 'JetBrains Mono', monospace;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
  }
  .users-table .user-actions { justify-content: flex-end; padding-top: 10px; }
}
