/* Admin console. Builds on app.css (tokens, buttons, forms, chips, toasts). */
.admin-body { background: var(--surface-2); height: auto; min-height: 100%; }
html:has(.admin-body) { background: var(--surface-2); height: auto; }
.admin-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, var(--bg), #050d09); }
.admin-gate .auth-card p { text-align: center; }

.admin-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }

/* Sidebar */
.side { background: var(--bg); color: #cfe3d8; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px; gap: 6px; }
.side .brand { text-decoration: none; padding: 0 8px; }
.side-label { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #7fa892; padding: 6px 10px 10px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.side-group { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #6f9581; padding: 14px 10px 4px; }
.side-nav a { display: flex; align-items: center; gap: .6rem; color: #d7eadf; text-decoration: none; padding: .5rem .65rem; border-radius: 8px; font-size: .9rem; font-weight: 500; border-left: 3px solid transparent; }
.side-nav a:hover { background: rgba(255,255,255,.07); }
.side-nav a.active { background: rgba(255,255,255,.12); color: #fff; border-left-color: var(--amber); font-weight: 600; }
.side-nav svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.side-nav .badge { margin-left: auto; }
.side-foot { border-top: 1px solid rgba(255,255,255,.1); padding: 12px 6px 0; display: grid; gap: 8px; }
.side-user { display: grid; font-size: .85rem; } .side-user b { color: #fff; }
.side-user .muted { color: #8fb3a0; font-size: .78rem; }
.side-foot .btn { justify-content: flex-start; text-decoration: none; }

/* Main column */
.main { min-width: 0; padding: 22px 28px 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 2px 0 0; font-size: 1.5rem; letter-spacing: -.02em; }
.crumbs { color: var(--muted); font-size: .8rem; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.page-actions select, .toolbar select, .toolbar input { padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.page { display: grid; gap: 16px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.card > h2, .card-title { margin: 0 0 12px; font-size: 1rem; display: flex; align-items: center; gap: .5rem; justify-content: space-between; }
.card-title small, .card > h2 small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.kpi .value { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.kpi .sub { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.kpi.warn { border-left: 4px solid var(--sev-2); }

/* Charts */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: .3rem .65rem; border-radius: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.seg button.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: #e9eeeb; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--primary); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .bar.hover { fill: var(--primary-dark); }
.chart-tip { position: absolute; pointer-events: none; background: var(--text); color: #fff; font-size: .78rem; padding: .35rem .55rem; border-radius: 6px; white-space: nowrap; transform: translate(-50%, calc(-100% - 8px)); z-index: 2; }
.chart-total { font-size: .85rem; color: var(--muted); }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: .85rem; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { display: block; background: var(--surface-2); border-radius: 4px; height: 10px; overflow: hidden; }
.hbar .fill { display: block; height: 100%; background: var(--primary); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar .num { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 2.5ch; text-align: right; }
.hbar .fill.sev-1 { background: var(--sev-1); } .hbar .fill.sev-2 { background: var(--sev-2); } .hbar .fill.sev-3 { background: var(--sev-3); }
.mini-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.mini-table th, .mini-table td { text-align: left; padding: .4rem .3rem; border-bottom: 1px solid var(--border); }
.mini-table th { color: var(--muted); font-weight: 600; font-size: .78rem; }
.mini-table td.n, .mini-table th.n { text-align: right; font-variant-numeric: tabular-nums; }

/* Data tables */
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { flex: 1; min-width: 180px; }
.table-wrap { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; font-size: .87rem; }
.data th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .55rem .5rem; border-bottom: 2px solid var(--border); white-space: nowrap; background: #fafbfa; }
.data td { padding: .55rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data tr:hover td { background: #fafcfb; }
.data tr.deleted td { opacity: .55; }
.data select { padding: .3rem; border-radius: 6px; border: 1px solid var(--border); background: #fff; max-width: 160px; }
.data .actions { text-align: right; min-width: 150px; }
.data .actions .btn { margin: 2px 0 2px 4px; }
.data tr.flagged td { background: #fff6f6; }
.pager { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; margin-top: 10px; font-size: .85rem; color: var(--muted); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; background: #9aa9a1; }
.status-dot.ok { background: var(--primary); } .status-dot.bad { background: var(--danger); } .status-dot.warn { background: var(--sev-2); }

/* Settings — grouped cards with a jump-to list and a sticky save bar */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.jump { position: sticky; top: 16px; display: grid; gap: 1px; }
.jump .label { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 10px 6px; }
.jump a { font-size: .83rem; color: #4d5c55; text-decoration: none; padding: 6px 10px; border-left: 3px solid transparent; }
.jump a:hover, .jump a.active { color: var(--primary-dark); border-left-color: var(--primary); background: rgba(18,138,74,.06); }
.jump a.active { font-weight: 600; }
.s-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; scroll-margin-top: 16px; }
.s-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; padding: 11px 16px; background: #f8faf9; border-left: 4px solid var(--primary); font-weight: 700; font-size: .93rem; user-select: none; }
.s-card > summary::-webkit-details-marker { display: none; }
.s-card > summary:hover { background: #f1f5f3; }
.s-card > summary svg { width: 17px; height: 17px; color: var(--primary); }
.s-card > summary .chev { margin-left: auto; transition: transform .2s; color: var(--muted); }
.s-card:not([open]) > summary .chev { transform: rotate(-90deg); }
.s-card .count { font-weight: 600; font-size: .72rem; color: var(--primary-dark); background: #e3f4ea; border-radius: 99px; padding: .05rem .5rem; }
.s-body { padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.field { display: grid; gap: 5px; align-content: start; }
.field.full { grid-column: 1 / -1; }
.field > label, .field > .flabel { font-size: .84rem; font-weight: 600; }
.field input[type=text], .field input[type=email], .field input[type=number], .field input[type=tel], .field select, .field textarea {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: .9rem; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.field.changed input, .field.changed select, .field.changed textarea, .field.changed .toggle-row { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(18,138,74,.12); }
.help { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.meta { font-size: .72rem; color: #8a9891; display: flex; gap: .5rem; flex-wrap: wrap; }
.meta button { border: 0; background: none; padding: 0; color: var(--primary-dark); font-size: .72rem; font-weight: 600; text-decoration: underline; }
.toggle-row { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--border); border-radius: 8px; padding: .45rem .6rem; background: #fff; }
.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: #c7d1cc; border-radius: 99px; transition: background .15s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch input:disabled + span { opacity: .5; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1rem; border: 1px solid var(--border); border-radius: 8px; padding: .5rem .6rem; background: #fff; }
.checks label { display: flex; align-items: center; gap: .4rem; font-size: .88rem; }
.env-field { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #f4f6f5; }
.env-field code { flex: 1; padding: .45rem .6rem; font-size: .84rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.env-field code.empty { color: var(--danger); font-family: inherit; }
.env-field .lock { padding: .45rem .6rem; color: var(--muted); border-left: 1px solid var(--border); display: grid; place-items: center; }
.env-field svg { width: 14px; height: 14px; }
.int-head { display: flex; align-items: center; gap: .5rem; grid-column: 1 / -1; font-weight: 700; font-size: .88rem; margin-top: 4px; }
.int-head:not(:first-child) { border-top: 1px solid var(--border); padding-top: 14px; }
.test-row { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; background: var(--surface-2); padding: .6rem; border-radius: 8px; }
.test-row input { padding: .4rem .55rem; border: 1px solid var(--border); border-radius: 8px; min-width: 180px; flex: 1; }
.save-bar { position: sticky; bottom: 12px; z-index: 20; display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--primary); border-radius: 10px; padding: 10px 14px; box-shadow: 0 -2px 14px rgba(10,30,20,.12); margin-top: 6px; }
.save-bar .unsaved { font-size: .78rem; font-weight: 700; color: #6b4500; background: #fff3cd; padding: .2rem .6rem; border-radius: 99px; opacity: 0; transition: opacity .2s; }
.save-bar .unsaved.show { opacity: 1; }
.save-bar .spacer { flex: 1; }

/* Roles & permission matrix */
.roles-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.role-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; background: #fff; }
.role-card .top { display: flex; align-items: center; gap: .4rem; justify-content: space-between; }
.role-card h3 { margin: 0; font-size: .95rem; }
.role-card code { font-size: .75rem; color: var(--muted); }
.role-card p { margin: 0; font-size: .82rem; color: var(--muted); }
.role-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.tag { font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border-radius: 99px; padding: .1rem .45rem; background: var(--surface-2); color: var(--muted); }
.tag.lock { background: #fff3cd; color: #6b4500; }
.matrix-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--border); border-radius: 10px; }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .85rem; }
.matrix th, .matrix td { border-bottom: 1px solid var(--border); padding: .5rem .6rem; background: #fff; }
.matrix thead th { position: sticky; top: 0; z-index: 3; background: #f8faf9; font-size: .78rem; text-align: center; white-space: nowrap; border-bottom: 2px solid var(--border); }
.matrix thead th:first-child { text-align: left; left: 0; z-index: 4; }
.matrix td:first-child, .matrix th:first-child { position: sticky; left: 0; z-index: 2; min-width: 260px; max-width: 360px; border-right: 1px solid var(--border); }
.matrix td { text-align: center; }
.matrix td:first-child { text-align: left; }
.matrix .perm-key { display: block; font-size: .72rem; color: var(--muted); font-family: ui-monospace, monospace; }
.matrix tr.group-row td { background: #f1f5f3; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #3b4a43; cursor: pointer; }
.matrix tr.group-row td:first-child { background: #f1f5f3; }
.matrix tr.group-row .chev { display: inline-block; transition: transform .2s; margin-right: .3rem; }
.matrix tr.group-row.collapsed .chev { transform: rotate(-90deg); }
.matrix td.cell-changed { background: #eaf7ef; }
.matrix input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.matrix input:disabled { cursor: not-allowed; }
.matrix .col-tools { display: flex; gap: 2px; justify-content: center; margin-top: 4px; }
.matrix .col-tools button { border: 1px solid var(--border); background: #fff; font-size: .66rem; padding: 0 .35rem; border-radius: 4px; color: var(--muted); }

/* Dialog */
dialog.modal { border: 0; border-radius: 14px; padding: 0; width: min(460px, calc(100% - 32px)); box-shadow: var(--shadow); }
dialog.modal::backdrop { background: rgba(5, 15, 10, .45); }
dialog.modal form { padding: 20px; }
dialog.modal h3 { margin: 0 0 12px; }

.callout { border-radius: 10px; padding: .7rem .9rem; font-size: .88rem; background: #e3f4ea; color: #0d4f2b; }
.callout.warn { background: #fff3cd; color: #5c4400; }
.callout.bad { background: #fbe0e3; color: #7a1020; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .87rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; height: auto; z-index: 30; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; gap: 8px; }
  .side-label, .side-foot .side-user, .side-group { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; flex-basis: 100%; order: 3; gap: 4px; scrollbar-width: none; }
  .side-nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; border-radius: 6px; padding: .4rem .6rem; }
  .side-nav a.active { border-bottom-color: var(--amber); }
  .side-foot { border: 0; padding: 0; margin-left: auto; }
  .main { padding: 16px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; }
  .side-nav { min-width: 0; max-width: 100%; }
  .page-head h1 { font-size: 1.3rem; }
  .jump { display: none; }
  .s-body { grid-template-columns: minmax(0, 1fr); }
  .save-bar .help { display: none; }
  .hbar { grid-template-columns: minmax(80px, 38%) 1fr auto; }
}

/* ---------- Upgrade pages: payments, agency report, speed zones, fleet managers ---------- */
.callout.ok { background: #e3f4ea; color: #0d4f2b; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.stat-grid .stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.stat-grid .stat b { display: block; font-size: 1.4rem; letter-spacing: -.01em; }
.stat-grid .stat span { color: var(--muted); font-size: .8rem; }
.plain-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.plain-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.plain-list li .btn { margin-left: auto; }
.map-form-row td { background: var(--surface-2); }
.print-head h2 { margin: 0 0 4px; }
@media print {
  .side, .page-head, .no-print, .page-actions { display: none !important; }
  .admin-shell, .main, .page { display: block !important; margin: 0 !important; padding: 0 !important; }
  .card { box-shadow: none !important; border: 0 !important; }
  .table-wrap { overflow: visible !important; }
  table.data { font-size: 10pt; }
  a { color: inherit; text-decoration: none; }
}
.fb-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.fb-msg { white-space: pre-wrap; margin: .6rem 0; }
.fb-reply { border-left: 3px solid var(--primary, #128a4a); padding: .4rem .7rem; margin: .5rem 0; background: rgba(18,138,74,.06); }
.fb-reply p { margin: .2rem 0 0; white-space: pre-wrap; }
.fb-form textarea { width: 100%; }
.side-lang { display: flex; align-items: center; gap: .4rem; margin: .5rem 0; color: inherit; }
.side-lang select { flex: 1; min-width: 0; padding: .35rem .5rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: inherit; font: inherit; font-size: .85rem; }
.side-lang select option { color: #13201a; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Maps inside admin pages */
.admin-map { width: 100%; height: 100%; min-height: 420px; border-radius: 10px; overflow: hidden; background: #e8eaed; }

/* Driver reports: list beside a map with a pin where each report was made */
.rp-layout { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 16px; align-items: start; }
.rp-side { max-height: calc(100vh - 170px); overflow-y: auto; }
.rp-mapcard { position: sticky; top: 12px; height: calc(100vh - 170px); display: flex; flex-direction: column; gap: 8px; }
.rp-mapcard .admin-map { flex: 1; }
.rp-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; cursor: pointer; }
.rp-item:hover { border-color: #9aa0a6; }
.rp-item.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(18,138,74,.2); }
.rp-head { display: flex; gap: 10px; align-items: flex-start; }
.rp-head b { margin-right: 6px; }
.rp-icon { width: 36px; height: 36px; border-radius: 8px; background: #fef7e0; color: #b06000; display: grid; place-items: center; flex: 0 0 auto; }
.rp-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rp-desc { margin: 8px 0 4px; }
.rp-actions { margin-top: 8px; }
.rp-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; }
/* Report pin: a square pin (bumps are round), coloured by status */
.report-marker.overlay-pin { background: none; border: 0; box-shadow: none; width: auto; height: auto; }
.rp-pin { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px 8px 8px 0; transform: rotate(-45deg); border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.4); background: #e37400; color: #fff; }
.rp-pin svg { width: 20px; height: 20px; transform: rotate(45deg); fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rp-pin.approved { background: #188038; } .rp-pin.rejected { background: #80868b; }
.report-marker.selected .rp-pin { width: 44px; height: 44px; outline: 3px solid #1a73e8; }
.rp-pin.mini { width: 14px; height: 14px; border-width: 2px; box-shadow: none; display: inline-block; vertical-align: middle; }
@media (max-width: 900px) { .rp-layout { grid-template-columns: 1fr; } .rp-mapcard { position: static; height: 420px; } .rp-side { max-height: none; } }
.side-nav .nav-count { margin-left: auto; background: #e37400; color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; min-width: 1.4rem; padding: 0 .4rem; text-align: center; line-height: 1.35rem; }
.map-toggle { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-weight: 600; white-space: nowrap; }

/* Map & coverage */
.cm-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; height: calc(100vh - 150px); }
.cm-panel { overflow-y: auto; display: grid; align-content: start; gap: 10px; }
.cm-panel select { width: 100%; margin-top: 4px; }
.cm-mapcard { padding: 8px; } .cm-mapcard .admin-map { height: 100%; }
.cm-stats { display: grid; gap: 8px; }
.cm-stats div { display: grid; } .cm-stats b { font-size: 1.35rem; } .cm-stats span { color: var(--muted); font-size: .8rem; }
.cm-h { margin: 6px 0 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cm-layer { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; cursor: pointer; }
.cm-layer small { margin-left: auto; color: var(--muted); font-weight: 500; white-space: nowrap; }
.cm-sub { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 26px; }
.cm-sub select { width: auto; margin: 0; }
.cm-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; background: var(--surface-2); border-radius: 999px; padding: 2px 8px; }
.sw { width: 22px; height: 6px; border-radius: 3px; display: inline-block; flex: 0 0 auto; }
.sw.mapped { background: #188038; } .sw.unmapped { background: repeating-linear-gradient(90deg, #d93025 0 6px, transparent 6px 10px); }
.sw.bump { height: 12px; width: 12px; border-radius: 50%; background: #e37400; } .sw.report { height: 12px; width: 12px; border-radius: 3px; background: #e37400; transform: rotate(45deg); }
.sw.sw-notice { background: #f07800; } .sw.felt { height: 12px; width: 12px; border-radius: 50%; background: #8430ce; }
.felt-pin.overlay-pin { width: 26px; height: 26px; border-color: #8430ce; color: #8430ce; font-weight: 800; font-size: .8rem; }
@media (max-width: 900px) { .cm-layout { grid-template-columns: 1fr; height: auto; } .cm-mapcard { height: 70vh; } }
.section-h { margin: 22px 0 10px; font-size: 1.05rem; }

/* Live bump map: counts, live indicator, pulse on new bumps */
.cm-big { display: grid; } .cm-big b { font-size: 1.6rem; } .cm-big span { color: var(--muted); font-size: .8rem; }
.cm-sev { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; font-size: .78rem; font-weight: 600; }
.cm-sev span { padding: 2px 8px; border-radius: 999px; }
.cm-sev .s3 { background: #fce8e6; color: #a50e0e; } .cm-sev .s2 { background: #feefe3; color: #b06000; } .cm-sev .s1 { background: #fef7e0; color: #7a4f01; }
.mini-table tr.clickable { cursor: pointer; } .mini-table tr.clickable:hover td { background: var(--surface-2); }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: #188038; margin-right: 8px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #188038; display: inline-block; animation: live-blink 1.6s ease-in-out infinite; }
@keyframes live-blink { 50% { opacity: .3; } }
.new-bump-pulse.overlay-pin { width: 18px; height: 18px; border: 0; background: none; box-shadow: none; pointer-events: none; }
.new-bump-pulse span { display: block; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #1a73e8; animation: bump-pulse 1.4s ease-out infinite; }
@keyframes bump-pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(3); opacity: 0; } }
