:root {
  --green: #1b5931;
  --orange: #ec7721;
  --ink: #162019;
  --muted: #68736b;
  --line: #dce4de;
  --bg: #f5f7f4;
  --panel: #ffffff;
}

* { box-sizing: border-box; }
html {
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.lucide-icon {
  display: inline-block;
  flex: 0 0 auto;
  height: 1em;
  stroke-width: 2;
  vertical-align: -0.16em;
  width: 1em;
}
input, select, textarea, button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}
button, .button {
  align-items: center;
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  padding: 10px 14px;
}
.button-secondary {
  align-items: center;
  background: white;
  color: var(--green);
  border: 1px solid var(--green);
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}
.button-danger {
  background: #b42318;
  color: white;
}
.icon-only-control {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  min-width: 42px;
  padding: 0;
  width: 42px;
}
.icon-only-control .lucide-icon {
  font-size: 18px;
}
.topbar {
  min-height: 64px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
}
.brand {
  align-items: center;
  display: inline-flex;
}
.brand img {
  display: block;
  height: 34px;
  object-fit: contain;
  width: auto;
}
.topbar nav { display: flex; gap: 16px; }
.topbar form { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar form button { width: auto; background: var(--orange); }
.page { padding: 24px; max-width: 1500px; margin: 0 auto; }
.page:has(.login) {
  padding-top: clamp(36px, 6vh, 72px);
}
.topbar:has(+ .page .login) {
  min-height: 78px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 14px;
}
.section-head h1 {
  display: none;
}
.section-head p {
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
h1, h2 { margin: 0 0 8px; }
h1 { font-size: 30px; }
h2 { font-size: 18px; }
p { margin: 0 0 12px; }
.muted, small { color: var(--muted); }
.panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.panel { padding: 18px; }
.card {
  padding: 12px;
  display: grid;
  gap: 4px;
}
.card:hover { border-color: var(--green); }
.filters, .inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.filters input, .filters select { min-width: 160px; }
.filters button, .inline-form button { width: auto; white-space: nowrap; }
.form-stack { display: grid; gap: 10px; }
.form-actions {
  display: flex;
  justify-content: flex-end;
}
.form-actions button { width: auto; }
.check-row {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.check-row input {
  width: auto;
}
.login {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: 1fr minmax(300px, 420px);
  gap: 40px;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 32px;
}
.login-intro {
  display: grid;
  gap: 12px;
}
.login-logo {
  display: block;
  height: auto;
  max-width: min(430px, 88vw);
  width: 100%;
}
.alert {
  background: #fff0e5;
  border: 1px solid #ffd4b8;
  color: #8a3d08;
  border-radius: 6px;
  padding: 10px;
}
.notice {
  background: #eef9f1;
  border: 1px solid #c9ead1;
  border-radius: 6px;
  color: #0b6b33;
  padding: 10px;
}
.auth-panel {
  align-self: center;
}
.auth-help-link {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  justify-self: start;
}
.auth-help-link.centered {
  justify-self: center;
}
.auth-password-field {
  display: block;
  position: relative;
}
.auth-password-field input {
  padding-right: 48px;
}
.auth-password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--green);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
}
.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  background: #edf8f0;
  outline: none;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}
