:root {
  color-scheme: light;
  --bg: #fff7f2;
  --surface: #ffffff;
  --surface-2: #f4f1ee;
  --ink: #191919;
  --muted: #6f6865;
  --line: #e5e5e5;
  --green: #ff6e2f;
  --green-2: #fde5d7;
  --blue: #191919;
  --blue-2: #e5e5e5;
  --amber: #b94b20;
  --amber-2: #fff0e7;
  --red: #a63a32;
  --red-2: #fff1ed;
  --shadow: 0 18px 48px rgba(25, 25, 25, 0.12);
  font-family:
    Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  background: #fff8f3;
}

.login-visual {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100%;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 56px;
  background:
    linear-gradient(90deg, rgba(18, 42, 30, 0.9) 0%, rgba(18, 42, 30, 0.6) 42%, rgba(18, 42, 30, 0.18) 100%),
    linear-gradient(180deg, rgba(242, 89, 24, 0.26) 0%, rgba(242, 89, 24, 0.08) 38%, rgba(18, 42, 30, 0.42) 100%),
    url("hero-horeca-sales.png");
  background-position: center;
  background-size: cover;
  color: #fff;
}

.login-visual::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 34%;
  background: linear-gradient(rgba(255, 248, 243, 0), rgba(31, 48, 38, 0.78));
  content: "";
}

.login-visual > * {
  position: relative;
}

.brand-mark {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: #ff6e2f;
  box-shadow: 0 10px 26px rgba(25, 25, 25, 0.18);
  object-fit: contain;
}

.login-visual .brand-mark {
  gap: 14px;
  padding: 8px 16px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #183d2b;
  box-shadow: 0 18px 42px rgba(36, 42, 34, 0.18);
}

.login-visual .brand-mark img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  box-shadow: none;
}

.app-brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: none;
}

.app-brand span {
  color: #191919;
  line-height: 1.1;
}

.login-hero-copy {
  display: grid;
  max-width: 720px;
  gap: 14px;
}

.login-kicker {
  color: #fff0df;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.login-hero-copy h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(44px, 6.4vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 14px 34px rgba(18, 36, 29, 0.24);
}

.login-hero-copy p {
  max-width: 560px;
  margin: 0;
  color: #fff7ed;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: linear-gradient(180deg, #fffaf7 0%, #ffffff 100%);
}

.login-card {
  width: min(100%, 360px);
  padding: 28px;
  border: 1px solid #f3d7c7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 56px rgba(45, 39, 32, 0.1);
}

.login-card h2,
.view-title h1 {
  margin: 0;
  font-family: "DM Sans", Poppins, Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.muted {
  color: var(--muted);
}

.form-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span,
.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

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

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(255, 110, 47, 0.18);
}

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

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

.btn.ghost {
  border: 1px solid var(--line);
  background: transparent;
}

.btn.danger {
  background: var(--red-2);
  color: var(--red);
}

.btn.danger-text {
  color: var(--red);
}

.btn.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.btn.icon {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

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

.sidebar {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, #ffffff 0%, #ffffff 62%, #fff7f2 100%);
  padding: 22px;
  position: sticky;
  top: 0;
}

.nav {
  display: grid;
  gap: 14px;
}

.nav-section {
  display: grid;
  gap: 7px;
}

.nav-section + .nav-section {
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.nav-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8b7a74;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.nav-section-title::after {
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--line) 74%, transparent);
  content: "";
}

.nav-section-items {
  display: grid;
  gap: 4px;
}

.nav button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
  padding: 8px 10px;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.nav button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.nav button .nav-icon {
  display: inline-grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-2) 76%, #fff);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.nav button.active {
  background: linear-gradient(90deg, var(--green-2), #fff9f6);
  color: var(--green);
  box-shadow: inset 3px 0 0 var(--green);
}

.nav button.active .nav-icon {
  border-color: color-mix(in srgb, var(--green) 28%, transparent);
  background: #fff;
  color: var(--green);
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.user-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--bg);
}

.user-pill strong,
.user-pill span {
  display: block;
}

.user-pill span {
  color: var(--muted);
  font-size: 12px;
}

