:root {
  --bg: #eef1ef;
  --surface: #ffffff;
  --surface-soft: #f6f7f5;
  --ink: #242c2f;
  --muted: #687276;
  --line: #d9dedc;
  --primary: #e5661a;
  --primary-dark: #b9470d;
  --primary-soft: #fce8da;
  --green: #20845e;
  --green-dark: #156348;
  --green-soft: #e0f3ea;
  --amber: #d88a16;
  --amber-soft: #fff0d2;
  --red: #c43d35;
  --red-soft: #fbe5e2;
  --blue: #2e6f95;
  --blue-soft: #e1eef5;
  --graphite: #263238;
  --graphite-soft: #344247;
  --shadow: 0 18px 48px rgba(38, 50, 56, .12);
  --radius: 8px;
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.brand-mark {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: var(--radius);
  background-color: #fff;
  background-image: url("./clickcidade-app-icon.png?v=20260628-logo-carmo-r4");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 3px 10px rgba(38, 50, 56, .16);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.small-label {
  margin-top: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 12px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 102, 26, .16);
}

.primary-button,
.secondary-button,
.photo-button,
.toggle-button,
.nav-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-weight: 800;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button,
.photo-button {
  border-color: var(--line);
  background: #fff;
  color: var(--primary-dark);
}

a.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.secondary-button:hover,
.photo-button:hover {
  background: var(--primary-soft);
}

.form-message {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.form-message.is-error {
  color: var(--red);
}

.form-message.is-success {
  color: var(--green);
}

/* Citizen */
.citizen-page {
  min-height: 100vh;
  border-top: 6px solid var(--primary);
  background:
    linear-gradient(180deg, rgba(229, 102, 26, .13), rgba(238, 241, 239, 0) 310px),
    var(--bg);
}

.citizen-shell {
  width: min(620px, 100%);
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.citizen-header {
  padding: 6px 0 14px;
}

.mobile-logo-frame {
  width: calc(100% - 24px);
  max-width: 536px;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  margin: 0 auto;
}

.citizen-mobile-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

.install-button {
  min-height: 38px;
  margin-top: 8px;
  padding: 8px 12px;
}

.citizen-form {
  display: grid;
  gap: 12px;
}

.citizen-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
  box-shadow: 0 10px 30px rgba(38, 50, 56, .08);
}

.citizen-card .field-label:not(:first-child) {
  margin-top: 14px;
}


.citizen-guide {
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px;
  box-shadow: 0 8px 24px rgba(38, 50, 56, .06);
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.guide-steps span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  border-radius: 4px;
  background: var(--surface-soft);
  padding: 6px 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.guide-steps strong {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.privacy-note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: #fbfdfb;
  padding: 10px 12px;
}

.privacy-note summary {
  cursor: pointer;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 850;
}

.privacy-note p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.citizen-receipt {
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px 20px 20px;
  box-shadow: 0 10px 30px rgba(38, 50, 56, .08);
  text-align: center;
}

.receipt-check {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.receipt-eyebrow {
  margin: 14px 0 6px;
  color: var(--green);
  font-size: 14px;
  font-weight: 850;
  text-transform: uppercase;
}

.citizen-receipt h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  overflow-wrap: anywhere;
}

.citizen-receipt > p {
  color: var(--muted);
}

.receipt-note {
  margin: 20px auto;
  max-width: 380px;
}

.receipt-actions {
  display: grid;
  gap: 10px;
}

.receipt-actions button {
  width: 100%;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-button {
  width: 100%;
}

.citizen-form .photo-button,
.citizen-form #locationButton {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.citizen-form .photo-button:hover,
.citizen-form #locationButton:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  color: #fff;
}

.photo-preview {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 12px;
  background: var(--surface-soft);
}

.type-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.type-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface-soft);
  font-weight: 850;
}

.type-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.type-option input {
  width: auto;
  accent-color: var(--primary);
}

.type-option:has(input[value="lixo"]:checked) {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: #7a4a08;
}

.type-option:has(input[value="dengue"]:checked) {
  border-color: var(--red);
  background: var(--red-soft);
  color: #8f2d27;
}

.type-option:has(input[value="terreno"]:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: #235b7b;
}

.location-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.location-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.submit-button {
  min-height: 54px;
  font-size: 17px;
}

/* Panel */
.panel-page {
  min-height: 100vh;
  background: var(--bg);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(229, 102, 26, .22), rgba(238, 241, 239, .95)),
    var(--bg);
}

