:root {
  --magenta: #c800c8;
  --magenta-deep: #9b009b;
  --magenta-soft: #f8e8f8;
  --navy: #2f3a4a;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f4f5f7;
  --white: #fff;
  --side: #2b2b33;
  --top: #2b2b33;
  font-family: "Figtree", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
button, input { font: inherit; }
button:disabled { cursor: not-allowed; }
.hidden { display: none !important; }
.muted-sm { font-size: 0.75rem; color: var(--muted); }

.app {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-rows: 56px minmax(0, 1fr);
  height: 100vh;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: var(--top);
  color: #f3f4f6;
  z-index: 20;
}
.brand {
  color: var(--magenta);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 1rem;
  min-width: 92px;
}
.top-search-wrap { position: relative; flex: 1; max-width: 520px; }
.top-search-wrap input {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 9px 12px;
  background: #3a3a44;
  color: #fff;
  outline: none;
}
.top-search-wrap input::placeholder { color: #9ca3af; }
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  max-height: 360px;
  overflow: auto;
  z-index: 30;
}
.search-hit {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
}
.search-hit:hover { background: var(--magenta-soft); }
.search-hit strong { display: block; }
.search-hit span { font-size: 0.75rem; color: var(--muted); }

.btn {
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.85rem;
}
.btn-dark { background: #111827; color: #fff; opacity: 0.85; }
.btn-ghost {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  align-self: end;
  height: 34px;
}
.btn:disabled { opacity: 0.55; }

.contacts-list-view { min-height: calc(100vh - 56px); }
.list-page { padding: 16px 18px 28px; }
.list-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.list-title-row h1 { margin: 0; font-size: 1.4rem; }
.filter-bar {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) minmax(140px, 0.8fr) minmax(160px, 1fr) minmax(220px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.filter-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.filter-field.grow { min-width: 0; }
.filter-field span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.filter-field select,
.filter-field input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fafafa;
  outline: none;
}
.filter-field select:focus,
.filter-field input:focus {
  border-color: #f0abfc;
  box-shadow: 0 0 0 3px rgba(200,0,200,0.1);
}
.list-table .table-scroll.tall { max-height: calc(100vh - 260px); }
.list-table tbody tr { cursor: pointer; }
.list-table tbody tr:hover { background: var(--magenta-soft); }
.link-back {
  border: 0;
  background: transparent;
  color: var(--magenta-deep);
  font-weight: 700;
  cursor: pointer;
  margin-right: 12px;
  padding: 0;
}

.top-spacer { flex: 1; }
.health-chip {
  font-size: 0.68rem;
  background: rgba(255,255,255,0.08);
  padding: 6px 8px;
  border-radius: 6px;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.health-chip.ok { color: #f0abfc; }
.health-chip.bad { color: #fda4af; }
.icon-btn {
  border: 0;
  background: transparent;
  color: #e5e7eb;
  font-size: 0.95rem;
  padding: 4px 6px;
}
.top-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.top-auth-btn {
  border: 1px solid rgba(255,255,255,0.22);
  background: transparent;
  color: #f3f4f6;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  height: 30px;
  cursor: pointer;
  white-space: nowrap;
}
.top-auth-btn:hover { background: rgba(255,255,255,0.08); }
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}
.avatar {
  width: 28px; height: 28px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--magenta);
  font-size: 0.7rem; font-weight: 700;
}

.sidenav {
  background: var(--side);
  color: #e5e7eb;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
}
.side-item {
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.side-item:hover:not(:disabled) { background: rgba(255,255,255,0.06); }
.side-item.active {
  background: rgba(200, 0, 200, 0.18);
  box-shadow: inset 3px 0 0 var(--magenta);
}
.side-item:disabled { opacity: 0.35; }
.side-foot { margin-top: auto; padding-top: 16px; }
.side-label {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 0 10px 6px;
}
.recent-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #d1d5db;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
}
.recent-item:hover { background: rgba(255,255,255,0.06); color: #fff; }

.workspace { overflow: auto; min-width: 0; background: var(--bg); }
.empty-state { max-width: 560px; margin: 72px auto; padding: 24px; color: var(--muted); }
.empty-state h1 { color: var(--ink); margin: 0 0 8px; }

.readonly-banner {
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
}

.contact-view {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: calc(100vh - 56px);
}
.contact-view > .readonly-banner {
  grid-column: 1 / -1;
}

.profile-pane {
  background: var(--white);
  border-right: 1px solid var(--line);
  padding: 16px;
  overflow: auto;
}
.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.profile-head h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.profile-contact { margin: 10px 0 14px; }
.pc-line { font-size: 0.88rem; margin-bottom: 4px; color: var(--ink); }
.pc-id { font-size: 0.72rem; color: var(--muted); margin-top: 6px; }

.profile-block { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.profile-block h3 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.notes-box {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-height: 56px;
  font-size: 0.88rem;
  white-space: pre-wrap;
}
.field-list { display: grid; gap: 8px; }
.field {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
}
.field .label { color: var(--muted); }
.field .value {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  min-height: 28px;
}
.field .value.chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--ink);
}

.card-pane { padding: 12px 16px 28px; min-width: 0; }

.team-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.team-tab {
  border: 0;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.team-tab.active {
  color: var(--magenta-deep);
  border-bottom-color: var(--magenta);
}
.team-tab.plus { color: var(--magenta); opacity: 0.6; cursor: not-allowed; }

.table-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.table-head h3 { margin: 0; font-size: 0.92rem; }
.table-filter {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  min-width: 180px;
  background: #fafafa;
  outline: none;
}
.table-filter:focus { border-color: #f0abfc; box-shadow: 0 0 0 3px rgba(200,0,200,0.1); }
.table-scroll { overflow: auto; max-height: 220px; }
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th, td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  background: #fafafa;
  color: #4b5563;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
tr.warn { background: #fdf2f8; }
.status-pill {
  display: inline-block;
  background: #f3e8ff;
  color: #6b21a8;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
}
.alert { color: var(--magenta-deep); font-weight: 600; }

.timeline-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px 16px;
}
.tl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tl-tab {
  border: 0;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tl-tab.active { color: var(--magenta-deep); border-bottom-color: var(--magenta); }
.tl-filter-row { padding: 10px 0; }
.timeline { display: flex; flex-direction: column; gap: 0; max-height: 420px; overflow: auto; }
.tl-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #f3f4f6;
}
.tl-dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--magenta);
  margin-top: 5px;
  box-shadow: 0 0 0 3px var(--magenta-soft);
}
.tl-meta { font-size: 0.72rem; color: var(--muted); margin-bottom: 2px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tl-body { font-size: 0.88rem; white-space: pre-wrap; word-break: break-word; margin-top: 4px; }
.tl-body.blank { color: var(--muted); font-style: italic; }
.dir-pill {
  display: inline-block;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.tl-party { font-size: 0.78rem; color: var(--muted); margin: 2px 0 6px; }
.tl-notes { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.tl-call-meta { font-size: 0.78rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.tl-transcript { margin-top: 8px; }
.tl-transcript summary {
  cursor: pointer;
  color: var(--magenta-deep);
  font-weight: 600;
  font-size: 0.82rem;
}
.tl-transcript pre {
  margin: 8px 0 0;
  padding: 10px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.82rem;
  max-height: 260px;
  overflow: auto;
}
.tl-recording {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}
.tl-recording audio { width: 100%; max-width: 420px; }
.tl-recording a { color: var(--magenta-deep); font-weight: 600; font-size: 0.82rem; }
.tl-item.kind-call .tl-dot { background: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }
.tl-item.kind-email .tl-dot { background: #059669; box-shadow: 0 0 0 3px #d1fae5; }
.tl-item.kind-sms .tl-dot { background: #d97706; box-shadow: 0 0 0 3px #fef3c7; }

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fafafa;
}
.source-tables-block .table-head { align-items: baseline; }
.source-tables { padding: 12px; }
.history-count { padding: 0 12px 8px; }
.table-scroll.tallish { max-height: 360px; }
.hist-changes { font-size: 0.8rem; }
.hist-change { margin-bottom: 4px; line-height: 1.35; }
.hist-change.status { color: var(--magenta-deep); font-weight: 600; }
.hist-field {
  display: inline-block;
  min-width: 72px;
  color: var(--muted);
  font-weight: 600;
  text-transform: capitalize;
}
.tl-item.kind-history .tl-dot { background: #64748b; box-shadow: 0 0 0 3px #e2e8f0; }
.ds-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-chip {
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  cursor: pointer;
  color: var(--ink);
}
.ds-chip.on {
  background: var(--magenta-soft);
  border-color: #f0abfc;
  color: var(--magenta-deep);
  font-weight: 600;
}
.ds-chip.on.empty { opacity: 0.7; }
.ds-chip.off { color: var(--muted); }
.ds-chip:hover { border-color: var(--magenta); }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  background: var(--magenta-soft);
  color: var(--magenta-deep);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.linkish {
  border: 0;
  background: transparent;
  color: var(--magenta-deep);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.ds-preview-actions { display: flex; gap: 8px; align-items: center; }

.reports-view { min-height: calc(100vh - 56px); }
.reports-filter { grid-template-columns: minmax(200px, 1.4fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) auto; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.kpi-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.kpi-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
.kpi-value { font-size: 1.6rem; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; }
.report-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.report-panels .table-block { margin-bottom: 0; }

.datasets-view { min-height: calc(100vh - 56px); }
.ds-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: calc(100vh - 90px);
}
.ds-list-pane {
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ds-list-head { padding: 14px; border-bottom: 1px solid var(--line); }
.ds-list-head h2 { margin: 0 0 8px; font-size: 1.1rem; }
.ds-list { overflow: auto; padding: 8px; }
.ds-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
}
.ds-item:hover, .ds-item.active { background: var(--magenta-soft); }
.ds-item strong { display: block; font-size: 0.86rem; }
.ds-item span { font-size: 0.72rem; color: var(--muted); }
.ds-preview-pane { padding: 14px; min-width: 0; }
.ds-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.ds-preview-head h2 { margin: 0; }
.dataset-preview {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  max-height: calc(100vh - 160px);
}
.empty-inline { padding: 24px; color: var(--muted); }

.auth-gate {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(248, 246, 243, 0.92);
}
.auth-card {
  width: min(420px, 92vw);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 12px 40px rgba(20, 16, 30, 0.08);
}
.auth-card h1 { margin: 0 0 8px; font-size: 1.35rem; }
.auth-card p { margin: 0 0 18px; color: var(--muted); }
.auth-card .btn { width: 100%; }
.auth-card .muted-sm { margin-top: 12px; }

.agent-filter {
  grid-template-columns: minmax(160px, 0.9fr) minmax(260px, 1.8fr) repeat(4, auto);
}
.dash-view .agent-filter {
  grid-template-columns: minmax(160px, 0.9fr) minmax(260px, 1.8fr) auto auto;
}
.dash-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 14px;
  align-items: start;
}
.dash-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.dash-panel .table-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.dash-panel h3 { margin: 0; font-size: 0.95rem; }
.dash-kpis {
  margin: 12px 0 14px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi-card.danger .kpi-value { color: #9b1c1c; }
@media (max-width: 1100px) {
  .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.calendar-grid.compact .cal-cell { min-height: 78px; }
.calendar-grid.compact .cal-chip { font-size: 0.65rem; }
.month-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 8px;
}
.month-bar {
  display: grid;
  grid-template-columns: 72px 1fr 40px;
  gap: 8px;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 4px 2px;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.month-bar:hover,
.month-bar.active { background: var(--magenta-soft, #f6e8f1); border-radius: 6px; }
.month-bar-label { font-size: 0.78rem; color: var(--muted); }
.month-bar-count { font-size: 0.8rem; font-weight: 600; text-align: right; }
.month-bar-track {
  height: 8px;
  background: #eee;
  border-radius: 999px;
  overflow: hidden;
}
.month-bar-track > span {
  display: block;
  height: 100%;
  background: var(--magenta, #8b1e6b);
  border-radius: 999px;
}
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
}
.linkish {
  border: 0;
  background: none;
  color: var(--magenta, #8b1e6b);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.row-overdue td { background: #fff4f4; }
.pill.danger {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fde2e2;
  color: #9b1c1c;
  font-size: 0.7rem;
  font-weight: 600;
}

.calendar-grid {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f3f0f6;
  border-bottom: 1px solid var(--line);
}
.cal-weekdays span {
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-cell {
  min-height: 110px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.empty { background: #faf9f8; }
.cal-day {
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.cal-items { display: flex; flex-direction: column; gap: 4px; }
.cal-chip {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: var(--magenta-soft, #f6e8f1);
  color: #4a1440;
  padding: 4px 6px;
  font-size: 0.7rem;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-chip:hover { filter: brightness(0.97); }
.cal-chip.sample {
  display: inline-block;
  width: auto;
  cursor: default;
  margin-right: 6px;
}
.cal-chip.status-confirmed { background: #ede9fe; color: #5b21b6; }
.cal-chip.status-completed { background: #dcfce7; color: #166534; }
.cal-chip.status-cancelled { background: #e5e7eb; color: #4b5563; }
.cal-chip.status-noshow { background: #fee2e2; color: #991b1b; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; align-items: center; }
.cal-month-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.month-chip {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}
.month-chip span { color: var(--muted); margin-left: 4px; }
.month-chip.active {
  border-color: var(--magenta, #8b1e6b);
  background: var(--magenta-soft, #f6e8f1);
  font-weight: 600;
}

@media (max-width: 1100px) {
  .contact-view { grid-template-columns: 1fr; }
  .ds-layout { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .kpi-grid, .report-panels { grid-template-columns: 1fr 1fr; }
  .add-row { grid-template-columns: 1fr; }
  .cal-cell { min-height: 84px; }
}
@media (max-width: 700px) {
  .kpi-grid, .report-panels { grid-template-columns: 1fr; }
  .cal-weekdays, .cal-days { grid-template-columns: repeat(7, minmax(72px, 1fr)); }
  .calendar-grid { overflow-x: auto; }
}