.main {
  min-width: 0;
  overflow-x: hidden;
  padding: 28px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.view-title {
  display: grid;
  gap: 5px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 10px;
}

.agent-picker {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
}

.agent-picker span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.agent-picker select {
  min-width: 170px;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  font-weight: 800;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid > *,
.planning-layout > *,
.route-layout > *,
.interaction-layout > * {
  min-width: 0;
}

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

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

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.metric,
.table-wrap,
.drawer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(25, 25, 25, 0.035);
  min-width: 0;
}

.panel {
  padding: 18px;
}

.panel h2,
.panel h3 {
  margin: 0 0 14px;
  letter-spacing: 0;
}

.metric {
  display: grid;
  min-height: 112px;
  align-content: space-between;
  padding: 16px;
  border-top: 3px solid var(--green-2);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric strong {
  font-size: 34px;
  letter-spacing: 0;
}

.metric.small {
  min-height: 86px;
  padding: 12px;
}

.metric.small strong {
  font-size: 24px;
}

.compact-metrics {
  margin-top: 10px;
}

.liquidation-bonus-panel {
  margin-top: 16px;
}

.liquidation-top-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.liquidation-top-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.liquidation-top-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.birthday-panel {
  margin-top: 16px;
  border-color: #f6cdbb;
  background: linear-gradient(135deg, #fff2ea 0%, #ffffff 72%);
}

.birthday-list {
  display: grid;
  gap: 10px;
}

.birthday-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.birthday-date-badge {
  display: grid;
  min-width: 74px;
  gap: 2px;
  border-radius: 7px;
  background: var(--amber-2);
  color: var(--amber);
  padding: 8px 10px;
  text-align: center;
}

.birthday-item.today .birthday-date-badge {
  background: var(--green-2);
  color: var(--green);
}

.birthday-date-badge strong {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.birthday-date-badge span {
  font-size: 12px;
  font-weight: 800;
}

.birthday-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.birthday-main strong,
.birthday-main span {
  overflow-wrap: anywhere;
}

.filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(130px, 180px)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.client-filters {
  grid-template-columns: minmax(180px, 1fr) repeat(4, minmax(130px, 180px)) auto;
}

.evidence-filters {
  grid-template-columns: minmax(190px, 1fr) minmax(140px, 170px) minmax(190px, 230px) minmax(130px, 160px) minmax(110px, 140px) auto;
}

.market-filters {
  grid-template-columns: minmax(130px, 170px) minmax(190px, 1fr) minmax(150px, 190px) minmax(150px, 190px) minmax(190px, 230px) auto;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

td.actions {
  width: 1%;
  white-space: nowrap;
}

td input {
  width: 100%;
  min-width: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
}

.compact-table table {
  min-width: 640px;
}

.kpi-table {
  min-width: 760px;
  table-layout: fixed;
}

.kpi-col-nr {
  width: 44px;
}

.kpi-col-number {
  width: 112px;
}

.kpi-col-percent {
  width: 96px;
}

.kpi-table th,
.kpi-table td {
  padding: 8px 10px;
  font-size: 13px;
}

.kpi-indicator-cell {
  min-width: 0;
}

.kpi-number-cell input {
  min-width: 0;
  padding: 6px 8px;
  font-size: 14px;
}

.kpi-indicator-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  outline: none;
  padding: 7px 9px;
  resize: vertical;
}

.kpi-indicator-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(255, 110, 47, 0.18);
}

td input[readonly],
td textarea[readonly] {
  background: var(--surface-2);
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.status.active,
.status.good {
  background: var(--green-2);
  color: var(--green);
}

.status.inactive {
  background: var(--red-2);
  color: var(--red);
}

.status.neutral {
  background: var(--blue-2);
  color: var(--blue);
}

.status.warn {
  background: var(--amber-2);
  color: var(--amber);
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 800;
}

.day-option {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.day-segmented {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.day-segmented button {
  min-width: 0;
  border-right: 1px solid var(--line);
  line-height: 1.05;
  padding: 7px 6px;
}

.day-segmented .day-option {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 2px;
}

.day-date {
  font-size: 11px;
  font-weight: 900;
  opacity: 0.78;
}

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

.segmented button.active {
  background: var(--green);
  color: #fff;
}

.week-segmented {
  display: flex;
  flex-wrap: wrap;
  overflow: visible;
}

.campaign-segmented {
  display: flex;
  flex-wrap: wrap;
  overflow: visible;
}

.systemic-tabs {
  margin: 12px 0 16px;
}

.activation-editor-form {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.activation-products-table table {
  min-width: 940px;
}

.activation-rules-panel {
  margin-top: 16px;
}

.activation-rules-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.45;
}

.activation-rules-list li::marker {
  color: var(--orange);
}

.activation-matrix-panel .panel-head {
  align-items: flex-start;
  gap: 12px;
}

.activation-matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.matrix-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 4px;
  border-radius: 999px;
}

.matrix-legend-dot.activated {
  background: #47a268;
}

.matrix-legend-dot.proposed {
  background: #f6c75f;
}

.activation-matrix-scroll {
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.activation-matrix-grid {
  min-width: 1280px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.activation-matrix-grid th,
.activation-matrix-grid td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.15;
  vertical-align: middle;
}

.activation-matrix-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  min-width: 118px;
  width: 118px;
  background: #fff8f3;
  color: var(--muted);
  text-transform: none;
}

.activation-matrix-grid thead th span {
  display: block;
  max-height: 38px;
  overflow: hidden;
}

.activation-matrix-grid thead th:first-child,
.activation-matrix-grid tbody th {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 260px;
  min-width: 260px;
  background: #fff;
  text-align: left;
}

.activation-matrix-grid thead th:first-child {
  z-index: 5;
  background: #fff8f3;
}

.activation-matrix-grid tbody th span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.activation-matrix-cell {
  min-width: 118px;
  height: 34px;
  text-align: center;
  background: #fff;
}

.activation-matrix-cell span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.activation-matrix-cell.activated {
  background: #e8f5ec;
}

.activation-matrix-cell.activated span {
  color: #23633b;
  background: #ccebd6;
}

.activation-matrix-cell.proposed {
  background: #fff5d8;
}

.activation-matrix-cell.proposed span {
  color: #8b5b05;
  background: #ffe6a4;
}

.activation-products-table td:nth-child(n + 2),
.activation-products-table th:nth-child(n + 2) {
  text-align: right;
}

.activation-products-editor input {
  width: 100%;
  min-width: 0;
  border-radius: 6px;
  padding: 8px;
}

.activation-products-editor td:first-child input {
  min-width: 220px;
}

.activation-bulk-import {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.activation-bulk-import textarea {
  min-height: 86px;
  font-family: inherit;
}

.activation-products-editor td:last-child,
.activation-products-editor th:last-child {
  width: 48px;
  text-align: center;
}

.activation-editor-actions,
.activation-agent-total {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.activation-agent-total {
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.activation-agent-total strong {
  color: var(--ink);
  font-size: 22px;
}

.week-segmented button {
  min-width: min(100%, 144px);
  flex: 0 1 144px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  line-height: 1.2;
  padding: 8px 10px;
  white-space: normal;
}

.week-option {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.week-option em {
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  opacity: 0.88;
}

.campaign-segmented button {
  min-width: min(100%, 172px);
  flex: 0 1 172px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  line-height: 1.2;
  padding: 8px 10px;
  white-space: normal;
}

.week-segmented button:last-child {
  border-right: 1px solid var(--line);
}

.campaign-segmented button:last-child {
  border-right: 1px solid var(--line);
}

.campaign-option {
  display: grid;
  gap: 2px;
}

.campaign-option small {
  font-size: 11px;
  font-weight: 900;
  opacity: 0.76;
}

.route-layout,
.interaction-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(420px, 1.18fr);
  gap: 16px;
  align-items: start;
}

.route-coverage-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.route-coverage-panel.warning {
  border-color: rgba(255, 100, 42, 0.36);
  background: linear-gradient(180deg, #fff7f1 0%, #fff 100%);
}

.route-coverage-panel.complete {
  border-color: rgba(91, 184, 128, 0.36);
  background: linear-gradient(180deg, #f7fff9 0%, #fff 100%);
}

.route-day-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.route-day-counts span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.route-unassigned-block,
.route-duplicate-note,
.route-ok-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.route-ok-message {
  color: var(--green);
  font-weight: 900;
}

.route-unassigned-list {
  display: grid;
  max-height: 240px;
  gap: 8px;
  margin-top: 10px;
  overflow: auto;
}

.route-unassigned-client {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}

.route-unassigned-client span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.route-duplicate-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.planning-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 1fr);
  gap: 16px;
  align-items: start;
}

.panel-head,
.task-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2 {
  margin: 0 0 14px;
}

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

.list {
  display: grid;
  gap: 8px;
}

.route-item,
.client-pick,
.task-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.route-item {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
}

.route-item[draggable="true"] {
  cursor: grab;
}

.route-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  font-weight: 900;
}

.item-main {
  min-width: 0;
}

.item-main strong,
.item-main span {
  display: block;
}

.item-main span,
.route-meta {
  color: var(--muted);
  font-size: 13px;
}

.meta-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.meta-line em {
  font-style: normal;
}

.item-main .meta-line {
  display: inline-flex;
}

.city-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border: 1px solid hsl(var(--city-h) 58% 66%);
  border-radius: 999px;
  background: hsl(var(--city-h) 86% 93%);
  color: hsl(var(--city-h) 56% 26%);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  padding: 3px 8px;
  vertical-align: middle;
  white-space: normal;
}

.city-chip.compact {
  font-size: 11px;
  padding: 2px 7px;
}

.segment-chip,
.week-meta-chip,
.date-range-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  padding: 3px 8px;
  vertical-align: middle;
  white-space: normal;
}

.segment-chip {
  border: 1px solid hsl(var(--segment-h) 56% 68%);
  background: hsl(var(--segment-h) 84% 94%);
  color: hsl(var(--segment-h) 52% 27%);
}

.week-meta-chip {
  border: 1px solid hsl(var(--week-h) 58% 66%);
  background: hsl(var(--week-h) 84% 93%);
  color: hsl(var(--week-h) 54% 27%);
}

.date-range-chip {
  border: 1px solid #e7d3c6;
  background: #fff3ec;
  color: #9b421e;
}

.segment-chip.compact,
.week-meta-chip.compact,
.date-range-chip.compact {
  font-size: 11px;
  padding: 2px 7px;
}

.city-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid hsl(var(--city-h) 56% 60%);
  border-radius: 999px;
  background: hsl(var(--city-h) 78% 54%);
  box-shadow: inset 0 0 0 3px hsl(var(--city-h) 86% 93%);
}

.segment-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid hsl(var(--segment-h) 56% 60%);
  border-radius: 999px;
  background: hsl(var(--segment-h) 78% 54%);
  box-shadow: inset 0 0 0 3px hsl(var(--segment-h) 86% 93%);
}

.city-fill {
  background: hsl(var(--city-h) 68% 48%);
}

.segment-fill {
  background: hsl(var(--segment-h) 68% 48%);
}

.client-activity {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0;
}

.client-activity.compact {
  margin: 4px 0 1px;
}

.activity-chip {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  border-radius: 5px;
  background: var(--blue-2);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  padding: 3px 6px;
  white-space: normal;
}

.client-activity.compact .activity-chip {
  font-size: 10px;
  padding: 2px 5px;
}

.activity-chip.order {
  background: var(--green-2);
  color: var(--green);
}

.activity-chip.visits {
  background: var(--amber-2);
  color: var(--amber);
}

.activity-chip.empty {
  background: var(--surface-2);
  color: var(--muted);
}

.client-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.client-contact.compact {
  gap: 5px;
  margin: 6px 0 2px;
}

.client-contact .contact-badge {
  display: grid;
  flex: 1 1 150px;
  min-width: 0;
  gap: 2px;
  border: 1px solid hsl(var(--contact-h) 56% 78%);
  border-radius: 8px;
  background: hsl(var(--contact-h) 82% 95%);
  color: hsl(var(--contact-h) 48% 24%);
  line-height: 1.25;
  padding: 7px 9px;
  overflow-wrap: anywhere;
}

.client-contact.compact .contact-badge {
  flex: 1 1 112px;
  padding: 5px 7px;
}

.client-contact.compact .contact-badge.address {
  flex-basis: 100%;
}

.client-contact .contact-badge.address {
  --contact-h: 204;
}

.client-contact .contact-badge.person {
  --contact-h: 162;
}

.client-contact .contact-badge.role {
  --contact-h: 38;
}

.client-contact .contact-badge.phone {
  --contact-h: 276;
}

.client-contact .contact-badge b {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.client-contact .contact-badge span {
  color: hsl(var(--contact-h) 46% 22%);
  font-size: 12px;
  font-weight: 850;
}

.client-group-line,
.client-network-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 6px;
  background: var(--amber-2);
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  padding: 3px 7px;
}

.client-group-line {
  margin-top: 3px;
}

.client-network-pill {
  margin: 0 0 6px;
}

.contact-editor {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.contact-editor .panel-head {
  align-items: center;
}

.contact-editor h3 {
  margin: 0;
}

.contact-editor-list {
  display: grid;
  gap: 10px;
}

.contact-editor-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.contact-row-title,
.contact-notes-field {
  grid-column: 1 / -1;
}

.contact-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.contact-row-title strong {
  font-size: 14px;
}

.client-card-filters {
  margin-bottom: 16px;
}

.client-card-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.68fr) minmax(0, 1.32fr);
  gap: 16px;
  align-items: start;
}

.client-list-panel {
  display: grid;
  max-height: clamp(420px, calc(100vh - 220px), 760px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.client-list-panel .panel-head {
  margin-bottom: 10px;
}

.client-list-panel .list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.client-card-pick {
  width: 100%;
  text-align: left;
}

.client-card-profile {
  display: grid;
  gap: 16px;
}

.client-profile-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.client-profile-hero h2 {
  margin: 2px 0 6px;
  font-size: 30px;
}

.client-card-sections.grid.cols-2 {
  grid-template-columns: minmax(0, 1fr);
}

.client-info-grid,
.client-contact-card dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 8px;
}

.client-info-grid div,
.client-contact-card dl div {
  --detail-h: 156;
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
  border: 1px solid hsl(var(--detail-h) 54% 77%);
  border-radius: 8px;
  background: hsl(var(--detail-h) 78% 95%);
  color: hsl(var(--detail-h) 46% 23%);
  padding: 9px 10px;
}

.client-info-grid div:nth-child(6n + 1),
.client-contact-card dl div:nth-child(6n + 1) {
  --detail-h: 198;
}

.client-info-grid div:nth-child(6n + 2),
.client-contact-card dl div:nth-child(6n + 2) {
  --detail-h: 156;
}

.client-info-grid div:nth-child(6n + 3),
.client-contact-card dl div:nth-child(6n + 3) {
  --detail-h: 34;
}

.client-info-grid div:nth-child(6n + 4),
.client-contact-card dl div:nth-child(6n + 4) {
  --detail-h: 274;
}

.client-info-grid div:nth-child(6n + 5),
.client-contact-card dl div:nth-child(6n + 5) {
  --detail-h: 172;
}

.client-info-grid div:nth-child(6n),
.client-contact-card dl div:nth-child(6n) {
  --detail-h: 14;
}

.client-info-grid div:nth-child(3),
.client-info-grid div:nth-child(12),
.client-contact-card dl div:last-child:nth-child(6) {
  grid-column: 1 / -1;
}

.client-info-grid b,
.client-contact-card dt {
  color: hsl(var(--detail-h) 42% 33%);
  font-size: 11px;
  font-weight: 900;
}

.client-info-grid > div > span,
.client-contact-card dd {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: hsl(var(--detail-h) 48% 18%);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.client-info-grid a {
  color: hsl(var(--detail-h) 54% 28%);
  font-weight: 900;
}

.detail-pill {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border-radius: 999px;
  background: hsl(var(--detail-h) 70% 90%);
  color: hsl(var(--detail-h) 54% 24%);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.1;
  padding: 4px 8px;
  overflow-wrap: anywhere;
}

.detail-pill.good {
  background: var(--green-2);
  color: var(--green);
}

.detail-pill.inactive {
  background: var(--surface-2);
  color: var(--muted);
}

.drawer-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.location-map-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  gap: 16px;
  align-items: start;
}

.location-map-panel {
  display: grid;
  gap: 12px;
}

.panel-head.compact h3 {
  margin: 0;
}

.google-map-canvas {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f1ee;
}

.google-map-message {
  display: grid;
  height: 100%;
  min-height: 480px;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.google-map-pin {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(25, 25, 25, 0.22);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.google-info-window {
  display: grid;
  max-width: 240px;
  gap: 5px;
  color: var(--ink);
  font-family: inherit;
}

.google-info-window span {
  color: var(--muted);
}

.google-info-window a {
  color: var(--green);
  font-weight: 850;
}

.location-map-empty {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.location-list {
  display: grid;
  max-height: 640px;
  overflow: auto;
  padding-right: 4px;
  gap: 8px;
}

.location-client-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.location-client-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 950;
}

.location-client-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.location-client-main > span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.location-tags,
.location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.location-actions {
  grid-column: 2;
  margin-top: 6px;
}

.client-contact-list,
.client-history-list,
.location-sibling-list {
  display: grid;
  gap: 10px;
}

.client-contact-card,
.history-item,
.location-sibling {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.location-sibling {
  width: 100%;
  text-align: left;
}

.location-sibling:hover {
  border-color: var(--green);
  background: var(--green-2);
}

.location-sibling.active {
  border-color: var(--amber);
  background: var(--amber-2);
}

.location-sibling span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.location-sibling em {
  color: var(--amber);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.client-contact-card > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.client-contact-card strong {
  font-size: 16px;
}

.client-contact-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.history-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.history-item-head div {
  display: grid;
  gap: 2px;
}

.history-item-head span {
  color: var(--muted);
  font-size: 13px;
}

.history-flags,
.history-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.history-flags span,
.history-product {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 7px;
}

.history-flags span.good {
  background: var(--green-2);
  color: var(--green);
}

.history-product {
  background: var(--blue-2);
  color: var(--blue);
}

.history-product em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.history-item p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.client-product-matrix-panel {
  display: grid;
  gap: 12px;
}

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

.client-product-table table {
  min-width: 960px;
}

.client-product-table td strong,
.client-product-table td span {
  display: block;
}

.supplier-chip {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: var(--amber-2);
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  padding: 5px 8px;
}

.supplier-chip.owned {
  background: var(--green-2);
  color: var(--green);
}

.client-product-note-row td {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}

.market-summary-panel,
.market-detail-panel {
  display: grid;
  gap: 14px;
}

.market-charts-empty {
  display: grid;
  gap: 12px;
}

.market-charts-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
  align-items: stretch;
}

.chart-panel {
  display: grid;
  gap: 12px;
  min-height: 280px;
}

.market-donut-panel {
  align-content: start;
}

.donut-chart {
  --value: 0;
  width: min(190px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, var(--surface) 0 56%, transparent 57%),
    conic-gradient(var(--green) calc(var(--value) * 1%), var(--amber) 0);
}

.donut-chart span {
  color: var(--ink);
  font-size: 32px;
  font-weight: 900;
}

.chart-legend {
  display: grid;
  gap: 8px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chart-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.legend-good {
  background: var(--green);
}

.legend-opportunity {
  background: var(--amber);
}

.chart-bars {
  display: grid;
  gap: 12px;
  align-content: start;
}

.chart-bar-row {
  display: grid;
  gap: 6px;
}

.chart-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.chart-bar-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.chart-bar-head span,
.chart-bar-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e5e5;
}

.chart-track > i {
  display: block;
  position: relative;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--amber);
}

.chart-bar-row:not(.opportunity) .chart-track > i {
  background: #fde5d7;
}

.chart-track > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.supplier-share-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.supplier-share-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(90px, 0.8fr) auto;
  gap: 8px;
  align-items: center;
}

.supplier-share-row strong,
.supplier-share-row span {
  display: block;
}

.supplier-share-row strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.supplier-share-row span,
.supplier-share-row b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.supplier-share-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e5e5;
}

.supplier-share-track i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--amber);
}

.supplier-share-track i.owned {
  background: var(--green);
}

.market-table table {
  min-width: 980px;
}

.active-market-row td {
  background: #fff4ed;
}

.market-table td strong,
.market-table td span {
  display: block;
}

.market-coverage {
  display: grid;
  gap: 6px;
  min-width: 110px;
}

.market-coverage strong {
  font-size: 16px;
}

.market-coverage span {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e5e5;
}

.market-coverage i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.supplier-breakdown {
  display: grid;
  gap: 5px;
}

.supplier-breakdown span {
  display: grid;
  gap: 2px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--surface-2);
}