.login-box {
  width: min(390px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.login-box h1 {
  margin: 14px 0 22px;
  font-size: 30px;
  letter-spacing: 0;
}

.login-box .brand-mark {
  width: 60px;
  height: 60px;
}

.login-box .primary-button {
  width: 100%;
  margin-top: 12px;
}

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

.panel-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  border-right: 1px solid var(--graphite-soft);
  background: var(--graphite);
  padding: 18px;
}

.panel-brand {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.panel-brand strong {
  display: block;
  color: #fff;
  font-size: 18px;
}

.panel-brand small {
  color: #c7d0d2;
  font-weight: 700;
}

.panel-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.nav-button {
  width: 100%;
  border-color: transparent;
  background: transparent;
  color: #d9e0e1;
  text-align: left;
}

.nav-button.is-active,
.nav-button:hover {
  background: var(--primary);
  color: #fff;
}

.panel-sidebar > .secondary-button {
  border-color: #53646a;
  background: transparent;
  color: #fff;
}

.panel-sidebar > .secondary-button:hover {
  border-color: var(--primary);
  background: var(--primary);
}

.panel-main {
  min-width: 0;
  padding: 18px;
}

.panel-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-topbar h1 {
  margin: 0 0 4px;
  font-size: 28px;
  letter-spacing: 0;
}

.panel-topbar p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(38, 50, 56, .07);
}

.stat-card:nth-child(1) {
  border-top: 3px solid var(--primary);
}

.stat-card:nth-child(2) {
  border-top: 3px solid var(--amber);
}

.stat-card:nth-child(3) {
  border-top: 3px solid var(--red);
}

.stat-card:nth-child(4) {
  border-top: 3px solid #79513a;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  letter-spacing: 0;
}

.attention-section {
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}

.attention-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.attention-head h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

.attention-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.attention-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.attention-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
  color: var(--ink);
  text-align: left;
}

.attention-item:hover,
.attention-item:focus-visible {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.attention-item.is-overdue {
  border-color: #d98d86;
  background: var(--red-soft);
}

.attention-item.is-due {
  border-color: #dcab59;
  background: var(--amber-soft);
}

.attention-item-main strong,
.attention-item-main small,
.deadline-label strong,
.deadline-label span {
  display: block;
}

.attention-item-main strong {
  margin-top: 5px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.attention-item-main small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.priority-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.priority-label.alta {
  color: var(--red);
}

.priority-label.media {
  color: #8a570d;
}

.deadline-label {
  align-self: center;
  text-align: right;
  white-space: nowrap;
}

.deadline-label strong {
  font-size: 12px;
}

.deadline-label span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.attention-empty {
  grid-column: 1 / -1;
  padding: 14px;
  color: var(--green-dark);
  font-weight: 800;
}

.filters-card {
  display: grid;
  grid-template-columns: 190px 190px 220px minmax(240px, 1fr);
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}

.filters-card label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.filters-card input,
.filters-card select {
  margin-top: 6px;
}


.topbar-hint {
  margin-top: 4px !important;
  color: var(--graphite) !important;
  font-size: 13px;
  font-weight: 800 !important;
}

.operation-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: -2px 0 12px;
}

.operation-strip article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  box-shadow: 0 10px 28px rgba(38, 50, 56, .06);
}

.operation-strip span,
.operation-strip small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.operation-strip span {
  font-size: 12px;
  text-transform: uppercase;
}

.operation-strip strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
}

.operation-strip small {
  font-size: 11px;
  line-height: 1.25;
}

.operation-strip article:nth-child(1) {
  border-top: 3px solid var(--red);
}

.operation-strip article:nth-child(2) {
  border-top: 3px solid var(--amber);
}

.operation-strip article:nth-child(3) {
  border-top: 3px solid var(--primary);
}

.operation-strip article:nth-child(4) {
  border-top: 3px solid var(--green);
}

.report-item-tags {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.status-pill.triagem,
.status-pill.encaminhada,
.status-pill.vistoria {
  background: var(--amber-soft);
  color: #7c4d12;
}

.status-pill.improcedente {
  background: #e9ecee;
  color: #4f5c60;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.25fr) minmax(330px, .75fr);
  grid-template-areas:
    "map list"
    "map detail";
  gap: 12px;
  align-items: stretch;
}

.map-panel,
.list-panel,
.detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(38, 50, 56, .07);
}

