:root {
  --navy: #0d0d0f;
  --navy-2: #1d1d21;
  --gold: #d4a53c;
  --gold-soft: #f8f0dc;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --border: #e6e3dc;
  --text: #141414;
  --text-2: #57544e;
  --muted: #8f8a80;
  --primary: #c99a2e;
  --primary-hover: #b4861d;
  --accent: #00838e;
  --accent-dark: #00646e;
  --accent-soft: #e0f3f4;
  --danger: #c43c3c;
  --good: #0f7a3a;
  --good-bg: #e5f4ea;
  --lost-bg: #fbe9e9;
  --open-bg: #e0f3f4;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .06);
  --series-1: #00939f;
  --series-2: #c08a1e;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 14px; line-height: 1.45; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--navy); color: #d9d4c8; border-right: 1px solid rgba(212,165,60,.22);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
a.brand:hover { text-decoration: none; }
.brand-logo { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: block; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.auth-logo { width: 150px; height: 150px; border-radius: 50%; display: block; margin-bottom: 28px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.auth-logo-sm { display: none; width: 88px; height: 88px; border-radius: 50%; align-self: center; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--navy-2); display: grid; place-items: center; flex-shrink: 0; }
.brand-mark span { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--gold); }
.brand-name { font-weight: 700; color: #fff; font-size: 14px; line-height: 1.2; }
.brand-sub { font-size: 11px; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.viewing { display: block; padding: 14px 16px 0; }
.viewing span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.viewing select { background: var(--navy-2); color: #fff; border-color: rgba(255,255,255,.15); }
.owner-tag { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--accent-dark); background: var(--accent-soft); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #c9c4b8; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(212,165,60,.14); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.side-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot .role { color: var(--muted); font-size: 12px; }
.side-foot .links { display: flex; gap: 14px; margin-top: 8px; }
.side-foot a, .side-foot button { color: #c9c4b8; background: none; border: 0; padding: 0; cursor: pointer; font-size: 13px; }
.side-foot a:hover, .side-foot button:hover { color: #fff; }

.main { flex: 1; min-width: 0; padding: 26px 32px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-2); margin-top: 2px; }
.crumb { color: var(--text-2); font-size: 13px; margin-bottom: 6px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 550; white-space: nowrap;
}
.btn:hover { background: #f1efea; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #141414; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--lost-bg); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1d1606; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(0,131,142,.25); border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }
label.field { display: block; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 320px; }
.toolbar select { width: auto; }

.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.segmented button { border: 0; background: none; padding: 7px 14px; cursor: pointer; font-weight: 550; color: var(--text-2); }
.segmented button + button { border-left: 1px solid var(--border); }
.segmented button.on { background: var(--navy); color: #fff; }

/* ---------- cards & tables ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); gap: 10px; }
.card-head .hint { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 10px 16px; border-bottom: 1px solid var(--border); background: #faf9f6; white-space: nowrap; }
td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: #f8f6f1; }
.opt-list { list-style: none; margin: 0; padding: 4px 0; }
.opt-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.opt-list li:last-child { border-bottom: 0; }
.opt-list .badge { flex-shrink: 0; margin-top: 1px; }
.opt-body { flex: 1; min-width: 0; font-size: 13.5px; }
.flabel { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.lc-note { text-transform: none; letter-spacing: 0; font-weight: 500; }
.s-muted { color: var(--muted); font-size: 12px; }
.phone { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.pill:hover { text-decoration: none; filter: brightness(.95); }
.pill.call { background: var(--accent-soft); color: var(--accent-dark); }
.pill.wa { background: #dcf5e4; color: #11713a; }
.badge.warn { background: #fdf0d2; color: #6d5212; }
.chip.urgent { background: #fbe1e1; color: #8f2424; }
.notice.danger { background: #fbe9e9; border-color: #f0c4c4; color: #7a1f1f; }
.notice.gold { background: var(--gold-soft); border-color: #ecd9a8; color: #5c4510; }
.nav-count { margin-left: auto; background: var(--gold); color: #141414; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }
.stepper button:disabled { cursor: default; }
.notice { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid; }
.notice.warn { background: #fdf6e6; border-color: #ecd9a8; color: #5c4510; }
.notice.ok { background: var(--accent-soft); border-color: #b9dfe2; color: var(--accent-dark); }
.notice code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }
.next-step { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13.5px; }
.chip { display: inline-block; background: #efede8; color: var(--text-2); border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600; margin: 2px 0; white-space: nowrap; }
.chip.warn { background: #fdf0d2; color: #6d5212; }
.missing { color: var(--danger); font-weight: 600; font-size: 13px; }
.req { font-size: 11px; color: var(--danger); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.hint-inline { color: var(--muted); font-size: 12.5px; }
.calc { padding: 8px 10px; background: var(--accent-soft); color: var(--accent-dark); border-radius: 8px; font-weight: 700; }
.calc-table { width: 100%; margin-top: 4px; background: #faf9f6; border-radius: 8px; }
.calc-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.calc-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.radio { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.radio input { accent-color: var(--accent); }
.docs { display: flex; flex-direction: column; gap: 8px; }
.doc-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.doc-row label.btn { flex-shrink: 0; }
.doc-file { font-size: 13px; margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.doc-file span { color: var(--muted); font-size: 12px; }
th.chk, td.chk { width: 36px; padding-right: 0; cursor: default; }
th.chk input, td.chk input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--navy); color: #fff; padding: 8px 10px 8px 16px; border-radius: 10px; margin-bottom: 12px; }
.bulk-bar[hidden], [data-co][hidden] { display: none; }
.bulk-bar span { font-weight: 600; margin-right: auto; }
.bulk-bar .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 40px 20px; text-align: center; color: var(--text-2); }
.empty h3 { color: var(--text); margin-bottom: 4px; font-size: 15px; }
.empty .btn { margin-top: 12px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #efede8; color: var(--text-2); white-space: nowrap; }
.badge.open { background: var(--open-bg); color: var(--accent-dark); }
.badge.won { background: var(--good-bg); color: var(--good); }
.badge.lost { background: var(--lost-bg); color: var(--danger); }
.badge.gold { background: var(--gold-soft); color: #7a5c17; }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold-soft); color: #7a5c17; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.co { border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); }
.name-cell { display: flex; align-items: center; gap: 10px; }
.name-cell .s { color: var(--muted); font-size: 12px; }

/* ---------- profile pages ---------- */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.profile-top { display: flex; align-items: center; gap: 14px; }
dl.details { display: grid; grid-template-columns: 130px 1fr; gap: 10px 12px; margin: 0; }
dl.details dt { color: var(--text-2); font-size: 13px; }
dl.details dd { margin: 0; word-break: break-word; }
.notes { white-space: pre-wrap; color: var(--text); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-stats div { background: #f8f6f1; border-radius: 8px; padding: 10px 12px; }
.mini-stats b { display: block; font-size: 18px; }
.mini-stats span { font-size: 12px; color: var(--text-2); }

.stepper { display: flex; gap: 4px; margin: 4px 0 0; }
.stepper button {
  flex: 1; border: 0; padding: 10px 6px; font-size: 12.5px; font-weight: 600; cursor: pointer; background: #ecebe6; color: var(--text-2);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
}
.stepper button:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 6px 0 0 6px; }
.stepper button:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); border-radius: 0 6px 6px 0; }
.stepper button.done { background: #c4e8ea; color: var(--accent-dark); }
.stepper button.current { background: var(--accent); color: #fff; }
.stepper button.won { background: var(--good); color: #fff; }
.stepper button:hover:not(.current) { filter: brightness(.96); }
.stepper.lost button { opacity: .55; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: 0; }
.t-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); flex-shrink: 0; font-size: 13px; }
.t-icon.system { background: var(--gold-soft); color: #7a5c17; }
.t-body { flex: 1; min-width: 0; }
.t-meta { font-size: 12px; color: var(--muted); }
.t-text { white-space: pre-wrap; word-break: break-word; }
.t-del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; align-self: flex-start; }
.t-del:hover { color: var(--danger); }
.add-activity { padding: 14px 20px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 140px 1fr auto; gap: 8px; align-items: start; }
.add-activity textarea { min-height: 40px; }

/* ---------- pipeline ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #ecebe6; border-radius: var(--radius); display: flex; flex-direction: column; min-height: 420px; }
.col.drag-over { background: #dff2f3; outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-head { padding: 12px 12px 8px; }
.col-head .t { display: flex; justify-content: space-between; align-items: center; font-weight: 650; }
.col-head .count { background: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--text-2); }
.col-head .v { font-size: 12px; color: var(--text-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.col-head .bar { height: 3px; border-radius: 2px; margin-top: 8px; }
.col-body { padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lead-card { background: #fff; border-radius: 8px; padding: 10px 12px; box-shadow: var(--shadow); cursor: grab; border: 1px solid transparent; }
.lead-card:hover { border-color: #b9dfe2; }
.lead-card.dragging { opacity: .5; }
.lead-card .lt { font-weight: 600; margin-bottom: 2px; }
.lead-card .lc { font-size: 12.5px; color: var(--text-2); }
.lead-card .lf { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12.5px; }
.lead-card .lf b { font-variant-numeric: tabular-nums; }
.lead-card .age { color: var(--muted); font-size: 12px; }
.col-empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 18px 6px; border: 1px dashed #c8cfd8; border-radius: 8px; }
.add-in-col { background: none; border: 0; color: var(--text-2); padding: 6px; cursor: pointer; border-radius: 6px; text-align: left; font-size: 13px; }
.add-in-col:hover { background: rgba(255,255,255,.6); color: var(--text); }

/* ---------- analytics ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .l { font-size: 12.5px; color: var(--text-2); font-weight: 550; }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.accent { background: var(--navy); color: #fff; border-color: var(--navy); }
.kpi.accent .l { color: #b5b0a4; }
.kpi.accent .s { color: var(--gold); }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.charts .wide { grid-column: 1 / -1; }
.charts > .card { min-width: 0; }
.chart-box { position: relative; height: 270px; padding: 12px 16px 16px; min-width: 0; overflow: hidden; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.funnel { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: 12px; align-items: center; font-size: 13px; }
.funnel-track { background: #f0eee9; border-radius: 4px; height: 22px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 4px; min-width: 2px; }
.funnel-row .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.funnel-row .n b { color: var(--text); }
.list-rows { padding: 6px 0; }
.list-rows .r { display: flex; justify-content: space-between; gap: 10px; padding: 8px 20px; font-size: 13px; }
.list-rows .r + .r { border-top: 1px solid var(--border); }
.chart-empty { height: 100%; display: grid; place-items: center; color: var(--muted); text-align: center; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: radial-gradient(circle at 25% 45%, rgba(0,147,159,.28), transparent 55%), var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 2px solid rgba(212,165,60,.35); box-shadow: 0 0 0 14px rgba(212,165,60,.06); }
.auth-art h2 { font-size: 30px; line-height: 1.2; max-width: 420px; font-weight: 700; }
.auth-art p { color: #b5b0a4; max-width: 420px; }
.auth-form { display: grid; place-items: center; padding: 32px 16px; }
.auth-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.auth-form h1 { margin-bottom: 2px; }
.auth-form .sub { color: var(--text-2); margin: 0 0 6px; }
.error { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 32, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal.sm { max-width: 420px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head button { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.2); font-size: 13.5px; }
.toast.err { background: var(--danger); }
.loading { padding: 60px; text-align: center; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .brand { padding: 14px 16px; }
  .viewing { padding: 10px 16px 0; }
  .nav { flex-direction: row; overflow-x: auto; padding: 8px; }
  .nav a { white-space: nowrap; }
  .nav a.active { box-shadow: inset 0 -3px 0 var(--gold); }
  .side-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
  .side-foot .links { margin: 0; }
  .main { padding: 18px 16px 48px; }
  .charts { grid-template-columns: minmax(0, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-logo-sm { display: block; }
  .brand-logo { width: 38px; height: 38px; }
  .form-grid { grid-template-columns: 1fr; }
  .add-activity { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 100px 1fr 70px; }
  dl.details { grid-template-columns: 110px 1fr; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .v { font-size: 21px; }
  .mini-stats { grid-template-columns: 1fr; }
}