.supplier-breakdown b {
  font-size: 13px;
}

.supplier-breakdown em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.market-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.form-context-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px 12px;
}

.form-context-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.interaction-progress {
  margin: 0 0 12px;
  border: 1px solid var(--amber);
  border-radius: 8px;
  background: var(--amber-2);
  color: var(--amber);
  font-size: 14px;
  font-weight: 800;
  padding: 10px 12px;
}

.interaction-progress strong {
  font-size: 18px;
}

.interaction-progress.done {
  border-color: var(--green);
  background: var(--green-2);
  color: var(--green);
}

.interaction-client-selector {
  display: grid;
}

.interaction-client-selector summary {
  display: none;
}

.item-actions {
  display: flex;
  gap: 6px;
}

.client-pick {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.client-pick > .status {
  align-self: start;
  padding: 2px 6px;
  font-size: 10px;
}

.client-pick.active {
  border-color: var(--green);
  background: var(--green-2);
}

.routing-client-list {
  gap: 6px;
}

.routing-client-list .client-pick {
  gap: 8px;
  padding: 10px 12px;
}

.routing-client-list .item-main {
  display: grid;
  gap: 3px;
}

.routing-client-list .item-main strong {
  line-height: 1.15;
}

.routing-client-list .client-activity.compact {
  margin: 2px 0 0;
}

.interaction-card {
  display: grid;
  gap: 14px;
}

.interaction-form {
  gap: 12px;
}

.interaction-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.interaction-basic-section {
  border-color: rgba(47, 127, 85, 0.28);
  background: linear-gradient(180deg, #f7fcf8 0%, #fff 100%);
}

.interaction-campaign-section {
  background: var(--surface-2);
}

.interaction-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.interaction-section-head div {
  display: grid;
  gap: 2px;
}

.interaction-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.1;
}

.interaction-section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.interaction-basic-grid {
  gap: 10px;
}

.interaction-switch-row {
  gap: 8px;
}

.interaction-switch-row .toggle {
  min-height: 42px;
  flex: 1 1 180px;
}

.interaction-campaign-section .promo-product-grid {
  gap: 6px;
}

.interaction-campaign-section .promo-product-tile {
  grid-template-columns: minmax(140px, 1fr) minmax(128px, 0.55fr) minmax(150px, 0.9fr);
  padding: 7px 8px;
}

.interaction-campaign-section .campaign-assets-panel.compact {
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
  background: transparent;
}

.interaction-followup-section {
  background: #fff;
  padding: 0;
  overflow: hidden;
}

.interaction-followup-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.interaction-followup-section summary::-webkit-details-marker {
  display: none;
}

.interaction-followup-section summary::after {
  content: "+";
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 900;
}

.interaction-followup-section[open] summary::after {
  content: "-";
}

.interaction-followup-section summary span {
  display: grid;
  gap: 2px;
}

.interaction-followup-section summary strong {
  color: var(--ink);
  font-size: 16px;
}

.interaction-followup-section summary em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
}