.map-panel {
  grid-area: map;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: min(760px, calc(100vh - 36px));
  min-height: 650px;
  overflow: hidden;
}

.list-panel {
  grid-area: list;
  min-height: 340px;
  max-height: 430px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.detail-panel {
  grid-area: detail;
  min-height: 330px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.panel-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
}

.panel-card-head h2 {
  margin: 0 0 3px;
  font-size: 18px;
  letter-spacing: 0;
}

.panel-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.map-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.map-controls {
  display: grid;
  gap: 7px;
  justify-items: end;
}

.map-style-switcher {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.map-style-button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 850;
}

.map-style-button:last-child {
  border-right: 0;
}

.map-style-button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.map-style-button.is-active {
  background: var(--primary);
  color: #fff;
}

.toggle-button {
  min-height: 34px;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
}

.toggle-button.is-on {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.report-map {
  width: 100%;
  min-height: 0;
  background: #dce7df;
}

.report-list {
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.report-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
  text-align: left;
}

.report-item + .report-item {
  margin-top: 8px;
}

.report-item.is-selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.report-item strong {
  display: block;
  font-size: 14px;
}

.report-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.report-item .list-deadline {
  color: var(--green-dark);
}

.report-item .list-deadline.is-due {
  color: #8a570d;
}

.report-item .list-deadline.is-overdue {
  color: var(--red);
}

.pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.pill.lixo {
  background: var(--amber-soft);
  color: #7c4d12;
}

.pill.dengue {
  background: var(--red-soft);
  color: #8f2f26;
}

.pill.terreno {
  background: #efe2da;
  color: #5a3828;
}

.status-pill {
  background: var(--surface-soft);
  color: #34483d;
}

.status-pill.nova {
  background: var(--red-soft);
  color: #8f2f26;
}

.status-pill.resolvida {
  background: var(--green-soft);
  color: var(--green-dark);
}

.detail-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  font-weight: 800;
}

.detail-content {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.detail-photo {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-photo-block {
  min-width: 0;
  margin: 0;
}

.detail-photo-block figcaption {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-photo-wrap {
  display: grid;
}

.photo-loading {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.photo-fallback {
  min-height: 84px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.photo-fallback:not([hidden]) {
  display: flex;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.meta-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface-soft);
}

.meta-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.meta-box strong {
  display: block;
  margin-top: 4px;
  word-break: break-word;
}

.detail-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.resolution-upload {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
}

.resolution-upload .photo-button {
  width: 100%;
}

.resolution-upload small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-weight: 700;
}

.resolution-preview {
  display: block;
  width: 100%;
  max-height: 240px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.leaflet-popup-content {
  margin: 10px;
}

.map-popup {
  min-width: 190px;
}

.map-popup strong,
.map-popup span {
  display: block;
}

.map-popup span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

/* Reports */
.reports-section {
  margin-top: 18px;
  padding: 20px 0 8px;
  border-top: 2px solid var(--line);
}

.reports-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.section-label {
  display: block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.reports-head h2 {
  margin: 3px 0;
  font-size: 25px;
}

.reports-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.report-actions {
  display: flex;
  gap: 8px;
}

.report-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.report-filters label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.report-filters select {
  margin-top: 6px;
}

.report-custom-dates {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 10px;
  padding-top: 2px;
}

.report-custom-dates[hidden] {
  display: none;
}

.report-custom-dates input {
  margin-top: 6px;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.report-kpi {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.report-kpi:nth-child(1) {
  border-top: 3px solid var(--primary);
}

.report-kpi:nth-child(2) {
  border-top: 3px solid var(--amber);
}

.report-kpi:nth-child(3),
.report-kpi:nth-child(4),
.report-kpi:nth-child(5) {
  border-top: 3px solid var(--green);
}

.report-kpi span,
.report-kpi small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.report-kpi span {
  font-size: 12px;
  text-transform: uppercase;
}

.report-kpi strong {
  display: block;
  margin: 5px 0 3px;
  font-size: 28px;
}

.report-kpi small {
  font-size: 11px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.report-territories {
  grid-column: 1 / -1;
}

.report-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 14px;
}

.report-panel-head h3 {
  margin: 0;
  font-size: 16px;
}

.report-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.report-bars {
  display: grid;
  gap: 13px;
}

.report-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 800;
}

.report-bar-label strong small {
  color: var(--muted);
}

.report-bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 5px;
  background: #edf2ee;
}

.report-bar-track span {
  display: block;
  min-width: 0;
  height: 100%;
  border-radius: inherit;
}

.report-table-wrap {
  overflow-x: auto;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.report-table th,
.report-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: right;
}

.report-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.report-table th:first-child,
.report-table td:first-child {
  text-align: left;
}

.report-table tbody tr:last-child td {
  border-bottom: 0;
}

.report-table-empty {
  color: var(--muted);
  text-align: center !important;
  font-weight: 800;
}

@media (max-width: 1160px) {
  .attention-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-shell {
    grid-template-columns: 1fr;
  }

  .panel-sidebar {
    position: static;
    height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
  }

  .panel-nav {
    grid-column: 1 / -1;
    display: flex;
    overflow: auto;
  }

  .nav-button {
    width: auto;
    white-space: nowrap;
  }

  .filters-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "map"
      "list"
      "detail";
  }

  .report-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .panel-main {
    padding: 12px;
  }

  .panel-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions button {
    flex: 1;
  }

  .stats-grid,
  .operation-strip,
  .filters-card,
  .detail-meta,
  .detail-actions,
  .report-filters,
  .report-kpis,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .reports-head {
    align-items: stretch;
    flex-direction: column;
  }

  .report-actions button {
    flex: 1;
  }

  .report-territories {
    grid-column: auto;
  }

  .map-panel {
    grid-template-rows: auto minmax(0, 1fr);
    height: 650px;
    min-height: 650px;
  }

  .map-panel .panel-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .map-controls {
    justify-items: stretch;
  }

  .map-style-switcher {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-toggles {
    justify-content: flex-start;
  }

.report-map {
    min-height: 0;
  }

  .location-row {
    grid-template-columns: 1fr;
  }
}

.map-category-legend {
  display: grid;
  gap: 5px;
  min-width: 142px;
  border: 1px solid rgba(38, 50, 56, .22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  padding: 8px 10px;
  box-shadow: 0 4px 14px rgba(38, 50, 56, .14);
  color: var(--ink);
  font-size: 11px;
}

.map-category-legend strong,
.map-category-legend span {
  display: flex;
  align-items: center;
}

.map-category-legend strong {
  margin-bottom: 1px;
  font-size: 11px;
}

.map-category-legend span {
  gap: 6px;
  font-weight: 750;
}

.map-category-legend i {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 50%;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 7mm;
  }

  html,
  body {
    width: 100%;
    background: #fff;
    color: #111;
    font-size: 8pt;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .panel-sidebar,
  .panel-topbar,
  #overview,
  #attentionPanel,
  .filters-card,
  .panel-grid,
  .report-actions,
  .report-filters {
    display: none !important;
  }

  .panel-shell,
  .panel-main {
    display: block;
    width: 100%;
    padding: 0;
  }

  .reports-section {
    margin: 0;
    padding: 0;
    border: 0;
    page-break-inside: avoid;
  }

  .reports-head {
    margin-bottom: 4mm;
  }

  .section-label {
    font-size: 7pt;
  }

  .reports-head h2 {
    margin: 1mm 0;
    font-size: 16pt;
  }

  .reports-head p {
    font-size: 8pt;
  }

  .report-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2mm;
    margin: 0 0 3mm;
  }

  .report-kpi {
    padding: 2.5mm;
  }

  .report-kpi span {
    font-size: 7pt;
  }

  .report-kpi strong {
    margin: 1mm 0;
    font-size: 16pt;
  }

  .report-kpi small {
    font-size: 6.5pt;
  }

  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2mm;
  }

  .report-panel {
    padding: 2.5mm;
  }

  .report-panel-head {
    margin-bottom: 2mm;
  }

  .report-panel-head h3 {
    font-size: 10pt;
  }

  .report-panel-head span,
  .report-bar-label {
    font-size: 7pt;
  }

  .report-bars {
    gap: 2mm;
  }

  .report-bar-label {
    margin-bottom: 1mm;
  }

  .report-bar-track {
    height: 2mm;
  }

  .report-table {
    font-size: 7pt;
  }

  .report-table th,
  .report-table td {
    padding: 1.5mm 2mm;
  }

  .report-table th {
    font-size: 6.5pt;
  }

  .report-panel,
  .report-kpi {
    box-shadow: none;
    break-inside: avoid;
  }
}
