/* Payaz Group Dashboard — tokens taken from app.payaz.software
 * (primary #009BA9, dark teal #005259, hover #017883, accent green #76B729,
 *  Inter, 6px radius, Tailwind/PrimeNG grey scale). */
:root {
  --primary: #009ba9;
  --primary-hover: #017883;
  --primary-dark: #005259;
  --primary-50: #e6f5f6;
  --primary-100: #c2e8eb;
  --accent: #76b729;
  --sidebar-bg: #212121;
  --sidebar-text: #d1d5db;
  --sidebar-muted: #9ca3af;
  --bg: #f9fafb;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #1f2937;
  --text-2: #4b5563;
  --text-3: #6b7280;
  --good: #1ea97c;
  --good-bg: #e7f7f1;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --bad: #e24c4c;
  --bad-bg: #fde8e8;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --gradient: linear-gradient(135deg, #76b729 0%, #3aa77a 45%, #009ba9 100%);
  font-family: Inter, "Inter var", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--text);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
button, input, select { font: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 22px 20px 18px; border-bottom: 1px solid #2f2f2f; }
.sidebar .brand img { height: 34px; display: block; }
.sidebar .brand .tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--sidebar-muted); margin-top: 8px; }
.sidebar nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; padding: 14px 10px 6px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius);
  color: var(--sidebar-text); font-weight: 500;
}
.sidebar nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.sidebar nav a:hover { background: #2c2c2c; color: #fff; }
.sidebar nav a.active { background: rgba(0, 155, 169, .18); color: #fff; box-shadow: inset 3px 0 0 var(--primary); }
.sidebar nav a .count { margin-left: auto; font-size: 12px; color: var(--sidebar-muted); }
.sidebar nav .church-link { font-weight: 400; font-size: 13px; padding: 7px 10px 7px 38px; }
.sidebar .foot { margin-top: auto; padding: 14px 20px; border-top: 1px solid #2f2f2f; font-size: 12px; color: var(--sidebar-muted); }
.sidebar .foot .org { color: #fff; font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.sidebar-scroll { overflow-y: auto; flex: 1; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 5;
}
.topbar .crumbs { font-size: 13px; color: var(--text-3); display: flex; gap: 6px; align-items: center; min-width: 0; }
.topbar .crumbs a { color: var(--text-3); }
.topbar .crumbs a:hover { color: var(--primary); }
.topbar .crumbs strong { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.btn.menu-btn { display: none; }
.content { padding: 24px 28px 48px; max-width: 1440px; width: 100%; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; margin: 0; color: var(--text); letter-spacing: -.01em; }
.page-head .sub { color: var(--text-3); margin-top: 4px; font-size: 13px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #f3f4f6; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); border-color: #f5b5b5; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 0 12px; height: 34px; color: var(--text-2); cursor: pointer; font-weight: 500; font-size: 13px; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button:hover { background: #f3f4f6; }
.seg button.on { background: var(--primary); color: #fff; }

.input, select.input {
  height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: #fff; color: var(--text); min-width: 0;
}
.month-select { height: 36px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.month-select.on { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-50); }
a.btn { text-decoration: none; }
.input:focus, .btn:focus-visible, .seg button:focus-visible { outline: 2px solid var(--primary-100); outline-offset: 1px; border-color: var(--primary); }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; color: var(--text-3); }
.search .input { padding-left: 34px; width: 240px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
label.field .hint { font-weight: 400; color: var(--text-3); font-size: 12px; }

/* ---------- Cards / KPIs ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 0; }
.card-head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.card-head .meta { color: var(--text-3); font-size: 12px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 16px 18px 18px; }

.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 16px; }
.cols-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); margin-bottom: 16px; }
.cols-even { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }

.kpi { padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .k-label { font-size: 12px; color: var(--text-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; color: var(--text); }
.kpi .k-foot { font-size: 12px; margin-top: 6px; color: var(--text-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kpi.hero { background: var(--gradient); border: 0; color: #fff; }
.kpi.hero .k-label, .kpi.hero .k-foot { color: rgba(255, 255, 255, .85); }
.kpi.hero .k-value { color: #fff; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; padding: 1px 6px; border-radius: 10px; font-size: 11.5px; }
.delta.up { color: #0f7a58; background: var(--good-bg); }
.delta.down { color: #b42318; background: var(--bad-bg); }
.delta.flat { color: var(--text-3); background: #f3f4f6; }
.kpi.hero .delta { background: rgba(255, 255, 255, .22); color: #fff; }

.demo-pill { background: #f59e0b; color: #1f2937; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 4px 10px; border-radius: 12px; white-space: nowrap; }

/* ---------- Biggest changes ---------- */
.mv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; }
.mv-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.mv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f1f3; cursor: pointer; }
.mv-row:last-child { border-bottom: 0; }
.mv-row:hover .strong { color: var(--primary); }
.mv-name { display: flex; flex-direction: column; min-width: 0; }
.mv-name .strong, .mv-name .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-name .muted { font-size: 12px; color: var(--text-3); }
.mv-fig { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; }
.mv-fig .muted { font-size: 12px; color: var(--text-3); }
.rep-up { color: #0f7a58; font-weight: 600; }
.rep-down { color: #b42318; font-weight: 600; }
@media (max-width: 860px) { .mv-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* ---------- Needs attention ---------- */
.nav-badge { margin-left: auto; background: #f59e0b; color: #1f2937; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; min-width: 20px; text-align: center; }
.att-list { padding-top: 6px; display: grid; }
.att-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid #f0f1f3; }
.att-item:last-child { border-bottom: 0; }
.att-icon svg { width: 18px; height: 18px; margin-top: 1px; }
.att-item.warn .att-icon { color: var(--warn); }
.att-item.info .att-icon { color: var(--primary); }
.att-title { font-weight: 600; color: var(--text); }
.att-title a { color: var(--text); }
.att-title a:hover { color: var(--primary); }
.att-detail { color: var(--text-2); font-size: 13px; margin-top: 3px; line-height: 1.5; }
.att-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
@media (max-width: 640px) { .att-item { grid-template-columns: 22px minmax(0, 1fr); } .att-actions { grid-column: 2; } }

/* ---------- Map ---------- */
.map-box { height: 460px; border-radius: var(--radius); overflow: hidden; position: relative; z-index: 0; isolation: isolate; background: #eef1f3; border: 1px solid var(--border); }
.map-box .leaflet-container { font-family: Inter, sans-serif; }
/* Mute the OpenStreetMap basemap so the teal church circles stand out */
.map-box .leaflet-tile-pane { filter: grayscale(1) brightness(1.08) contrast(.85) opacity(.85); }
.map-off { height: 100%; display: grid; place-items: center; color: var(--text-3); text-align: center; padding: 20px; }
.leaflet-tooltip.pgd-tip { background: #212121; color: #fff; border: 0; border-radius: 6px; padding: 10px 12px; font-family: Inter, sans-serif; font-size: 12.5px; line-height: 1.55; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.leaflet-tooltip.pgd-tip::before { border-top-color: #212121; }
.leaflet-tooltip.pgd-tip strong { font-size: 13.5px; }
.leaflet-tooltip.pgd-tip .muted { color: #9ca3af; }
.leaflet-tooltip.pgd-tip .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.leaflet-tooltip.pgd-label { background: rgba(255, 255, 255, .92); border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; box-shadow: none; color: var(--text); font: 600 11.5px Inter, sans-serif; }
.leaflet-tooltip.pgd-label::before { display: none; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.map-legend .dot { display: inline-block; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); vertical-align: middle; margin-right: 6px; }

.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 340px; }
.chart-box.short { height: 220px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-weight: 600; color: var(--text-2); background: #f9fafb; font-size: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none;
}
table.data th.sortable { cursor: pointer; }
table.data th.sortable:hover { color: var(--primary); }
table.data th .arrow { font-size: 10px; margin-left: 4px; color: var(--primary); }
table.data td { padding: 11px 14px; border-bottom: 1px solid #f0f1f3; color: var(--text-2); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover td { background: var(--primary-50); }
table.data td.r, table.data th.r { text-align: right; }
table.data td .strong { color: var(--text); font-weight: 600; }
table.data td .muted { color: var(--text-3); font-size: 12px; }
table.data tfoot td { font-weight: 600; color: var(--text); background: #f9fafb; border-top: 1px solid var(--border); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 13px; }
.pager .spacer { flex: 1; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: #f3f4f6; color: var(--text-2); }
.badge.api { background: var(--primary-50); color: var(--primary-dark); }
.badge.csv { background: #eef6e4; color: #3f6b12; }
.badge.demo { background: #f3f4f6; color: var(--text-3); }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.status svg { width: 14px; height: 14px; }
.status.good { color: #0f7a58; }
.status.warn { color: var(--warn); }

.bar-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.bar-cell .track { flex: 1; height: 6px; background: #f0f1f3; border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar-cell .fill { height: 100%; background: var(--primary); border-radius: 3px; }

/* ---------- Banners / empty ---------- */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13.5px; }
.banner svg { width: 18px; height: 18px; flex: none; }
.banner.info { background: var(--primary-50); color: var(--primary-dark); border: 1px solid var(--primary-100); }
.banner.warn { background: var(--warn-bg); color: #7c4a03; border: 1px solid #fde68a; }
.banner .actions { margin-left: auto; display: flex; gap: 8px; }
.banner a { font-weight: 600; }

.empty { text-align: center; padding: 64px 24px; }
.empty .hex { width: 64px; height: 64px; margin: 0 auto 16px; background: var(--gradient); clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); display: grid; place-items: center; color: #fff; }
.empty .hex svg { width: 28px; height: 28px; }
.empty h2 { margin: 0 0 6px; font-size: 18px; }
.empty p { color: var(--text-3); margin: 0 auto 20px; max-width: 460px; line-height: 1.5; }
.empty .actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 18px; }
.tabs button { border: 0; background: none; padding: 12px 10px; color: var(--text-3); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs .count { font-weight: 500; color: var(--text-3); margin-left: 4px; }

/* ---------- Heatmap ---------- */
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 11px; color: var(--text-3); }
.heat .cell { aspect-ratio: 1 / 1; border-radius: 3px; background: #f3f4f6; min-height: 10px; }
.heat .cell:hover { outline: 2px solid var(--primary-dark); outline-offset: 0; }
.heat .rl { display: flex; align-items: center; }
.heat .hl { text-align: center; }
.heat-legend { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; color: var(--text-3); }
.heat-legend .sw { width: 14px; height: 10px; border-radius: 2px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 8px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 40px rgba(0, 0, 0, .2); }
.modal header { display: flex; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal header h3 { margin: 0; font-size: 16px; }
.modal header .x { margin-left: auto; }
.modal .body { padding: 20px; display: grid; gap: 14px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: #f9fafb; border-radius: 0 0 8px 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drop {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; text-align: center;
  color: var(--text-3); cursor: pointer; background: #fcfcfd;
}
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-50); color: var(--primary-dark); }
.drop strong { color: var(--primary); }
.file-list { font-size: 12.5px; color: var(--text-2); display: grid; gap: 4px; }
.src-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.src-tabs button { border: 1px solid var(--border-strong); background: #fff; border-radius: var(--radius); padding: 12px; text-align: left; cursor: pointer; color: var(--text-2); }
.src-tabs button strong { display: block; color: var(--text); margin-bottom: 2px; }
.src-tabs button.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--primary-50); }
.src-tabs .soon { font-size: 10.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; margin-left: 6px; }
.error { color: var(--bad); font-size: 13px; }

.toast { position: fixed; bottom: 20px; right: 20px; background: #212121; color: #fff; padding: 12px 16px; border-radius: var(--radius); font-size: 13.5px; z-index: 60; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); display: flex; gap: 10px; align-items: center; max-width: 420px; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.legend-inline { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.legend-inline span { display: inline-flex; align-items: center; gap: 6px; }
.legend-inline i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.list-rows { display: grid; }
.list-rows .lr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid #f0f1f3; }
.list-rows .lr:last-child { border-bottom: 0; }
.list-rows .lr .name { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-rows .lr .val { font-weight: 600; text-align: right; }
.list-rows .lr .bar { grid-column: 1 / -1; height: 6px; background: #f0f1f3; border-radius: 3px; overflow: hidden; }
.list-rows .lr .bar i { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.list-rows .lr .sub { grid-column: 1 / -1; font-size: 12px; color: var(--text-3); }
.list-rows .lr.link { cursor: pointer; }
.list-rows .lr.link:hover .name { color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .cols-2, .cols-even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 30; }
  .btn.menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px 16px 40px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search .input { width: 100%; }
  .topbar .range-wrap { display: none; }
  .banner { flex-wrap: wrap; }
  .banner > div:not(.actions) { flex: 1 1 200px; }
  .banner .actions { margin-left: 30px; }
  .mobile-range { display: block !important; margin-bottom: 16px; }
}
.mobile-range { display: none; }
.mobile-range .seg { width: 100%; overflow-x: auto; }
/* ---------- Reports (screen) ---------- */
.report { padding: 36px 40px; max-width: 920px; margin: 0 auto; }
.rep-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 20px; margin-bottom: 8px; border-bottom: 3px solid transparent; border-image: var(--gradient) 1; }
.rep-logo { height: 30px; display: block; margin-bottom: 14px; }
.rep-kicker { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); font-weight: 700; }
.rep-head h1 { margin: 4px 0 2px; font-size: 26px; letter-spacing: -.01em; }
.rep-period { color: var(--text-2); font-size: 15px; }
.rep-meta { text-align: right; font-size: 12px; color: var(--text-3); line-height: 1.6; white-space: nowrap; }
.report section { margin-top: 26px; break-inside: avoid; }
.report h2 { font-size: 15px; margin: 0 0 10px; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .05em; }
.rep-sub { font-size: 12px; color: var(--text-3); margin: -6px 0 8px; }
.rep-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rep-kpis > div { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.rep-kpis > div:first-child { background: var(--primary-50); border-color: var(--primary-100); }
.rep-kpis span { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.rep-kpis b { display: block; font-size: 22px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.rep-kpis em { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); }
.rep-narrative { font-size: 14px; line-height: 1.65; color: var(--text); margin: 14px 0 0; }
.rep-table { font-size: 12.5px; }
.rep-table th, .rep-table td { padding: 7px 10px; }
.rep-table { width: 100%; table-layout: auto; }
.rep-table td, .rep-table th { white-space: normal; }
.rep-table td.num, .rep-table td.r { white-space: nowrap; }
.rep-up { color: #0f7a58; font-weight: 600; }
.rep-down { color: #b42318; font-weight: 600; }
.rep-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; }
.rep-two .rep-table th, .rep-two .rep-table td { padding: 7px 8px; }
.rep-small { font-size: 12.5px; color: var(--text-2); line-height: 1.6; margin: 0; }
.rep-notes textarea { width: 100%; height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.rep-notes-print { display: none; font-size: 13.5px; line-height: 1.6; }
.rep-foot { margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-3); }
@media (max-width: 860px) { .report { padding: 22px 18px; } .rep-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rep-two { grid-template-columns: 1fr; } .rep-head { flex-direction: column; } .rep-meta { text-align: left; } }

@media print {
  @page { size: A4; margin: 14mm 12mm; }
  .sidebar, .topbar, .page-head .actions, .btn, .report-controls, .toast, #overlay { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .report { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .report section { margin-top: 18px; }
  .rep-break { break-before: page; }
  .rep-notes textarea { display: none; }
  .rep-notes-print { display: block; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.data th { background: #f3f4f6 !important; }
  a { color: inherit; text-decoration: none; }
}