.interaction-followup-fields {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.switch-row,
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle,
.check-tile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  font-weight: 800;
}

.toggle input,
.check-tile input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

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

.activation-reminder {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 100, 42, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf7 0%, #fff 100%);
  padding: 12px;
}

.activation-reminder-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.activation-reminder-head div {
  display: grid;
  gap: 2px;
}

.activation-reminder-head strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
}

.activation-reminder-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.activation-selected-count {
  border: 1px solid rgba(255, 100, 42, 0.25);
  border-radius: 999px;
  background: #fff0e8;
  color: var(--orange);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.activation-product-picker {
  display: grid;
  max-height: 190px;
  overflow: auto;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}

.activation-product-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: flex-start;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 9px;
  cursor: pointer;
}

.activation-product-option:hover {
  border-color: rgba(255, 100, 42, 0.32);
  background: #fff8f3;
}

.activation-product-option.is-selected {
  border-color: rgba(47, 127, 85, 0.38);
  background: #edf8f1;
}

.activation-product-option input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--green);
}

.activation-option-main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.activation-option-main strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  line-height: 1.15;
}

.activation-option-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.activation-option-meta em {
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 3px 6px;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.activation-rule-note {
  margin: 0;
  border-left: 3px solid var(--orange);
  padding-left: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.activation-reminder select[multiple] {
  min-height: 112px;
}

.activation-selected-summary {
  display: grid;
  gap: 8px;
}

.activation-selected-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.activation-selected-head strong {
  color: var(--ink);
  font-size: 13px;
}

.activation-selected-list {
  display: grid;
  gap: 7px;
}

.activation-selected-chip {
  display: grid;
  max-width: 100%;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  color: var(--ink);
  font-weight: 850;
}

.activation-selected-chip.is-proposed {
  border-color: rgba(194, 139, 17, 0.34);
  background: #fff8e1;
}

.activation-selected-chip.is-activated {
  border-color: rgba(47, 127, 85, 0.34);
  background: #edf8f1;
}

.activation-selected-chip em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.activation-selected-chip label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.activation-selected-chip select {
  min-height: 34px;
  padding: 5px 30px 5px 9px;
  font-size: 13px;
  font-weight: 850;
}

.activation-matrix-table table {
  min-width: 860px;
}

.activation-manual-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(130px, 0.7fr) minmax(120px, 0.65fr) auto;
  align-items: end;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  margin-bottom: 12px;
}

.activation-proposal-table table {
  min-width: 920px;
}

.activation-proposal-table select {
  min-height: 34px;
  min-width: 116px;
  padding: 5px 30px 5px 9px;
  font-size: 13px;
  font-weight: 850;
}

.compact-empty {
  min-height: auto;
  padding: 10px;
}

.promo-product-tile {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(120px, 0.85fr) minmax(128px, 0.7fr) minmax(190px, 1.25fr);
  align-items: end;
  gap: 7px;
  padding: 8px 10px;
}

.product-checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  min-width: 0;
}

