/* Simplified professional design */
:root{
  --bg:#f6f7fb; --text:#111827; --muted:#6b7280; --card:#fff; --stroke:#e5e7eb;
  --primary:#0ea5e9; --radius:14px; --shadow: 0 6px 20px rgba(17,24,39,.06);
}
*{box-sizing:border-box} html,body{height:100%} body{margin:0;font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
.topbar{display:flex;align-items:center;gap:18px;padding:12px 16px;background:#fff;border-bottom:1px solid var(--stroke);position:sticky;top:0;z-index:10}
.brand{font-weight:700}
.nav{display:flex;gap:8px;flex-wrap:wrap}
.tab{background:#fff;border:1px solid var(--stroke);border-radius:999px;padding:8px 12px;cursor:pointer}
.tab.active{background:var(--text);color:#fff;border-color:var(--text)}
.period{margin-left:auto}
main{padding:18px;max-width:1200px;margin:0 auto}
.grid{display:grid;gap:16px}
.cards-4{grid-template-columns:repeat(4,1fr)}
.cards-2{grid-template-columns:repeat(2,1fr)}
@media(max-width:900px){.cards-4{grid-template-columns:1fr 1fr}.cards-2{grid-template-columns:1fr}}
@media(max-width:640px){.cards-4{grid-template-columns:1fr}}
.card{background:var(--card);border:1px solid var(--stroke);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}
.card-h{font-weight:600;margin-bottom:10px}
.stat .stat-k{color:var(--muted);font-size:14px}
.stat .stat-n{font-size:26px;font-weight:700;margin-top:6px}
.muted{color:var(--muted);font-size:12px}
.legend{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.legend .chip{display:flex;align-items:center;gap:8px;border:1px solid var(--stroke);border-radius:999px;padding:6px 10px}
.legend .dot{width:10px;height:10px;border-radius:999px}
.budgets{display:grid;gap:12px}
.bdg-row{display:flex;align-items:center;gap:12px}
.bdg-label{width:160px}
.bdg-track{flex:1;height:12px;background:#f3f4f6;border-radius:999px;position:relative}
.bdg-fill{position:absolute;left:0;top:0;bottom:0;border-radius:999px;background:var(--primary)}
.bdg-meta{width:220px;text-align:right;color:var(--muted)}
.row{display:flex;flex-wrap:wrap;align-items:center}
.gap{gap:8px}
.btn{border:1px solid var(--stroke);background:#fff;border-radius:10px;padding:10px 12px;cursor:pointer}
.btn.primary{background:var(--primary);color:#fff;border-color:var(--primary)}
.table{overflow:auto;border:1px solid var(--stroke);border-radius:var(--radius)}
.table table{width:100%;border-collapse:collapse}
.table th,.table td{padding:10px;border-bottom:1px solid var(--stroke);text-align:left;font-size:14px}
.table th{background:#f9fafb;color:#374151}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--stroke);border-radius:999px;background:#fff}
.chip .dot{width:10px;height:10px;border-radius:999px}
.toast{position:fixed;bottom:16px;left:50%;transform:translateX(-50%) translateY(20px);background:#111827;color:#fff;padding:10px 14px;border-radius:8px;opacity:0;transition:.25s}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.tabpage{display:none}.tabpage.show{display:block}
