:root {
  --ink: #111827;
  --muted: #667085;
  --soft: #98a2b3;
  --line: #e7eaf0;
  --canvas: #f4f6f9;
  --surface: #ffffff;
  --sidebar: #0b1220;
  --blue: #2563eb;
  --blue-strong: #1d4ed8;
  --blue-soft: #eff6ff;
  --green: #0f9f6e;
  --green-soft: #ecfdf5;
  --red: #e34949;
  --red-soft: #fff1f2;
  --amber: #e99922;
  --amber-soft: #fffbeb;
  --purple: #7557d5;
  --shadow: 0 8px 30px rgba(15, 23, 42, .06);
  --radius: 18px;
  --font: "DM Sans", Arial, sans-serif;
  --heading: "Manrope", "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); color: var(--ink); font-family: var(--font); }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: 244px; padding: 26px 18px;
  display: flex; flex-direction: column; background: var(--sidebar); color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8); color: #fff; font-family: var(--heading); font-weight: 800;
  box-shadow: 0 8px 22px rgba(37,99,235,.34);
}
.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--heading); font-size: 14px; letter-spacing: -.02em; }
.brand small { color: #95a2b8; font-size: 11px; margin-top: 3px; }
.side-nav { display: grid; gap: 7px; }
.nav-item {
  width: 100%; border: 0; border-radius: 12px; padding: 12px 13px; display: flex; gap: 12px; align-items: center;
  background: transparent; color: #aeb9cb; text-align: left; font-weight: 600; font-size: 13px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item span { width: 20px; text-align: center; color: #7f90aa; font-size: 17px; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(59,130,246,.15); color: #fff; box-shadow: inset 3px 0 #3b82f6; }
.nav-item.active span { color: #69a5ff; }
.sidebar-footer { margin-top: auto; }
.sync-card { padding: 13px; margin-bottom: 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; display: flex; align-items: center; gap: 10px; }
.sync-card strong, .sync-card small { display: block; }
.sync-card strong { font-size: 12px; }
.sync-card small { margin-top: 2px; color: #95a2b8; font-size: 10px; }
.status-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #28c990; box-shadow: 0 0 0 4px rgba(40,201,144,.13); }
.nav-item.subtle { padding-left: 10px; }

.main-content { margin-left: 244px; min-height: 100vh; padding: 24px 30px 48px; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 64px; gap: 20px; }
.topbar h1 { margin: 3px 0 0; font: 800 27px/1.15 var(--heading); letter-spacing: -.035em; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.scope-switch { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 4px 14px rgba(15,23,42,.03); }
.scope-option { border: 0; padding: 8px 11px; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 800; font-size: 12px; }
.scope-option span { margin-left: 4px; font-weight: 600; }
.scope-option.active { background: var(--ink); color: #fff; box-shadow: 0 3px 8px rgba(17,24,39,.18); }
.primary-btn, .secondary-btn, .danger-btn, .icon-action {
  border-radius: 11px; border: 0; min-height: 40px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; font-size: 12px;
}
.primary-btn { color: #fff; background: var(--blue); box-shadow: 0 7px 18px rgba(37,99,235,.2); }
.primary-btn:hover { background: var(--blue-strong); }
.primary-btn.full { width: 100%; height: 46px; }
.secondary-btn { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.danger-btn { background: var(--red); color: #fff; }
.icon-action { width: 40px; padding: 0; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 18px; }
.icon-action.loading { animation: spin .8s linear infinite; }
.mobile-menu { display: none; }

.filter-row { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 18px; }
.period-control { position: relative; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; padding: 4px; border-radius: 13px; }
.icon-btn { border: 0; background: transparent; border-radius: 8px; width: 34px; height: 34px; color: var(--muted); font-size: 20px; }
.icon-btn:hover { background: var(--canvas); color: var(--ink); }
.period-label { border: 0; background: transparent; min-width: 145px; text-align: left; padding: 2px 10px; color: var(--ink); }
.period-label span, .period-label small { display: block; }
.period-label span { font-weight: 700; font-size: 12px; }
.period-label small { color: var(--soft); font-size: 9px; margin-top: 1px; }
#monthInput { position: absolute; inset: 0; width: 100%; opacity: 0; pointer-events: none; }
.view-note { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }

.view-panel { display: none; }
.view-panel.active { display: block; animation: fadeIn .22s ease; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.kpi-card { padding: 19px; min-height: 136px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 15px rgba(15,23,42,.025); }
.kpi-card.featured { color: #fff; border-color: transparent; background: linear-gradient(135deg, #2563eb 0%, #2e6ce4 50%, #1e50bf 100%); box-shadow: 0 12px 32px rgba(37,99,235,.21); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; }
.featured .kpi-top { color: rgba(255,255,255,.72); }
.kpi-card > strong { display: block; margin: 15px 0 17px; font: 800 23px/1 var(--heading); letter-spacing: -.04em; }
.metric-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: var(--blue); background: var(--blue-soft); }
.metric-icon.positive { color: var(--green); background: var(--green-soft); }
.metric-icon.negative { color: var(--red); background: var(--red-soft); }
.metric-icon.warning { color: var(--amber); background: var(--amber-soft); }
.featured .metric-icon { background: rgba(255,255,255,.15); color: #fff; }
.kpi-foot { display: flex; align-items: center; gap: 7px; color: var(--soft); font-size: 9px; }
.tag { padding: 3px 6px; border-radius: 20px; background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.tag.positive { background: var(--green-soft); color: var(--green); }
.tag.negative { background: var(--red-soft); color: var(--red); }
.tag.warning { background: var(--amber-soft); color: var(--amber); }
.trend { font-size: 10px; color: rgba(255,255,255,.7); }

.dashboard-grid { margin-top: 14px; display: grid; grid-template-columns: 1.45fr 1fr; gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.panel-header { padding: 19px 20px 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-header h2, .section-intro h2 { margin: 4px 0 0; font: 800 16px/1.2 var(--heading); letter-spacing: -.025em; }
.panel-header p, .section-intro p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.legend { display: flex; gap: 13px; color: var(--muted); font-size: 9px; font-weight: 600; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.legend-dot.income { background: var(--blue); }
.legend-dot.expense { background: #ef7d61; }
.chart-wrap { height: 250px; padding: 0 16px 14px; position: relative; }
.chart-wrap canvas { display: block; width: 100%; height: 100%; }
.text-btn { border: 0; background: transparent; color: var(--blue); font-size: 10px; font-weight: 700; }

.donut-layout { min-height: 250px; display: grid; grid-template-columns: 145px 1fr; align-items: center; gap: 16px; padding: 0 20px 18px; }
.donut { width: 138px; height: 138px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue) 0 40%, #61a3fa 40% 65%, #90c2ff 65% 80%, #c9e0ff 80%); position: relative; }
.donut::after { content: ""; position: absolute; width: 88px; height: 88px; border-radius: 50%; background: #fff; }
.donut > div { position: relative; z-index: 1; text-align: center; }
.donut strong, .donut small { display: block; }
.donut strong { font: 800 14px var(--heading); }
.donut small { margin-top: 3px; color: var(--soft); font-size: 9px; }
.category-legend { display: grid; gap: 11px; }
.category-row { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; font-size: 10px; }
.category-row i { width: 8px; height: 8px; border-radius: 50%; }
.category-row span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-row strong { font-size: 10px; }

.upcoming-list { padding: 0 20px 18px; display: grid; gap: 3px; }
.upcoming-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; padding: 11px 0; border-bottom: 1px solid #f0f2f5; }
.upcoming-item:last-child { border-bottom: 0; }
.date-badge { width: 38px; padding: 5px 0; border-radius: 9px; background: var(--blue-soft); color: var(--blue); text-align: center; }
.date-badge strong, .date-badge small { display: block; }
.date-badge strong { font: 800 14px var(--heading); }
.date-badge small { font-size: 7px; text-transform: uppercase; }
.upcoming-copy strong, .upcoming-copy small { display: block; }
.upcoming-copy strong { font-size: 11px; }
.upcoming-copy small { margin-top: 3px; color: var(--soft); font-size: 9px; }
.upcoming-value { text-align: right; }
.upcoming-value strong, .upcoming-value small { display: block; }
.upcoming-value strong { font-size: 11px; }
.upcoming-value small { margin-top: 3px; color: var(--amber); font-size: 8px; }

.projection-bars { padding: 6px 20px 18px; display: grid; gap: 13px; }
.projection-bar-row { display: grid; grid-template-columns: 42px 1fr 78px; gap: 10px; align-items: center; font-size: 9px; }
.projection-bar-row > span { color: var(--muted); text-transform: capitalize; }
.projection-bar-row > strong { text-align: right; font-size: 9px; }
.bar-track { height: 8px; border-radius: 10px; background: #edf0f5; overflow: hidden; }
.bar-fill { height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #69a3fb); }

.recent-panel { margin-top: 14px; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 710px; }
.data-table th { padding: 10px 20px; color: var(--soft); background: #fafbfc; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 9px; text-align: left; text-transform: uppercase; letter-spacing: .04em; }
.data-table td { padding: 13px 20px; border-bottom: 1px solid #f0f2f5; font-size: 10px; vertical-align: middle; }
.data-table tbody tr:hover { background: #fafcff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.amount-col { text-align: right !important; }
.transaction-name { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.transaction-icon { display: grid; place-items: center; width: 31px; height: 31px; flex: none; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: 13px; }
.transaction-name strong, .transaction-name small { display: block; }
.transaction-name strong { font-size: 10px; }
.transaction-name small { margin-top: 2px; color: var(--soft); font-size: 8px; }
.status-pill { display: inline-block; padding: 4px 8px; border-radius: 20px; background: var(--amber-soft); color: #a46710; font-size: 8px; font-weight: 700; }
.status-pill.paid { background: var(--green-soft); color: var(--green); }
.status-pill.late { background: var(--red-soft); color: var(--red); }
.amount-positive { color: var(--green); font-weight: 700; }
.amount-negative { color: var(--ink); font-weight: 700; }
.row-menu { border: 0; background: transparent; color: var(--soft); padding: 6px; border-radius: 7px; }
.row-menu:hover { background: var(--canvas); color: var(--ink); }

.section-intro { margin-bottom: 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.section-intro h2 { font-size: 22px; }
.projection-highlight { min-width: 230px; padding: 13px 16px; border-radius: 14px; background: var(--blue-soft); text-align: right; }
.projection-highlight span, .projection-highlight strong { display: block; }
.projection-highlight span { color: var(--blue); font-size: 9px; font-weight: 700; }
.projection-highlight strong { margin-top: 5px; font: 800 17px var(--heading); color: var(--blue-strong); }
.projection-chart { height: 330px; padding-top: 18px; }
.table-panel { margin-top: 14px; }
.large-table { min-height: 450px; }
.responsive-header { align-items: center; }
.table-actions { display: flex; gap: 8px; }
.search-box { min-width: 220px; height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.search-box span { color: var(--soft); }
.search-box input { width: 100%; border: 0; outline: 0; font-size: 10px; }
.table-actions select { height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); padding: 0 10px; font-size: 10px; }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-state > span { font-size: 32px; color: var(--soft); }
.empty-state h3 { margin: 10px 0 4px; font: 800 16px var(--heading); color: var(--ink); }
.empty-state p { margin: 0; font-size: 10px; }

.records-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.record-card { position: relative; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.record-card-top { display: flex; justify-content: space-between; gap: 12px; }
.record-card .record-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--blue-soft); color: var(--blue); font-size: 17px; }
.record-actions { display: flex; gap: 2px; }
.record-actions button { border: 0; background: transparent; color: var(--soft); border-radius: 7px; width: 29px; height: 29px; }
.record-actions button:hover { background: var(--canvas); color: var(--ink); }
.record-card h3 { margin: 15px 0 3px; font: 800 14px var(--heading); }
.record-card .category { color: var(--muted); font-size: 9px; }
.record-value { margin: 17px 0 14px; font: 800 21px var(--heading); letter-spacing: -.035em; }
.record-meta { padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--soft); font-size: 9px; }
.record-meta strong { color: var(--muted); }
.record-progress { margin: 13px 0 7px; height: 6px; border-radius: 10px; background: #edf0f5; overflow: hidden; }
.record-progress span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }

.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,10,20,.58); backdrop-filter: blur(4px); }
.modal-card { position: relative; z-index: 1; width: min(690px, 100%); max-height: min(800px, 92vh); overflow-y: auto; border-radius: 22px; background: #fff; box-shadow: 0 30px 90px rgba(3,8,18,.28); }
.modal-header { padding: 22px 24px 18px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 4px 0 0; font: 800 20px var(--heading); }
.record-form { padding: 20px 24px 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field > span { color: #475467; font-size: 10px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; border: 1px solid #dfe3ea; border-radius: 10px; background: #fff; outline: 0; padding: 0 11px; color: var(--ink); font-size: 11px; transition: border .15s, box-shadow .15s; }
.field textarea { padding: 10px 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #8ab3ff; box-shadow: 0 0 0 3px rgba(37,99,235,.09); }
.inline-switch { display: flex; padding: 4px; border: 1px solid var(--line); background: #f8fafc; border-radius: 11px; }
.nature-option { flex: 1; height: 34px; border: 0; background: transparent; border-radius: 8px; color: var(--muted); font-size: 10px; font-weight: 700; }
.nature-option.active { background: #fff; color: var(--blue); box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.money-input { display: flex; align-items: center; border: 1px solid #dfe3ea; border-radius: 10px; overflow: hidden; }
.money-input:focus-within { border-color: #8ab3ff; box-shadow: 0 0 0 3px rgba(37,99,235,.09); }
.money-input span { padding-left: 11px; color: var(--muted); font-size: 11px; }
.money-input input { border: 0; box-shadow: none !important; }
.modal-footer { padding-top: 20px; display: flex; justify-content: flex-end; gap: 9px; }
.confirmation-card { width: min(420px,100%); padding: 30px; text-align: center; }
.confirmation-card h2 { margin: 15px 0 8px; font: 800 20px var(--heading); }
.confirmation-card p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.confirmation-card .modal-footer { justify-content: center; }
.danger-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto; border-radius: 50%; background: var(--red-soft); color: var(--red); font: 800 22px var(--heading); }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 25% 15%, rgba(37,99,235,.25), transparent 30%), radial-gradient(circle at 80% 70%, rgba(29,78,216,.17), transparent 35%), #0b1220; }
.login-card { width: min(430px,100%); padding: 34px; border-radius: 24px; background: rgba(255,255,255,.98); box-shadow: 0 35px 110px rgba(0,0,0,.35); }
.brand-dark { padding: 0 0 28px; color: var(--ink); }
.brand-dark small { color: var(--muted); }
.login-copy h1 { margin: 10px 0 9px; font: 800 29px/1.15 var(--heading); letter-spacing: -.045em; }
.login-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.login-form { margin-top: 27px; }
.login-form > label { display: block; margin-bottom: 7px; color: #475467; font-size: 10px; font-weight: 700; }
.password-field { height: 45px; margin-bottom: 12px; display: flex; align-items: center; border: 1px solid #dfe3ea; border-radius: 11px; }
.password-field input { flex: 1; height: 100%; border: 0; outline: 0; padding: 0 13px; background: transparent; font-size: 11px; }
.form-error { min-height: 16px; margin: 9px 0 0; color: var(--red); font-size: 9px; text-align: center; }

.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 9px; }
.toast { min-width: 260px; max-width: 360px; padding: 13px 15px; border-radius: 12px; color: #fff; background: #172033; box-shadow: 0 15px 45px rgba(0,0,0,.22); font-size: 10px; animation: slideUp .25s ease; }
.toast.success { background: #087a58; }
.toast.error { background: #b72e38; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .records-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(0,0,0,.18); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 20px 18px 40px; }
  .mobile-menu { display: inline-grid; place-items: center; float: left; width: 35px; height: 35px; margin-right: 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .scope-switch { order: 1; }
  #openAddBtn { order: 2; }
  .icon-action { order: 3; }
}

@media (max-width: 640px) {
  .main-content { padding: 16px 12px 34px; }
  .topbar { display: block; }
  .topbar h1 { font-size: 23px; }
  .top-actions { margin-top: 17px; display: grid; grid-template-columns: 1fr 42px; }
  .scope-switch { grid-column: 1 / -1; width: 100%; }
  .scope-option { flex: 1; }
  #openAddBtn { width: 100%; }
  .filter-row { margin-top: 16px; }
  .view-note { display: none; }
  .period-control { width: 100%; justify-content: space-between; }
  .period-label { flex: 1; text-align: center; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi-card { min-height: 124px; padding: 15px; }
  .kpi-card > strong { font-size: 18px; margin: 14px 0; }
  .kpi-foot { display: block; line-height: 1.7; }
  .kpi-foot span:last-child { display: none; }
  .panel-header { padding: 16px 15px 11px; }
  .legend { display: none; }
  .chart-wrap { height: 220px; padding-left: 8px; padding-right: 8px; }
  .donut-layout { grid-template-columns: 125px 1fr; padding: 0 15px 16px; gap: 10px; }
  .donut { width: 118px; height: 118px; }
  .donut::after { width: 76px; height: 76px; }
  .upcoming-list, .projection-bars { padding-left: 15px; padding-right: 15px; }
  .section-intro { display: block; }
  .section-intro .primary-btn, .projection-highlight { margin-top: 14px; width: 100%; }
  .projection-highlight { text-align: left; }
  .records-grid { grid-template-columns: 1fr; }
  .responsive-header { display: block; }
  .table-actions { margin-top: 14px; display: grid; }
  .search-box { min-width: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: 1; }
  .modal { padding: 0; align-items: end; }
  .modal-card { width: 100%; max-height: 93vh; border-radius: 22px 22px 0 0; }
  .modal-header { padding: 18px; }
  .record-form { padding: 16px 18px 22px; }
  .login-card { padding: 27px 23px; }
  .toast-region { right: 12px; left: 12px; bottom: 12px; }
  .toast { min-width: 0; max-width: none; }
}

@media (max-width: 390px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .scope-option span { display: none; }
  .donut-layout { grid-template-columns: 1fr; justify-items: center; }
  .category-legend { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