.product-checkline strong {
  overflow-wrap: anywhere;
}

.promo-product-tile .product-assets {
  grid-column: 1 / -1;
}

.promo-product-tile .field {
  gap: 3px;
}

.promo-product-tile .field span {
  font-size: 11px;
}

.promo-product-tile .field input,
.promo-product-tile .field select {
  width: 100%;
  height: auto;
  min-height: 34px;
  padding: 7px 8px;
}

.promo-product-tile .field:last-child {
  min-width: 0;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  background: rgba(25, 25, 25, 0.28);
}

.drawer {
  width: min(520px, 100%);
  height: 100%;
  overflow: auto;
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 22px;
}

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

.drawer-head h2 {
  margin: 0;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar-track.compact {
  height: 8px;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.bar-fill.amber {
  background: var(--amber);
}

.bar-fill.muted {
  background: #9c948e;
}

.dashboard-city-panel .panel-head.compact {
  margin-bottom: 10px;
}

.dashboard-city-panel .panel-head.compact h2 {
  margin-bottom: 4px;
}

.dashboard-city-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.dashboard-city-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 5px 8px;
}

.dashboard-city-summary strong {
  color: var(--ink);
  font-size: 18px;
}

.dashboard-city-chart {
  display: grid;
  gap: 9px;
}

.dashboard-city-row {
  display: grid;
  gap: 5px;
}

.dashboard-city-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-city-label span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-city-label strong {
  color: var(--ink);
  font-size: 13px;
}

.city-swatch.muted {
  border-color: #d9d0c9;
  background: #9c948e;
  box-shadow: inset 0 0 0 3px #f4f0ed;
}

.segment-swatch.muted {
  border-color: #d9d0c9;
  background: #9c948e;
  box-shadow: inset 0 0 0 3px #f4f0ed;
}

.dashboard-day-list {
  display: grid;
  gap: 12px;
}

.dashboard-day-row {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.dashboard-day-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-day-head,
.dashboard-day-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-day-head strong {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0;
}

.dashboard-day-head span,
.dashboard-day-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-day-stats b {
  color: var(--ink);
}

.dashboard-progress-grid {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 42px;
  gap: 6px 8px;
  align-items: center;
}

.dashboard-progress-grid span,
.dashboard-progress-grid em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-progress-grid em {
  text-align: right;
}

.dashboard-task-list {
  max-height: min(58vh, 560px);
  overflow-y: auto;
  padding-right: 2px;
}

.dashboard-tasks-panel .panel-head {
  align-items: flex-start;
  flex-wrap: wrap;
}

.dashboard-tasks-panel .panel-head > div:first-child {
  min-width: 0;
}

.dashboard-tasks-panel .panel-head h2 {
  margin-bottom: 8px;
}

.dashboard-tasks-panel .panel-actions {
  flex: 1 1 220px;
}

.dashboard-task.due-today {
  border-color: rgba(200, 116, 32, 0.5);
  background: #fff8ed;
}

.dashboard-task.overdue {
  border-color: rgba(183, 65, 65, 0.5);
  background: #fff3f2;
}

.dashboard-task-agent {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  border: 1px solid #b9d6c6;
  border-radius: 999px;
  background: #e8f5ec;
  color: #23633b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  padding: 4px 8px;
  overflow-wrap: anywhere;
}

.product-stats-table table {
  min-width: 680px;
}

.product-stats-panel .product-stats-table {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-stats-panel .product-stats-table table {
  min-width: 760px;
}

.product-stats-panel .product-stats-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff8f3;
}

.product-stats-panel .product-stats-table td,
.product-stats-panel .product-stats-table th {
  padding: 9px 10px;
}

.product-stats-panel .product-stats-table td:first-child strong {
  font-size: 14px;
}

.stat-percent-cell {
  display: grid;
  min-width: 160px;
  gap: 6px;
}

.stat-percent-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-client-panel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.product-client-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 680px), 1fr));
  gap: 20px;
  align-items: start;
}