.kanban {
  display: grid;
  grid-template-columns: repeat(7, minmax(190px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.agent-workspace {
  margin-bottom: 18px;
}
.pipeline-kanban {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.task-kanban {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}
.tasks-page .dash-panel {
  padding: 8px;
}
.tasks-page .task-kanban {
  gap: 4px;
}
.tasks-page .agent-task-list {
  padding: 0;
}
.tasks-page .agent-task-card strong {
  font-size: 12px;
}
.tasks-page .agent-task-drag-handle {
  font-size: 20px;
  margin-top: 0;
}
.tasks-page .agent-task-card {
  border-left-width: 8px;
}
.tasks-page .agent-task-card.priority-bassa {
  border-left-color: #08772f;
}
.tasks-page .agent-task-card.priority-media {
  border-left-color: #f59e0b;
}
.tasks-page .agent-task-card.priority-alta {
  border-left-color: #dc2626;
}
.tasks-page .tasks-secondary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.tasks-page .tasks-column-title {
  line-height: 1.1;
  margin: 0;
}
.tasks-page .task-deadlines-list a small {
  color: var(--muted);
  font-size: 12px;
}
.tasks-page .tasks-agenda-section {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}
.tasks-page .tasks-agenda-heading h2 {
  margin: 0 0 4px;
}
.tasks-page .tasks-agenda-heading p,
.tasks-page .tasks-agenda-panel-heading p {
  color: var(--muted);
  margin: 0;
}
.tasks-page .tasks-agenda-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tasks-page .tasks-agenda-summary-card {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 78px;
  padding: 14px;
}
.tasks-page .tasks-agenda-summary-card--appointments {
  background: #effbf5;
}
.tasks-page .tasks-agenda-summary-card--overdue {
  background: #fff1f1;
}
.tasks-page .tasks-agenda-summary-card--today {
  background: #f2f6f8;
}
.tasks-page .tasks-agenda-summary-icon {
  align-items: center;
  background: rgba(12, 102, 57, 0.1);
  border-radius: 50%;
  color: var(--green);
  display: inline-flex;
  font-size: 20px;
  height: 42px;
  justify-content: center;
  width: 42px;
}
.tasks-page .tasks-agenda-summary-card--overdue .tasks-agenda-summary-icon {
  background: #ffdcdc;
  color: #c62828;
  font-weight: 700;
}
.tasks-page .tasks-agenda-summary-card--today .tasks-agenda-summary-icon {
  background: #e2ebef;
  color: #17364b;
}
.tasks-page .tasks-agenda-summary-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.tasks-page .tasks-agenda-summary-card strong {
  font-size: 16px;
}
.tasks-page .tasks-agenda-summary-card small {
  color: var(--muted);
  font-size: 12px;
}
.tasks-page .tasks-agenda-summary-card b {
  font-size: 28px;
  line-height: 1;
}
.tasks-page .tasks-agenda-summary-card--overdue b {
  color: #b91c1c;
}
.tasks-page .tasks-agenda-panels {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tasks-page .tasks-agenda-panel {
  align-content: start;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
}
.tasks-page .tasks-agenda-panel-heading {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.tasks-page .tasks-agenda-panel-heading h2 {
  margin: 0 0 4px;
}
.tasks-page .tasks-agenda-open-link {
  flex: 0 0 auto;
  white-space: nowrap;
}
.tasks-page .tasks-agenda-tabs {
  background: #eef3f5;
  border-radius: 9px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
}
.tasks-page .tasks-agenda-tabs--deadlines {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tasks-page .tasks-agenda-tabs--appointments {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tasks-page .tasks-agenda-tab {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #25425a;
  cursor: pointer;
  min-height: 42px;
  font: inherit;
  font-weight: 600;
  min-width: 0;
  padding: 9px 8px;
}
.tasks-page .tasks-agenda-tab span {
  background: #dce8ed;
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  margin-left: 4px;
  min-width: 22px;
  padding: 3px 6px;
}
.tasks-page .tasks-agenda-tab.is-active {
  background: var(--green);
  color: white;
}
.tasks-page .tasks-agenda-tab.is-active span {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}
.tasks-page .tasks-agenda-tab--past.is-active {
  background: #4b5563;
  color: white;
}
.tasks-page .tasks-agenda-tab--past.is-active span {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}
.tasks-page .tasks-agenda-tab--upcoming.is-active {
  background: #dbeafe;
  color: #1769aa;
}
.tasks-page .tasks-agenda-tab--upcoming.is-active span {
  background: #bfdbfe;
  color: #1769aa;
}
.tasks-page .tasks-agenda-tabs--deadlines .tasks-agenda-tab.is-active {
  background: #ffd2d5;
  color: #bd1f27;
}
.tasks-page .tasks-agenda-tabs--deadlines .tasks-agenda-tab.is-active span {
  background: #ffc2c6;
  color: #a71920;
}
.tasks-page .tasks-agenda-tabs--deadlines .tasks-agenda-tab--past.is-active {
  background: #4b5563;
  color: white;
}
.tasks-page .tasks-agenda-tabs--deadlines .tasks-agenda-tab--past.is-active span {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}
.tasks-page .tasks-agenda-tabs--deadlines .tasks-agenda-tab--upcoming.is-active {
  background: #dbeafe;
  color: #1769aa;
}
.tasks-page .tasks-agenda-tabs--deadlines .tasks-agenda-tab--upcoming.is-active span {
  background: #bfdbfe;
  color: #1769aa;
}
.tasks-page .tasks-agenda-tab-panel[hidden] {
  display: none;
}
.tasks-page .tasks-agenda-panel .compact-list {
  gap: 0;
}
.tasks-page .tasks-agenda-panel .compact-list a {
  background: #fbfdfd;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 9px;
  gap: 4px;
  margin-bottom: 8px;
  padding: 11px 12px;
}
.tasks-page .tasks-agenda-panel .tasks-agenda-item--past {
  border-left: 8px solid #4b5563 !important;
}
.tasks-page .tasks-agenda-panel .tasks-agenda-item--today {
  border-left: 8px solid #1b5931 !important;
}
.tasks-page .tasks-agenda-panel .tasks-agenda-item--upcoming {
  border-left: 8px solid #dbeafe !important;
}
.tasks-page .tasks-agenda-panel[data-agenda-panel="deadlines"] .tasks-agenda-item--today {
  border-left: 8px solid #dc2626 !important;
}
.tasks-page .tasks-agenda-panel .compact-list a:last-child {
  margin-bottom: 0;
}
.tasks-page .tasks-agenda-panel .compact-list a strong {
  font-size: 14px;
}
.tasks-page .tasks-agenda-panel .compact-list a span,
.tasks-page .tasks-agenda-panel .compact-list a small {
  font-size: 12px;
}
.tasks-page .tasks-agenda-panel .compact-list a small {
  color: var(--muted);
}
@media (max-width: 900px) {
  .tasks-page .tasks-agenda-summary,
  .tasks-page .tasks-agenda-panels {
    grid-template-columns: 1fr;
  }
}

/* Statistics workspace: intentionally scoped so existing admin views keep their layout. */
.statistics-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.statistics-page-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}
.statistics-page-header h1 {
  margin: 0 0 4px;
}
.statistics-page-header p,
.statistics-chart-panel p,
.statistics-table-panel p,
.statistics-alert-panel p {
  color: var(--muted);
  margin: 0;
}
.statistics-period-badge {
  background: #edf6f0;
  border: 1px solid #cde5d4;
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  padding: 7px 11px;
  white-space: nowrap;
}
.statistics-header-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}
.statistics-filters {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}
.statistics-filters label {
  flex: 1 1 140px;
  display: grid;
  gap: 4px;
  min-width: 120px;
}
.statistics-filters label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.statistics-filters input,
.statistics-filters select {
  min-height: 38px;
  padding: 8px 9px;
}
.statistics-filters .icon-only-control {
  height: 38px;
  min-width: 38px;
  width: 38px;
}
.statistics-tabs {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 2px;
}
.statistics-tabs a {
  border-bottom: 3px solid transparent;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px 8px;
}
.statistics-tabs a:hover,
.statistics-tabs a.active {
  border-bottom-color: var(--green);
  color: var(--green);
}
.statistics-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.statistics-kpi-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px;
}
.statistics-kpi-card a {
  display: grid;
  gap: 4px;
}
.statistics-kpi-card > span,
.statistics-kpi-card a > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.statistics-kpi-card strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}
.statistics-kpi-card small {
  color: var(--muted);
  font-size: 11px;
}
.statistics-kpi-card.tone-green { background: #edf8f0; }
.statistics-kpi-card.tone-blue { background: #edf6fb; }
.statistics-kpi-card.tone-violet { background: #f2effc; }
.statistics-kpi-card.tone-amber { background: #fff7e4; }
.statistics-kpi-card.tone-gray { background: #f1f4f3; }
.statistics-grid-two {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.statistics-chart-panel,
.statistics-table-panel,
.statistics-alert-panel {
  min-width: 0;
}
.statistics-chart-panel .panel-title-row,
.statistics-table-panel .panel-title-row,
.statistics-alert-panel .panel-title-row {
  align-items: flex-start;
  margin-bottom: 14px;
}
.statistics-chart-panel h2,
.statistics-table-panel h2,
.statistics-alert-panel h2 {
  font-size: 17px;
  margin: 0 0 2px;
}
.statistics-timeline {
  align-items: end;
  display: flex;
  gap: 8px;
  height: 190px;
  overflow-x: auto;
  padding: 12px 2px 0;
}
.statistics-timeline > div {
  align-items: center;
  display: flex;
  flex: 1 0 34px;
  flex-direction: column;
  gap: 5px;
  height: 100%;
  justify-content: end;
  min-width: 34px;
}
.statistics-timeline span {
  align-items: center;
  background: #8ccdae;
  border-radius: 5px 5px 2px 2px;
  color: var(--green);
  display: flex;
  justify-content: center;
  max-height: 140px;
  min-height: 8px;
  width: 100%;
}
.statistics-timeline b {
  font-size: 10px;
}
.statistics-timeline small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.statistics-bar-list {
  display: grid;
  gap: 11px;
}
.statistics-bar-list > a,
.statistics-bar-list > div {
  display: grid;
  gap: 5px;
}
.statistics-bar-list > a > span,
.statistics-bar-list > div > span {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.statistics-bar-list strong,
.statistics-bar-list em {
  font-size: 12px;
  font-style: normal;
}
.statistics-bar-list em {
  color: var(--muted);
  white-space: nowrap;
}
.statistics-bar-list i {
  background: #edf1ef;
  border-radius: 999px;
  display: block;
  height: 8px;
  overflow: hidden;
}
.statistics-bar-list i b {
  background: var(--green);
  border-radius: inherit;
  display: block;
  height: 100%;
}
.statistics-alert-count {
  background: #fff0ed;
  border-radius: 999px;
  color: #c53b2f;
  font-size: 14px;
  padding: 6px 10px;
}
.statistics-limitations {
  background: #f1f5f2;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  padding: 10px 12px;
}
.statistics-limitations strong {
  color: var(--ink);
}
.statistics-limitations ul {
  display: grid;
  gap: 3px;
  margin: 5px 0 0;
  padding-left: 18px;
}
.statistics-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.statistics-table-wrap table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}
.statistics-table-wrap th,
.statistics-table-wrap td {
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  padding: 9px 8px;
  text-align: left;
  white-space: nowrap;
}
.statistics-table-wrap th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.statistics-table-wrap tr:last-child td {
  border-bottom: 0;
}
.statistics-table-wrap td a {
  color: var(--green);
}
.statistics-shell .admin-main {
  min-width: 0;
}

@media (max-width: 1100px) {
  .statistics-filters label {
    flex-basis: 180px;
  }
}
@media (max-width: 760px) {
  .statistics-page-header {
    flex-direction: column;
  }
  .statistics-period-badge {
    white-space: normal;
  }
  .statistics-kpi-grid,
  .statistics-grid-two {
    grid-template-columns: 1fr;
  }
  .statistics-filters label {
    flex-basis: 100%;
  }
  .statistics-filters .icon-only-control {
    justify-self: start;
  }
  .statistics-table-wrap table {
    min-width: 640px;
  }
}
@media (max-width: 900px) {
  .tasks-page .tasks-secondary-grid {
    grid-template-columns: 1fr;
  }
}
.column {
  min-height: 380px;
  background: #eef4ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.column h2 { display: flex; justify-content: space-between; font-size: 14px; }
.column h2 span, .badge {
  background: var(--orange);
  color: white;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
}
.pipeline-card,
.task-card {
  border-left: 5px solid var(--line);
}
.priority-alta {
  border-left-color: #b42318;
}
.priority-media {
  border-left-color: #d89b00;
}
.priority-bassa {
  border-left-color: #1f7a3a;
}
.priority-badge {
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  padding: 2px 8px;
  text-transform: capitalize;
  width: max-content;
}
.priority-badge.priority-alta {
  background: #b42318;
}
.priority-badge.priority-media {
  background: #d89b00;
}
.priority-badge.priority-bassa {
  background: #1f7a3a;
}
.priority-icon {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  justify-content: center;
  min-height: 28px;
  min-width: 28px;
  vertical-align: middle;
}
.priority-icon.low { color: #08772f; }
.priority-icon.medium { color: #f59e0b; }
.priority-icon.high { color: #dc2626; }
.priority-choice-group {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  width: auto;
}
.priority-choice {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}
.priority-choice input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}
.priority-choice span {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}
.priority-choice.low { color: #08772f; }
.priority-choice.medium { color: #f59e0b; }
.priority-choice.high { color: #dc2626; }
.priority-choice:has(input:checked) {
  background: #eef7f1;
  border-color: currentColor;
  box-shadow: 0 0 0 2px rgba(8, 119, 47, 0.08);
}
.population-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  padding: 4px 10px;
  width: max-content;
}
.population-low {
  background: white;
  color: var(--ink);
}
.population-ok {
  background: #e7f6ec;
  border-color: #9bd5ad;
  color: #146b32;
}
.population-high {
  background: #fdecec;
  border-color: #f3aaaa;
  color: #b42318;
}
.area-summary {
  border: 2px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  padding: 16px;
}
.area-summary div {
  display: grid;
  gap: 4px;
}
.area-summary span {
  color: var(--muted);
  font-size: 13px;
}
.area-summary strong {
  font-size: 24px;
}
.area-summary.population-low {
  background: white;
}
.area-summary.population-ok {
  background: #e7f6ec;
}
.area-summary.population-high {
  background: #fdecec;
}
.side-stack, .grid-2, .grid-3 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.bulk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.province-option-complete,
.province-option-partial {
  color: #1f7a3a;
  font-weight: 700;
}
.province-option-partial {
  color: var(--orange);
}
.province-legend {
  display: grid;
  gap: 4px;
  font-size: 12px;
  line-height: 1.3;
}
.province-legend span {
  color: var(--muted);
}
.legend-check-complete {
  color: #1f7a3a;
}
.legend-check-partial {
  color: var(--orange);
}
.active-region-head {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  margin-bottom: 16px;
}
.active-region-head label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.area-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}
.area-stat-item {
  background: #eef4ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
}
.area-stat-item span {
  font-size: 13px;
}
.area-stat-item small {
  color: #8a3d08;
}
.table-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.table-toolbar,
.selection-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.selection-toolbar {
  background: #e7f6ec;
  border: 1px solid #9bd5ad;
  border-radius: 8px;
  padding: 10px 12px;
}
.selection-toolbar div {
  display: flex;
  gap: 8px;
}
.selection-toolbar[hidden],
.table-toolbar[hidden],
.confirm-modal[hidden] {
  display: none;
}
tr.row-selected td {
  background: #e7f6ec;
}
.confirm-modal {
  align-items: center;
  background: rgba(22, 32, 25, 0.45);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 20px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}
.confirm-dialog {
  background: white;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  max-width: 520px;
  padding: 22px;
  width: 100%;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}
.undo-toast {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  bottom: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
  color: white;
  display: flex;
  gap: 16px;
  left: 50%;
  padding: 12px 14px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 30;
}
.undo-toast form button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: white;
  width: auto;
}
.icon-danger {
  background: #fdecec;
  border: 1px solid #f3aaaa;
  color: #b42318;
  font-size: 20px;
  font-weight: 800;
  height: 34px;
  line-height: 1;
  padding: 0;
  width: 34px;
}
dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }
dt { color: var(--muted); }
dd { margin: 0; }
.timeline-item { border-top: 1px solid var(--line); padding: 12px 0; }
.contact-row {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 10px 0;
}
.contact-row form button { width: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 13px; }

.admin-table-scroll,
.table-overflow-guard,
.dash-panel:has(> table) {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-color: #0c6639 #edf1ef;
  scrollbar-width: thin;
}
.admin-table-scroll::-webkit-scrollbar,
.table-overflow-guard::-webkit-scrollbar,
.dash-panel:has(> table)::-webkit-scrollbar {
  height: 14px;
}
.admin-table-scroll::-webkit-scrollbar-track,
.table-overflow-guard::-webkit-scrollbar-track,
.dash-panel:has(> table)::-webkit-scrollbar-track {
  background: #edf1ef;
  border-radius: 999px;
}
.admin-table-scroll::-webkit-scrollbar-thumb,
.table-overflow-guard::-webkit-scrollbar-thumb,
.dash-panel:has(> table)::-webkit-scrollbar-thumb {
  background: #0c6639;
  border: 3px solid #edf1ef;
  border-radius: 999px;
}
.dash-panel:has(> table) > table {
  min-width: max-content;
}

.admin-dashboard-mode {
  background: #f6f8f7;
}
.admin-dashboard-mode .topbar {
  display: none;
}
.admin-dashboard-mode .page {
  max-width: none;
  padding: 0;
}
.admin-main *,
.admin-sidebar * {
  min-width: 0;
}
[hidden] {
  display: none !important;
}
.admin-shell {
  min-height: 100vh;
  padding-left: 220px;
}
.admin-sidebar {
  background: linear-gradient(180deg, #07592f 0%, #063f24 100%);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  left: 0;
  overflow: hidden;
  padding: 24px 12px;
  position: fixed;
  top: 0;
  width: 220px;
  z-index: 20;
}
.admin-brand {
  display: grid;
  gap: 8px;
  padding: 0 6px 14px;
}
.admin-brand img {
  display: block;
  height: auto;
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
  width: min(168px, 100%);
}
.admin-brand span {
  color: rgba(255, 255, 255, 0.76);
}
.admin-nav {
  align-content: start;
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
  grid-auto-rows: max-content;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}
.admin-nav a {
  align-items: center;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  font-size: 14px;
  gap: 10px;
  padding: 11px 12px;
}
.admin-nav a .lucide-icon {
  font-size: 18px;
}
.admin-nav-badge {
  align-items: center;
  background: #f97316;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  justify-content: center;
  margin-left: auto;
  min-width: 22px;
  padding: 3px 7px;
}
.admin-nav a.active,
.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}
.admin-user-card {
  align-items: center;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex: 0 0 auto;
  font-size: 14px;
  gap: 10px;
  margin-top: auto;
  padding: 11px 12px;
}
.admin-user-card .lucide-icon {
  color: white;
  font-size: 18px;
}
.admin-user-card span {
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-sidebar > form {
  flex: 0 0 auto;
  margin: 0;
}
.admin-logout {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  font-size: 14px;
  font-weight: 400;
  gap: 10px;
  justify-content: flex-start;
  padding: 11px 12px;
  width: 100%;
}
.admin-logout .lucide-icon {
  color: white;
  font-size: 18px;
}
.admin-logout:hover {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}
.admin-main {
  display: grid;
  gap: 22px;
  min-width: 0;
  padding: 16px 16px;
}

@media (min-width: 761px) and (max-height: 760px) {
  .admin-sidebar {
    bottom: 0;
    gap: 8px;
    height: auto;
    min-height: 100dvh;
    padding: 14px 10px;
  }
  .admin-brand {
    gap: 4px;
    padding: 0 6px 6px;
  }
  .admin-brand img {
    max-height: 34px;
    width: min(150px, 100%);
  }
  .admin-brand span {
    font-size: 13px;
    line-height: 1.1;
  }
  .admin-nav {
    gap: 2px;
    overflow-y: auto;
  }
  .admin-nav a,
  .admin-user-card,
  .admin-logout {
    font-size: 12.5px;
    gap: 8px;
    padding: 7px 9px;
  }
  .admin-nav a .lucide-icon,
  .admin-user-card .lucide-icon,
  .admin-logout .lucide-icon {
    font-size: 16px;
  }
}
.agent-sidebar {
  background: linear-gradient(180deg, #07592f 0%, #064125 100%);
}
.agent-user-menu {
  display: grid;
  gap: 10px;
  margin-top: auto;
  position: relative;
}
.agent-user-trigger {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 12px;
  text-align: left;
  width: 100%;
}
.agent-user-trigger span {
  display: grid;
  gap: 2px;
}
.agent-user-trigger small,
.agent-user-popover a {
  color: rgba(255, 255, 255, 0.78);
}
.agent-user-trigger b {
  align-items: center;
  display: inline-flex;
  font-size: 16px;
}
.agent-user-popover {
  background: #0b2d1d;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  bottom: calc(100% + 8px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  display: grid;
  gap: 4px;
  left: 0;
  padding: 8px;
  position: absolute;
  right: 0;
  z-index: 50;
}
.agent-user-popover a,
.agent-user-popover button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  padding: 10px;
  text-align: left;
  width: 100%;
}
.agent-user-popover a:hover,
.agent-user-popover button:hover {
  background: rgba(255, 255, 255, 0.12);
}
.agent-notification-menu {
  position: relative;
}
.agent-icon-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 10px;
  color: white;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  position: relative;
  width: 100%;
}
.agent-icon-button span {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  width: 20px;
}
.agent-icon-button b {
  align-items: center;
  background: #d92d20;
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 11px;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 5px;
  position: absolute;
  right: -5px;
  top: -6px;
}
.agent-notification-popover {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
  display: grid;
  gap: 12px;
  padding: 14px;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
}
.agent-notification-list {
  display: grid;
  gap: 10px;
}
.agent-notification-list article {
  display: grid;
  gap: 10px;
  grid-template-columns: 8px minmax(0, 1fr);
}
.agent-notification-list article > span {
  background: #f2a900;
  border-radius: 999px;
  height: 8px;
  margin-top: 6px;
  width: 8px;
}
.agent-notification-list article > span.critical {
  background: #d92d20;
}
.agent-notification-list article > span.info {
  background: #2f80ed;
}
.agent-notification-list small,
.agent-notification-popover p {
  color: var(--muted);
}
.agent-dashboard-page {
  gap: 16px;
}
.agent-dashboard-hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.agent-dashboard-hero h1 {
  display: none;
}
.agent-dashboard-hero p {
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.agent-dashboard-actions {
  display: flex;
  gap: 12px;
}
.agent-dashboard-actions .button,
.agent-dashboard-actions .button-secondary {
  align-items: center;
  border-radius: 8px;
  font-weight: 900;
  min-height: 46px;
  padding-inline: 18px;
  width: auto;
}
.agent-stat-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.agent-stat-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.agent-stat-card {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  gap: 16px;
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 116px;
  padding: 20px;
}
.agent-stat-card.has-stat-tooltip {
  cursor: help;
  position: relative;
}
.agent-stat-card b {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  height: 54px;
  justify-content: center;
  width: 54px;
}
.agent-stat-card b .lucide-icon {
  font-size: 26px;
}
.agent-stat-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.agent-stat-card span {
  color: #162019;
  font-size: 13px;
  font-weight: 800;
}
.agent-stat-card strong {
  font-size: 29px;
  line-height: 1;
  overflow-wrap: anywhere;
}
.agent-stat-card .stat-appointment-value {
  font-size: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-stat-card small {
  color: #31443a;
  overflow-wrap: anywhere;
}
.agent-stat-card.tone-green {
  background: #f1faf3;
}
.agent-stat-card.tone-green b {
  background: #c8f0d2;
  color: #08772f;
}
.agent-stat-card.tone-blue {
  background: #eef7ff;
}
.agent-stat-card.tone-blue b {
  background: #cfe9ff;
  color: #1473c9;
}
.agent-stat-card.tone-amber {
  background: #fff7e8;
}
.agent-stat-card.tone-amber b {
  background: #ffe5ad;
  color: #af6500;
}
.agent-stat-card.tone-violet {
  background: #f6f0ff;
}
.agent-stat-card.tone-violet b {
  background: #e5d8ff;
  color: #7046c8;
}
.agent-stat-card.tone-red {
  background: #fff0f0;
}
.agent-stat-card.tone-red b {
  background: #ffd6d8;
  color: #c9252d;
}
.agent-stat-tooltip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 35, 25, 0.16);
  color: #162019;
  display: grid;
  gap: 10px;
  left: 12px;
  min-width: 260px;
  opacity: 0;
  padding: 12px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 10px);
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  visibility: hidden;
  width: min(330px, calc(100vw - 32px));
  z-index: 40;
}
.agent-stat-card.has-stat-tooltip:hover .agent-stat-tooltip,
.agent-stat-card.has-stat-tooltip:focus-within .agent-stat-tooltip {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.agent-stat-tooltip strong {
  font-size: 13px;
}
.agent-stat-tooltip ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.agent-stat-tooltip li {
  border-bottom: 1px solid #edf2ee;
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
}
.agent-stat-tooltip li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.agent-stat-tooltip li span,
.agent-stat-tooltip li small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-stat-tooltip li span {
  font-size: 13px;
  font-weight: 800;
}
.agent-stat-tooltip li small,
.agent-stat-tooltip p,
.agent-stat-tooltip em {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.agent-stat-tooltip em {
  font-style: normal;
  font-weight: 800;
}
.agent-dashboard-main-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(420px, 0.95fr) minmax(0, 1.05fr);
}
.agent-dashboard-main-grid > *,
.agent-bottom-grid > *,
.agent-stat-grid > * {
  min-width: 0;
}
.agent-day-panel {
  display: grid;
  gap: 16px;
}
.agent-day-counters {
  margin-bottom: 2px;
}
.agent-day-list {
  display: grid;
  gap: 10px;
}
.agent-day-item {
  align-items: center;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-left: 5px solid #b8c7bd;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  padding: 12px;
}
.agent-day-item.priority-alta {
  border-left-color: #d92d20;
}
.agent-day-item.priority-media {
  border-left-color: #f2a900;
}
.agent-day-item.priority-bassa {
  border-left-color: #08772f;
}
.agent-day-item.appointment {
  border-left-color: #7046c8;
}
.agent-day-item time {
  color: #0a6b3c;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}
.agent-day-item.is-overdue time {
  color: #dc2626;
}
.agent-day-item.is-today time {
  color: #2563eb;
}
.agent-day-item.is-upcoming time {
  color: #08772f;
}
.agent-day-item span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.agent-day-item strong,
.agent-day-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-day-item small {
  color: var(--muted);
}
.agent-day-item em {
  background: #eef4f0;
  border-radius: 999px;
  color: #31443a;
  font-style: normal;
  font-weight: 800;
  padding: 5px 9px;
  text-transform: capitalize;
}
.agent-day-more {
  background: #f8faf9;
  border: 1px dashed #add7a4;
  border-radius: 8px;
  color: #0c6639;
  display: grid;
  gap: 2px;
  padding: 12px;
  text-align: center;
}
.agent-day-more strong {
  font-size: 15px;
}
.agent-day-more span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.compact-empty {
  min-height: 170px;
}
.agent-side-stack {
  display: grid;
  gap: 18px;
}
.agent-pipeline-panel {
  align-content: start;
  display: grid;
  gap: 14px;
  grid-auto-rows: max-content;
}
.agent-pipeline-filter {
  align-items: end;
  display: grid;
  gap: 6px;
  justify-self: start;
  min-width: min(320px, 100%);
}
.agent-pipeline-filter label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.agent-pipeline-filter select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #162019;
  font-weight: 800;
  min-height: 40px;
  padding: 8px 10px;
}
.agent-pipeline-panel .panel-title-row .button-secondary,
.agent-pipeline-panel .panel-title-row a {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #08772f;
  font-weight: 900;
  padding: 10px 14px;
}
.agent-pipeline-bars {
  display: grid;
  gap: 14px;
}
.agent-pipeline-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(130px, 0.72fr) minmax(96px, 1fr) minmax(28px, max-content) minmax(42px, max-content);
  min-width: 0;
}
.agent-pipeline-row strong {
  font-size: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.agent-pipeline-row span {
  background: transparent;
  display: block;
  height: 9px;
  min-width: 0;
}
.agent-pipeline-row i {
  background: #0a6b3c;
  border-radius: 999px;
  display: block;
  height: 7px;
}
.agent-pipeline-row b,
.agent-pipeline-row em {
  font-style: normal;
  font-weight: 900;
  text-align: right;
}
.agent-pipeline-row em {
  color: #536678;
  font-weight: 700;
}
.agent-pipeline-footer {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 8px;
  padding: 14px 16px;
}
.agent-pipeline-footer div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.agent-pipeline-footer div:last-child {
  text-align: right;
}
.agent-pipeline-footer span {
  color: var(--muted);
}
.agent-pipeline-footer strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.agent-empty-panel,
.agent-today-panel,
.agent-recents-panel,
.agent-appointments-panel {
  display: grid;
  gap: 14px;
}
.empty-state-large {
  align-content: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 206px;
  text-align: center;
}
.empty-state-large b {
  align-items: center;
  background: #dff6e7;
  border-radius: 999px;
  color: #08772f;
  display: inline-flex;
  height: 92px;
  justify-content: center;
  width: 92px;
}
.empty-state-large strong {
  font-size: 18px;
}
.today-strip {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 70px minmax(0, 1fr);
}
.date-tile {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  height: 70px;
  justify-items: center;
  width: 70px;
}
.date-tile strong {
  font-size: 26px;
  line-height: 1;
}
.date-tile span {
  font-size: 12px;
  font-weight: 900;
}
.today-counters {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}
.today-counters div {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 14px 10px;
}
.today-counters div:last-child {
  border-right: 0;
}
.today-counters span {
  color: var(--muted);
}
.today-counters strong {
  color: #176bb8;
  font-size: 18px;
}
.today-counters .danger {
  color: #c9252d;
}
.today-counters .success {
  color: #08772f;
}
.agent-bottom-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr) minmax(0, 1.05fr);
}
.agent-planning-panel {
  align-content: start;
  display: grid;
  gap: 18px;
}
.planning-summary {
  align-items: center;
  background: #fff7e8;
  border: 1px solid #ffe6b6;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 130px;
  padding: 20px;
  text-align: center;
}
.planning-summary strong {
  color: #af6500;
  font-size: 42px;
  line-height: 1;
}
.planning-summary span {
  color: #31443a;
  font-weight: 800;
}
.interest-dashboard-card {
  align-content: start;
  display: grid;
  gap: 16px;
}
.interest-dashboard-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.interest-dashboard-summary div {
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}
.interest-dashboard-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.interest-dashboard-summary strong {
  font-size: 24px;
  line-height: 1;
}
.interest-dashboard-bars {
  display: grid;
  gap: 10px;
}
.interest-dashboard-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(92px, 0.85fr) 42px minmax(80px, 1fr) 46px;
}
.interest-dashboard-row span {
  align-items: center;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  min-width: 0;
}
.interest-dashboard-row span b {
  border-radius: 999px;
  flex: 0 0 auto;
  height: 9px;
  width: 9px;
}
.interest-dashboard-row strong {
  font-size: 14px;
  text-align: right;
}
.interest-dashboard-row i {
  background: #edf1ef;
  border-radius: 999px;
  display: block;
  height: 8px;
  overflow: hidden;
}
.interest-dashboard-row em {
  border-radius: inherit;
  display: block;
  height: 100%;
}
.interest-dashboard-row small {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.full-width-action {
  justify-content: center;
  text-align: center;
  width: 100%;
}
.recent-municipalities-list {
  display: grid;
}
.recent-municipalities-list a {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 34px minmax(120px, 0.45fr) minmax(120px, 1fr) 24px;
  padding: 12px 0;
}
.recent-municipalities-list a:last-child {
  border-bottom: 0;
}
.mini-crest {
  align-items: center;
  background: #e7f6ec;
  border-radius: 8px;
  color: #08772f;
  display: inline-flex;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.recent-municipalities-list b {
  color: #536678;
  font-size: 24px;
  line-height: 1;
}
.appointment-card {
  align-items: center;
  background: #f8f2ff;
  border: 1px solid #eadcff;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 52px minmax(0, 1fr) auto 24px;
  padding: 18px;
}
.appointment-card > span {
  align-items: center;
  background: #e5d8ff;
  border-radius: 999px;
  color: #7046c8;
  display: inline-flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}
.appointment-card time {
  font-weight: 900;
  text-align: right;
}
.appointment-card b {
  color: #7046c8;
  font-size: 25px;
}
.empty-appointment-drop {
  align-items: center;
  border: 1px dashed #b8c7bd;
  border-radius: 8px;
  color: #31443a;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 70px;
  padding: 18px;
}
.agent-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.agent-dashboard-grid,
.agent-lower-grid,
.agent-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.compact-list {
  display: grid;
  gap: 8px;
}
.compact-list a,
.compact-list > div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 3px;
  padding: 10px 0;
}
.compact-list a:last-child,
.compact-list > div:last-child {
  border-bottom: 0;
}
.compact-list span {
  color: var(--muted);
  font-size: 13px;
}
.funnel-list {
  display: grid;
  gap: 10px;
}
.funnel-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 1fr) 58px minmax(80px, 160px);
}
.funnel-row span {
  font-size: 13px;
  font-weight: 800;
}
.funnel-row i {
  background: #0c6639;
  border-radius: 999px;
  display: block;
  height: 8px;
}
.count-pill {
  background: #edf5ef;
  border-radius: 999px;
  color: #0c6639;
  font-weight: 900;
  padding: 4px 10px;
}
.agent-task-kanban {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.agent-task-column {
  align-content: start;
  display: flex;
  flex-direction: column;
}
.agent-task-list {
  align-content: start;
  border: 1px dashed transparent;
  border-radius: 8px;
  display: grid;
  flex: 1;
  gap: 7px;
  min-height: 130px;
  padding: 4px;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.agent-task-list.task-drop-over {
  background: #eef9f1;
  border-color: #7ac995;
}
.agent-task-card {
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 8px;
}
.agent-task-card[data-task-id] {
  grid-template-columns: auto minmax(0, 1fr);
}
.agent-task-card.dragging {
  opacity: 0.55;
}
.agent-task-card.task-saving {
  opacity: 0.7;
}
.agent-task-drag-handle {
  align-self: start;
  font-size: 12px;
  margin-top: 1px;
}
.agent-task-card a {
  color: inherit;
  display: grid;
  gap: 2px;
  text-decoration: none;
}
.agent-task-card-title {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}
.agent-task-card strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-task-card-title strong {
  flex: 1;
  min-width: 0;
}
.agent-task-card-title .priority-icon {
  color: white;
  flex: 0 0 auto;
  min-height: 25px;
  min-width: 34px;
}
.agent-task-card-title .priority-icon.low {
  background: #0f8a45;
}
.agent-task-card-title .priority-icon.medium {
  background: #f59e0b;
}
.agent-task-card-title .priority-icon.high {
  background: #dc2626;
}
.agent-task-card span,
.agent-task-card small {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-task-card em {
  background: #fff1d6;
  border-radius: 999px;
  color: #a76400;
  font-style: normal;
  font-weight: 800;
  justify-self: start;
  padding: 2px 7px;
  text-transform: capitalize;
}
.phase-readonly-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  padding: 6px 10px;
  white-space: nowrap;
}
.phase-readonly-pill.info {
  background: #eaf3ff;
  color: #216fbd;
}
.phase-readonly-pill.ok {
  background: #e8f7ee;
  color: #0f7a3b;
}
.phase-readonly-pill.warning {
  background: #fff3da;
  color: #a76400;
}
.phase-readonly-pill.danger {
  background: #fdecec;
  color: #b42318;
}
.interest-table-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  min-width: 46px;
  padding: 4px 6px;
  white-space: nowrap;
}
.interest-table-pill.neutral {
  background: #eef2f0;
  color: #64716b;
}
.interest-table-pill.low {
  background: #fff7dd;
  color: #9a6700;
}
.interest-table-pill.medium {
  background: #fff0d2;
  color: #b46200;
}
.interest-table-pill.high {
  background: #fdecec;
  color: #b42318;
}
.interest-table-pill.very-high {
  background: #ffe4e6;
  color: #9f1239;
}
.table-link {
  padding: 7px 12px;
  width: max-content;
}
.agent-contact-row {
  align-items: center;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) auto;
}
.agent-contact-row form button {
  width: auto;
}
.timeline-list {
  display: grid;
}
.agent-municipality-page {
  gap: 18px;
}
.municipality-topbar {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(260px, 1fr) auto;
}
.back-link {
  color: var(--ink);
  font-weight: 800;
}
.municipality-search input {
  background: white;
  border-radius: 10px;
  min-height: 46px;
}
.municipality-profile-card {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 24px;
}
.municipality-profile-main {
  align-items: center;
  display: flex;
  gap: 22px;
  min-width: 0;
}
.municipality-emblem {
  align-items: center;
  background: #e7f6ec;
  border: 1px solid #b9e5c6;
  border-radius: 14px;
  color: #08772f;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 40px;
  font-weight: 900;
  height: 78px;
  justify-content: center;
  width: 78px;
}
.municipality-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.municipality-title-row h1 {
  display: none;
}
.deal-status {
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 12px;
}
.deal-status.active,
.deal-status.approved {
  background: #dff6e7;
  color: #08772f;
}
.deal-status.pending {
  background: #fff3da;
  color: #a76400;
}
.municipality-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
}
.municipality-meta-row span {
  border-right: 1px solid var(--line);
  color: var(--muted);
  padding-right: 18px;
}
.municipality-meta-row span:last-child {
  border-right: 0;
}
.municipality-meta-row strong {
  color: var(--ink);
  margin-left: 4px;
}
.municipality-profile-actions {
  display: flex;
  gap: 10px;
}
.municipality-profile-actions .button-secondary {
  white-space: nowrap;
  width: auto;
}
.municipality-tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 26px;
  overflow-x: auto;
}
.municipality-tabs a {
  color: #31443a;
  font-weight: 800;
  padding: 13px 0;
  position: relative;
  white-space: nowrap;
}
.municipality-tabs a.active {
  color: #08772f;
}
.municipality-tabs a.active::after {
  background: #08772f;
  bottom: -1px;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
}
.municipality-tab-panel {
  display: none;
}
.municipality-tab-panel.active {
  display: grid;
  gap: 16px;
}
.tab-section-panel {
  display: grid;
  gap: 16px;
}
.tab-two-col {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.tab-three-col {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mini-kpi-grid,
.activity-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.mini-kpi-grid div,
.activity-kpis div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 16px;
}
.mini-kpi-grid span,
.activity-kpis span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.mini-kpi-grid strong,
.activity-kpis strong {
  font-size: 26px;
}
.activity-kpis b {
  background: #e7f6ec;
  border-radius: 8px;
  color: #08772f;
  display: inline-flex;
  font-size: 11px;
  justify-content: center;
  padding: 7px 9px;
  width: max-content;
}
.table-filter-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(140px, 0.7fr)) auto;
}
.table-filter-row button {
  width: auto;
}
.soft-tag {
  border-radius: 6px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 8px;
  width: max-content;
}
.soft-tag.green {
  background: #dff6e7;
  color: #08772f;
}
.soft-tag.blue {
  background: #eaf3ff;
  color: #216fbd;
}
.soft-tag.amber {
  background: #fff1d6;
  color: #a76400;
}
.soft-tag.gray {
  background: #eef2f0;
  color: #4f5d55;
}
.contact-detail-grid,
.history-dashboard {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
.contact-detail-grid {
  grid-template-columns: minmax(220px, 0.65fr) minmax(320px, 1.2fr) minmax(280px, 0.95fr);
}
.contact-profile-card,
.nested-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
}
.contact-profile-card {
  min-width: 0;
  overflow: hidden;
}
.contact-profile-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-profile-card .soft-tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-profile-fields {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.contact-profile-field {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}
.contact-profile-field span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-copy-button {
  flex: 0 0 auto;
  height: 30px;
  width: 30px;
}
.contact-copy-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.contact-select-row {
  cursor: pointer;
}
.contact-select-row.active td {
  background: #f0fbf4;
}
.contact-select-row.active td:first-child {
  border-left: 4px solid #08772f;
}
.contact-notes-panel textarea {
  min-height: 160px;
  resize: vertical;
}
.contact-notes-panel button {
  justify-self: end;
  width: auto;
}
.compact-history article {
  grid-template-columns: 34px minmax(110px, 0.4fr) minmax(180px, 1fr);
}
.storage-meter {
  background: #edf1ef;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.storage-meter i {
  background: #08772f;
  display: block;
  height: 100%;
}
.proposal-progress {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.check-list {
  display: grid;
  gap: 8px;
  list-style: none;
  padding-left: 0;
}
.check-list li::before {
  color: #08772f;
  content: "✓ ";
  font-weight: 900;
}
.proposal-preview div {
  align-items: center;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 24px;
  justify-items: center;
  min-height: 310px;
  padding: 24px;
  text-align: center;
}
.proposal-preview span {
  color: #08772f;
  font-size: 28px;
  font-weight: 900;
}
.notes-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
}
.notes-list {
  display: grid;
  gap: 10px;
}
.notes-list article {
  border: 1px solid var(--line);
  border-left: 4px solid #5ca9ff;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 14px;
}
.notes-list article.active {
  background: #f0fbf4;
  border-left-color: #08772f;
}
.notes-list p {
  color: var(--muted);
  font-size: 13px;
}
.note-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: 20px;
}
.linked-box {
  background: #f0fbf4;
  border: 1px solid #ccebd6;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}
.linked-box a {
  color: #08772f;
  font-weight: 900;
}
.municipality-overview-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.95fr) minmax(260px, 0.95fr);
}
.deal-stage-panel,
.quick-actions-panel,
.municipality-summary-panel {
  align-content: start;
}
.phase-progress {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 22px 0;
  position: relative;
}
.phase-progress::before {
  background: var(--line);
  content: "";
  height: 2px;
  left: 8%;
  position: absolute;
  right: 8%;
  top: 17px;
}
.phase-progress div {
  display: grid;
  gap: 8px;
  justify-items: center;
  position: relative;
  z-index: 1;
}
.phase-progress span {
  align-items: center;
  background: #eef2f0;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.phase-progress .done span,
.phase-progress .current span {
  background: #08772f;
  border-color: #08772f;
  color: white;
}
.phase-progress small {
  color: #31443a;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
@media (min-width: 761px) and (max-width: 1200px) {
  .deal-stage-panel .phase-progress {
    margin: 16px 0 18px;
  }

  .deal-stage-panel .phase-progress div:not(.current) small {
    display: none;
  }

  .deal-stage-panel .phase-progress .current small {
    max-width: 120px;
  }
}
.deal-next-actions {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding-top: 16px;
}
.deal-next-actions div {
  display: grid;
  gap: 4px;
}
.deal-info-label,
.municipality-summary-panel dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.deal-stage-panel form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.quick-actions-panel {
  display: grid;
  gap: 10px;
}
.quick-actions-panel a {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding: 10px 0;
}
.quick-actions-panel a:last-child {
  border-bottom: 0;
}
.quick-actions-panel b {
  align-items: center;
  background: #e7f6ec;
  border-radius: 8px;
  color: #08772f;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}
.quick-actions-panel span {
  display: grid;
}
.municipality-summary-panel dl {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  margin-top: 14px;
}
.municipality-summary-panel dl div {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  justify-content: space-between;
  padding: 13px 0;
  width: 100%;
}
.municipality-summary-panel dl div:last-child {
  border-bottom: 0;
}
.municipality-summary-panel dd {
  font-weight: 900;
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.municipality-summary-panel > a {
  color: #08772f;
  display: inline-flex;
  font-weight: 900;
  margin-top: 14px;
}
.municipality-form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-header-row {
  margin-bottom: 16px;
}

.analysis-layout-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.15fr 0.9fr 1fr;
  grid-template-areas:
    "political context environment"
    "links signals interest"
    "freshness freshness freshness";
}

.analysis-card {
  border-radius: 8px;
  min-width: 0;
  padding: 18px;
}

.analysis-card h2 {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.analysis-card h2 svg {
  color: var(--green);
  height: 22px;
  width: 22px;
}

.analysis-political-card { grid-area: political; }
.analysis-context-card { grid-area: context; }
.analysis-environment-card { grid-area: environment; }
.analysis-links-card { grid-area: links; }
.analysis-signals-card { grid-area: signals; }
.analysis-interest-card { grid-area: interest; }
.analysis-freshness-card { grid-area: freshness; }

.analysis-political-card {
  min-width: 0;
}

.analysis-role-grid,
.analysis-links-list,
.analysis-form-grid {
  display: grid;
  gap: 10px;
}

.analysis-role-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(135px, 0.9fr) minmax(120px, 1fr) minmax(120px, 0.9fr) auto;
  padding: 0 0 9px;
}

.analysis-linked-badge {
  align-items: center;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  color: var(--green);
  min-height: 38px;
  padding: 6px 9px;
}

@media (max-width: 1900px) and (min-width: 901px) {
  .analysis-political-card .analysis-role-row {
    grid-template-columns: minmax(150px, 0.85fr) minmax(0, 1fr) minmax(0, 1fr) 38px;
  }

  .analysis-political-card .analysis-linked-badge {
    justify-content: center;
    min-width: 38px;
    padding: 6px;
    width: 38px;
  }

  .analysis-political-card .analysis-linked-badge span {
    display: none;
  }
}

.analysis-role-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.analysis-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.freshness-grid {
  align-items: end;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.analysis-form-grid .span-2 {
  grid-column: 1 / -1;
}

.analysis-role-row label,
.analysis-form-grid label,
.analysis-note-box {
  display: grid;
  gap: 6px;
}

.analysis-row-title,
.analysis-form-grid label span,
.analysis-note-box span,
.readonly-field span,
.environment-score-box span,
.province-adopters-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.analysis-role-row input,
.analysis-role-row select,
.analysis-form-grid input,
.analysis-form-grid select,
.analysis-form-grid textarea,
.analysis-links-list input {
  min-width: 0;
  width: 100%;
}

.environment-score-box,
.province-adopters-box,
.readonly-field {
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 13px;
}

.environment-score-box {
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.55fr);
}

.environment-score-box strong {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.environment-score-box strong,
.readonly-field strong {
  font-size: 16px;
}

.analysis-status-dot {
  border-radius: 999px;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.analysis-status-dot.alta { background: #008a45; }
.analysis-status-dot.media { background: #f59e0b; }
.analysis-status-dot.bassa { background: #9ca3af; }
.analysis-status-dot.non_disponibile { background: #c8d0cc; }

.province-adopters-box {
  align-content: start;
  float: left;
  margin: 0 14px 10px 0;
  min-width: 150px;
  width: 170px;
}

.province-adopters-box strong {
  color: var(--green);
  font-size: 28px;
  line-height: 1;
}

.province-adopters-box div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.province-adopters-box a {
  background: #e7f7ee;
  border-radius: 999px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
  text-decoration: none;
}

.analysis-signals-card textarea {
  min-height: 86px;
}

.analysis-links-list div {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(130px, 0.65fr) minmax(180px, 1fr) auto;
}

.analysis-links-list div:not(:has(a)) {
  grid-template-columns: minmax(130px, 0.7fr) minmax(180px, 1fr);
}

.analysis-links-card .analysis-links-list {
  grid-template-columns: 1fr;
}

.analysis-links-card .analysis-links-list div {
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr) auto;
  padding: 10px;
}

.analysis-links-card .analysis-links-list div:not(:has(a)) {
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
}

.interest-segment-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 12px;
}

.interest-segment-grid label {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 7px;
  justify-items: center;
  min-height: 78px;
  padding: 10px 6px;
  text-align: center;
}

.interest-segment-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.interest-segment-grid b {
  background: #c8d0cc;
  border-radius: 999px;
  height: 14px;
  width: 14px;
}

.interest-segment-grid span {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

.interest-segment-grid .basso b { background: #f3b51b; }
.interest-segment-grid .medio b { background: #f59e0b; }
.interest-segment-grid .alto b { background: #ef4444; }
.interest-segment-grid .molto_alto b { background: #b91c1c; }

.interest-segment-grid label.active {
  background: #fff7e8;
  border-color: #f59e0b;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.16);
}

.interest-segment-grid label:has(input:checked) {
  background: #fff7e8;
  border-color: #f59e0b;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.16);
}

.interest-segment-grid label.active.medio,
.interest-segment-grid label.active.alto,
.interest-segment-grid label.active.molto_alto,
.interest-segment-grid label.medio:has(input:checked),
.interest-segment-grid label.alto:has(input:checked),
.interest-segment-grid label.molto_alto:has(input:checked) {
  background: #f59e0b;
  color: #fff;
}

.interest-segment-grid label.active.medio b,
.interest-segment-grid label.active.alto b,
.interest-segment-grid label.active.molto_alto b,
.interest-segment-grid label.medio:has(input:checked) b,
.interest-segment-grid label.alto:has(input:checked) b,
.interest-segment-grid label.molto_alto:has(input:checked) b {
  background: #fff;
}

.autosave-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  min-height: 18px;
  margin: -4px 0 10px;
}

.autosave-status[data-state="saving"] {
  color: #a76400;
}

.autosave-status[data-state="saved"] {
  color: #08772f;
}

.autosave-status[data-state="error"] {
  color: #b42318;
}

.form-grid-2 {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-stack label {
  color: #31443a;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}
.split-actions {
  gap: 12px;
}
.split-actions button {
  width: auto;
}
.agent-contacts-table {
  overflow-x: auto;
}
.agent-contacts-table table {
  min-width: 1120px;
}
.agent-contacts-table th,
.agent-contacts-table td {
  padding: 13px 10px;
}
.contact-channel-list {
  display: grid;
  gap: 4px;
}
.contact-channel-list span {
  color: #162019;
  line-height: 1.25;
}
.contact-channel-list b {
  color: var(--muted);
  display: inline-block;
  font-size: 12px;
  min-width: 48px;
}
.contact-create-row td {
  background: #f8faf9;
  vertical-align: top;
}
.contact-create-row input {
  min-height: 38px;
  width: 100%;
}
.contact-create-row select,
.contact-create-row textarea {
  min-height: 38px;
  width: 100%;
}
.activity-log-table table {
  min-width: 1180px;
  font-size: 14px;
}
.activity-log-table th,
.activity-log-table td {
  padding: 9px 8px;
  vertical-align: middle;
}
.activity-log-table textarea {
  min-width: 180px;
  resize: vertical;
}
.activity-log-table .contact-create-row td {
  vertical-align: top;
}
.appointments-log-table table {
  font-size: 12.5px;
  min-width: 920px;
  table-layout: fixed;
  width: 100%;
}
.appointments-log-table th,
.appointments-log-table td {
  padding: 8px 6px;
}
.appointments-log-table th:nth-child(1),
.appointments-log-table td:nth-child(1) {
  width: 120px;
}
.appointments-log-table th:nth-child(2),
.appointments-log-table td:nth-child(2) {
  padding-left: 16px;
  width: 150px;
}
.appointments-log-table th:nth-child(3),
.appointments-log-table td:nth-child(3) {
  width: 104px;
}
.appointments-log-table th:nth-child(4),
.appointments-log-table td:nth-child(4) {
  padding-left: 16px;
}
.appointments-log-table th:nth-child(4),
.appointments-log-table td:nth-child(4),
.appointments-log-table th:nth-child(5),
.appointments-log-table td:nth-child(5) {
  width: auto;
}
.appointments-log-table th:nth-child(6),
.appointments-log-table td:nth-child(6) {
  text-align: center;
  width: 88px;
}
.appointments-log-table td:nth-child(1),
.appointments-log-table td:nth-child(2),
.appointments-log-table td:nth-child(3),
.appointments-log-table td:nth-child(6) {
  white-space: nowrap;
}
.appointments-log-table textarea,
.appointments-log-table input,
.appointments-log-table select {
  min-width: 0;
  width: 100%;
}
.appointments-log-table .table-icon-actions {
  justify-content: center;
}
.contact-create-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  white-space: nowrap;
  width: 100%;
}
.contact-row-actions {
  align-items: center;
  display: flex;
  gap: 6px;
}
.contact-edit-control {
  display: none;
}
.contact-select-row.editing .contact-view-value,
.contact-select-row.editing [data-contact-edit-trigger] {
  display: none;
}
.contact-select-row.editing .contact-edit-control {
  display: inline-flex;
}
input.contact-edit-control {
  min-height: 34px;
  width: 100%;
}
.agent-contacts-table form button {
  height: 34px;
  width: 34px;
}
.inline-contact-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
  margin-top: 16px;
  padding-top: 16px;
}
.inline-contact-form button {
  width: auto;
}
.appointment-highlight > div {
  align-items: center;
  background: #f0fbf4;
  border: 1px solid #ccebd6;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(180px, 1fr) minmax(220px, 1.5fr) auto;
  padding: 14px;
}
.calendar-tile {
  align-items: center;
  background: white;
  border: 1px solid #b9e5c6;
  border-radius: 8px;
  color: #08772f;
  display: grid;
  height: 62px;
  justify-items: center;
  width: 62px;
}
.calendar-tile strong {
  font-size: 24px;
  line-height: 1;
}
.calendar-tile small {
  color: #08772f;
  font-weight: 900;
  text-transform: uppercase;
}
.history-list {
  display: grid;
  gap: 0;
}
.history-list article {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: 42px minmax(140px, 0.5fr) minmax(240px, 1.5fr);
  padding: 14px 0;
}
.history-list article:last-child {
  border-bottom: 0;
}
.history-icon {
  align-items: center;
  background: #e7f6ec;
  border-radius: 999px;
  color: #08772f;
  display: inline-flex;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}
.admin-hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.admin-hero h1 {
  display: none;
}
.admin-hero p {
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.admin-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}
.admin-actions .button-secondary,
.admin-actions button {
  width: auto;
}
.date-pill {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
  padding: 12px 18px;
}
.kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.kpi-card {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  min-height: 118px;
  padding: 20px;
}
.kpi-card div {
  display: grid;
  gap: 6px;
}
.kpi-card span {
  color: #31443a;
  font-size: 13px;
}
.kpi-card strong {
  font-size: 28px;
  line-height: 1;
}
.kpi-card b {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  height: 56px;
  justify-content: center;
  width: 56px;
}
.kpi-card b .lucide-icon {
  font-size: 26px;
}
.kpi-icon {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}
.kpi-icon .lucide-icon {
  font-size: 22px;
}
.kpi-green { background: #eef8ef; }
.kpi-blue { background: #eef6fb; }
.kpi-amber { background: #fff5df; }
.kpi-violet { background: #f3efff; }
.kpi-red { background: #fff0ee; }
.kpi-green b { background: #caefcd; color: #08772f; }
.kpi-blue b { background: #d6ecff; color: #176bb8; }
.kpi-amber b { background: #ffe4a9; color: #b66a00; }
.kpi-violet b { background: #e4d7ff; color: #6b46c1; }
.kpi-red b { background: #ffd8d3; color: #d92d20; }
.dashboard-grid {
  display: grid;
  gap: 16px;
}
.top-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lower-grid {
  align-items: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin-config-grid {
  align-items: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dash-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
  padding: 18px;
}
.panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.panel-head h2 {
  margin-bottom: 0;
}
.panel-head a {
  align-items: center;
  color: #008a45;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}
.pipeline-list {
  display: grid;
  gap: 10px;
}
.pipeline-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 1fr) 58px minmax(90px, 180px) 48px;
}
.pipeline-row span,
.pipeline-row small {
  font-size: 12px;
}
.pipeline-bar {
  background: #edf1ef;
  border-radius: 4px;
  height: 16px;
  overflow: hidden;
}
.pipeline-bar i {
  background: linear-gradient(90deg, #95d9c8, #008a45);
  display: block;
  height: 100%;
}
.pipeline-total,
.panel-total {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 12px;
}
.coverage-map {
  align-items: center;
  background: radial-gradient(circle at 50% 45%, #f7fbf8 0, #eef4ef 58%, #e2e8e3 100%);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, 1fr);
  min-height: 260px;
  padding: 22px;
}
.coverage-node {
  align-items: center;
  border-radius: 999px;
  color: white;
  display: grid;
  height: 62px;
  justify-items: center;
  padding: 8px;
  width: 62px;
}
.coverage-node span {
  font-size: 11px;
}
.node-0 { background: #007f3d; }
.node-1 { background: #65b84f; }
.node-2 { background: #f3b51b; }
.node-3 { background: #f9732b; }
.node-4 { background: #d92d20; }
.coverage-legend {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.coverage-legend span {
  color: var(--muted);
  font-size: 13px;
}
.coverage-legend b,
.basin-dot {
  border-radius: 4px;
  display: inline-block;
  height: 10px;
  margin-right: 8px;
  width: 10px;
}
.province-map-card {
  display: grid;
  gap: 10px;
  position: relative;
}
.province-coverage-map {
  align-items: center;
  background: linear-gradient(180deg, #f8fbf9, #eef4ef);
  border: 1px solid #dfe8e2;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  min-height: 300px;
  overflow: hidden;
  padding: 8px;
}
.province-coverage-map svg {
  display: block;
  height: 300px;
  max-width: 100%;
  width: auto;
}
.province-map-path {
  cursor: pointer;
  outline: none;
  transition: fill 0.16s ease, opacity 0.16s ease, stroke-width 0.16s ease;
}
.province-map-path:hover,
.province-map-path:focus {
  opacity: 0.9;
  stroke: #0f5132;
  stroke-width: 1.4;
}
.province-map-path[data-status="mixed"] {
  stroke-dasharray: 2 1;
}
.province-map-tooltip {
  background: #162019;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  color: white;
  display: grid;
  gap: 4px;
  left: 0;
  max-width: 260px;
  padding: 10px 12px;
  pointer-events: none;
  position: fixed;
  top: 0;
  z-index: 50;
}
.province-map-tooltip strong {
  font-size: 14px;
}
.province-map-tooltip span,
.province-map-tooltip small {
  color: #dfeee4;
  font-size: 12px;
}
.province-map-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.province-map-stats span {
  align-items: center;
  background: #f7faf8;
  border: 1px solid #dfe8e2;
  border-radius: 8px;
  color: #31443a;
  display: flex;
  font-size: 12px;
  gap: 6px;
  min-width: 0;
  padding: 8px;
}
.province-map-stats b,
.province-area-legend b {
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  height: 10px;
  width: 10px;
}
.province-map-stats strong {
  color: #162019;
}
.province-area-legend {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.province-area-legend span {
  align-items: center;
  display: flex;
  min-width: 0;
}
.legend-excellent,
.basin-dot.in_target { background: #008a45; }
.legend-good,
.basin-dot.under_target { background: #ff9800; }
.legend-medium,
.basin-dot.out_target { background: #e53935; }
.basin-dot.unconfigured { background: #9aa5a0; }
.compact-table th,
.compact-table td {
  font-size: 12px;
  padding: 9px 6px;
}
.admin-performance-panel {
  grid-column: span 2;
  overflow: hidden;
}
.admin-performance-panel .compact-table {
  table-layout: fixed;
}
.admin-performance-panel .compact-table th,
.admin-performance-panel .compact-table td {
  overflow-wrap: anywhere;
}
.admin-performance-panel .compact-table th:nth-child(1),
.admin-performance-panel .compact-table td:nth-child(1) {
  width: 8%;
}
.admin-performance-panel .compact-table th:nth-child(2),
.admin-performance-panel .compact-table td:nth-child(2) {
  width: 34%;
}
.admin-performance-panel .compact-table th:nth-child(3),
.admin-performance-panel .compact-table td:nth-child(3),
.admin-performance-panel .compact-table th:nth-child(4),
.admin-performance-panel .compact-table td:nth-child(4),
.admin-performance-panel .compact-table th:nth-child(5),
.admin-performance-panel .compact-table td:nth-child(5),
.admin-performance-panel .compact-table th:nth-child(6),
.admin-performance-panel .compact-table td:nth-child(6) {
  text-align: right;
}
.column-help {
  border-bottom: 1px dotted #8aa097;
  cursor: help;
  text-underline-offset: 3px;
}
.success-text {
  color: #008a45;
  font-weight: 800;
}
.activity-list,
.issue-list,
.due-list,
.alert-list,
.mini-list {
  display: grid;
  gap: 10px;
}
.activity-list div,
.due-list div,
.alert-list p,
.mini-list a {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 34px 1fr auto auto;
  margin: 0;
  padding: 10px 0;
}
.activity-icon {
  background: #e7f6ec;
  border-radius: 999px;
  height: 32px;
  width: 32px;
}
.issue-list a {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  padding: 10px 0;
}
.issue-list b,
.alert-list b {
  color: #d92d20;
}
.due-list div {
  grid-template-columns: 52px 1fr;
}
.due-list time {
  background: #fff0db;
  border-radius: 6px;
  color: #b66a00;
  font-weight: 800;
  padding: 7px 8px;
  text-align: center;
}
.admin-due-list div {
  grid-template-columns: 42px minmax(0, 1fr);
}
.admin-due-list time {
  font-size: 12px;
  line-height: 1.1;
  padding: 6px 5px;
  white-space: nowrap;
}
.admin-due-list span,
.admin-due-list strong,
.admin-due-list small {
  min-width: 0;
}
.right-stack {
  display: grid;
  gap: 16px;
}
.basin-widget {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 140px 1fr;
}
.donut {
  align-items: center;
  background: conic-gradient(#008a45 0 40%, #ff9800 40% 68%, #e53935 68% 88%, #9aa5a0 88% 100%);
  border-radius: 999px;
  display: flex;
  height: 140px;
  justify-content: center;
  width: 140px;
}
.donut span {
  background: white;
  border-radius: 999px;
  display: grid;
  height: 84px;
  place-items: center;
  text-align: center;
  width: 84px;
}
.basin-legend {
  display: grid;
  gap: 8px;
}
.basin-legend span {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 16px 1fr auto;
  font-size: 13px;
}
.mini-list a {
  grid-template-columns: 70px 1fr;
}
.mini-list span {
  color: var(--muted);
  font-size: 13px;
}
.areas-kpi-grid {
  grid-template-columns: 1fr 1.15fr 1.4fr 0.95fr 0.95fr;
}
.admin-search,
.areas-toolbar input {
  background: white;
  min-width: 320px;
}
.areas-table-panel {
  container-type: inline-size;
  overflow: hidden;
}
.areas-toolbar {
  align-items: end;
  display: flex;
  gap: 10px;
}
.areas-toolbar .sort-select-field {
  min-width: 230px;
}
.areas-toolbar .button-secondary,
.areas-toolbar button {
  width: auto;
}
.areas-table-scroll {
  padding-bottom: 8px;
}
.operational-areas-table {
  font-size: 13px;
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}
.operational-areas-table th,
.operational-areas-table td {
  padding: 8px 4px;
}
.operational-areas-table th:nth-child(1),
.operational-areas-table td:nth-child(1) {
  width: 22%;
}
.operational-areas-table th:nth-child(2),
.operational-areas-table td:nth-child(2) {
  width: 27%;
}
.operational-areas-table th:nth-child(3),
.operational-areas-table td:nth-child(3) {
  text-align: right;
  width: 7%;
}
.operational-areas-table th:nth-child(4),
.operational-areas-table td:nth-child(4) {
  text-align: right;
  width: 12%;
}
.operational-areas-table th:nth-child(5),
.operational-areas-table td:nth-child(5) {
  width: 20%;
}
.operational-areas-table th:nth-child(6),
.operational-areas-table td:nth-child(6),
.operational-areas-table th:nth-child(7),
.operational-areas-table td:nth-child(7) {
  text-align: right;
  width: 6%;
}
.area-agent-inline-form {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 34px;
  min-width: 0;
}
.area-agent-inline-form select {
  font-size: 13px;
  min-width: 0;
  width: 100%;
}
.area-agent-inline-form .icon-action {
  height: 34px;
  width: 34px;
}
.area-name-cell {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  max-width: 100%;
  white-space: normal;
}
.area-name-cell:hover strong {
  color: #008a45;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.status-dot {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}
.status-dot.ok { background: #008a45; }
.status-dot.warning { background: #ff9800; }
.status-dot.danger { background: #e53935; }
.status-dot.neutral { background: #9aa5a0; }
.target-progress {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(30px, 1fr) 32px;
}
.target-progress span {
  background: #edf1ef;
  border-radius: 999px;
  display: block;
  height: 8px;
  overflow: hidden;
}
.target-progress i {
  background: #008a45;
  display: block;
  height: 100%;
}
.target-progress i.warning { background: #ff9800; }
.target-progress i.danger { background: #e53935; }
.target-progress i.neutral { background: #9aa5a0; }
.state-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
  white-space: nowrap;
}
.state-pill.ok {
  background: #dff6e8;
  color: #008a45;
}
.state-pill.warning {
  background: #fff1d6;
  color: #c16b00;
}
.state-pill.danger {
  background: #ffe2df;
  color: #d92d20;
}
.state-pill.neutral {
  background: #eef1ef;
  color: #59645e;
}

@media (max-width: 1200px) {
  .operational-areas-table {
    font-size: 11px;
  }
  .operational-areas-table th,
  .operational-areas-table td {
    padding: 6px 3px;
  }
  .operational-areas-table th:nth-child(1),
  .operational-areas-table td:nth-child(1) {
    width: 21%;
  }
  .operational-areas-table th:nth-child(2),
  .operational-areas-table td:nth-child(2) {
    width: 30%;
  }
  .operational-areas-table th:nth-child(3),
  .operational-areas-table td:nth-child(3) {
    width: 7%;
  }
  .operational-areas-table th:nth-child(4),
  .operational-areas-table td:nth-child(4) {
    width: 12%;
  }
  .operational-areas-table th:nth-child(5),
  .operational-areas-table td:nth-child(5) {
    width: 18%;
  }
  .operational-areas-table th:nth-child(6),
  .operational-areas-table td:nth-child(6),
  .operational-areas-table th:nth-child(7),
  .operational-areas-table td:nth-child(7) {
    width: 6%;
  }
  .area-agent-inline-form {
    grid-template-columns: minmax(0, 1fr) 28px;
  }
  .area-agent-inline-form select {
    font-size: 11px;
    min-height: 30px;
    padding: 5px 7px;
  }
  .area-agent-inline-form .icon-action {
    height: 28px;
    width: 28px;
  }
  .area-name-cell {
    gap: 5px;
    line-height: 1.15;
  }
  .status-dot {
    height: 8px;
    width: 8px;
  }
  .target-progress {
    gap: 4px;
    grid-template-columns: minmax(26px, 1fr) 28px;
  }
  .target-progress span {
    height: 6px;
  }
}

@media (max-width: 760px) {
  .operational-areas-table {
    font-size: 9.5px;
  }
  .operational-areas-table th,
  .operational-areas-table td {
    padding: 5px 2px;
  }
  .area-agent-inline-form {
    grid-template-columns: minmax(0, 1fr) 25px;
  }
  .area-agent-inline-form select {
    font-size: 9.5px;
    min-height: 26px;
    padding: 3px 5px;
  }
  .area-agent-inline-form .icon-action {
    height: 25px;
    width: 25px;
  }
  .target-progress {
    grid-template-columns: minmax(22px, 1fr) 25px;
  }
}

.inline-create-area {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 44px minmax(180px, 1fr) minmax(180px, 1fr) minmax(220px, 1.4fr);
  margin-top: 10px;
  padding-top: 14px;
}
.inline-create-area button {
  border-radius: 6px;
  font-size: 24px;
  font-weight: 800;
  height: 42px;
  padding: 0;
  width: 42px;
}
.areas-management-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 360px;
}
.quick-area-panel {
  border-color: #6bb88a;
}
.quick-steps {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.quick-steps > div {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-right: 18px;
}
.quick-steps > div:last-child {
  border-right: 0;
}
.quick-steps h3 {
  margin: 0;
}
.quick-steps ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  max-height: 190px;
  overflow: auto;
  padding: 0;
}
.quick-steps li {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 18px 1fr auto;
}
.quick-steps li small {
  justify-self: end;
}
.check-dot {
  background: #008a45;
  border-radius: 999px;
  display: inline-block;
  height: 12px;
  width: 12px;
}
.area-detail-main {
  padding-top: 28px;
}
.area-detail-card {
  background: #f8fbf9;
  border-radius: 10px;
  display: grid;
  gap: 14px;
  padding: 18px;
}
.area-detail-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.area-detail-head h1 {
  font-size: 28px;
}
.area-detail-head .button {
  width: auto;
}
.area-detail-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.area-detail-actions form {
  margin: 0;
}
.area-detail-actions .button,
.area-detail-actions .button-danger {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
  width: auto;
}
.area-detail-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px;
}
.area-detail-summary.summary-ok {
  background: #e8f7ee;
  border-color: #b8e1c6;
}
.area-detail-summary.summary-warning {
  background: #fff6e4;
  border-color: #ffe0a6;
}
.area-detail-summary.summary-danger {
  background: #fdecec;
  border-color: #f5b8b3;
}
.area-detail-summary.summary-neutral {
  background: #eef1ef;
}
.area-detail-summary div {
  display: grid;
  gap: 4px;
}
.area-detail-summary span {
  color: var(--muted);
  font-size: 13px;
}
.area-detail-summary strong {
  color: var(--ink);
  font-size: 22px;
}
.summary-danger strong {
  color: #b42318;
}
.area-detail-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.territory-chips {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 250px;
  overflow: auto;
}
.territory-chips div {
  background: #edf5ef;
  border: 1px solid #d7e8dc;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}
.territory-chips small {
  color: #a05a00;
}
.quick-assignment-panel {
  padding: 0;
}
.area-assignment-head {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  padding: 18px;
}
.area-assignment-head label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}
.area-assignment-grid {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.assignment-column {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding: 18px;
}
.assignment-column:last-child {
  border-right: 0;
}
.assignment-column h3 {
  margin: 0;
}
.municipalities-area-panel {
  overflow: auto;
}
.municipalities-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.agents-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.agents-filter-panel {
  overflow: visible;
}
.agents-table-panel {
  overflow: auto;
}
.agents-table {
  min-width: 1180px;
}
.agent-name-cell {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}
.agent-name-cell > b {
  align-items: center;
  background: var(--agent-color, #6b46c1);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  width: 34px;
}
.agent-name-cell span {
  display: grid;
  gap: 2px;
}
.agent-name-cell small {
  font-size: 12px;
}
.agents-create-panel {
  scroll-margin-top: 24px;
}
.agent-create-form {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.1fr) minmax(145px, 0.9fr) 82px minmax(180px, 1fr) auto;
}
.agent-create-form button {
  white-space: nowrap;
  width: auto;
}
.agent-color-field {
  align-items: center;
  display: grid;
  gap: 6px;
}
.agent-color-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.agent-color-field input[type="color"] {
  cursor: pointer;
  height: 42px;
  min-width: 0;
  padding: 4px;
  width: 100%;
}
.admin-agent-detail-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
}
.agent-detail-lists {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.top-search {
  display: flex;
  gap: 8px;
}
.top-search input {
  min-width: 280px;
}
.top-search button {
  width: auto;
}
.municipality-filters {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 1.3fr 1fr 1fr minmax(220px, 0.9fr) auto auto auto;
}
.municipality-filters label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}
.municipality-filters button,
.municipality-filters .button-secondary {
  width: auto;
}
.sort-select-field {
  display: grid;
  gap: 6px;
  font-weight: 800;
}
.sort-select-field select {
  min-width: 220px;
}
.client-table-sort-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.client-table-sort-toolbar .sort-select-field {
  min-width: 240px;
}
.municipalities-filter-panel {
  overflow: visible;
  position: relative;
  z-index: 5;
}
.municipality-advanced-filter {
  position: relative;
}
.municipality-advanced-filter summary {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  list-style: none;
  min-height: 45px;
  padding: 0 18px;
  user-select: none;
  white-space: nowrap;
}
.municipality-advanced-filter summary.icon-only-control,
.municipality-filters button.icon-only-control,
.municipality-filters .button-secondary.icon-only-control,
.admin-actions .button-secondary.icon-only-control,
.admin-actions button.icon-only-control,
.panel-head a.icon-only-control,
button.icon-only-control,
a.icon-only-control {
  border-radius: 8px;
  height: 42px;
  min-height: 42px;
  min-width: 42px;
  padding: 0;
  width: 42px;
}
.municipality-advanced-filter summary::-webkit-details-marker {
  display: none;
}
.municipality-advanced-filter summary.active,
.municipality-advanced-filter[open] summary {
  border-color: #0c6639;
  box-shadow: 0 0 0 3px rgba(12, 102, 57, 0.1);
  color: #0c6639;
}
.municipality-filter-popover {
  background: white;
  border: 1px solid #d7e2da;
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(14, 33, 25, 0.18);
  display: grid;
  gap: 14px;
  left: auto;
  padding: 14px 16px 16px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  max-width: calc(100vw - 32px);
  width: 325px;
  z-index: 40;
}
.municipality-filter-popover label {
  color: var(--muted);
  display: grid;
  font-size: 15px;
  gap: 7px;
}
.municipality-filter-popover input[type="text"],
.municipality-filter-popover input:not([type]) {
  border: 1px solid #d7e2da;
  border-radius: 8px;
  font-size: 15px;
  min-height: 44px;
  padding: 10px 12px;
}
.municipality-filter-popover fieldset {
  border: 0;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.municipality-filter-popover legend {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
}
.municipality-filter-popover fieldset label {
  align-items: center;
  color: var(--ink);
  display: grid;
  font-weight: 800;
  gap: 12px;
  grid-template-columns: 1fr 1.3fr;
  line-height: 1.35;
}
.municipality-filter-popover input[type="radio"] {
  height: 18px;
  justify-self: center;
  width: 18px;
}
.municipality-filter-actions {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  padding-top: 14px;
}
.municipality-filter-actions .button-secondary,
.municipality-filter-actions button {
  align-items: center;
  display: flex;
  font-size: 20px;
  justify-content: center;
  min-height: 50px;
  width: 100%;
}
.municipalities-table-panel {
  overflow: hidden;
  max-width: 100%;
}
.municipalities-results-summary {
  align-items: baseline;
  color: var(--muted);
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.municipalities-results-summary strong {
  color: var(--green);
  font-size: 22px;
  line-height: 1;
}
.municipalities-results-summary span {
  font-size: 14px;
  font-weight: 700;
}
.municipalities-results-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}
.municipalities-results-toolbar .municipalities-results-summary {
  margin-bottom: 0;
  min-width: 0;
}
.municipalities-results-toolbar .column-picker-trigger {
  border-radius: 8px;
  min-height: 36px;
  padding: 7px 10px;
}
.municipalities-table-scroll {
  max-width: 100%;
  max-height: calc(100vh - 360px);
  min-height: 420px;
  overflow: auto;
  padding-bottom: 8px;
  scrollbar-color: #0c6639 #edf1ef;
  scrollbar-width: thin;
}
.municipalities-table-scroll::-webkit-scrollbar {
  height: 14px;
}
.municipalities-table-scroll::-webkit-scrollbar-track {
  background: #edf1ef;
  border-radius: 999px;
}
.municipalities-table-scroll::-webkit-scrollbar-thumb {
  background: #0c6639;
  border-radius: 999px;
}
.agent-table-no-horizontal {
  overflow-x: auto;
}
.agent-table-no-horizontal::-webkit-scrollbar {
  height: 16px;
}
.agent-table-no-horizontal::-webkit-scrollbar-track {
  background: #edf1ef;
  border-radius: 999px;
}
.agent-table-no-horizontal::-webkit-scrollbar-thumb {
  background: #0c6639;
  border: 3px solid #edf1ef;
  border-radius: 999px;
}
.table-scroll-hint {
  background: #edf5ef;
  border: 1px solid #d7e8dc;
  border-radius: 8px;
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
  padding: 8px 10px;
}
.municipalities-table {
  min-width: 1280px;
}
.admin-municipalities-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}
.admin-municipalities-table th,
.admin-municipalities-table td {
  font-size: 13px;
  padding: 9px 5px;
}
.admin-municipalities-table th:nth-child(1),
.admin-municipalities-table td:nth-child(1) {
  text-align: center;
  width: 3%;
}
.admin-municipalities-table th:nth-child(2),
.admin-municipalities-table td:nth-child(2) {
  width: 16%;
}
.admin-municipalities-table th:nth-child(3),
.admin-municipalities-table td:nth-child(3) {
  width: 5%;
}
.admin-municipalities-table th:nth-child(4),
.admin-municipalities-table td:nth-child(4) {
  width: 13%;
}
.admin-municipalities-table th:nth-child(5),
.admin-municipalities-table td:nth-child(5) {
  width: 18%;
}
.admin-municipalities-table th:nth-child(6),
.admin-municipalities-table td:nth-child(6) {
  text-align: center;
  width: 4%;
}
.admin-municipalities-table th:nth-child(7),
.admin-municipalities-table td:nth-child(7) {
  width: 13%;
}
.admin-municipalities-table th:nth-child(8),
.admin-municipalities-table td:nth-child(8) {
  width: 13%;
}
.admin-municipalities-table th:nth-child(9),
.admin-municipalities-table td:nth-child(9) {
  width: 7%;
}
.admin-municipalities-table th:nth-child(10),
.admin-municipalities-table td:nth-child(10) {
  width: 8%;
}
.admin-municipalities-table .municipality-name-cell {
  min-width: 0;
}
.admin-municipalities-table .municipality-name-cell span:last-child,
.admin-municipalities-table .municipality-row-link,
.admin-municipalities-table .municipality-row-link strong {
  min-width: 0;
}
.admin-municipalities-table .municipality-row-link strong {
  overflow-wrap: anywhere;
}
.admin-municipalities-table td:nth-child(4) {
  line-height: 1.2;
  overflow-wrap: normal;
  white-space: normal;
  word-break: normal;
}
.admin-municipalities-table .table-row-select,
.admin-municipalities-table .next-action-pill {
  font-size: 13px;
  min-width: 0;
  width: 100%;
}
.admin-municipalities-table .next-action-pill {
  padding: 7px 8px;
}
.admin-municipalities-table .row-actions {
  justify-content: flex-end;
}
.agent-municipalities-table {
  min-width: 1320px;
  table-layout: fixed;
}
.agent-municipalities-table th,
.agent-municipalities-table td {
  padding: 9px 3px;
}
.agent-municipalities-table th:nth-child(1),
.agent-municipalities-table td:nth-child(1) {
  width: 23%;
}
.agent-municipalities-table th:nth-child(2),
.agent-municipalities-table td:nth-child(2) {
  width: 6%;
}
.agent-municipalities-table th:nth-child(3),
.agent-municipalities-table td:nth-child(3) {
  width: 9%;
}
.agent-municipalities-table th:nth-child(4),
.agent-municipalities-table td:nth-child(4) {
  width: 8%;
}
.agent-municipalities-table th:nth-child(5),
.agent-municipalities-table td:nth-child(5) {
  text-align: center;
  width: 5%;
}
.agent-municipalities-table th:nth-child(6),
.agent-municipalities-table td:nth-child(6) {
  width: 14%;
}
.agent-municipalities-table th:nth-child(7),
.agent-municipalities-table td:nth-child(7) {
  width: 13%;
}
.agent-municipalities-table th:nth-child(8),
.agent-municipalities-table td:nth-child(8) {
  width: 10%;
}
.agent-municipalities-table th:nth-child(9),
.agent-municipalities-table td:nth-child(9) {
  width: 10%;
}
.agent-municipalities-table th:nth-child(10),
.agent-municipalities-table td:nth-child(10) {
  width: 2%;
}
.materials-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.material-feedback {
  font-weight: 800;
  margin-bottom: 16px;
}
.materials-management-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 100%;
  min-width: 0;
}
.materials-management-grid > .dash-panel {
  min-width: 0;
}
.material-form-card {
  align-content: start;
  min-width: 0;
}
.materials-agent-workbench .material-form-card {
  justify-self: stretch;
  width: 100%;
}
.material-form {
  display: grid;
  gap: 12px;
}
.material-form-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.material-source-choice {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.material-form .material-source-choice label {
  color: inherit;
  cursor: pointer;
  display: block;
  font-weight: inherit;
}
.material-source-choice input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}
.admin-material-source-choice label {
  position: relative;
}
.admin-material-source-choice input {
  height: 1px;
  width: 1px;
  padding: 0;
  border: 0;
  top: 0;
  left: 0;
}
.admin-material-source-choice input:focus-visible + span {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.material-source-choice span {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  display: flex;
  font-weight: 900;
  gap: 8px;
  justify-content: center;
  padding: 10px 12px;
}
.material-source-choice input:checked + span {
  background: #edf8f0;
  border-color: var(--green);
  color: var(--green);
}
.material-source-choice svg {
  flex: 0 0 auto;
}
.material-form [data-material-source-field][hidden] {
  display: none;
}
.material-form label {
  color: var(--muted);
  display: grid;
  font-weight: 600;
  gap: 6px;
}
.material-form input,
.material-form select,
.material-form textarea {
  font-weight: 400;
}
.material-form input[type="file"]::file-selector-button {
  align-items: center;
  background: #edf8f0;
  border: 1px solid var(--green);
  border-radius: 8px;
  color: var(--green);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  margin-right: 10px;
  padding: 9px 12px;
}
.material-form textarea {
  resize: vertical;
}
.material-form-options {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.material-visibility-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 12px;
}
.material-visibility-box legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  padding: 0 6px;
}
.material-visibility-box label {
  align-items: center;
  color: var(--ink);
  display: flex;
  flex-direction: row;
  font-size: 13px;
  font-weight: 400;
  gap: 8px;
}
.material-visibility-box input[type="radio"] {
  width: auto;
}
.material-visibility-box select {
  min-height: 86px;
}
.material-visibility-box select[hidden] {
  display: none;
}
.material-form button[type="submit"] {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}
.materials-edit-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 360px minmax(0, 1fr);
}
.material-edit-summary {
  align-content: start;
  display: grid;
  gap: 18px;
}
.material-edit-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}
.material-edit-facts div {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr;
  padding: 0 0 12px;
}
.material-edit-facts dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.material-edit-facts dd {
  font-weight: 900;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-edit-panel {
  display: grid;
  gap: 16px;
}
.material-edit-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.material-edit-form label:has(textarea),
.material-edit-form .material-form-options,
.material-edit-form .material-visibility-box,
.material-edit-form .form-actions-row {
  grid-column: 1 / -1;
}
.form-actions-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.form-actions-row .button-secondary,
.form-actions-row button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  min-width: 150px;
  padding: 10px 18px;
  width: auto;
}
.materials-list-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}
.materials-filters {
  grid-template-columns: 1.25fr 0.9fr 0.85fr 0.85fr minmax(220px, 0.9fr) auto;
  min-width: 0;
}
.materials-filters label,
.materials-filters .sort-select-field {
  color: var(--muted);
  font-weight: 600;
}
.materials-filters input,
.materials-filters select {
  font-weight: 400;
}
.materials-filter-actions {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.materials-filter-actions .icon-only-control {
  flex: 0 0 auto;
}
.materials-table-scroll {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-color: #0c6639 #edf1ef;
  scrollbar-width: thin;
  width: 100%;
}
.materials-table {
  max-width: 100%;
  min-width: 0 !important;
  table-layout: fixed !important;
  width: 100% !important;
}
.materials-table th,
.materials-table td {
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  overflow: hidden;
  padding: 7px 6px;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}
.materials-table th:nth-child(1),
.materials-table td:nth-child(1) {
  width: 25%;
}
.materials-table th:nth-child(2),
.materials-table td:nth-child(2) {
  width: 14%;
}
.materials-table th:nth-child(3),
.materials-table td:nth-child(3) {
  text-align: center;
  width: 7%;
}
.materials-table th:nth-child(4),
.materials-table td:nth-child(4) {
  text-align: center;
  width: 7%;
}
.materials-table th:nth-child(5),
.materials-table td:nth-child(5) {
  text-align: center;
  width: 7%;
}
.materials-table th:nth-child(6),
.materials-table td:nth-child(6) {
  width: 9%;
}
.materials-table th:nth-child(7),
.materials-table td:nth-child(7) {
  text-align: center;
  width: 9%;
}
.materials-table th:nth-child(8),
.materials-table td:nth-child(8) {
  text-align: center;
  width: 7%;
}
.materials-table th:nth-child(9),
.materials-table td:nth-child(9) {
  text-align: center;
  width: 9%;
}
.materials-table th:nth-child(10),
.materials-table td:nth-child(10) {
  text-align: right;
  width: 6%;
}
.material-name-cell {
  align-items: flex-start;
  display: grid;
  gap: 6px;
  grid-template-columns: 26px minmax(0, 1fr);
}
.material-name-cell > span {
  align-items: center;
  background: #edf8f0;
  border-radius: 8px;
  color: #006b3c;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  width: 26px;
}
.material-name-cell > span .lucide-icon {
  font-size: 14px;
}
.material-name-cell strong,
.material-card h2 {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-name-cell small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-name-cell em {
  color: #b56b00;
  display: inline-block;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  margin-top: 2px;
}
.material-type-icon {
  align-items: center;
  background: #eef7f2;
  border: 1px solid #cfe4d7;
  border-radius: 8px;
  color: #0c6639;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}
.material-type-icon .lucide-icon {
  font-size: 13px;
}
.material-uploader-badge {
  align-items: center;
  background: var(--uploader-color, #6b46c1);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  width: 28px;
}
.material-visibility-summary {
  color: var(--muted);
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-usage-mini {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  gap: 3px;
  margin-right: 4px;
}
.material-usage-mini .lucide-icon {
  font-size: 13px;
}
.materials-table .soft-tag {
  font-size: 12px;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 6px;
  text-overflow: ellipsis;
}
.materials-table .state-pill {
  font-size: 12px;
  padding: 4px 6px;
}
.materials-table .material-actions-menu .icon-action {
  height: 28px;
  width: 28px;
}
.materials-table .material-actions-menu .icon-action .lucide-icon {
  font-size: 14px;
}
.material-actions-menu {
  display: inline-flex;
  position: relative;
}
.material-actions-menu summary {
  cursor: pointer;
  list-style: none;
}
.material-actions-menu summary::-webkit-details-marker {
  display: none;
}
.material-actions-popover {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.16);
  display: grid;
  gap: 4px;
  min-width: 176px;
  padding: 6px;
  position: fixed;
  z-index: 1000;
}
.material-actions-menu:not([open]) .material-actions-popover {
  display: none;
}
.material-actions-popover a,
.material-actions-popover button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 9px;
  justify-content: flex-start;
  min-height: 34px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}
.material-actions-popover a:hover,
.material-actions-popover button:hover,
.material-actions-popover a:focus-visible,
.material-actions-popover button:focus-visible {
  background: #edf8f0;
  color: var(--green);
  outline: none;
}
.material-actions-popover button.danger {
  color: #b91c1c;
}
.material-actions-popover button.danger:hover,
.material-actions-popover button.danger:focus-visible {
  background: #fff0f0;
  color: #b91c1c;
}
.material-actions-popover form {
  margin: 0;
}
.material-actions-popover .lucide-icon {
  font-size: 16px;
}
.materials-category-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.materials-management-grid .materials-category-panel {
  align-content: start;
}
.material-category-form {
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr) auto;
  min-width: 0;
}
.materials-management-grid .material-category-form,
.materials-management-grid .material-category-list {
  grid-template-columns: 1fr;
}
.material-category-form button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.material-category-form .material-category-submit {
  justify-self: start;
}
.material-category-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.material-category-list article {
  align-items: center;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}
.material-category-summary {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.material-category-summary strong,
.material-category-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-category-summary small {
  color: var(--muted);
}
.material-category-list form {
  flex: 0 0 auto;
}
.material-category-edit-form {
  align-items: center;
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
  grid-template-columns: minmax(90px, 1fr) minmax(90px, 1fr) 34px 34px;
  min-width: 0;
}
.material-category-edit-form[hidden] {
  display: none;
}
.material-category-edit-form input {
  font-size: 12px;
  min-height: 34px;
  min-width: 0;
  padding: 7px 8px;
}
.material-category-edit-form .icon-only-control {
  height: 34px;
  min-height: 34px;
  min-width: 34px;
  width: 34px;
}
.material-category-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}
.material-category-toggle {
  display: inline-flex;
}
.materials-agent-filter-panel {
  overflow: visible;
}
.materials-agent-workbench {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  margin-bottom: 16px;
}
.agent-material-scope-panel {
  align-content: start;
  display: grid;
  gap: 14px;
}
.agent-material-scope-panel h2 {
  margin: 0;
}
.agent-material-scope-panel div {
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 12px;
}
.agent-material-scope-panel span {
  align-items: center;
  background: #edf8f0;
  border-radius: 8px;
  color: var(--green);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.agent-material-scope-panel strong,
.agent-material-scope-panel p {
  grid-column: 2;
  margin: 0;
}
.agent-material-scope-panel p {
  color: var(--muted);
  font-size: 13px;
}
.material-scope-note {
  align-items: center;
  background: #f7fbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
}
.material-scope-note svg {
  color: var(--green);
  flex: 0 0 auto;
}
.material-section-block {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.section-title-row {
  align-items: end;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}
.section-title-row h2,
.section-title-row p {
  margin: 0;
}
.section-title-row p {
  color: var(--muted);
}
.section-title-row > strong {
  align-items: center;
  background: #edf8f0;
  border-radius: 999px;
  color: var(--green);
  display: inline-flex;
  font-size: 18px;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  padding: 0 10px;
}
.materials-card-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.material-card {
  display: grid;
  gap: 8px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 12px;
  position: relative;
}
.material-favorite-form {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
}
.material-favorite-form .icon-action {
  height: 30px;
  width: 30px;
}
.material-favorite-form .icon-action.active {
  background: #fff7df;
  border-color: #f3c575;
  color: #b56b00;
}
.material-card.featured {
  border-color: #f3c575;
}
.material-card.personal {
  border-color: #add7a4;
}
.material-card:target {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(12, 102, 57, 0.12);
}
.material-card-icon {
  align-items: center;
  background: #edf8f0;
  border-radius: 8px;
  color: #006b3c;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.material-card-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.material-card-body > div:first-child {
  align-items: start;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-right: 42px;
}
.material-card h2 {
  font-size: 14px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  margin: 0;
  max-height: 30px;
  overflow: hidden;
}
.material-card dl {
  display: grid;
  gap: 5px;
  grid-template-columns: 1fr;
  margin: 0;
}
.material-card dl div {
  background: #f8fbf9;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  padding: 5px 7px;
}
.material-card dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  flex: 0 0 28px;
  min-width: 28px;
}
.material-card dd {
  flex: 1 1 auto;
  font-size: 11px;
  font-weight: 900;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-card-actions {
  grid-column: 2 / 3;
  display: grid;
  gap: 16px;
  grid-template-columns: 34px;
  justify-content: end;
}
.material-card-actions form {
  margin: 0;
}
.material-card.personal .material-card-actions {
  grid-template-columns: repeat(3, 34px);
}
.material-card-action,
.material-card-delete {
  height: 34px;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 0;
  width: 34px;
}
.material-card-actions .icon-only-control {
  height: 34px;
  min-height: 34px;
  min-width: 34px;
  padding: 0;
  width: 34px;
}
.material-card-delete {
  align-items: center;
  display: inline-flex;
  white-space: nowrap;
}
.material-empty-state {
  align-items: center;
  color: var(--muted);
  display: grid;
  grid-column: 1 / -1;
  justify-items: center;
  padding: 42px;
  text-align: center;
}
.agent-materials-panel {
  grid-column: span 2;
}
.agent-featured-materials {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.agent-featured-materials a {
  align-items: center;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 8px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  padding: 10px;
  text-decoration: none;
}
.agent-featured-materials span {
  align-items: center;
  background: #edf8f0;
  border-radius: 8px;
  color: #006b3c;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}
.agent-featured-materials strong,
.agent-featured-materials small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-featured-materials small {
  color: var(--muted);
  grid-column: 2 / 3;
}
.agent-featured-materials b {
  color: #b56b00;
  grid-column: 3 / 4;
  grid-row: 1 / span 2;
}
.agent-compact-filter-panel {
  overflow: visible;
  position: relative;
  z-index: 6;
}
.agent-municipality-search-form {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 1fr) minmax(230px, 0.35fr) auto auto;
}
.agent-municipality-search-form .search-field {
  display: grid;
  gap: 8px;
}
.agent-municipality-search-form .search-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.agent-table-heading {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}
.agent-table-heading > div {
  display: grid;
  gap: 4px;
}
.agent-table-sort-form {
  flex: 0 0 auto;
}
.agent-table-sort-form .sort-select-field {
  min-width: 260px;
}
.agent-filter-menu {
  position: relative;
}
.agent-filter-menu summary {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  min-height: 42px;
  padding: 10px 14px;
}
.agent-filter-menu summary.active {
  background: #e4f7eb;
  border-color: #b7dec3;
  color: #08772f;
}
.agent-filter-menu .municipality-filter-popover {
  left: auto;
  max-width: calc(100vw - 32px);
  min-width: 310px;
  right: 0;
  width: min(325px, calc(100vw - 32px));
}
.checkbox-filter {
  align-items: center;
  display: flex !important;
  flex-direction: row !important;
  gap: 8px;
}
.switch-filter {
  justify-content: space-between;
}
.checkbox-filter input {
  width: auto;
}
.switch-filter input {
  height: 1px;
  width: 1px;
}
.agent-table-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}
.agent-table-heading em {
  background: #fff7e8;
  border-radius: 999px;
  color: #a76400;
  font-style: normal;
  font-weight: 800;
  padding: 6px 10px;
}
.agent-municipalities-panel {
  overflow: visible;
}
.agent-table-no-horizontal {
  max-height: calc(100vh - 320px);
  min-height: 420px;
  overflow-x: auto;
  overflow-y: auto;
}
.agent-clickable-table {
  min-width: 0;
  table-layout: fixed;
}
.agent-clickable-table th,
.agent-clickable-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-clickable-table th:nth-child(1) { width: 24%; }
.agent-clickable-table th:nth-child(2) { width: 8%; }
.agent-clickable-table th:nth-child(3) { width: 12%; }
.agent-clickable-table th:nth-child(4) { width: 10%; }
.agent-clickable-table th:nth-child(5) { width: 17%; }
.agent-clickable-table th:nth-child(6) { width: 15%; }
.agent-clickable-table th:nth-child(7) { width: 9%; }
.agent-clickable-table th:nth-child(8) { width: 12%; }
.agent-clickable-table th:nth-child(9) { width: 3%; }
.agent-municipalities-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}
.agent-municipalities-table th,
.agent-municipalities-table td {
  padding-left: 2px;
  padding-right: 2px;
}
.agent-municipalities-table thead th {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.agent-municipalities-table th:nth-child(1),
.agent-municipalities-table td:nth-child(1) { width: 24%; }
.agent-municipalities-table th:nth-child(2),
.agent-municipalities-table td:nth-child(2) {
  text-align: center;
  width: 4%;
}
.agent-municipalities-table th:nth-child(3),
.agent-municipalities-table td:nth-child(3) { width: 8%; }
.agent-municipalities-table th:nth-child(4),
.agent-municipalities-table td:nth-child(4) {
  text-align: center;
  width: 7%;
}
.agent-municipalities-table th:nth-child(5),
.agent-municipalities-table td:nth-child(5) {
  text-align: center;
  width: 6%;
}
.agent-municipalities-table th:nth-child(6),
.agent-municipalities-table td:nth-child(6) {
  padding-left: 6px;
  width: 15%;
}
.agent-municipalities-table th:nth-child(7),
.agent-municipalities-table td:nth-child(7) { width: 13%; }
.agent-municipalities-table th:nth-child(8),
.agent-municipalities-table td:nth-child(8) {
  text-align: center;
  width: 8%;
}
.agent-municipalities-table th:nth-child(9),
.agent-municipalities-table td:nth-child(9) { width: 13%; }
.agent-municipalities-table th:nth-child(10),
.agent-municipalities-table td:nth-child(10) {
  text-align: right;
  width: 2%;
}
.agent-municipalities-table .phase-readonly-pill {
  max-width: 100%;
  overflow: hidden;
  padding-left: 8px;
  padding-right: 8px;
  text-overflow: ellipsis;
}
.agent-clickable-table tbody tr {
  cursor: pointer;
}
.agent-clickable-table tbody tr:hover {
  background: #f3faf5;
}
.agent-clickable-table tbody tr:focus {
  outline: 2px solid #0a6b3c;
  outline-offset: -2px;
}
.agent-clickable-table .municipality-name-cell strong,
.agent-clickable-table .municipality-name-cell small,
.agent-clickable-table td {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-clickable-table .municipality-name-cell span:last-child {
  min-width: 0;
}
.municipality-row-link {
  color: inherit;
  text-decoration: none;
}
.municipality-row-link:hover strong {
  color: #0c6639;
  text-decoration: underline;
}
.agent-clickable-table th:nth-child(2),
.agent-clickable-table td:nth-child(2) {
  left: auto;
  position: static;
}
.row-chevron {
  color: #536678;
  font-size: 24px;
  font-weight: 900;
  text-align: right;
}
.municipalities-table th,
.municipalities-table td {
  padding: 11px 7px;
  vertical-align: middle;
}
.municipalities-table thead th {
  background: white;
  position: sticky;
  top: 0;
  z-index: 3;
}
.municipalities-table th:nth-child(2),
.municipalities-table td:nth-child(2) {
  background: white;
  left: 0;
  position: sticky;
  z-index: 1;
}
.municipalities-table th:nth-child(2) {
  z-index: 2;
}
.agent-clickable-table th:nth-child(2),
.agent-clickable-table td:nth-child(2) {
  background: inherit;
  left: auto;
  position: static;
  z-index: auto;
}
.municipality-name-cell {
  align-items: center;
  display: flex;
  gap: 7px;
}
.municipality-name-cell span:last-child {
  display: grid;
  gap: 2px;
}
.municipality-crest {
  align-items: center;
  background: #e7f6ec;
  border: 1px solid #b7dec3;
  border-radius: 8px;
  color: #08772f;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.table-select-form {
  align-items: center;
  display: flex;
  gap: 5px;
}
.table-row-select {
  min-width: 118px;
  padding: 8px 10px;
}
.table-select-form select {
  min-width: 118px;
  padding: 8px 10px;
}
.table-select-form button {
  padding: 8px 9px;
  width: auto;
}
.phase-pill {
  border: 0;
  font-weight: 800;
}
.phase-pill.info {
  background: #e9f3ff;
  color: #2474c6;
}
.phase-pill.ok {
  background: #e4f7eb;
  color: #008a45;
}
.phase-pill.warning {
  background: #fff1d6;
  color: #c16b00;
}
.phase-pill.danger {
  background: #ffe2df;
  color: #d92d20;
}
.assignment-state {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-width: 28px;
  white-space: nowrap;
}
.assignment-state b {
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
  display: inline-block;
  height: 12px;
  width: 12px;
}
.assignment-state.assigned b {
  background: #008a45;
}
.assignment-state.unassigned b {
  background: #e14d4d;
}
.assignment-label {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}
.next-action-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  min-width: 118px;
}
.next-action-pill small {
  color: #e14d4d;
  font-weight: 800;
}
.muted-action {
  color: var(--muted);
}
.row-actions {
  align-items: center;
  display: flex;
  gap: 6px;
}
.row-actions .button-secondary,
.row-actions button {
  padding: 8px 10px;
  width: auto;
}
.row-actions .button-secondary[type="button"] {
  display: none;
}
.row-actions form {
  margin: 0;
}
.icon-action {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #0a3622;
  display: inline-flex;
  font-size: 16px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  text-decoration: none;
  width: 34px;
}
.icon-action .lucide-icon {
  font-size: 17px;
}
.icon-action.save {
  background: #0c6639;
  border-color: #0c6639;
  color: white;
}
.icon-action.edit {
  background: white;
}
.icon-action.danger {
  background: white;
  border-color: #ffd6d6;
  color: #b91c1c;
}
.icon-text-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}
.icon-text-button .lucide-icon {
  font-size: 17px;
}
.table-icon-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.table-icon-actions form {
  margin: 0;
}
.trash-filter-card {
  color: inherit;
  padding: 6px;
  text-decoration: none;
}
.trash-filter-card.active {
  border-color: #0c6639;
  box-shadow: 0 0 0 2px rgba(12, 102, 57, 0.12);
}
.trash-items-panel,
.trash-items-panel * {
  font-weight: 400 !important;
}
.trash-filters {
  align-items: end;
  margin: 12px 0 14px;
}
.trash-filters label {
  min-width: 220px;
}
@media (min-width: 761px) and (max-width: 1200px) {
  .trash-filters {
    gap: 8px;
    grid-template-columns: minmax(0, 1.35fr) minmax(110px, 0.8fr) minmax(150px, 1fr) auto auto;
  }
  .trash-filters label {
    min-width: 0;
  }
  .trash-filters input,
  .trash-filters select {
    min-width: 0;
    width: 100%;
  }
}
.filtered-results-count {
  color: var(--muted);
  margin: 0 0 12px;
}
.filtered-results-count strong {
  color: #0c6639;
  font-size: 22px;
}
.trash-table table {
  min-width: 1180px;
}
.trash-table table {
  min-width: 1040px;
}
.trash-table small {
  color: var(--muted);
  display: inline-block;
  max-width: 420px;
}
.table-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
}
.pagination-lite {
  align-items: center;
  display: flex;
  gap: 8px;
}
.pagination-lite button,
.pagination-lite strong {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}
.pagination-lite strong {
  background: var(--green);
  color: white;
}
.phase-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.phase-legend span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
}
.legend-phase {
  border-radius: 999px;
  height: 8px;
  width: 8px;
}
.legend-phase.info { background: #2474c6; }
.legend-phase.ok { background: #008a45; }
.legend-phase.warning { background: #f3b51b; }
.legend-phase.danger { background: #d92d20; }

.settings-grid {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  min-width: 0;
}
.settings-tabs {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 22px;
  margin: 0 0 18px;
  overflow-x: auto;
}
.settings-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #31443a;
  font-weight: 900;
  padding: 14px 0 12px;
  white-space: nowrap;
  width: auto;
}
.settings-tabs button.active {
  border-bottom-color: #008a45;
  color: #008a45;
}
.settings-tab-panel {
  display: none;
  margin-bottom: 18px;
}
.settings-tab-panel.active {
  display: block;
}
.settings-tab-grid {
  grid-template-columns: 1fr;
}
.settings-main .settings-tab-panel:not(.active) {
  display: none !important;
}
.settings-main .settings-tab-panel.active {
  display: block;
}
.settings-main .pipeline-config-grid.settings-tab-panel.active {
  display: grid;
}
.settings-main .pipeline-tabs.settings-tab-panel.active {
  display: flex;
}
.settings-main .settings-tab-panel[data-settings-panel="pipeline"].active {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}
.settings-main .settings-tab-panel[data-settings-panel="pipeline"] > form,
.settings-main .settings-tab-panel[data-settings-panel="pipeline"] > article {
  height: 100%;
  min-width: 0;
}
.settings-main .settings-tab-panel[data-settings-panel="pipeline"] > form {
  display: grid;
}
.settings-main .settings-tab-panel[data-settings-panel="pipeline"] > form > .pipeline-panel,
.settings-main .settings-tab-panel[data-settings-panel="pipeline"] > .pipeline-panel {
  height: 100%;
}
.settings-main .settings-tab-panel[data-settings-panel="pipeline"] .pipeline-panel > form {
  display: grid;
  min-height: 0;
}
.settings-main .settings-tab-panel[data-settings-panel="pipeline"] .pipeline-table-wrap {
  height: 100%;
  max-height: none;
}
.settings-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.settings-left-column {
  align-content: start;
  display: grid;
  gap: 18px;
  height: 100%;
  grid-template-rows: auto 1fr;
  min-width: 0;
}
.settings-right-column {
  align-content: start;
  display: grid;
  gap: 18px;
  grid-template-rows: 1fr auto;
  height: 100%;
  min-width: 0;
}
.settings-right-column > .workflow-panel {
  align-self: stretch;
  height: 100%;
  min-width: 0;
}
.settings-right-column > .workflow-panel form {
  min-height: 0;
  min-width: 0;
}
.settings-left-column .settings-fields {
  grid-template-columns: 1fr;
}
.settings-fields {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}
.settings-fields label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
}
.settings-fields small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.settings-toggle-list {
  display: grid;
  gap: 12px;
}
.settings-toggle-row,
.settings-checkbox-line {
  align-items: center;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 12px 14px;
}
.settings-toggle-row > span {
  display: grid;
  gap: 3px;
}
.settings-toggle-row strong,
.settings-checkbox-line span {
  color: var(--ink);
  font-size: 14px;
}
.settings-toggle-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.pricing-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}
.pricing-kpis {
  margin: 0;
}
.pricing-table-wrap {
  max-height: none;
}
.pricing-table {
  min-width: 1080px;
  table-layout: fixed;
}
.pricing-table th:nth-child(1),
.pricing-table td:nth-child(1) {
  width: 8%;
}
.pricing-table th:nth-child(2),
.pricing-table td:nth-child(2),
.pricing-table th:nth-child(3),
.pricing-table td:nth-child(3) {
  width: 12%;
}
.pricing-table th:nth-child(4),
.pricing-table td:nth-child(4),
.pricing-table th:nth-child(5),
.pricing-table td:nth-child(5) {
  width: 13%;
}
.pricing-table th:nth-child(6),
.pricing-table td:nth-child(6) {
  width: 10%;
}
.pricing-table th:nth-child(7),
.pricing-table td:nth-child(7) {
  width: 32%;
}
.pricing-table td:nth-child(7),
.pricing-table td:nth-child(7) small {
  white-space: nowrap;
}
.pricing-table input {
  min-height: 38px;
  width: 100%;
}
.pricing-table td:last-child small {
  color: var(--muted);
  line-height: 1.35;
}
.pricing-history {
  display: grid;
  gap: 10px;
}
.compact-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}
.compact-actions form {
  margin: 0;
}
.pricing-panel .compact-actions form {
  display: flex;
}
.pricing-panel .pricing-action-control {
  box-sizing: border-box;
  flex: 0 0 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  width: 34px;
}
.compact-icon-label {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}
.compact-icon-label .lucide-icon {
  font-size: 16px;
}
.pricing-detail-panel {
  margin-top: 16px;
}
.pricing-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 14px 0;
}
.pricing-detail-grid div {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}
.pricing-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.pricing-detail-grid strong {
  overflow-wrap: anywhere;
}
.pricing-custom-form {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 0.9fr) minmax(160px, 0.6fr) minmax(260px, 1fr) auto;
  margin-top: 14px;
  padding-top: 14px;
}
.pricing-custom-form input {
  min-height: 38px;
}
.double-range {
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  padding: 18px 18px 14px;
}
.double-range-values {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.double-range-values span {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 3px;
  min-width: 128px;
  padding: 10px 12px;
}
.double-range-values small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.double-range-values strong {
  color: #0c6639;
  font-size: 20px;
  line-height: 1;
}
.double-range-control {
  height: 76px;
  margin: 2px 4px 0;
  position: relative;
}
.double-range-track {
  background: #dfe3e0;
  border-radius: 999px;
  height: 10px;
  left: 0;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 38px;
}
.double-range-track i {
  background: linear-gradient(90deg, #94d865, #0c8b4b);
  border-radius: inherit;
  bottom: 0;
  display: block;
  left: 0;
  position: absolute;
  top: 0;
  width: 0;
}
.double-range-control input[type="range"] {
  background: transparent;
  border: 0;
  height: 10px;
  left: 0;
  padding: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 38px;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.double-range-control input[type="range"]::-webkit-slider-thumb {
  background: #98dc68;
  border: 4px solid #d8f7c4;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(12, 102, 57, 0.22);
  cursor: grab;
  height: 28px;
  pointer-events: auto;
  width: 28px;
  -webkit-appearance: none;
}
.double-range-control input[type="range"]::-moz-range-thumb {
  background: #98dc68;
  border: 4px solid #d8f7c4;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(12, 102, 57, 0.22);
  cursor: grab;
  height: 20px;
  pointer-events: auto;
  width: 20px;
}
.range-bubble {
  background: #0f6760;
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  min-width: 56px;
  padding: 9px 12px;
  position: absolute;
  text-align: center;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.range-bubble-max {
  top: 52px;
}
.double-range-scale {
  color: var(--muted);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: space-between;
}

.pipeline-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.pipeline-tabs {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
}
.pipeline-tabs a {
  color: var(--muted);
  font-weight: 800;
  padding: 0 0 14px;
}
.pipeline-tabs a.active {
  border-bottom: 3px solid #08772f;
  color: #08772f;
}
.pipeline-config-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  min-width: 0;
}
.pipeline-panel {
  display: grid;
  gap: 16px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}
.pipeline-panel > *,
.pipeline-panel form,
.pipeline-table-wrap {
  max-width: 100%;
  min-width: 0;
}
.panel-title-row {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}
.panel-title-row h2 {
  font-size: 18px;
  margin-bottom: 6px;
}
.panel-title-with-icon {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.panel-title-with-icon svg {
  color: var(--green);
  flex: 0 0 auto;
}
.panel-title-row p {
  color: var(--muted);
  font-size: 13px;
}
.panel-title-row .icon-action {
  flex: 0 0 auto;
}
.pipeline-table-wrap {
  max-height: 560px;
  overflow: auto;
  scrollbar-color: #0c6639 #edf1ef;
  scrollbar-width: thin;
}
.settings-right-column > .workflow-panel {
  overflow: visible;
}
.settings-right-column > .workflow-panel .pipeline-table-wrap {
  max-width: 100%;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
}
.settings-right-column > .workflow-panel .pipeline-table {
  min-width: 620px;
}
.settings-right-column > .workflow-panel .pipeline-table th,
.settings-right-column > .workflow-panel .pipeline-table td {
  padding: 10px 8px;
}
.settings-right-column > .workflow-panel .pipeline-table td:nth-child(2) {
  min-width: 170px;
}
.pipeline-table {
  min-width: 560px;
  width: 100%;
}
.pipeline-table th {
  background: white;
  color: var(--muted);
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
}
.pipeline-table th,
.pipeline-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: middle;
}
.pipeline-table input,
.pipeline-table select {
  min-width: 0;
  padding: 9px 10px;
}
.pipeline-table td:nth-child(2) {
  min-width: 190px;
}
.phases-table th:nth-child(4),
.phases-table td:nth-child(4) {
  text-align: center;
  width: 74px;
}
.pipeline-table th:last-child,
.pipeline-table td:last-child {
  text-align: center;
  width: 56px;
}
.pipeline-table small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.catalog-order-cell {
  align-items: center;
  display: flex;
  gap: 8px;
}
.catalog-drag-handle {
  cursor: grab;
  display: inline-flex;
  touch-action: none;
  user-select: none;
}
.catalog-drag-handle:active {
  cursor: grabbing;
}
.todos-table tr.dragging {
  background: #ADD7A4;
  outline: 2px dashed #0c6639;
  outline-offset: -4px;
  opacity: 0.88;
}
.todos-table tr.dragging td {
  background: #ADD7A4;
}
.catalog-drop-placeholder-row td {
  background: #ADD7A4;
  border: 2px dashed #0c6639;
  border-radius: 8px;
  height: 58px;
  padding: 0;
}
.todos-table tbody.saving-order {
  opacity: 0.8;
}
.phase-number-badge {
  align-items: center;
  background: #dff0ff;
  border-radius: 999px;
  color: #2474c6;
  display: inline-flex;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.pipeline-phase-list {
  display: grid;
  gap: 10px;
}
.pipeline-phase-card {
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.pipeline-phase-card summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  column-gap: 10px;
  grid-template-areas:
    "number name name name name action"
    "number template config status count action";
  grid-template-columns: 34px minmax(0, 1fr) max-content max-content max-content 38px;
  row-gap: 8px;
  list-style: none;
  padding: 12px 14px;
}
.pipeline-phase-card summary::-webkit-details-marker {
  display: none;
}
.pipeline-phase-card summary > strong,
.pipeline-phase-card summary > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phase-summary-number {
  grid-area: number;
}
.phase-summary-name {
  grid-area: name;
}
.phase-summary-template {
  color: #31443a;
  font-size: 14px;
  grid-area: template;
}
.phase-summary-config {
  grid-area: config;
}
.phase-summary-status {
  grid-area: status;
}
.phase-summary-count {
  font-size: 14px;
  grid-area: count;
}
.phase-summary-action {
  grid-area: action;
}
.pipeline-phase-card summary em {
  border-radius: 999px;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  padding: 5px 9px;
  text-align: center;
  white-space: nowrap;
}
.pipeline-phase-card summary em.standard {
  background: #e8f6ed;
  color: #08772f;
}
.pipeline-phase-card summary em.custom {
  background: #fff0d1;
  color: #9a5b00;
}
.status-pill {
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  padding: 5px 9px;
  text-align: center;
  white-space: nowrap;
}
.status-pill.ok {
  background: #d9f4e2;
  color: #08772f;
}
.status-pill.muted {
  background: #eef1ef;
  color: var(--muted);
}
.pipeline-phase-editor {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  padding: 14px;
}
.pipeline-phase-editor label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
}
.pipeline-phase-editor .settings-checkbox-line {
  min-height: 68px;
}
.pipeline-phase-card:not(.uses-custom-values) .pipeline-phase-editor label:has(input[name^="priority_"]),
.pipeline-phase-card:not(.uses-custom-values) .pipeline-phase-editor label:has(input[name^="due_days_"]),
.pipeline-phase-card:not(.uses-custom-values) .pipeline-phase-editor .settings-checkbox-line:has(input[name^="required_"]) {
  opacity: 0.52;
}
.toggle-switch {
  display: inline-flex;
}
.toggle-switch input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}
.toggle-switch span {
  background: #cad3ce;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  height: 22px;
  padding: 3px;
  width: 42px;
}
.toggle-switch span::before {
  background: white;
  border-radius: 50%;
  content: "";
  height: 16px;
  transition: transform 0.16s ease;
  width: 16px;
}
.toggle-switch input:checked + span {
  background: #08772f;
}
.toggle-switch input:checked + span::before {
  transform: translateX(20px);
}
.priority-select {
  border: 0;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-main .settings-tab-panel[data-settings-panel="pipeline"].active {
    grid-template-columns: 1fr;
  }
  .settings-left-column {
    height: auto;
    grid-template-rows: none;
  }
  .settings-right-column {
    height: auto;
    grid-template-rows: none;
  }
  .settings-right-column > .workflow-panel {
    height: auto;
  }
}

@media (max-width: 1500px) and (min-width: 1181px) {
  .settings-main .settings-tab-panel[data-settings-panel="pipeline"].active {
    grid-template-columns: 1fr;
  }

  .pipeline-phase-card summary {
    grid-template-columns: 34px minmax(0, 1fr) max-content max-content max-content 38px;
  }
}

@media (max-width: 640px) {
  .settings-fields,
  .settings-left-column .settings-fields {
    grid-template-columns: 1fr;
  }
  .double-range {
    padding: 16px 14px 12px;
  }
  .double-range-values {
    flex-wrap: wrap;
  }
  .double-range-values span {
    flex: 1 1 140px;
    min-width: 0;
  }
  .settings-toggle-row,
  .settings-checkbox-line {
    align-items: flex-start;
  }
  .pipeline-tabs {
    overflow-x: auto;
    white-space: nowrap;
  }
  .settings-main .pipeline-table,
  .settings-main .settings-right-column > .workflow-panel .pipeline-table,
  .settings-main .pipeline-config-grid .pipeline-table {
    min-width: 0;
    table-layout: fixed;
  }
  .settings-main .pipeline-table th,
  .settings-main .pipeline-table td {
    font-size: 11px;
    padding: 8px 5px;
    word-break: break-word;
  }
  .settings-main .pipeline-table input,
  .settings-main .pipeline-table select {
    font-size: 12px;
    padding: 7px 6px;
    width: 100%;
  }
  .settings-main .pipeline-table .icon-action {
    height: 34px;
    width: 34px;
  }
}

.priority-select.warning {
  background: #fff1d6;
  color: #a76400;
}
.priority-select.danger {
  background: #ffe2df;
  color: #d92d20;
}
.priority-select.info {
  background: #e9f3ff;
  color: #2474c6;
}
.pipeline-panel-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
}
.pipeline-panel-footer span {
  color: var(--muted);
  font-weight: 800;
}
.pipeline-help {
  align-items: center;
  border-left: 3px solid #3d9cff;
  display: grid;
  gap: 8px 24px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.pipeline-help p {
  color: var(--muted);
  margin: 0;
}
.phases-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.phases-kpi-grid .kpi-card .phase-busiest-result {
  font-size: 18px;
  line-height: 1.15;
}
.kanban-toolbar {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}
.kanban-toolbar div {
  display: grid;
  gap: 4px;
}
.kanban-toolbar span {
  color: var(--muted);
}
.kanban-save-feedback {
  align-items: center;
  background: #dff6e8;
  border: 1px solid #bfe8ce;
  border-radius: 8px;
  color: #006b3c;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}
.kanban-save-feedback[data-tone="error"] {
  background: #ffe2df;
  border-color: #ffc7c0;
  color: #b42318;
}
.kanban-board-scroll-rail {
  background: #edf1ef;
  border-radius: 999px;
  cursor: pointer;
  height: 14px;
  margin: 0 0 6px;
  overflow: hidden;
  position: relative;
  touch-action: none;
}
.kanban-board-scroll-rail[hidden] {
  display: none;
}
.kanban-board-scroll-rail span {
  background: #0c6639;
  border: 3px solid #edf1ef;
  border-radius: 999px;
  display: block;
  height: 100%;
  min-width: 52px;
  transform: translateX(0);
  width: 52px;
}
.crm-kanban-board {
  align-items: stretch;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  height: var(--kanban-board-height, min(720px, calc(100vh - 170px)));
  min-height: 620px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 14px;
  scrollbar-color: #0c6639 #edf1ef;
  scrollbar-width: auto;
}
.crm-kanban-board::-webkit-scrollbar {
  height: 16px;
}
.crm-kanban-board::-webkit-scrollbar-track {
  background: #edf1ef;
  border-radius: 999px;
}
.crm-kanban-board::-webkit-scrollbar-thumb {
  background: #0c6639;
  border: 3px solid #edf1ef;
  border-radius: 999px;
}
.crm-kanban-board::-webkit-scrollbar-thumb:hover {
  background: #084d2c;
}
.crm-kanban-column {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-top: 4px solid var(--phase-color, #08772f);
  border-radius: 10px;
  display: grid;
  flex: 0 0 300px;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  max-width: 300px;
  min-width: 300px;
  overflow: visible;
  position: relative;
  width: 300px;
}
.crm-kanban-column header {
  align-items: center;
  background: white;
  border-bottom: 5px solid #f7faf8;
  display: flex;
  gap: 10px;
  margin-bottom: -15px;
  padding: 14px 52px 14px 14px;
  position: relative;
}
.kanban-column-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.crm-kanban-column h2 {
  font-size: 15px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-kanban-column small {
  color: var(--muted);
}
.filter-active-badge {
  background: #fff1d6;
  border-radius: 999px;
  color: #a76400;
  font-size: 11px;
  font-weight: 900;
  margin-left: 0;
  padding: 4px 7px;
  white-space: nowrap;
}
.kanban-filter {
  margin-left: 0;
  position: absolute;
  right: 14px;
  top: 14px;
}
.filter-active-badge + .kanban-filter {
  margin-left: 0;
}
.kanban-filter-toggle,
.kanban-card-toggle {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #0a5a33;
  display: inline-flex;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}
.kanban-filter-toggle.active {
  background: #e4f7eb;
  border-color: #08772f;
  color: #08772f;
}
.kanban-filter-popover {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.14);
  display: grid;
  gap: 9px;
  max-height: min(440px, calc(100vh - 24px));
  overflow-y: auto;
  padding: 12px;
  position: fixed;
  width: 260px;
  z-index: 1000;
}
.kanban-filter-popover label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}
.kanban-filter-popover input,
.kanban-filter-popover select {
  padding: 8px 9px;
}
.kanban-filter-popover fieldset {
  border: 0;
  display: grid;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
}
.kanban-filter-popover legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}
.kanban-filter-popover fieldset label {
  align-items: center;
  color: #26372f;
  display: flex;
  flex-direction: row;
  font-weight: 700;
  gap: 7px;
}
.kanban-filter-actions {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  padding-top: 10px;
}
.kanban-filter-actions button {
  padding: 8px 10px;
  width: 100%;
}
.crm-kanban-dropzone {
  align-content: start;
  display: grid;
  gap: 4px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px;
  scrollbar-color: #0c6639 #edf1ef;
  scrollbar-width: thin;
}
.crm-kanban-dropzone.drag-over {
  background: #edf7f0;
  outline: 2px dashed #08772f;
  outline-offset: -6px;
}
.crm-kanban-card {
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--phase-color, #08772f);
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.05);
  cursor: default;
  display: grid;
  gap: 8px;
  max-width: 100%;
  min-height: 50px;
  min-width: 0;
  overflow: hidden;
  padding: 8px 8px;
}
.crm-kanban-card.dragging {
  opacity: 0.55;
}
.crm-kanban-card.expanded {
  min-height: 236px;
  overflow: visible;
}
.kanban-card-head {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 32px;
  min-width: 0;
}
.drag-handle {
  align-items: center;
  background: #d9f4e2;
  border: 1px solid #9bd8b3;
  border-radius: 8px;
  color: #005d31;
  cursor: grab;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 20px;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  letter-spacing: -5px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  padding-bottom: 3px;
  padding-right: 5px;
  touch-action: none;
  user-select: none;
  width: 32px;
}
.drag-handle:hover,
.drag-handle:focus-visible {
  background: #c4eed4;
  border-color: #08772f;
  color: #004225;
  outline: none;
}
.drag-handle:active {
  cursor: grabbing;
}
.kanban-card-title {
  display: grid;
  flex: 1;
  gap: 1px;
  line-height: 1.05;
  min-width: 0;
}
.kanban-card-title a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.08;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kanban-card-title a:hover,
.kanban-card-title a:focus-visible {
  color: #08772f;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kanban-card-title small {
  color: #31443a;
  font-size: 12px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kanban-card-head strong {
  flex: 1;
  font-size: 15px;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kanban-card-province {
  align-items: center;
  background: #eef4f0;
  border-radius: 999px;
  color: #0a5a33;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  min-height: 22px;
  padding: 2px 7px;
}
.kanban-card-agent-badge {
  align-items: center;
  background: var(--agent-color, #6b46c1);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  letter-spacing: 0;
  min-width: 28px;
  padding: 0 7px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.kanban-card-toggle {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0;
  height: 28px;
  justify-content: center;
  width: 28px;
}
.kanban-card-toggle::before {
  content: "\25BE";
  font-size: 13px;
}
.kanban-card-toggle[aria-expanded="true"]::before {
  content: "\25B4";
}
.kanban-card-details {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.crm-kanban-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
.crm-kanban-card dl div {
  background: #f7faf8;
  border: 1px solid #e2ebe5;
  border-radius: 8px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
}
.crm-kanban-card dt {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}
.crm-kanban-card dd {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-kanban-card footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
  padding-top: 8px;
}
.crm-kanban-card footer > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.task-chip {
  background: #fff1d6;
  border-radius: 999px;
  color: #a76400;
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  padding: 5px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-chip.alta {
  background: #ffe2df;
  color: #d92d20;
}
.task-chip.bassa {
  background: #e9f3ff;
  color: #2474c6;
}
.task-chip.empty {
  background: #eef1ef;
  color: var(--muted);
}
.kanban-empty {
  border: 1px dashed #cdd8d2;
  border-radius: 10px;
  color: var(--muted);
  padding: 16px;
  text-align: center;
}
.kanban-more-row {
  background: #eef4f0;
  border: 1px solid #d8e5dd;
  border-radius: 8px;
  color: #0a5a33;
  font-size: 13px;
  font-weight: 900;
  padding: 10px;
  text-align: center;
}

@media (max-width: 1200px) and (min-width: 901px) {
  .agent-stat-grid,
  .agent-stat-grid-four,
  .agent-bottom-grid,
  .agent-dashboard-grid,
  .agent-lower-grid,
  .kpi-grid,
  .municipalities-kpi-grid,
  .areas-kpi-grid,
  .agents-kpi-grid,
  .phases-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .agent-dashboard-main-grid {
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lower-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-performance-panel .compact-table th,
  .admin-performance-panel .compact-table td {
    font-size: 11px;
    padding: 7px 5px;
  }
  .map-panel .province-coverage-map {
    min-height: 240px;
  }
  .map-panel .province-coverage-map svg {
    height: 235px;
  }
  .map-panel .province-map-stats {
    grid-template-columns: 1fr;
  }
  .map-panel .province-map-stats span,
  .map-panel .province-area-legend span {
    font-size: 11px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .map-panel .province-area-legend {
    grid-template-columns: 1fr;
  }
  .basin-widget {
    justify-items: center;
    grid-template-columns: 1fr;
  }
  .basin-legend {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .basin-legend span {
    font-size: 11px;
  }
  .kpi-card,
  .agent-stat-card {
    padding: 16px;
  }
  .agent-pipeline-row {
    gap: 8px;
    grid-template-columns: minmax(120px, 0.8fr) minmax(72px, 1fr) minmax(28px, max-content);
  }
  .agent-pipeline-row em {
    display: none;
  }
  .agent-pipeline-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
  .agent-pipeline-footer div:last-child {
    text-align: left;
  }
  .interest-dashboard-row {
    grid-template-columns: minmax(88px, 0.9fr) minmax(32px, max-content) minmax(52px, 1fr);
  }
  .interest-dashboard-row small {
    display: none;
  }
  .pipeline-row,
  .target-progress {
    grid-template-columns: minmax(0, 1fr) minmax(40px, max-content);
  }
  .pipeline-row .pipeline-bar,
  .pipeline-row small {
    display: none;
  }
  .analysis-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "political political"
      "context environment"
      "links signals"
      "interest freshness";
  }
  .agents-filter-panel .municipality-filters {
    align-items: end;
    grid-template-columns: repeat(3, minmax(0, 1fr)) repeat(2, 42px);
  }
  .agents-filter-panel .sort-select-field {
    grid-column: span 2;
  }
  .agents-table-panel {
    overflow: visible;
  }
  .agents-table {
    border-collapse: separate;
    border-spacing: 0 10px;
    min-width: 0;
  }
  .agents-table thead {
    display: none;
  }
  .agents-table tr,
  .agents-table td {
    display: block;
    width: 100%;
  }
  .agents-table tbody {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .agents-table tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
  }
  .agents-table td {
    align-items: center;
    border-bottom: 1px solid #edf1ef;
    display: grid;
    font-size: 12px;
    gap: 10px;
    grid-template-columns: minmax(92px, 0.55fr) minmax(0, 1fr);
    padding: 7px 0;
  }
  .agents-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }
  .agents-table td:first-child {
    grid-template-columns: 1fr;
    padding-top: 0;
  }
  .agents-table td:first-child::before {
    display: none;
  }
  .agents-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .agents-table .agent-name-cell {
    gap: 8px;
  }
  .agents-table .agent-name-cell > b {
    height: 30px;
    width: 30px;
  }
  .admin-municipalities-table-panel {
    overflow: visible;
  }
  .admin-municipalities-table-scroll {
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding-bottom: 0;
  }
  .table-scroll-hint {
    display: none;
  }
  .admin-municipalities-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 0;
  }
  .admin-municipalities-table thead {
    display: none;
  }
  .admin-municipalities-table tbody {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-municipalities-table tr,
  .admin-municipalities-table td {
    display: block;
    width: 100%;
  }
  .admin-municipalities-table th:nth-child(n),
  .admin-municipalities-table td:nth-child(n) {
    width: 100%;
  }
  .admin-municipalities-table tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
  }
  .admin-municipalities-table td {
    align-items: center;
    border-bottom: 1px solid #edf1ef;
    display: grid;
    font-size: 12px;
    gap: 8px;
    grid-template-columns: minmax(82px, 0.42fr) minmax(0, 1fr);
    padding: 6px 0;
  }
  .admin-municipalities-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .admin-municipalities-table td:first-child {
    display: none;
  }
  .admin-municipalities-table td:nth-child(2) {
    background: transparent;
    left: auto;
    position: static;
    z-index: auto;
  }
  .admin-municipalities-table td:nth-child(2)::before {
    display: none;
  }
  .admin-municipalities-table td:nth-child(2) {
    grid-template-columns: 1fr;
    padding-top: 0;
  }
  .admin-municipalities-table .municipality-name-cell {
    gap: 0;
  }
  .admin-municipalities-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .admin-municipalities-table .table-row-select,
  .admin-municipalities-table .next-action-pill {
    font-size: 12px;
    min-height: 34px;
    padding: 6px 8px;
  }
  .admin-municipalities-table .row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .topbar, .section-head, .filters, .inline-form { flex-direction: column; align-items: stretch; }
  .topbar form { margin-left: 0; }
  .login, .split, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .area-summary { grid-template-columns: 1fr; }
  .bulk-grid, .active-region-head { grid-template-columns: 1fr; }
  .table-head, .selection-toolbar { align-items: stretch; flex-direction: column; }
  .admin-shell,
  .kpi-grid,
  .top-grid,
  .lower-grid,
  .admin-config-grid,
  .task-kanban,
  .areas-kpi-grid,
  .areas-management-grid,
  .quick-steps,
  .inline-create-area,
  .area-detail-summary,
  .area-detail-grid,
  .area-assignment-head,
  .area-assignment-grid,
  .municipalities-kpi-grid,
  .municipality-filters,
  .pipeline-kpis,
  .phases-kpi-grid,
  .agent-kpi-grid,
  .agent-stat-grid,
  .agent-dashboard-main-grid,
  .agent-bottom-grid,
  .agent-dashboard-grid,
  .agent-lower-grid,
  .agent-detail-grid,
  .admin-agent-detail-grid,
  .agent-task-kanban,
  .municipality-topbar,
  .municipality-overview-grid,
  .municipality-form-grid,
  .analysis-layout-grid,
  .analysis-role-row,
  .analysis-form-grid.two,
  .form-grid-2,
  .tab-two-col,
  .tab-three-col,
  .mini-kpi-grid,
  .activity-kpis,
  .table-filter-row,
  .contact-detail-grid,
  .history-dashboard,
  .notes-layout,
  .inline-contact-form,
  .appointment-highlight > div,
  .history-list article,
  .settings-grid,
  .pipeline-config-grid,
  .settings-fields,
  .pipeline-help {
    grid-template-columns: 1fr;
  }
  .admin-performance-panel {
    grid-column: auto;
  }
  .agents-filter-panel .municipality-filters {
    grid-template-columns: 1fr 1fr;
  }
  .agents-filter-panel .municipality-filters label,
  .agents-filter-panel .sort-select-field {
    grid-column: 1 / -1;
  }
  .agents-filter-panel .municipality-filters button,
  .agents-filter-panel .municipality-filters .button-secondary {
    justify-self: start;
  }
  .agents-table-panel {
    overflow: visible;
  }
  .agents-table {
    border-collapse: separate;
    border-spacing: 0 10px;
    min-width: 0;
  }
  .agents-table thead {
    display: none;
  }
  .agents-table tbody,
  .agents-table tr,
  .agents-table td {
    display: block;
    width: 100%;
  }
  .agents-table tbody {
    display: grid;
    gap: 12px;
  }
  .agents-table tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
  }
  .agents-table td {
    align-items: center;
    border-bottom: 1px solid #edf1ef;
    display: grid;
    font-size: 12px;
    gap: 10px;
    grid-template-columns: minmax(92px, 0.55fr) minmax(0, 1fr);
    padding: 7px 0;
  }
  .agents-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }
  .agents-table td:first-child {
    grid-template-columns: 1fr;
    padding-top: 0;
  }
  .agents-table td:first-child::before {
    display: none;
  }
  .agents-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .agents-table .agent-name-cell {
    gap: 8px;
  }
  .agents-table .agent-name-cell > b {
    height: 30px;
    width: 30px;
  }
  .admin-municipalities-table-panel {
    overflow: visible;
  }
  .admin-municipalities-table-scroll {
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding-bottom: 0;
  }
  .table-scroll-hint {
    display: none;
  }
  .admin-municipalities-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 0;
  }
  .admin-municipalities-table thead {
    display: none;
  }
  .admin-municipalities-table tbody,
  .admin-municipalities-table tr,
  .admin-municipalities-table td {
    display: block;
    width: 100%;
  }
  .admin-municipalities-table th:nth-child(n),
  .admin-municipalities-table td:nth-child(n) {
    width: 100%;
  }
  .admin-municipalities-table tbody {
    display: grid;
    gap: 12px;
  }
  .admin-municipalities-table tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
  }
  .admin-municipalities-table td {
    align-items: center;
    border-bottom: 1px solid #edf1ef;
    display: grid;
    font-size: 12px;
    gap: 8px;
    grid-template-columns: minmax(86px, 0.44fr) minmax(0, 1fr);
    padding: 6px 0;
  }
  .admin-municipalities-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .admin-municipalities-table td:first-child {
    display: none;
  }
  .admin-municipalities-table td:nth-child(2) {
    background: transparent;
    grid-template-columns: 1fr;
    left: auto;
    padding-top: 0;
    position: static;
    z-index: auto;
  }
  .admin-municipalities-table td:nth-child(2)::before {
    display: none;
  }
  .admin-municipalities-table .municipality-name-cell {
    gap: 0;
  }
  .admin-municipalities-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .admin-municipalities-table .table-row-select,
  .admin-municipalities-table .next-action-pill {
    font-size: 12px;
    min-height: 34px;
    padding: 6px 8px;
  }
  .admin-municipalities-table .row-actions {
    justify-content: flex-start;
  }
  .analysis-layout-grid {
    grid-template-areas:
      "political"
      "context"
      "environment"
      "links"
      "signals"
      "interest"
      "freshness";
  }
  .freshness-grid {
    grid-template-columns: 1fr;
  }
  .analysis-links-card .analysis-links-list,
  .interest-segment-grid {
    grid-template-columns: 1fr;
  }
  .admin-shell {
    padding-left: 0;
  }
  .assignment-column,
  .quick-steps > div {
    border-right: 0;
  }
  .admin-sidebar {
    height: auto;
    min-height: auto;
    position: static;
    width: auto;
  }
  .admin-hero,
  .admin-actions,
  .municipality-profile-card,
  .municipality-profile-main,
  .municipality-profile-actions,
  .panel-title-row,
  .pipeline-panel-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  .agent-shell {
    padding-left: 220px;
  }
  .agent-shell .agent-sidebar {
    height: 100vh;
    min-height: 100vh;
    left: 0;
    overflow: hidden;
    position: fixed;
    top: 0;
    width: 220px;
  }
}

.agent-task-card.appointment-card-inline {
  border-left-color: #7046c8;
  background: #fbf7ff;
}
.agent-task-card.appointment-card-inline em {
  background: #e5d8ff;
  color: #7046c8;
}
.kanban-agent-controls {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 16px;
}
.kanban-agent-controls form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.kanban-recent-days-field {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
}
.kanban-recent-days-field select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  min-height: 38px;
  min-width: 150px;
  padding: 7px 10px;
  width: auto;
}
.kanban-recent-days-field select:disabled {
  background: #eef1ef;
  color: #8a958f;
  cursor: not-allowed;
  opacity: 0.72;
}
.switch-line {
  align-items: center;
  display: inline-flex;
  gap: 9px;
  font-weight: 900;
}
.switch-line input {
  accent-color: #0a6b3c;
  width: auto;
}
.kanban-agent-controls small {
  color: var(--muted);
}
.workflow-suggestion-modal {
  align-items: center;
  background: rgba(12, 28, 20, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 200;
}
.workflow-suggestion-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
  display: grid;
  gap: 14px;
  max-width: 460px;
  padding: 22px;
  position: relative;
  width: 100%;
}
.workflow-suggestion-card > strong {
  font-size: 20px;
}
.workflow-suggestion-card p {
  color: var(--muted);
}
.workflow-suggestion-card form {
  display: grid;
  gap: 12px;
}
.workflow-suggestion-card label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 6px;
}
.modal-close {
  background: #eef4f0;
  border: 0;
  border-radius: 999px;
  color: #31443a;
  height: 30px;
  padding: 0;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 30px;
}
.calendar-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.55fr);
}
.calendar-layout-reversed {
  align-items: start;
  grid-template-columns: minmax(420px, 0.95fr) minmax(360px, 0.75fr);
}
.calendar-agenda-panel,
.calendar-mini-panel {
  display: grid;
  gap: 16px;
}
.calendar-main-panel {
  align-content: start;
}
.calendar-range-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.calendar-range-tabs .button-secondary {
  justify-content: center;
  min-height: 40px;
  padding: 9px 10px;
  text-align: center;
}
.calendar-range-tabs .button-secondary.active {
  background: #0c6639;
  border-color: #0c6639;
  color: white;
}
.calendar-agenda-list {
  display: grid;
  gap: 18px;
}
.calendar-agenda-list section {
  display: grid;
  gap: 9px;
}
.calendar-agenda-day-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.calendar-agenda-day-grid.single-column {
  grid-template-columns: 1fr;
}
.calendar-agenda-list h3 {
  color: #536678;
  font-size: 14px;
  text-transform: capitalize;
}
.calendar-agenda-item {
  align-items: center;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-left: 5px solid #7046c8;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 58px minmax(0, 1fr) auto 36px;
  padding: 10px 12px;
}
.calendar-appointment-card {
  align-items: start;
}
.calendar-appointment-toggle {
  align-self: center;
  justify-self: end;
}
.calendar-appointment-details {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  padding-top: 10px;
}
.calendar-appointment-details[hidden] {
  display: none;
}
.calendar-appointment-details dl {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}
.calendar-appointment-details dl div {
  background: white;
  border: 1px solid #dce8e1;
  border-radius: 8px;
  display: grid;
  gap: 2px;
  padding: 8px;
}
.calendar-appointment-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.calendar-appointment-details dd {
  font-size: 13px;
  font-weight: 800;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-appointment-card > span a {
  display: inline-flex;
  min-width: 0;
}
.calendar-appointment-card > span strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-agenda-item time {
  color: #7046c8;
  font-weight: 900;
}
.calendar-agenda-item span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.calendar-agenda-item small,
.calendar-agenda-item em {
  color: var(--muted);
  font-style: normal;
}
.calendar-appointment-notes {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  padding-top: 10px;
}
.calendar-appointment-notes label {
  display: grid;
  gap: 5px;
}
.calendar-appointment-notes label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.calendar-appointment-notes textarea,
.agent-contacts-table textarea[data-appointment-notes-input] {
  min-height: 62px;
  resize: vertical;
}
.calendar-day-dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(12, 35, 24, 0.22);
  max-height: min(86vh, 840px);
  max-width: min(1080px, calc(100vw - 36px));
  padding: 22px;
  width: min(1080px, calc(100vw - 36px));
}
.calendar-day-dialog::backdrop {
  background: rgba(12, 35, 24, 0.34);
}
.dialog-close-form {
  margin: 0;
  position: absolute;
  right: 18px;
  top: 18px;
}
.calendar-day-dialog-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  margin-top: 16px;
}
.calendar-day-appointments {
  display: grid;
  gap: 12px;
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 6px;
}
.calendar-new-appointment-form {
  align-self: start;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 14px;
}
.calendar-new-appointment-form h3 {
  margin: 0;
}
.calendar-new-appointment-form label {
  color: #31443a;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 5px;
}
.calendar-new-appointment-form input,
.calendar-new-appointment-form select,
.calendar-new-appointment-form textarea {
  width: 100%;
}
.autosave-status {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.autosave-status[data-state="dirty"] {
  color: #a76400;
}
.autosave-status[data-state="saving"] {
  color: #1f6fb2;
}
.autosave-status[data-state="saved"] {
  color: #08772f;
}
.autosave-status[data-state="error"] {
  color: #dc2626;
}
.autosave-status.compact {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 0;
  height: 30px;
  justify-content: center;
  margin: 0;
  min-height: 30px;
  width: 30px;
  white-space: nowrap;
}
.autosave-status.compact::before {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}
.autosave-status.compact[data-state="saved"]::before {
  color: #08772f;
  content: "\2713";
}
.autosave-status.compact[data-state="dirty"]::before {
  color: #f59e0b;
  content: "\270E";
}
.autosave-status.compact[data-state="saving"]::before {
  animation: autosavePulse 0.8s ease-in-out infinite alternate;
  color: #1f6fb2;
  content: "\21BB";
}
.autosave-status.compact[data-state="error"]::before {
  color: #dc2626;
  content: "!";
}
@keyframes autosavePulse {
  from { opacity: 0.55; }
  to { opacity: 1; }
}
.calendar-mini-grid {
  display: grid;
  gap: 10px;
}
.agent-month-calendar {
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 12px;
  padding: 14px;
}
.agent-month-calendar-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  text-transform: capitalize;
}
.agent-month-calendar-header > div {
  display: grid;
  gap: 2px;
}
.agent-month-calendar-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.calendar-month-controls {
  align-items: center;
  display: flex;
  gap: 7px;
}
.calendar-month-controls .icon-action {
  height: 34px;
  width: 34px;
}
.agent-month-weekdays,
.agent-month-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.agent-month-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}
.agent-month-day {
  align-items: center;
  aspect-ratio: 1;
  background: white;
  border: 1px solid #dce8e1;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: grid;
  justify-items: center;
  min-width: 0;
  padding: 3px;
  position: relative;
  text-align: center;
}
.agent-month-day:hover {
  border-color: #0c6639;
  box-shadow: 0 8px 20px rgba(12, 102, 57, 0.12);
}
.agent-month-day.empty {
  background: transparent;
  border-color: transparent;
}
.agent-month-day strong {
  font-size: 13px;
  line-height: 1;
}
.agent-month-day.has-events {
  border-color: #0c6639;
  box-shadow: inset 0 0 0 1px rgba(12, 102, 57, 0.12);
}
.agent-month-day.today {
  background: #e8f7ed;
}
.agent-month-day em {
  align-items: center;
  background: #0c6639;
  border-radius: 999px;
  bottom: 3px;
  color: white;
  display: inline-flex;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  height: 15px;
  justify-content: center;
  min-width: 15px;
  padding: 0 4px;
  position: absolute;
  right: 3px;
}
.calendar-mini-grid a {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}
.calendar-mini-grid strong {
  color: #0a6b3c;
}

@media (max-width: 1280px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }
  .calendar-layout-reversed {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .calendar-agenda-day-grid {
    grid-template-columns: 1fr;
  }
  .calendar-day-dialog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .materials-kpi-grid,
  .material-category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .materials-edit-grid {
    grid-template-columns: 1fr;
  }
  .materials-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .materials-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .materials-management-grid .material-category-form,
  .materials-management-grid .material-category-list {
    grid-template-columns: 1fr;
  }
  .materials-agent-workbench {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }
  .materials-agent-workbench .material-form-card {
    width: 100%;
  }
  .materials-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .materials-kpi-grid,
  .material-category-list,
  .materials-edit-grid,
  .materials-management-grid,
  .materials-card-grid,
  .material-form-row,
  .materials-filters,
  .material-category-form,
  .material-edit-form,
  .agent-featured-materials {
    grid-template-columns: 1fr;
  }
  .materials-agent-workbench {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }
  .materials-agent-workbench .material-form-card {
    width: 100%;
  }
  .materials-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .agent-materials-panel {
    grid-column: auto;
  }
  .material-card dl {
    grid-template-columns: 1fr;
  }
}

.print-body {
  background: #ffffff;
  color: #162019;
  font-family: Arial, Helvetica, sans-serif;
}

.municipality-print-page {
  margin: 0 auto;
  max-width: 1120px;
  padding: 28px;
}

.print-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.print-actions form {
  margin: 0;
}

.print-actions a,
.print-actions button {
  background: #0c6639;
  border: 1px solid #0c6639;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 10px 14px;
  text-decoration: none;
}

.print-actions a {
  background: #ffffff;
  color: #0c6639;
}

.print-header {
  align-items: start;
  border-bottom: 3px solid #0c6639;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 260px;
  margin-bottom: 24px;
  padding-bottom: 18px;
}

.print-header span {
  color: #0c6639;
  display: block;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.print-header h1 {
  font-size: 32px;
  line-height: 1.1;
  margin: 8px 0;
}

.print-header p,
.print-muted {
  color: #5f6c63;
  margin: 0;
}

.print-header dl {
  border: 1px solid #d8e4dc;
  border-radius: 8px;
  margin: 0;
  padding: 12px;
}

.print-header dl div,
.print-facts-grid div {
  display: grid;
  gap: 4px;
}

.print-header dt,
.print-facts-grid span {
  color: #5f6c63;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.print-header dd {
  font-weight: 800;
  margin: 0;
}

.print-section {
  break-inside: avoid;
  border: 1px solid #d8e4dc;
  border-radius: 8px;
  margin: 0 0 18px;
  padding: 16px;
}

.print-section h2 {
  font-size: 20px;
  margin: 0;
}

.print-section-title {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 0 0 12px;
}

.print-section-choice {
  align-items: center;
  color: #0c6639;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 34px;
}

.print-section-choice input {
  accent-color: #0c6639;
  cursor: pointer;
  height: 18px;
  width: 18px;
}

.print-section-choice span {
  align-items: center;
  background: #eef8f1;
  border: 1px solid #add7a4;
  border-radius: 8px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.print-section.is-print-excluded {
  opacity: 0.45;
}

.print-section h3 {
  font-size: 15px;
  margin: 0 0 6px;
}

.print-section p {
  line-height: 1.45;
}

.print-facts-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.print-facts-grid div {
  background: #f7faf8;
  border: 1px solid #d8e4dc;
  border-radius: 8px;
  padding: 10px;
}

.print-facts-grid strong {
  overflow-wrap: anywhere;
}

.print-table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}

.print-table th,
.print-table td {
  border: 1px solid #d8e4dc;
  padding: 7px;
  text-align: left;
  vertical-align: top;
}

.print-table th {
  background: #eef6f1;
  color: #415248;
  font-size: 11px;
  text-transform: uppercase;
}

.print-note {
  border: 1px solid #d8e4dc;
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 10px;
}

.print-note p {
  margin: 0 0 6px;
}

@media print {
  @page {
    margin: 4mm;
    size: A4;
  }

  html,
  body {
    height: auto;
    overflow: visible;
  }

  * {
    box-shadow: none !important;
  }

  ::-webkit-scrollbar {
    display: none;
  }

  body.print-body {
    color: #111;
    font-size: 7.2pt;
    line-height: 1.12;
  }

  .municipality-print-page {
    max-width: none;
    padding: 0;
  }

  .print-actions {
    display: none;
  }

  .print-section-choice {
    display: none;
  }

  .print-section.is-print-excluded {
    display: none;
  }

  .print-header {
    border-bottom-width: 1pt;
    gap: 5mm;
    grid-template-columns: 1fr 34mm;
    margin-bottom: 2mm;
    padding-bottom: 2mm;
  }

  .print-header h1 {
    font-size: 14pt;
    margin: 1mm 0;
  }

  .print-header p {
    font-size: 7pt;
  }

  .print-header span,
  .print-header dt,
  .print-facts-grid span {
    font-size: 6.8pt;
  }

  .print-header dl {
    border: 0;
    border-radius: 0;
    padding: 0;
  }

  .print-header dl div {
    gap: 1mm;
  }

  .print-section {
    break-inside: auto;
    border: 0;
    border-top: 0.8pt solid #cfdad3;
    border-radius: 0;
    margin-bottom: 1.6mm;
    padding: 1.6mm 0 0;
  }

  .print-section h2 {
    color: #0c6639;
    font-size: 9pt;
    margin: 0;
  }

  .print-section h3 {
    font-size: 7.8pt;
    margin-bottom: 1mm;
  }

  .print-section p {
    margin: 0.8mm 0 0;
  }

  .print-section-title {
    margin-bottom: 1mm;
  }

  .print-facts-grid {
    gap: 0.8mm;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .print-facts-grid div {
    background: #ffffff;
    border: 0.5pt solid #d8e4dc;
    border-radius: 0;
    gap: 0.4mm;
    min-height: 0;
    padding: 0.9mm 1mm;
  }

  .print-facts-grid strong {
    font-size: 7.1pt;
    line-height: 1.08;
  }

  .print-table {
    font-size: 6.4pt;
    line-height: 1.08;
    page-break-inside: auto;
  }

  .print-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-table th,
  .print-table td {
    padding: 1.2pt 1.5pt;
  }

  .print-table th {
    background: #f4f8f5;
    font-size: 5.9pt;
  }

  .print-note {
    border: 0.5pt solid #d8e4dc;
    border-radius: 0;
    margin-bottom: 1mm;
    padding: 1mm;
  }

  .print-note p {
    margin-bottom: 0.5mm;
  }
}

.municipality-column-picker {
  position: relative;
}
.municipality-column-picker summary {
  list-style: none;
}
.column-picker-trigger {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
  min-height: 42px;
  white-space: nowrap;
  width: auto;
}
.municipality-column-picker summary::-webkit-details-marker {
  display: none;
}
.municipality-column-popover {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(10, 38, 25, 0.16);
  display: grid;
  gap: 10px;
  max-height: min(420px, 70vh);
  min-width: 210px;
  overflow: auto;
  padding: 14px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 25;
}
.municipality-column-popover strong {
  font-size: 13px;
}
.municipality-column-popover label {
  align-items: center;
  display: flex;
  flex-direction: row;
  font-size: 13px;
  gap: 8px;
  white-space: nowrap;
}
.municipality-column-popover input {
  accent-color: #0c6639;
  width: auto;
}
.admin-municipalities-filter-panel .municipality-filters {
  column-gap: 12px;
  grid-template-columns: minmax(180px, 1fr) minmax(135px, 0.7fr) minmax(160px, 0.85fr) minmax(190px, 0.9fr) 42px minmax(96px, auto);
  row-gap: 14px;
}
.municipality-filter-primary-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  justify-self: end;
}
.admin-municipalities-filter-panel,
.admin-municipalities-filter-panel input,
.admin-municipalities-filter-panel select,
.admin-municipalities-filter-panel button,
.admin-municipalities-filter-panel .button-secondary {
  font-size: 12px;
}
.admin-municipalities-filter-panel .municipality-filters label,
.admin-municipalities-filter-panel .sort-select-field {
  font-size: 11px;
}
.admin-municipalities-table[hidden],
.admin-municipalities-table [hidden] {
  display: none !important;
}
.admin-municipalities-table-scroll {
  max-width: 100%;
  width: 100%;
}
.admin-municipalities-table {
  min-width: 760px;
}
.admin-municipalities-table.has-extra-columns {
  min-width: 1180px;
  width: 1180px;
}
.admin-municipalities-table.has-extra-columns th:nth-child(2),
.admin-municipalities-table.has-extra-columns td:nth-child(2) {
  width: 180px;
}
.admin-municipalities-table.has-extra-columns th:nth-child(3),
.admin-municipalities-table.has-extra-columns td:nth-child(3) {
  width: 52px;
}
.admin-municipalities-table.has-extra-columns th:nth-child(4),
.admin-municipalities-table.has-extra-columns td:nth-child(4) {
  width: 190px;
}
.admin-municipalities-table.has-extra-columns th:nth-child(5),
.admin-municipalities-table.has-extra-columns td:nth-child(5) {
  width: 180px;
}
.admin-municipalities-table.has-extra-columns th:nth-child(6),
.admin-municipalities-table.has-extra-columns td:nth-child(6) {
  width: 58px;
}
.admin-municipalities-table.has-extra-columns th:nth-child(7),
.admin-municipalities-table.has-extra-columns td:nth-child(7) {
  width: 190px;
}
.admin-municipalities-table.has-extra-columns th:nth-child(8),
.admin-municipalities-table.has-extra-columns td:nth-child(8) {
  width: 165px;
}
.admin-municipalities-table.has-extra-columns th:nth-child(9),
.admin-municipalities-table.has-extra-columns td:nth-child(9) {
  width: 85px;
}
.admin-municipalities-table.has-extra-columns th:nth-child(10),
.admin-municipalities-table.has-extra-columns td:nth-child(10) {
  width: 80px;
}
.admin-municipalities-table th:nth-child(2) {
  left: auto;
  z-index: 3;
}
.admin-municipalities-table td:nth-child(2) {
  left: auto;
  position: static;
  z-index: auto;
}
.admin-table-scroll-rail {
  background: #e6eeea;
  border-radius: 999px;
  height: 12px;
  margin: 0 0 10px;
  overflow: hidden;
  position: relative;
  touch-action: none;
}
.admin-table-scroll-rail[hidden] {
  display: none;
}
.admin-table-scroll-rail span {
  background: #0c6639;
  border-radius: inherit;
  cursor: grab;
  display: block;
  height: 100%;
  min-width: 44px;
  transform: translateX(0);
}
.admin-table-scroll-rail span:active {
  cursor: grabbing;
}

@media (max-width: 1200px) {
  .admin-municipalities-filter-panel .municipality-filters {
    gap: 10px;
    grid-template-columns: minmax(120px, 0.9fr) minmax(116px, 0.7fr) minmax(132px, 0.75fr) minmax(150px, 0.8fr) 34px minmax(78px, auto);
  }
  .admin-municipalities-filter-panel .sort-select-field select {
    min-width: 0;
  }
  .admin-municipalities-filter-panel .municipality-filters button,
  .admin-municipalities-filter-panel .municipality-filters .button-secondary,
  .admin-municipalities-filter-panel .municipality-column-picker summary,
  .admin-municipalities-filter-panel .municipality-advanced-filter summary {
    min-height: 34px;
    padding: 7px 9px;
  }
  .admin-municipalities-filter-panel,
  .admin-municipalities-filter-panel input,
  .admin-municipalities-filter-panel select,
  .admin-municipalities-filter-panel button,
  .admin-municipalities-filter-panel .button-secondary {
    font-size: 11px;
  }
  .admin-municipalities-filter-panel .municipality-filters label,
  .admin-municipalities-filter-panel .sort-select-field {
    font-size: 10px;
  }
  .admin-municipalities-table-scroll {
    display: block;
    max-height: none;
    min-height: 0;
    overflow-x: scroll;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .admin-municipalities-table-scroll::-webkit-scrollbar {
    height: 10px;
  }
  .admin-municipalities-table-scroll::-webkit-scrollbar-track {
    background: #e6eeea;
    border-radius: 999px;
  }
  .admin-municipalities-table-scroll::-webkit-scrollbar-thumb {
    background: #0c6639;
    border-radius: 999px;
  }
  .admin-municipalities-table,
  .admin-municipalities-table thead,
  .admin-municipalities-table tbody,
  .admin-municipalities-table tr,
  .admin-municipalities-table th,
  .admin-municipalities-table td {
    display: revert;
  }
  .admin-municipalities-table {
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 11px;
    min-width: 0;
    table-layout: fixed;
    width: 100%;
  }
  .admin-municipalities-table.has-extra-columns {
    min-width: 1060px;
    width: 1060px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(2),
  .admin-municipalities-table.has-extra-columns td:nth-child(2) {
    width: 150px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(3),
  .admin-municipalities-table.has-extra-columns td:nth-child(3) {
    width: 44px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(4),
  .admin-municipalities-table.has-extra-columns td:nth-child(4) {
    width: 170px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(5),
  .admin-municipalities-table.has-extra-columns td:nth-child(5) {
    width: 155px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(6),
  .admin-municipalities-table.has-extra-columns td:nth-child(6) {
    width: 50px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(7),
  .admin-municipalities-table.has-extra-columns td:nth-child(7) {
    width: 180px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(8),
  .admin-municipalities-table.has-extra-columns td:nth-child(8) {
    width: 150px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(9),
  .admin-municipalities-table.has-extra-columns td:nth-child(9) {
    width: 78px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(10),
  .admin-municipalities-table.has-extra-columns td:nth-child(10) {
    width: 83px;
  }
  .admin-municipalities-table th,
  .admin-municipalities-table td {
    font-size: 11px;
    padding: 7px 4px;
    vertical-align: middle;
  }
  .admin-municipalities-table td::before {
    content: none;
  }
  .admin-municipalities-table th:nth-child(1),
  .admin-municipalities-table td:nth-child(1) {
    display: none;
  }
  .admin-municipalities-table th:nth-child(2),
  .admin-municipalities-table td:nth-child(2) {
    background: white;
    width: 21%;
  }
  .admin-municipalities-table th:nth-child(3),
  .admin-municipalities-table td:nth-child(3) {
    width: 6%;
  }
  .admin-municipalities-table th:nth-child(4),
  .admin-municipalities-table td:nth-child(4) {
    width: 25%;
  }
  .admin-municipalities-table th:nth-child(5),
  .admin-municipalities-table td:nth-child(5) {
    width: 17%;
  }
  .admin-municipalities-table th:nth-child(6),
  .admin-municipalities-table td:nth-child(6) {
    text-align: center;
    width: 6%;
  }
  .admin-municipalities-table th:nth-child(7),
  .admin-municipalities-table td:nth-child(7) {
    width: 24%;
  }
  .admin-municipalities-table th:nth-child(8),
  .admin-municipalities-table td:nth-child(8) {
    width: 16%;
  }
  .admin-municipalities-table th:nth-child(9),
  .admin-municipalities-table td:nth-child(9) {
    width: 9%;
  }
  .admin-municipalities-table th:nth-child(10),
  .admin-municipalities-table td:nth-child(10) {
    width: 10%;
  }
  .admin-municipalities-table .municipality-name-cell {
    gap: 0;
  }
  .admin-municipalities-table .municipality-row-link strong,
  .admin-municipalities-table .municipality-name-cell small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .admin-municipalities-table td:nth-child(4) {
    display: table-cell;
    line-height: 1.2;
    overflow: visible;
    overflow-wrap: normal;
    text-overflow: clip;
    white-space: normal;
    word-break: normal;
  }
  .admin-municipalities-table .table-row-select,
  .admin-municipalities-table .next-action-pill {
    font-size: 11px;
    min-height: 30px;
    min-width: 0;
    padding: 5px 7px;
    width: 100%;
  }
  .admin-municipalities-table .next-action-pill {
    display: block;
  }
  .admin-municipalities-table .row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .municipalities-results-toolbar {
    align-items: flex-start;
  }
  .municipalities-results-toolbar .column-picker-trigger {
    min-height: 32px;
    padding: 6px 8px;
  }
  .admin-municipalities-filter-panel .municipality-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 34px minmax(78px, auto);
  }
  .admin-municipalities-filter-panel .municipality-filters label,
  .admin-municipalities-filter-panel .sort-select-field {
    grid-column: span 2;
  }
  .municipality-filter-primary-actions {
    grid-column: 4;
  }
  .admin-municipalities-filter-panel,
  .admin-municipalities-filter-panel input,
  .admin-municipalities-filter-panel select,
  .admin-municipalities-filter-panel button,
  .admin-municipalities-filter-panel .button-secondary {
    font-size: 10px;
  }
  .admin-municipalities-filter-panel .municipality-filters label,
  .admin-municipalities-filter-panel .sort-select-field {
    font-size: 9.5px;
  }
  .admin-municipalities-table {
    font-size: 10px;
    min-width: 0;
    width: 100%;
  }
  .admin-municipalities-table.has-extra-columns {
    min-width: 1120px;
    width: 1120px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(2),
  .admin-municipalities-table.has-extra-columns td:nth-child(2) {
    width: 150px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(3),
  .admin-municipalities-table.has-extra-columns td:nth-child(3) {
    width: 45px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(4),
  .admin-municipalities-table.has-extra-columns td:nth-child(4) {
    width: 180px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(5),
  .admin-municipalities-table.has-extra-columns td:nth-child(5) {
    width: 170px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(6),
  .admin-municipalities-table.has-extra-columns td:nth-child(6) {
    width: 50px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(7),
  .admin-municipalities-table.has-extra-columns td:nth-child(7) {
    width: 180px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(8),
  .admin-municipalities-table.has-extra-columns td:nth-child(8) {
    width: 160px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(9),
  .admin-municipalities-table.has-extra-columns td:nth-child(9) {
    width: 85px;
  }
  .admin-municipalities-table.has-extra-columns th:nth-child(10),
  .admin-municipalities-table.has-extra-columns td:nth-child(10) {
    width: 100px;
  }
  .admin-municipalities-table th:nth-child(2),
  .admin-municipalities-table td:nth-child(2) {
    width: 22%;
  }
  .admin-municipalities-table th:nth-child(3),
  .admin-municipalities-table td:nth-child(3) {
    width: 5%;
  }
  .admin-municipalities-table th:nth-child(4),
  .admin-municipalities-table td:nth-child(4) {
    width: 27%;
  }
  .admin-municipalities-table th:nth-child(6),
  .admin-municipalities-table td:nth-child(6) {
    width: 5%;
  }
  .admin-municipalities-table th:nth-child(7),
  .admin-municipalities-table td:nth-child(7) {
    width: 25%;
  }
  .admin-municipalities-table th:nth-child(10),
  .admin-municipalities-table td:nth-child(10) {
    width: 16%;
  }
  .admin-municipalities-table th,
  .admin-municipalities-table td {
    font-size: 10px;
    padding: 6px 3px;
  }
  .admin-municipalities-table .table-row-select,
  .admin-municipalities-table .next-action-pill {
    font-size: 10px;
    min-height: 28px;
    padding: 4px 6px;
  }
  .municipality-column-popover {
    left: auto;
    right: 0;
  }
}
