:root {
  --bg: #151719;
  --surface: #1e2124;
  --surface-2: #272b2f;
  --surface-3: #30353a;
  --line: #3a3f43;
  --line-soft: #2b2f32;
  --text: #edf0f2;
  --muted: #9da3a8;
  --accent: #aeb4b8;
  --accent-strong: #d1d5d8;
  --accent-ink: #17191b;
  --danger: #b5655e;
  --warning: #b89a60;
  --radius: 8px;
  --shadow: 0 18px 60px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
img { display: block; max-width: 100%; }
.mono { font-family: inherit; }
.hidden { display: none !important; }

.login-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(320px, 42%) 1fr;
}
.login-panel {
  min-height: 100dvh;
  padding: clamp(32px, 7vw, 88px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background: #17191b;
}
.login-visual {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: #111;
}
.login-visual img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.46); }
.login-visual::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(12,14,13,.7), transparent 45%), linear-gradient(0deg, rgba(12,14,13,.8), transparent 45%);
}
.visual-caption { position: absolute; z-index: 2; left: 48px; right: 48px; bottom: 44px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font: 600 11px "IBM Plex Mono"; }
.visual-caption h2 { max-width: 640px; margin: 10px 0 0; font-size: clamp(28px, 4vw, 52px); line-height: 1.05; font-weight: 500; }
.brand { display: block; max-width: 430px; }
.brand-logo { width: 100%; max-width: 390px; filter: invert(1) grayscale(1); mix-blend-mode: screen; border-radius: 4px; }
.brand-copy { margin-top: 14px; color: var(--muted); font-size: 10px; line-height: 1.6; letter-spacing: .11em; }
.login-box { width: 100%; max-width: 430px; margin: 72px 0; }
.login-box h1 { margin: 0 0 8px; font-weight: 500; font-size: 26px; }
.login-box > p { margin: 0 0 28px; color: var(--muted); line-height: 1.5; }
.login-help { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.demo-accounts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.demo-chip { background: var(--surface); border: 1px solid var(--line); padding: 7px 10px; border-radius: 4px; color: var(--text); cursor: pointer; font-size: 12px; }
.legal { color: #626a65; font-size: 11px; }

.field { margin-bottom: 21px; }
.field label { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 7px; font-weight: 600; }
.input, .textarea, .select {
  width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 5px;
  background: #191b1d; color: var(--text); padding: 0 16px;
}
.textarea { min-height: 92px; padding-top: 12px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #59615c; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn {
  min-height: 46px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2);
  color: var(--text); padding: 0 17px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; cursor: pointer; font-weight: 500; font-size: 13px; transition: .16s ease;
}
.btn:hover { border-color: #4a554f; background: var(--surface-3); }
.btn.primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.danger { color: #d89690; border-color: #633d39; background: #211816; }
.btn.ghost { background: transparent; }
.btn.full { width: 100%; }
.btn.icon { width: 44px; padding: 0; }
.btn i, .icon-btn i { width: 17px; height: 17px; stroke-width: 1.7; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 4px; position: relative; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.shell { min-height: 100dvh; display: flex; background: var(--bg); }
.sidebar {
  width: 256px; flex: none; position: fixed; inset: 0 auto 0 0; z-index: 1000;
  background: #191b1d; border-right: 1px solid var(--line); display: flex; flex-direction: column;
}
.side-brand { height: 92px; display: flex; align-items: center; padding: 10px 24px; border-bottom: 1px solid var(--line); overflow: hidden; }
.side-brand img { width: 190px; filter: invert(1) grayscale(1); mix-blend-mode: screen; }
.nav { padding: 24px 14px; display: flex; flex-direction: column; gap: 7px; }
.nav-label { padding: 9px 12px; font: 600 10px "IBM Plex Mono"; color: #626b65; letter-spacing: .12em; }
.nav-item {
  min-height: 46px; width: 100%; border: 0; border-radius: 5px; padding: 0 14px; background: transparent;
  color: var(--muted); display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; font-size: 13px;
}
.nav-item i { width: 18px; height: 18px; stroke-width: 1.7; }
.nav-item:hover { color: var(--text); background: var(--surface); }
.nav-item.active { color: var(--text); background: #303438; }
.nav-item.active::before { content: ""; width: 2px; height: 20px; margin-left: -12px; background: var(--accent); }
.side-bottom { margin-top: auto; padding: 14px 12px; border-top: 1px solid var(--line); }
.profile { display: grid; grid-template-columns: 34px 1fr 34px; gap: 10px; align-items: center; padding: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #34383c; color: var(--accent); display: grid; place-items: center; font: 600 11px "IBM Plex Mono"; }
.profile-name { font-size: 13px; }
.profile-role { color: var(--muted); font-size: 11px; margin-top: 2px; }

.main { min-width: 0; margin-left: 256px; width: calc(100% - 256px); }
.topbar {
  height: 76px; position: sticky; top: 0; z-index: 900; background: rgba(21,23,25,.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 clamp(18px, 3vw, 42px); gap: 14px;
}
.top-title { min-width: 0; }
.top-title h1 { margin: 0; font-size: 18px; font-weight: 500; }
.top-title p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.badge {
  position: absolute; right: 5px; top: 4px; min-width: 17px; height: 17px; padding: 0 4px; display: grid;
  place-items: center; border-radius: 9px; background: var(--danger); color: white; font: 600 9px "IBM Plex Mono";
}
.role-pill { border: 1px solid var(--line); border-radius: 20px; padding: 6px 10px; color: var(--accent); font: 600 10px "IBM Plex Mono"; letter-spacing: .08em; }
.mobile-menu { display: none; }
.content { padding: clamp(22px, 3.5vw, 52px); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h2 { margin: 0; font-size: 25px; font-weight: 500; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-button { color: var(--text); text-align: left; cursor: pointer; transition: .18s ease; width: 100%; }
.stat-button:hover { border-color: #70777c; background: var(--surface-2); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.statistics-cta { min-height: 50px; border-color: #8b9297; background: #34393d; }
.stat-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.stat-value { margin-top: 10px; font: 500 25px "IBM Plex Mono"; }
.stat-note { margin-top: 6px; font-size: 11px; color: var(--muted); }
.good { color: var(--accent); }
.warn { color: #ccb077; }

.map-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 300px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); min-height: 590px; }
#map { min-height: 590px; background: #304b38; z-index: 1; }
.map-side { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.map-side-head { padding: 17px; border-bottom: 1px solid var(--line); }
.map-side-title { display: flex; align-items: center; justify-content: space-between; }
.map-side-title strong { font-size: 13px; font-weight: 500; }
.map-list { padding: 8px; overflow: auto; }
.object-row {
  border: 1px solid transparent; background: transparent; border-radius: 5px; width: 100%; display: grid;
  grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; padding: 11px; color: var(--text); cursor: pointer; text-align: left;
}
.object-row:hover { border-color: var(--line); background: var(--surface-2); }
.object-code { width: 38px; height: 38px; display: grid; place-items: center; background: #34383c; color: var(--accent-strong); border: 1px solid #4b5156; border-radius: 4px; font: 600 12px "IBM Plex Mono"; }
.object-name { font-size: 12px; }
.object-meta { color: var(--muted); font-size: 10px; margin-top: 4px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(174,180,184,.12); }
.map-footer { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.5; }

.leaflet-tile-pane { filter: grayscale(.35) invert(.82) sepia(.45) hue-rotate(72deg) saturate(1.75) brightness(.86) contrast(1.12); }
.leaflet-control-zoom a { background: #151918 !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: rgba(12,14,13,.8) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--accent); }
.ors-marker { background: none; border: 0; }
.marker-inner { min-width: 34px; height: 30px; display: grid; place-items: center; border-radius: 4px 4px 4px 0; transform: rotate(-8deg); background: var(--accent); color: #111; border: 2px solid #111; box-shadow: 0 5px 16px #000; font: 600 11px "IBM Plex Mono"; }
.marker-inner span { transform: rotate(8deg); }
.placement-marker .marker-inner { width: 42px; height: 38px; background: #d1d5d8; box-shadow: 0 0 0 7px rgba(174,180,184,.24), 0 8px 24px #000; font-size: 20px; cursor: move; }
.map-create-button {
  position: absolute; z-index: 500; left: 18px; bottom: 18px; min-height: 48px; border: 1px solid #c3c8cc;
  border-radius: 5px; padding: 0 17px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: #b6bcc0; color: #151719; box-shadow: 0 8px 28px rgba(0,0,0,.35); font-weight: 600;
}
.map-create-button:hover { background: #d1d5d8; }
.placement-controls {
  position: absolute; z-index: 500; left: 18px; right: 318px; bottom: 18px; min-height: 58px; padding: 7px 8px 7px 15px;
  display: flex; align-items: center; gap: 8px; background: rgba(15,20,17,.95); border: 1px solid #607568; border-radius: 6px; box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.placement-controls > span { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; color: var(--accent-strong); font-size: 12px; }

.grid { display: grid; gap: 12px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.agent-card { padding: 18px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.call-sign { font: 600 15px "IBM Plex Mono"; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.status.off::before { background: #68706b; }
.status.blocked::before { background: var(--danger); }
.agent-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0; padding: 13px 0; border-block: 1px solid var(--line-soft); }
.agent-stats > div + div { border-left: 1px solid var(--line); padding-left: 15px; }
.agent-stats strong { display: block; font: 500 17px "IBM Plex Mono"; }
.agent-stats span { font-size: 10px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { border: 1px solid var(--line); padding: 4px 7px; border-radius: 3px; font: 500 10px "IBM Plex Mono"; color: var(--muted); }

.object-hero { display: grid; grid-template-columns: 1fr 340px; gap: 16px; margin-bottom: 18px; }
.object-summary { padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.object-summary h2 { margin: 6px 0 8px; font: 500 27px "IBM Plex Mono"; }
.object-summary p { color: var(--muted); line-height: 1.55; margin: 0; font-size: 13px; }
.object-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.detail-label { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.detail-value { margin-top: 5px; font-size: 12px; }
.object-photo { min-height: 220px; overflow: hidden; }
.object-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.55); }

.event-toolbar { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.tab { min-height: 40px; border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 0 17px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.tab:last-child { border: 0; }
.tab.active { background: var(--accent); color: var(--accent-ink); }
.event-count { color: var(--muted); font-size: 11px; }
.event-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.event-card { overflow: hidden; cursor: pointer; transition: .16s ease; }
.event-card:hover { border-color: #4c5851; transform: translateY(-1px); }
.event-image { height: 180px; position: relative; overflow: hidden; background: #0d0f0e; }
.event-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.65); transition: .3s; }
.event-card:hover .event-image img { transform: scale(1.02); }
.event-type { position: absolute; left: 10px; top: 10px; background: rgba(12,14,13,.86); border: 1px solid rgba(255,255,255,.14); border-radius: 3px; padding: 5px 8px; font: 600 9px "IBM Plex Mono"; letter-spacing: .08em; }
.event-body { padding: 15px; }
.event-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.event-head h3 { margin: 0; font: 600 15px "IBM Plex Mono"; }
.event-head time { color: var(--muted); font: 500 10px "IBM Plex Mono"; }
.event-desc { color: var(--muted); font-size: 12px; margin-top: 7px; line-height: 1.45; }
.event-meta { display: flex; flex-wrap: wrap; gap: 10px 13px; margin-top: 12px; color: #aab2ad; font-size: 10px; }
.event-meta span { display: inline-flex; align-items: center; gap: 4px; }
.verification { border-radius: 3px; padding: 4px 7px; font-size: 9px; white-space: nowrap; }
.verification.ok { color: var(--accent-strong); background: rgba(174,180,184,.1); }
.verification.pending { color: #d2b675; background: rgba(184,154,96,.11); }

.detail-list { display: grid; gap: 7px; }
.detail-list > button, .detail-static { width: 100%; min-height: 60px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); padding: 10px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; text-align: left; }
.detail-list > button { cursor: pointer; }
.detail-list > button:hover { background: var(--surface-2); border-color: #62696e; }
.detail-list small { display: block; color: var(--muted); margin-top: 5px; font-size: 9px; }
.filter-panel { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: end; padding: 18px; margin-bottom: 16px; }
.filter-panel .field { margin: 0; }
.analytics-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.metric { min-height: 126px; padding: 18px; display: flex; align-items: flex-start; gap: 13px; }
.metric > span { width: 38px; height: 38px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 50%; color: var(--accent-strong); flex: none; }
.metric small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.metric strong { display: block; margin-top: 9px; font-size: 16px; }
.metric p { margin: 6px 0 0; color: var(--muted); font-size: 9px; }
.alert-card { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 18px; margin-bottom: 16px; padding: 20px; border: 1px solid #65594b; border-radius: var(--radius); background: #27241f; }
.alert-symbol { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #d4b681; background: #393126; }
.alert-card h3 { margin: 6px 0; font-size: 15px; }
.alert-card p { margin: 0; color: #b7b0a5; font-size: 10px; line-height: 1.6; }
.analytics-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; margin-bottom: 16px; }
.analytics-card, .data-section { padding: 20px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.section-head h3 { margin: 6px 0 0; font-size: 16px; font-weight: 500; }
.bar-chart { height: 230px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: space-around; gap: 10px; padding: 24px 8px 0; }
.bar-chart > div { height: 100%; flex: 1; display: flex; flex-direction: column-reverse; align-items: center; gap: 7px; }
.bar-chart i { width: min(38px, 65%); display: block; background: #8f969b; border-radius: 3px 3px 0 0; min-height: 8px; }
.bar-chart span, .bar-chart b { font-size: 9px; font-style: normal; font-weight: 500; }
.bar-chart b { color: var(--muted); }
.hour-grid { display: grid; gap: 12px; }
.hour-grid > div { display: grid; grid-template-columns: 58px 32px 1fr; align-items: center; gap: 10px; font-size: 9px; }
.hour-grid strong { color: var(--text); text-align: right; }
.hour-grid i { display: block; height: 8px; background: #858c91; border-radius: 5px; }
.sort-select { width: auto; min-width: 210px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th { color: var(--muted); text-align: left; text-transform: uppercase; letter-spacing: .06em; font-size: 8px; padding: 11px 10px; border-bottom: 1px solid var(--line); }
td { padding: 13px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.risk { display: inline-block; padding: 4px 7px; border-radius: 3px; background: var(--surface-2); color: var(--muted); font-size: 8px; }
.risk.high { color: #d7b47b; background: #352e23; }
.report-builder { margin-top: 16px; padding: 20px; display: grid; grid-template-columns: 1fr 220px auto auto; align-items: center; gap: 12px; }
.report-builder h3 { margin: 6px 0; font-size: 16px; }
.report-builder p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.report-preview { background: #f2f2f1; color: #24282a; padding: 34px; }
.report-logo { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 2px solid #34393c; padding-bottom: 18px; }
.report-logo img { width: 250px; }
.report-logo span { max-width: 240px; font-size: 8px; letter-spacing: .1em; text-align: right; }
.report-title { display: flex; justify-content: space-between; gap: 20px; margin: 30px 0 20px; }
.report-title h2 { margin: 7px 0 0; font-size: 24px; }
.report-title small, .report-summary small { color: #73797d; font-size: 8px; letter-spacing: .08em; }
.report-summary { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid #b8babc; margin-bottom: 25px; }
.report-summary div { padding: 15px; border-right: 1px solid #b8babc; }
.report-summary div:last-child { border: 0; }
.report-summary b { display: block; font-size: 19px; margin-top: 4px; }
.report-preview h4 { margin: 24px 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.report-preview p { font-size: 10px; line-height: 1.6; }
.report-bars { display: grid; gap: 8px; }
.report-bars > div { display: grid; grid-template-columns: 30px 1fr 24px; gap: 8px; align-items: center; font-size: 9px; }
.report-bars i { height: 7px; background: #d5d6d6; }
.report-bars i b { display: block; height: 100%; background: #41474a; }
.report-bars em { font-style: normal; text-align: right; }
.report-preview th, .report-preview td { border-color: #cfd0d0; }
.report-footer { margin-top: 30px; border-top: 1px solid #b8babc; padding-top: 10px; color: #777; font-size: 8px; text-align: center; }

.agent-entry { max-width: 820px; margin: 0 auto; }
.agent-entry-card { display: grid; grid-template-columns: 1fr 280px; overflow: hidden; }
.agent-entry-form { padding: clamp(24px, 5vw, 52px); }
.agent-entry-side { border-left: 1px solid var(--line); min-height: 480px; position: relative; overflow: hidden; }
.agent-entry-side img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.45); }
.agent-entry-side div { position: absolute; inset: auto 22px 24px; font-size: 12px; color: #cbd2cd; line-height: 1.5; }
.big-code { font: 600 clamp(28px, 6vw, 46px) "IBM Plex Mono"; letter-spacing: .08em; text-transform: uppercase; text-align: center; }

.media-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.media-slot { aspect-ratio: 1; border: 1px dashed #4d5358; border-radius: 5px; display: grid; place-items: center; text-align: center; padding: 8px; color: var(--muted); cursor: pointer; background: #191b1d; font-size: 10px; }
.media-slot:hover { color: var(--accent); border-color: var(--accent); }
.media-slot i { width: 19px; margin: 0 auto 6px; }
.media-slots.compact { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
.media-slots.compact .media-slot { min-height: 82px; aspect-ratio: auto; }
.capture-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.capture-group { border: 1px solid var(--line); border-radius: 5px; padding: 11px; background: #191b1d; }
.capture-group strong { display: block; margin-bottom: 9px; font: 500 11px "IBM Plex Mono"; color: var(--text); }
.capture-group > div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.capture-action { min-height: 38px; border: 1px solid var(--line); border-radius: 4px; display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--muted); cursor: pointer; font-size: 10px; }
.capture-action:hover { color: var(--accent); border-color: var(--accent); }
.evidence-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.evidence { position: relative; height: 122px; padding: 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: #111; color: var(--text); cursor: pointer; }
.evidence img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.65); transition: .2s; }
.evidence:hover img { transform: scale(1.03); }
.evidence span { position: absolute; inset: auto 5px 5px; padding: 4px 6px; border-radius: 3px; background: rgba(10,12,11,.84); font: 500 9px "IBM Plex Mono"; }

.notification-panel { position: fixed; z-index: 1500; right: 22px; top: 68px; width: min(390px, calc(100vw - 24px)); background: #1a1d1f; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.panel-head { padding: 15px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.panel-head strong { font-size: 13px; }
.notification { width: 100%; border: 0; border-bottom: 1px solid var(--line-soft); padding: 14px 17px; display: grid; grid-template-columns: 30px 1fr; gap: 11px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.notification:hover { background: var(--surface); }
.notif-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: #303438; }
.notif-icon i { width: 14px; }
.notification p { margin: 0; font-size: 12px; line-height: 1.4; }
.notification time { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(2,3,2,.8); display: grid; place-items: center; padding: 18px; animation: fade .15s; }
.modal { width: min(580px, 100%); max-height: calc(100dvh - 36px); overflow: auto; background: #1a1d1f; border: 1px solid #4b5054; border-radius: var(--radius); box-shadow: var(--shadow); animation: rise .2s; }
.modal.wide { width: min(900px, 100%); }
.modal-head { min-height: 62px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 18px; }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 500; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.modal-photo { width: 100%; height: 260px; object-fit: cover; margin-bottom: 18px; filter: saturate(.65); }
.verify-box { padding: 13px; border: 1px solid #4d4532; background: #1b1913; color: #ccb77e; border-radius: 5px; font-size: 11px; line-height: 1.5; margin-bottom: 16px; }
.form-section { margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 500; }

.empty { padding: 50px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty i { width: 28px; height: 28px; margin-bottom: 12px; }
#toast-root { position: fixed; z-index: 3000; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { background: #202622; color: var(--text); border: 1px solid #465049; box-shadow: var(--shadow); border-radius: 5px; padding: 12px 15px; font-size: 12px; animation: rise .2s; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .analytics-metrics { grid-template-columns: repeat(2, 1fr); }
  .filter-panel { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
  .report-builder { grid-template-columns: 1fr 1fr; }
  .report-builder > div { grid-column: 1 / -1; }
  .map-layout { grid-template-columns: 1fr; }
  .map-side { display: none; }
  .placement-controls { right: 18px; }
  .grid.three { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { padding: 28px 22px; }
  .sidebar { transform: translateX(-100%); transition: .2s; width: 260px; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px #000; }
  .main { margin-left: 0; width: 100%; }
  .mobile-menu { display: inline-grid; }
  .topbar { height: 66px; padding: 0 12px; }
  .role-pill { display: none; }
  .content { padding: 18px 12px 30px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .alert-card { grid-template-columns: 42px 1fr; }
  .alert-card .btn { grid-column: 1 / -1; }
  .object-hero { grid-template-columns: 1fr; }
  .object-photo { min-height: 190px; grid-row: 1; }
  .event-list { grid-template-columns: 1fr; }
  .agent-entry-card { grid-template-columns: 1fr; }
  .agent-entry-side { display: none; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .analytics-metrics, .filter-panel { grid-template-columns: 1fr; }
  .report-builder { grid-template-columns: 1fr; }
  .report-builder > * { grid-column: auto; width: 100%; }
  .section-head { flex-direction: column; }
  .sort-select { width: 100%; }
  .report-preview { padding: 20px 14px; }
  .report-logo { align-items: flex-start; flex-direction: column; }
  .report-logo img { width: 220px; }
  .report-logo span { text-align: left; }
  .report-summary { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 13px; }
  .stat-value { font-size: 20px; }
  .grid.three { grid-template-columns: 1fr; }
  .input-row { grid-template-columns: 1fr; gap: 0; }
  .object-details { grid-template-columns: 1fr 1fr; }
  .heading-actions { width: 100%; }
  .heading-actions .btn { flex: 1; }
  #map { min-height: calc(100dvh - 310px); }
  .map-layout { min-height: calc(100dvh - 310px); }
  .map-create-button { left: 12px; bottom: 12px; }
  .placement-controls { left: 8px; right: 8px; bottom: 8px; padding: 7px; flex-wrap: wrap; }
  .placement-controls > span { width: 100%; padding: 4px 6px; }
  .placement-controls .btn { flex: 1; }
  .event-toolbar { flex-wrap: wrap; }
  .event-toolbar .tabs { flex: 1; }
  .event-toolbar .tab { flex: 1; }
  .event-toolbar > .btn { width: 100%; margin-left: 0 !important; }
  .media-slots { grid-template-columns: repeat(2, 1fr); }
  .media-slots.compact, .capture-grid { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 92dvh; border-radius: 10px 10px 0 0; width: 100%; }
  .modal.wide { width: 100%; }
}