.systemic-panel .product-stats-table table {
  min-width: 820px;
}

.status-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.status-stat {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.status-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.status-stat strong {
  font-size: 24px;
  letter-spacing: 0;
}

.status-stat em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.product-client-group {
  display: grid;
  min-width: 0;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.product-client-group.is-promoted {
  border-color: rgba(255, 110, 47, 0.34);
  border-left: 5px solid var(--green);
  background: linear-gradient(90deg, rgba(255, 110, 47, 0.09), #fff 34%);
}

.product-client-group.is-not-promoted {
  border-color: rgba(255, 168, 46, 0.5);
  border-left: 5px solid #ffa82e;
  background: linear-gradient(90deg, rgba(255, 168, 46, 0.12), #fff 34%);
}

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-radius: 6px;
  padding: 8px 10px;
}

.product-client-group.is-promoted .group-head {
  background: var(--green-2);
  color: var(--green);
}

.product-client-group.is-not-promoted .group-head {
  background: #fff3df;
  color: #a05c00;
}

.group-head strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.group-marker {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.group-head .muted {
  color: currentColor;
  opacity: 0.78;
}

.planning-section-title.accent {
  color: #ffa82e;
}

.product-client-form {
  display: grid;
  grid-template-columns: minmax(160px, 1.3fr) minmax(118px, 140px) minmax(150px, 1fr) minmax(118px, 140px);
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.product-client-form .client-contact {
  margin-bottom: 0;
}

.product-client-form .field {
  gap: 5px;
}

.product-client-form .field input,
.product-client-form .field select {
  padding: 8px 9px;
}

.product-client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 2 / -1;
  justify-content: flex-end;
}

.evidence-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.evidence-matrix-panel {
  min-width: 0;
}

.evidence-matrix-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.evidence-matrix {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

.evidence-matrix th,
.evidence-matrix td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px;
  vertical-align: top;
}

.evidence-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.evidence-matrix tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 210px;
  max-width: 260px;
  background: #fff;
  text-align: left;
}

.evidence-matrix tbody th strong,
.evidence-matrix tbody th span {
  display: block;
}

.evidence-matrix tbody th span {
  color: var(--muted);
  font-size: 12px;
}

.client-info-grid .city-chip,
.evidence-matrix tbody th .city-chip {
  display: inline-flex;
}

.evidence-matrix tbody th .meta-line {
  display: inline-flex;
}

.evidence-cell {
  display: grid;
  width: 100%;
  min-height: 82px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
  text-align: left;
}

.evidence-cell strong {
  font-size: 12px;
}

.evidence-cell span,
.evidence-cell em,
.evidence-cell small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.evidence-cell.complete {
  border-color: rgba(255, 110, 47, 0.34);
  background: var(--green-2);
}

.evidence-cell.partial {
  border-color: rgba(255, 168, 46, 0.48);
  background: var(--amber-2);
}

.evidence-cell.missing {
  background: var(--surface-2);
}

.evidence-cell.has-notes small {
  width: fit-content;
  border-radius: 999px;
  background: var(--blue-2);
  color: var(--blue);
  padding: 2px 6px;
}

.evidence-cell-status-list {
  display: grid;
  gap: 3px;
}

.evidence-cell .evidence-cell-status {
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(255, 110, 47, 0.12);
  color: var(--green);
  padding: 2px 6px;
  overflow-wrap: anywhere;
}

.evidence-cell .evidence-cell-status.empty {
  background: var(--surface);
  color: var(--muted);
}

.evidence-detail {
  display: grid;
  gap: 12px;
}

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

.evidence-detail-grid div,
.evidence-notes-box div {
  --detail-h: 158;
  display: grid;
  min-width: 0;
  gap: 5px;
  border: 1px solid hsl(var(--detail-h) 54% 78%);
  border-radius: 8px;
  background: hsl(var(--detail-h) 78% 96%);
  color: hsl(var(--detail-h) 47% 22%);
  padding: 10px;
}

.evidence-detail-grid div:nth-child(3n + 1),
.evidence-notes-box div:nth-child(2n + 1) {
  --detail-h: 198;
}

.evidence-detail-grid div:nth-child(3n + 2),
.evidence-notes-box div:nth-child(2n) {
  --detail-h: 274;
}

.evidence-detail-grid div:nth-child(3n) {
  --detail-h: 34;
}

.evidence-detail-grid span,
.evidence-notes-box span {
  color: hsl(var(--detail-h) 42% 34%);
  font-size: 11px;
  font-weight: 900;
}

.evidence-detail-grid strong,
.evidence-notes-box p {
  color: hsl(var(--detail-h) 48% 18%);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.evidence-products {
  display: grid;
  gap: 8px;
}

.evidence-product-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(90px, 0.6fr) minmax(140px, 1fr);
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.evidence-product-row b,
.evidence-product-row em {
  color: var(--muted);
  font-style: normal;
}

.evidence-notes-box {
  display: grid;
  gap: 8px;
}

.evidence-notes-box p {
  margin: 0;
  overflow-wrap: anywhere;
}

.evidence-notes-panel {
  margin-top: 16px;
}

.note-row {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.note-row span,
.note-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.note-row p {
  margin: 0;
}

.manager-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.manager-control-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.manager-campaign-workspace {
  margin-top: 16px;
}

.manager-campaign-panel {
  display: grid;
  gap: 14px;
}

.campaign-selection-block {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.campaign-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.campaign-status-line.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
}

.campaign-status-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.campaign-status-chip.good {
  border-color: rgba(47, 127, 85, 0.24);
  background: var(--green-2);
  color: var(--green);
}

.campaign-status-chip.neutral {
  border-color: rgba(39, 126, 158, 0.24);
  background: var(--blue-2);
  color: var(--blue);
}

.campaign-status-chip.warn {
  border-color: rgba(255, 100, 42, 0.24);
  background: var(--orange-2);
  color: var(--orange);
}

.manager-selected-product-panel {
  margin-top: 16px;
}

.manager-selected-product-panel .product-client-panel {
  margin-top: 0;
}

.campaign-overview-panel {
  margin-top: 16px;
}

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

.manager-metrics .metric {
  min-height: 92px;
}

.manager-product-list {
  display: grid;
  gap: 10px;
}

.manager-product-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.manager-product-main {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.manager-product-main strong {
  overflow-wrap: anywhere;
}

.manager-product-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.manager-product-stats span {
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.manager-product-stats b {
  color: var(--ink);
}

.manager-user-create {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(160px, 1fr) minmax(120px, 0.7fr) minmax(150px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}

.manager-users-table table {
  min-width: 980px;
}

.manager-users-table td,
.manager-users-table th {
  padding: 8px 10px;
}

.manager-users-table input,
.manager-users-table select {
  min-width: 0;
  width: 100%;
  padding: 7px 8px;
  font-size: 14px;
}

.manager-user-password,
.manager-user-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.manager-user-password input {
  min-width: 130px;
}

.manager-user-actions {
  flex-wrap: wrap;
}

.manager-classifier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.generic-product-panel {
  display: grid;
  gap: 12px;
}

.generic-product-add,
.generic-product-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.7fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.generic-product-add {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.generic-product-list {
  display: grid;
  gap: 10px;
}

.generic-product-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.generic-product-row .product-client-actions {
  grid-column: auto;
  justify-content: flex-end;
}

.manager-classifier-grid .generic-product-add,
.manager-classifier-grid .generic-product-row {
  grid-template-columns: 1fr;
}

.manager-classifier-grid .product-client-actions {
  justify-content: stretch;
}

.manager-classifier-grid .product-client-actions .btn {
  flex: 1;
}

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

.option-admin-card {
  display: grid;
  min-width: 0;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.option-admin-head h3 {
  margin: 0 0 2px;
  font-size: 17px;
}

.option-admin-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.option-add-form,
.option-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.option-admin-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.option-admin-row.city-option-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.option-add-form input,
.option-admin-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
}

.option-admin-list {
  display: grid;
  gap: 7px;
}

.supervisor-matrix-panel {
  min-width: 0;
}

.compact-segmented {
  width: auto;
}

.compact-segmented button {
  padding: 7px 12px;
}

.inline-select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  padding: 7px 10px;
}

.activity-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.activity-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
}

.legend-dot.complete {
  background: var(--green);
}

.legend-dot.partial {
  background: #ffa82e;
}

.legend-dot.missing {
  background: var(--red);
}

.activity-matrix-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.activity-matrix {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  background: #fff;
}

.activity-matrix th,
.activity-matrix td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px;
  vertical-align: top;
}

.activity-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-matrix thead th span,
.activity-matrix thead th small {
  display: block;
}

.activity-matrix tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 190px;
  background: #fff;
  text-align: left;
}

.activity-matrix tbody th strong,
.activity-matrix tbody th span {
  display: block;
}

.activity-matrix tbody th span {
  color: var(--muted);
  font-size: 12px;
}

.activity-matrix-cell {
  display: grid;
  min-width: 112px;
  min-height: 74px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.activity-matrix-cell strong {
  font-size: 28px;
  line-height: 1;
}

.activity-matrix-cell span,
.activity-matrix-cell em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.activity-matrix-cell.complete {
  border-color: rgba(255, 110, 47, 0.34);
  background: var(--green-2);
}

.activity-matrix-cell.partial {
  border-color: rgba(255, 168, 46, 0.48);
  background: var(--amber-2);
}

.activity-matrix-cell.missing {
  border-color: rgba(166, 58, 58, 0.28);
  background: #fff6f3;
}

.activity-matrix-cell.empty {
  background: var(--surface-2);
}

.matrix-total-row th,
.matrix-total-row td {
  background: var(--surface);
}

.week-product-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.product-option-row {
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  padding: 7px 8px 7px 12px;
}

.product-option-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.product-option-main {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.campaign-assets-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 100, 42, 0.24);
  border-radius: 8px;
  background: #fff8f3;
  padding: 12px;
}

.campaign-assets-panel.compact {
  border: 0;
  background: transparent;
  padding: 0;
}

.campaign-assets-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.campaign-assets-head div {
  display: grid;
  gap: 2px;
}

.campaign-assets-head strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
}

.campaign-assets-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.product-option-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.product-option-label span {
  overflow-wrap: anywhere;
}

.product-assets {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.product-assets.compact {
  gap: 5px;
}

.product-asset-links,
.product-asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.asset-chip,
.asset-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 900;
}

.asset-chip {
  border: 1px solid rgba(255, 110, 47, 0.24);
  background: var(--green-2);
  color: var(--green);
}

.asset-chip a {
  color: inherit;
  text-decoration: none;
}

.asset-placeholder {
  border: 1px dashed var(--line);
  color: var(--muted);
}

.asset-remove {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(25, 25, 25, 0.08);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.asset-upload {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.asset-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.visual-chip {
  border-radius: 8px;
  padding-right: 4px;
}

.asset-thumb-link {
  display: inline-flex;
  width: 34px;
  height: 24px;
  overflow: hidden;
  border-radius: 5px;
  background: #fff;
}

.asset-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.help-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 42;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.help-chat > * {
  pointer-events: auto;
}

.help-chat-toggle {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 24px;
  font-weight: 900;
}

.help-chat-panel {
  display: grid;
  width: min(380px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 104px));
  overflow: hidden;
  border: 1px solid #f1c8b6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 58px rgba(25, 25, 25, 0.18);
}

.help-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff7f2 0%, #fff 100%);
}

.help-chat-head strong,
.help-chat-head span {
  display: block;
}

.help-chat-head strong {
  font-size: 18px;
}

.help-chat-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.help-chat-actions {
  display: inline-flex;
  gap: 8px;
}

.help-chat-messages {
  display: grid;
  max-height: 310px;
  gap: 10px;
  overflow: auto;
  padding: 14px;
  background: #fffaf7;
}

.help-chat-message {
  width: fit-content;
  max-width: 92%;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.help-chat-message.assistant {
  border: 1px solid #f1d9cd;
  background: #fff;
  color: var(--ink);
}

.help-chat-message.user {
  justify-self: end;
  background: var(--ink);
  color: #fff;
}

.help-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 0;
  background: #fff;
}

.help-chat-chip {
  border: 1px solid #ffd5c1;
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--amber-2);
  color: #8a3717;
  font-size: 12px;
  font-weight: 800;
}

.help-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 14px 14px;
  background: #fff;
}

.help-chat-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  outline: none;
}

.help-chat-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(255, 110, 47, 0.16);
}

