:root {
  --bg: #070b14; --surface: rgba(15, 23, 42, 0.78); --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc; --text-secondary: #cbd5e1; --muted: #94a3b8; --radius: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.5; overflow-x: hidden;
}
.bg-glow { position: fixed; border-radius: 50%; filter: blur(130px); pointer-events: none; z-index: 0; }
.bg-glow-1 { width: 560px; height: 560px; top: -200px; left: -120px; background: radial-gradient(circle, rgba(16,185,129,0.2), transparent 70%); }
.bg-glow-2 { width: 520px; height: 520px; top: 220px; right: -160px; background: radial-gradient(circle, rgba(34,211,238,0.15), transparent 70%); }
.app-shell { position: relative; z-index: 1; max-width: 1220px; margin: 0 auto; padding: 18px 20px 56px; display: flex; flex-direction: column; gap: 16px; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.pos { color: #34d399; }
.neg { color: #fb7185; }
.hidden { display: none !important; }
.print-only { display: none; }
a { color: #67e8f9; text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface); backdrop-filter: blur(18px); border: 1px solid var(--border); border-radius: var(--radius); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 850; font-size: 1.15rem; letter-spacing: -0.04em; background: linear-gradient(135deg, rgba(16,185,129,0.22), rgba(34,211,238,0.18)); border: 1.5px solid rgba(52,211,153,0.55); color: #34d399; box-shadow: 0 6px 20px rgba(16,185,129,0.2); flex-shrink: 0; }
.brand-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand-title { margin: 0; font-size: 1.25rem; letter-spacing: -0.025em; line-height: 1.15; }
.brand-sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card { background: var(--surface); backdrop-filter: blur(18px); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.section-card { display: flex; flex-direction: column; gap: 14px; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.card-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-label { display: block; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.section-title { margin: 3px 0 0; font-size: 1.08rem; font-weight: 700; letter-spacing: -0.015em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; border: 1px solid transparent; padding: 9px 14px; font-size: 0.85rem; font-weight: 650; cursor: pointer; transition: transform 0.12s, background 0.15s, border-color 0.15s; text-decoration: none !important; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 11px; font-size: 0.8rem; border-radius: 9px; }
.btn-primary { background: linear-gradient(135deg, #10b981, #059669); color: #031710; border-color: rgba(52,211,153,0.4); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-secondary { background: rgba(30,41,59,0.8); color: #f8fafc; border-color: rgba(148,163,184,0.26); }
.btn-secondary:hover { border-color: rgba(56,189,248,0.5); background: rgba(30,41,59,0.96); }
.btn-ghost { background: transparent; color: #cbd5e1; border-color: rgba(148,163,184,0.18); }
.btn-ghost:hover { background: rgba(148,163,184,0.1); color: #fff; }
.pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; border: 1px solid rgba(148,163,184,0.25); background: rgba(30,41,59,0.7); color: #e2e8f0; white-space: nowrap; }
.pill-emerald { background: rgba(16,185,129,0.16); color: #6ee7b7; border-color: rgba(52,211,153,0.4); }
.pill-cyan { background: rgba(34,211,238,0.14); color: #67e8f9; border-color: rgba(34,211,238,0.36); }
.pill-amber { background: rgba(245,158,11,0.16); color: #fcd34d; border-color: rgba(245,158,11,0.4); }
.pill-red { background: rgba(244,63,94,0.16); color: #fda4af; border-color: rgba(244,63,94,0.4); }
.hero-strip { display: flex; flex-direction: column; gap: 12px; background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(15,23,42,0.85)); border-color: rgba(52,211,153,0.25); }
.hero-strip-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.55; }
.preset-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.preset-chip { background: rgba(15,23,42,0.82); color: #e2e8f0; border: 1px solid rgba(148,163,184,0.26); border-radius: 999px; padding: 5px 12px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.preset-chip:hover { border-color: #22d3ee; background: rgba(34,211,238,0.12); color: #fff; }
.preset-chip.active { border-color: #10b981; background: rgba(16,185,129,0.18); color: #6ee7b7; }
.preset-chip-muted { color: var(--muted); }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.kpi-accent { background: linear-gradient(145deg, rgba(16,185,129,0.13), rgba(15,23,42,0.85)); border-color: rgba(52,211,153,0.35); }
.kpi-val { font-size: 1.32rem; font-weight: 800; letter-spacing: -0.02em; color: #f8fafc; }
.kpi-sub { font-size: 0.74rem; color: var(--muted); line-height: 1.35; }
.coast-section { border-color: rgba(34,211,238,0.28); }
.inline-ctrl { display: inline-flex; align-items: center; gap: 8px; background: rgba(7,11,20,0.55); border: 1px solid var(--border); border-radius: 10px; padding: 5px 10px; }
.inline-ctrl input { width: 112px; }
.coast-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.milestone-card { background: rgba(7,11,20,0.52); border: 1px solid rgba(148,163,184,0.2); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.milestone-card.milestone-done { background: linear-gradient(145deg, rgba(16,185,129,0.13), rgba(15,23,42,0.8)); border-color: rgba(52,211,153,0.45); }
.milestone-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.milestone-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.milestone-metrics > div { padding: 8px 10px; border-radius: 9px; background: rgba(15,23,42,0.72); border: 1px solid rgba(148,163,184,0.14); display: flex; flex-direction: column; gap: 2px; }
.milestone-metrics > div strong { font-size: 0.92rem; color: #f8fafc; }
.progress-track { height: 8px; border-radius: 999px; background: rgba(148,163,184,0.18); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #10b981, #22d3ee); transition: width 0.3s ease; }
.controls-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ctrl { display: flex; flex-direction: column; gap: 4px; }
.ctrl span { font-size: 0.74rem; color: var(--muted); font-weight: 500; }
.input-sm { width: 100%; background: rgba(7,11,20,0.78); border: 1px solid rgba(148,163,184,0.26); border-radius: 9px; color: #f8fafc; padding: 8px 10px; font-size: 0.86rem; font-family: inherit; outline: none; }
.input-sm:focus { border-color: #22d3ee; box-shadow: 0 0 0 2px rgba(34,211,238,0.16); }
.pill-group { display: inline-flex; background: rgba(7,11,20,0.7); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 3px; }
.pill-btn { border: none; background: transparent; color: var(--muted); font-size: 0.76rem; font-weight: 650; padding: 5px 10px; border-radius: 7px; cursor: pointer; }
.pill-btn.active { background: rgba(34,211,238,0.18); color: #67e8f9; }
.chart-wrap { position: relative; width: 100%; background: rgba(7,11,20,0.52); border: 1px solid rgba(148,163,184,0.15); border-radius: 13px; padding: 8px 6px 4px; }
.chart-svg { width: 100%; height: auto; display: block; cursor: crosshair; }
.chart-tooltip { position: absolute; top: 14px; pointer-events: none; min-width: 225px; background: rgba(7,11,20,0.94); border: 1px solid rgba(56,189,248,0.4); border-radius: 11px; padding: 10px 12px; font-size: 0.78rem; box-shadow: 0 12px 32px rgba(0,0,0,0.55); z-index: 10; }
.tt-title { font-weight: 750; color: #f8fafc; margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid rgba(148,163,184,0.18); }
.tt-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 3px; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.stats-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-tile { padding: 10px 12px; border-radius: 11px; background: rgba(7,11,20,0.56); border: 1px solid rgba(148,163,184,0.16); display: flex; flex-direction: column; gap: 3px; }
.stat-tile span { font-size: 0.73rem; color: var(--muted); }
.stat-tile strong { font-size: 0.98rem; color: #f8fafc; }
.renta-bridge { padding: 14px 16px; border-radius: 13px; background: linear-gradient(145deg, rgba(16,185,129,0.08), rgba(15,23,42,0.72)); border: 1px solid rgba(52,211,153,0.28); display: flex; flex-direction: column; gap: 10px; }
.renta-bridge-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.renta-bar { display: flex; height: 11px; border-radius: 999px; overflow: hidden; background: rgba(148,163,184,0.16); gap: 2px; }
.renta-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.renta-col { padding: 10px 12px; border-radius: 10px; background: rgba(7,11,20,0.56); border: 1px solid rgba(148,163,184,0.14); display: flex; flex-direction: column; gap: 3px; }
.renta-col strong { font-size: 1rem; color: #f8fafc; }
.nw-bar-block { display: flex; flex-direction: column; gap: 8px; }
.nw-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(148,163,184,0.14); gap: 2px; }
.nw-seg { height: 100%; }
.nw-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-secondary); }
.dual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.subbox { padding: 14px 16px; border-radius: 13px; background: rgba(7,11,20,0.46); border: 1px solid rgba(148,163,184,0.16); display: flex; flex-direction: column; gap: 10px; }
.subbox-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 7px; flex-wrap: wrap; }
.inline-form .input-sm { flex: 1 1 115px; min-width: 90px; }
.items-list { display: flex; flex-direction: column; gap: 8px; }
.item-row { padding: 10px 12px; border-radius: 10px; background: rgba(15,23,42,0.72); border: 1px solid rgba(148,163,184,0.16); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.item-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.item-del:hover { color: #fb7185; background: rgba(244,63,94,0.12); }
.prepay-box { padding: 16px; border-radius: 13px; background: rgba(7,11,20,0.5); border: 1px solid rgba(148,163,184,0.18); display: flex; flex-direction: column; gap: 12px; }
.prepay-controls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; }
.ctrl-check { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-secondary); cursor: pointer; }
.prepay-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.prepay-card { padding: 12px 14px; border-radius: 11px; background: rgba(15,23,42,0.72); border: 1px solid rgba(148,163,184,0.16); display: flex; flex-direction: column; gap: 4px; }
.prepay-card-win { background: linear-gradient(145deg, rgba(16,185,129,0.14), rgba(15,23,42,0.82)); border-color: rgba(52,211,153,0.45); }
.prepay-card strong { font-size: 1.08rem; }
.newsletter-card { background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(34,211,238,0.06), rgba(15,23,42,0.9)); border-color: rgba(52,211,153,0.35); }
.newsletter-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: center; }
.newsletter-title { margin: 0; font-size: 1.2rem; letter-spacing: -0.02em; }
.newsletter-bullets { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 0.84rem; color: var(--text-secondary); }
.site-footer { margin-top: 8px; padding: 18px 20px; border-radius: var(--radius); background: rgba(15,23,42,0.55); border: 1px solid rgba(148,163,184,0.14); display: flex; flex-direction: column; gap: 10px; }
.footer-privacy { font-size: 0.82rem; color: var(--text-secondary); }
.footer-legal { line-height: 1.55; }
.footer-bottom { display: flex; gap: 10px; align-items: center; padding-top: 6px; border-top: 1px solid rgba(148,163,184,0.12); }
.toast { position: fixed; bottom: 22px; right: 22px; background: rgba(15,23,42,0.96); color: #f8fafc; border: 1px solid rgba(52,211,153,0.5); padding: 11px 16px; border-radius: 12px; font-size: 0.84rem; font-weight: 600; box-shadow: 0 14px 36px rgba(0,0,0,0.55); z-index: 100; }
.toast.toast-err { border-color: rgba(244,63,94,0.6); color: #fecdd3; }
@media (max-width: 1024px) { .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .controls-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .prepay-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .coast-grid, .dual-grid, .newsletter-grid, .renta-cols, .prepay-result { grid-template-columns: 1fr; } .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .controls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .milestone-metrics { grid-template-columns: 1fr; } .prepay-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .app-shell { padding: 12px 12px 44px; } .kpi-grid { grid-template-columns: 1fr; } }
@media print {
  body { background: #fff !important; color: #0f172a !important; }
  .bg-glow, .no-print, .toast { display: none !important; }
  .print-only { display: block !important; }
  .print-header { margin-bottom: 12px; border-bottom: 2px solid #0f172a; padding-bottom: 8px; }
  .print-header h1 { margin: 0; font-size: 1.35rem; color: #0f172a; }
  .card, .milestone-card, .subbox, .prepay-box, .renta-bridge, .stat-tile, .renta-col, .prepay-card { background: #fff !important; color: #0f172a !important; border-color: #cbd5e1 !important; box-shadow: none !important; break-inside: avoid; }
  .kpi-val, strong, .section-title, .milestone-metrics > div strong, .stat-tile strong, .renta-col strong { color: #0f172a !important; }
  .muted, .card-label, .kpi-sub, .ctrl span { color: #475569 !important; }
  .input-sm { background: #f8fafc !important; color: #0f172a !important; border-color: #cbd5e1 !important; }
}