:root {
  color-scheme: light;
  --ink: #172831;
  --muted: #59676b;
  --navy: #172c34;
  --paper: #f3f6f3;
  --line: #dce5df;
  --accent: #ff8a69;
  --white: #fff;
  --shell: 1330px;
  font-family: system-ui, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .62; cursor: wait; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #bf573c;
  outline-offset: 4px;
}
h1, h2, h3, p, dl, dd { margin: 0; }
.sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(var(--shell), calc(100% - 80px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; overflow: hidden; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 20; top: 10px; left: 10px; padding: 12px; background: var(--white); }
.header { background: var(--navy); color: #fff; }
.header .brand-name span { color: #a8bcba; }
.header .brand-mark { background: #f58f72; color: #302321; }
.header-inner { min-height: 67px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.header-inner > .button { justify-self: end; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #f9e4d9; color: #ac452d; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { display: grid; gap: 3px; font-weight: 800; font-size: 1.045rem; line-height: 1; letter-spacing: -.03em; }
.brand-name span { font-size: .63rem; letter-spacing: .15em; font-weight: 800; color: var(--muted); }
.nav { display: flex; align-items: stretch; gap: 25px; align-self: stretch; }
.nav a { position: relative; display: flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 680; color: #c8d8d6; font-size: .875rem; white-space: nowrap; }
.nav a:hover, .nav .nav-active { color: #fff; }
.nav svg { width: 17px; height: 17px; }
.nav .nav-active::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: #ff9578; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; min-height: 43px; line-height: 1.2; font-size: .875rem; font-weight: 800; border: 1px solid transparent; border-radius: 8px; text-decoration: none; transition: background-color .16s, border-color .16s; }
.button svg { width: 18px; height: 18px; stroke-width: 1.9; }
.button-primary { color: #2b2421; background: var(--accent); }
.button-primary:hover { background-color: #ffad93; }
.button-light { background: var(--white); color: var(--ink); border-color: #d5dcd6; }
.button-light:hover { background: #eef2ec; }
.dashboard { padding-block: 26px 37px; scroll-margin-top: 12px; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
.eyebrow { letter-spacing: .135em; font-size: .75rem; font-weight: 800; line-height: 1.5; }
.section-eyebrow { color: #9f462f; margin-bottom: 7px; }
.dashboard-heading .eyebrow { display: flex; align-items: center; gap: 8px; }
.dashboard-heading .eyebrow span { background: #cb684c; width: 20px; height: 2px; border-radius: 4px; }
.dashboard-heading h1 { color: #172b31; font-size: clamp(2.6rem, 5vw, 3.4rem); font-weight: 780; line-height: 1; letter-spacing: -.062em; }
.dashboard-heading p { color: var(--muted); margin-top: 11px; line-height: 1.5; }
.archive-label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 7px; background: #e4ece7; color: #395950; font-size: .83rem; font-weight: 740; white-space: nowrap; }
.archive-label svg { width: 16px; height: 16px; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 15px; }
.metric { display: flex; align-items: center; min-width: 0; padding: 11px 15px; gap: 12px; border: 1px solid var(--line); background: white; border-radius: 11px; box-shadow: 0 2px 2px #14282003; }
.metric-icon, .panel-icon, .trust-icon { width: 41px; height: 41px; display: inline-grid; place-items: center; flex: none; border-radius: 8px; }
.metric-icon svg, .panel-icon svg, .trust-icon svg { width: 21px; height: 21px; }
.metric-coral, .trust-icon { background: #faeae3; color: #a44630; }
.metric-teal { background: #e1f0e9; color: #356556; }
.metric-blue { background: #e8edf5; color: #455b7f; }
.metric dt { color: var(--muted); font-size: .85rem; font-weight: 650; line-height: 1.25; }
.metric dd { color: var(--ink); font-size: 1.48rem; line-height: 1.16; letter-spacing: -.055em; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.workspace-panels { display: grid; gap: 13px; }
.filters { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border: 1px solid var(--line); padding: 9px 10px; background: white; border-radius: 10px; }
.type-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.filter-tab { color: #435457; background: transparent; border: 0; border-radius: 6px; min-height: 36px; padding: 0 12px; font-size: .875rem; font-weight: 675; }
.filter-tab:hover { background: #edf2ee; }
.filter-tab.selected { background: #20383c; color: #fff; }
.municipality-filter { position: relative; display: flex; align-items: center; min-height: 36px; color: #384c51; }
.municipality-filter svg { position: absolute; left: 11px; pointer-events: none; width: 16px; height: 16px; }
.municipality-filter .select-chevron { left: auto; right: 10px; }
.municipality-filter select { appearance: none; border: 1px solid #dbe1d9; border-radius: 7px; background: #fff; color: #384c51; padding: 8px 31px 8px 33px; font-size: .875rem; font-weight: 685; min-height: 36px; min-width: 188px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.46fr) minmax(315px, 1fr); gap: 14px; align-items: start; --stage-height: clamp(354px, 29.7vw, 435px); }
.map-panel, .feed-panel { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; min-width: 0; box-shadow: 0 2px 3px #14282006; }
.panel-heading { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 15px; }
.panel-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.panel-icon { width: 36px; height: 36px; color: #3a615b; background: #edf3ee; }
.panel-icon svg { width: 19px; height: 19px; }
.panel-heading h2 { font-size: 1.115rem; line-height: 1.25; letter-spacing: -.025em; font-weight: 790; overflow-wrap: anywhere; }
.panel-heading p { margin-top: 2px; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.panel-heading p.error { color: #992e23; }
.map-scope { color: #3c5657; font-size: .82rem; font-weight: 710; padding: 5px 8px; border-radius: 6px; background: #eef3ef; text-align: right; }
.map-clear { padding-inline: 10px; min-height: 34px; color: #24474a; background: white; border-color: #d7e1db; white-space: nowrap; }
.map-clear:hover { background: #edf3ef; }
.map-stage { position: relative; height: var(--stage-height); isolation: isolate; overflow: hidden; background: #dcebe9; border-block: 1px solid #d7e4de; }
.geo-map { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.geo-map.is-zoomed { touch-action: none; cursor: grab; }
.geo-map.is-dragging, .geo-map.is-dragging * { cursor: grabbing; }
.map-grid-line { stroke: #c4dcd8; stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-water-label { font-size: 14px; font-weight: 700; letter-spacing: .26em; stroke: none; fill: #52776f; pointer-events: none; }
.map-place-label { fill: #43685b; stroke: none; font-size: 11px; letter-spacing: .105em; font-weight: 750; pointer-events: none; }
.map-municipality { fill: #f1f3e4; stroke: #a3b8a9; stroke-width: .85; vector-effect: non-scaling-stroke; cursor: pointer; }
.map-municipality.has-reports { fill: #f5cbb3; stroke: #be765e; }
.map-municipality:hover, .map-municipality.is-hovered { fill: #d5e4d4; stroke: #597e70; stroke-width: 1.35; }
.map-municipality.has-reports:hover, .map-municipality.has-reports.is-hovered { fill: #f5b799; }
.map-municipality.is-selected { fill: #cae2d4; stroke: #2d6759; stroke-width: 1.95; }
.map-count { cursor: pointer; }
.map-count-shape { fill: #a94330; stroke: #fff; stroke-width: 2.3; vector-effect: non-scaling-stroke; }
.map-count.is-selected .map-count-shape { fill: #285f50; }
.map-count-number { fill: white; stroke: none; font-weight: 800; pointer-events: none; }
.map-status, .map-hover { position: absolute; padding: 7px 10px; border-radius: 6px; background: #fff; color: #244641; box-shadow: 0 2px 5px #264b421c; font-size: .875rem; }
.map-status { top: 50%; left: 50%; max-width: calc(100% - 48px); text-align: center; transform: translate(-50%, -50%); }
.map-hover { top: 12px; left: 13px; font-weight: 700; pointer-events: none; }
.map-controls { position: absolute; top: 13px; right: 13px; display: grid; gap: 1px; border: 1px solid #b7cec7; border-radius: 8px; overflow: hidden; background: #dce7e1; box-shadow: 0 2px 8px #1c403516; }
.map-controls button { width: 37px; height: 37px; min-height: 0; display: grid; place-items: center; padding: 0; border: 0; color: #2c4c49; background: #fff; }
.map-controls button:hover:not(:disabled) { background: #eaf2ee; }
.map-controls button:disabled { opacity: .65; cursor: default; }
.map-controls button:focus-visible { outline-offset: -3px; }
.map-controls svg { width: 19px; height: 19px; }
.map-compass { display: grid; justify-items: center; gap: 5px; position: absolute; bottom: 17px; right: 21px; color: #44675e; font-size: .72rem; font-weight: 850; pointer-events: none; }
.map-compass i { width: 13px; height: 19px; background: linear-gradient(90deg, #42655d 50%, #799991 50%); clip-path: polygon(50% 0, 100% 100%, 50% 74%, 0 100%); }
.map-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 10px 13px; gap: 8px 14px; min-height: 46px; color: var(--muted); font-size: .78rem; }
.map-legend { display: flex; flex-wrap: wrap; gap: 7px 15px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 11px; height: 11px; flex: none; }
.legend-count { border-radius: 100%; background: #a94330; }
.legend-selected { border: 1px solid #2d6759; background: #cae2d4; border-radius: 3px; }
.map-footer a { color: #506b65; text-underline-offset: 2px; }

.feed-panel { scroll-margin-top: 15px; }
.feed-panel .panel-heading { border-bottom: 1px solid var(--line); }
.feed-content { max-height: calc(var(--stage-height) + 46px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b9cbc3 transparent; padding: 0 13px 10px; }
.demo-chip { color: #774829; background: #faeddc; font-size: .72rem; font-weight: 800; padding: 5px 8px; border-radius: 6px; white-space: nowrap; }
.cards { display: grid; }
.card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; border-bottom: 1px solid #e9eeea; padding: 13px 4px; min-width: 0; }
.card:hover { background: #f7faf7; }
.card-media { grid-column: 2; grid-row: 1; height: 58px; width: 60px; overflow: hidden; border-radius: 6px; background: #e8ede8; }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-content { grid-column: 1; grid-row: 1; display: grid; min-width: 0; gap: 5px; }
.card-topline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 6px; border-radius: 5px; font-size: .72rem; font-weight: 750; background: #e8eee8; color: #354d45; }
.tag.operativo { background: #fae9e2; color: #8a3929; }
.tag.detencion { background: #f4e9d8; color: #775222; }
.tag.presencia { background: #e3eee9; color: #2b5950; }
.card time { color: var(--muted); font-size: .77rem; }
.card h3 { font-size: .96rem; line-height: 1.3; letter-spacing: -.016em; overflow-wrap: anywhere; }
.card h3 button { text-align: left; padding: 0; border: 0; background: none; color: inherit; font-weight: 750; }
.card h3 button::after { content: ""; position: absolute; inset: 0; }
.card:focus-within { outline: 2px solid #bf573c; outline-offset: -2px; }
.card-place { color: #405a59; display: flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 650; }
.card-place svg { width: 14px; height: 14px; }
.empty-state { display: grid; justify-items: start; padding: 21px 8px; gap: 8px; color: var(--muted); }
.empty-state h3 { color: var(--ink); font-size: 1.02rem; }
.empty-state p { line-height: 1.5; font-size: .92rem; }
.more-row { display: flex; justify-content: center; }
.more-row > button { margin-top: 12px; width: 100%; min-height: 37px; }
.form-status { color: #992e23; }
h2 { font-size: clamp(2rem, 3.2vw, 2.75rem); line-height: 1.1; letter-spacing: -.057em; font-weight: 800; }
.how p { color: var(--muted); margin-top: 9px; line-height: 1.55; }
.how { border-top: 1px solid var(--line); background: #eff2ec; }
.how-inner { display: grid; grid-template-columns: 1fr 1fr; padding-block: 55px; gap: 44px; }
.how-inner p { max-width: 325px; margin-bottom: 17px; }
.how-steps { display: grid; gap: 15px; }
.how-steps > div { padding-left: 15px; border-left: 2px solid #d7775e; display: grid; gap: 4px; }
.how-steps dt { font-weight: 800; }
.how-steps dd { color: var(--muted); line-height: 1.55; }
.footer { background: #fbfcf9; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 17px; min-height: 83px; padding-block: 15px; }
.footer-inner > span, .footer-inner > a:last-child { color: var(--muted); font-size: .83rem; }
.footer-inner > a:last-child:hover { color: var(--ink); }
.traffic { min-height: calc(100vh - 157px); display: grid; place-items: center; padding-block: 30px; }
.traffic-panel { width: min(100%, 580px); display: grid; justify-items: center; gap: 16px; padding: 42px 28px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 17px; }
.traffic-panel .trust-icon { width: 51px; height: 51px; }
.traffic-panel h1 { font-size: clamp(1.85rem, 4vw, 2.6rem); line-height: 1.1; letter-spacing: -.045em; }
.traffic-panel p { color: var(--muted); min-height: 1.5em; }
dialog { width: min(580px, calc(100% - 26px)); max-height: calc(100% - 26px); padding: 0; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #fcfdf9; box-shadow: 0 14px 72px #11252e37; }
dialog::backdrop { background: #102027ab; }
.dialog-inner { padding: clamp(17px, 4vw, 26px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-heading h2, #detail-title { font-size: clamp(1.8rem, 4vw, 2.25rem); overflow-wrap: anywhere; }
.icon-button { display: grid; place-items: center; width: 37px; height: 37px; padding: 0; color: #32464b; border: 1px solid var(--line); background: #fff; border-radius: 7px; flex: none; }
.icon-button:hover { background: #eef2ec; }
.dialog-intro { color: var(--muted); margin: 9px 0 18px; line-height: 1.55; }
#report-form { display: grid; gap: 12px; }
#report-form label { display: grid; gap: 5px; font-size: .875rem; font-weight: 800; }
#report-form input:not([type=file]), #report-form select, #report-form textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #cdd7ce; background: #fff; color: var(--ink); border-radius: 7px; font-size: 1rem; font-weight: 500; }
#report-form select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23384c51' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
#report-form textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#report-form .file-field { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; }
.file-field small { color: var(--muted); font-weight: 600; }
.file-field input { grid-column: 1 / -1; width: 100%; font: inherit; }
.file-field input::file-selector-button { background: #fff; color: var(--ink); border: 1px solid #cdd7ce; border-radius: 6px; padding: 7px 10px; margin-right: 8px; font: inherit; cursor: pointer; }
.form-hint, .form-status { font-size: .83rem; line-height: 1.5; }
.form-hint { margin-top: 5px; color: var(--muted); }
.submit-button { justify-self: start; }
.submitted { display: grid; justify-items: start; gap: 10px; padding-block: 10px 2px; }
.submitted h3 { font-size: 1.4rem; }
.submitted p, .detail-meta { color: var(--muted); }
.detail-meta { font-size: .88rem; margin-top: 8px; }
.detail-description { margin-top: 15px; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-media { display: grid; gap: 12px; }
.detail-media:not(:empty) { margin-top: 16px; }
.detail-media img, .detail-media video { display: block; width: 100%; max-height: 50vh; object-fit: contain; border-radius: 8px; background: #e8ede7; }
.api-operations { display: grid; gap: 14px; margin: 10px 0 20px; }
.api-operations dt { font-weight: 800; }
.api-operations dd { color: var(--muted); line-height: 1.55; margin-top: 4px; }
code { font-size: .87em; background: #e8eee7; padding: 2px 5px; border-radius: 4px; }
@media (max-width: 1080px) {
  .shell { width: calc(100% - 52px); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.8fr) minmax(292px, 1fr); }
}
@media (max-width: 800px) {
  .dashboard-grid { grid-template-columns: 1fr; --stage-height: clamp(290px, 55vw, 420px); }
  .feed-content { max-height: none; overflow: visible; }
  .dashboard-heading { align-items: start; }
  .archive-label { margin-top: 2px; }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 0; grid-template-columns: 1fr auto; gap: 3px 6px; padding-top: 8px; }
  .header-inner > .button { grid-column: 2; grid-row: 1; padding-inline: 10px; min-height: 37px; font-size: .82rem; }
  .nav { grid-column: 1 / -1; grid-row: 2; min-height: 42px; gap: 15px; }
  .dashboard { padding-block: 24px 30px; }
  .dashboard-heading { gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
  .dashboard-heading h1 { font-size: clamp(2.18rem, 9vw, 2.95rem); }
  .dashboard-heading p { margin-top: 7px; }
  .archive-label { margin-top: 0; padding: 4px 8px; }
  .dashboard-metrics { gap: 5px; margin-bottom: 13px; }
  .metric { display: grid; align-content: start; gap: 5px; padding: 8px; }
  .metric-icon { width: 29px; height: 29px; }
  .metric-icon svg { width: 16px; height: 16px; }
  .metric dt { font-size: .8rem; }
  .metric dd { font-size: 1.24rem; }
  .filter-tab { padding-inline: 8px; }
  .filters { gap: 5px; padding: 6px; }
  .map-scope, .map-place-label { display: none; }
  .panel-heading { padding-inline: 10px; }
  .how-inner { grid-template-columns: 1fr; gap: 18px; padding-block: 36px; }
  .footer-inner { flex-wrap: wrap; }
}
@media (max-width: 475px) {
  .form-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