#toast {
  position: fixed;
  right: 18px;
  bottom: 86px;
  z-index: 30;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 240px;
  max-width: 380px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.toast.error {
  background: var(--red);
}

.toast.birthday {
  background: #704b18;
}

.toast.due {
  background: #9a4d12;
}

.loading {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: static;
  }

  .route-layout,
  .interaction-layout,
  .planning-layout,
  .location-map-layout,
  .client-card-layout,
  .evidence-layout,
  .product-client-groups,
  .manager-classifier-grid,
  .manager-user-create,
  .manager-options-grid,
  .client-potential-grid,
  .market-detail-grid,
  .generic-product-add,
  .generic-product-row,
  .activation-manual-form,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .help-chat {
    right: 12px;
    bottom: 12px;
  }

  .help-chat-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 88px);
  }

  .help-chat-form {
    grid-template-columns: 1fr;
  }

  #toast {
    right: 12px;
    bottom: 78px;
  }

  .product-client-form {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 0.7fr);
  }

  .product-client-actions {
    grid-column: 1 / -1;
  }

  .manager-control-grid,
  .manager-product-card {
    grid-template-columns: 1fr;
  }

  .manager-metrics {
    grid-template-columns: 1fr 1fr;
  }

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

  .status-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .client-profile-hero {
    display: grid;
  }
}

@media (max-width: 760px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 34vh;
    padding: 28px;
  }

  .login-hero-copy h1 {
    font-size: 42px;
  }

  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar {
    gap: 14px;
  }

  .toolbar,
  .toolbar .btn,
  .week-segmented,
  .campaign-segmented {
    width: 100%;
  }

  .topbar {
    display: grid;
  }

  .agent-picker,
  .agent-picker select {
    width: 100%;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .birthday-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .birthday-date-badge {
    width: fit-content;
    min-width: 88px;
  }

  .contact-editor-row,
  .client-info-grid div,
  .client-contact-card dl div {
    grid-template-columns: 1fr;
  }

  .product-client-form {
    grid-template-columns: 1fr;
  }

  .option-add-form,
  .option-admin-row,
  .generic-product-add,
  .generic-product-row,
  .activation-bulk-import {
    grid-template-columns: 1fr;
  }

  .manager-metrics {
    grid-template-columns: 1fr;
  }

  .market-charts-grid,
  .supplier-share-row {
    grid-template-columns: 1fr;
  }

  .status-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .product-client-actions {
    justify-content: stretch;
  }

  .product-client-actions .btn {
    flex: 1;
  }

  .promo-product-tile {
    grid-template-columns: 1fr;
  }

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

  .day-segmented {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .day-segmented button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .week-segmented button,
  .campaign-segmented button {
    flex-basis: calc(50% - 1px);
    min-width: 0;
  }

  .day-option {
    display: grid;
    gap: 2px;
  }

  .day-date {
    font-size: 12px;
  }

  .day-segmented button:last-child {
    border-bottom: 0;
  }

  .interaction-client-selector {
    gap: 10px;
  }

  .interaction-client-selector summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
  }

  .interaction-client-selector summary::-webkit-details-marker {
    display: none;
  }

  .interaction-client-selector summary::after {
    content: "+";
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--ink);
    font-weight: 900;
  }

  .interaction-client-selector[open] summary::after {
    content: "-";
  }

  .interaction-client-selector summary span {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .interaction-client-selector summary strong,
  .interaction-client-selector summary em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .interaction-client-selector summary strong {
    color: var(--ink);
    font-size: 15px;
  }

  .interaction-client-selector summary em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
  }

  .interaction-client-selector-body {
    display: grid;
    gap: 10px;
  }

  .interaction-client-selector-body .interaction-progress,
  .interaction-client-selector-body .form-stack {
    margin-bottom: 0 !important;
  }

  .interaction-client-selector-body .routing-client-list {
    max-height: 42vh;
    overflow: auto;
    padding-right: 2px;
  }

  .interaction-layout > .panel:first-child .toolbar {
    margin-bottom: 10px !important;
  }

  .interaction-layout > .panel:first-child .day-segmented {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .interaction-layout > .panel:first-child .day-segmented button {
    min-width: 92px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  .week-segmented button,
  .campaign-segmented button {
    flex-basis: 100%;
  }

  .product-stats-table table,
  .systemic-panel .product-stats-table table {
    min-width: 700px;
  }
}
