:root {
  --bg: #edf2f7;
  --surface: #f8fafc;
  --surface-strong: #ffffff;
  --line: #dde6f1;
  --line-strong: #cbd8e7;
  --text: #06142b;
  --muted: #8b9ab5;
  --green: #16c76a;
  --green-deep: #009b55;
  --green-soft: #e8fff2;
  --blue: #3b7cff;
  --blue-deep: #1244b8;
  --blue-soft: #eaf3ff;
  --amber: #f39a10;
  --amber-soft: #fff8df;
  --red: #ef4444;
  --red-soft: #fff0f0;
  --purple: #7c5cff;
  --shadow: 0 22px 70px rgba(30, 55, 90, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

.sidebar {
  min-height: 100svh;
  padding: 18px 18px 24px;
  border-right: 1px solid var(--line);
  background: rgba(247, 250, 253, 0.82);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
}

.window-dots {
  display: flex;
  gap: 12px;
  align-items: center;
  height: 28px;
  margin-bottom: 22px;
}

.dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.dot.red { background: #fb4949; }
.dot.yellow { background: #f6a20b; }
.dot.green { background: #20c76b; }

.brand {
  display: grid;
  gap: 8px;
  padding: 0 8px 18px;
}

.brand-title {
  font-size: 24px;
  line-height: 1.05;
  font-weight: 800;
  color: #102140;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.niche-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--green-deep);
  background: var(--green-soft);
  border: 1px solid #a6f0c8;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 750;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.nav-button {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border-radius: 16px;
  color: #60708c;
  background: transparent;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-button:hover {
  background: #fff;
  color: var(--text);
  transform: translateX(2px);
}

.nav-button.active {
  color: var(--blue-deep);
  background: #fff;
  box-shadow: 0 10px 28px rgba(44, 91, 150, 0.10);
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eef5ff;
  color: var(--blue);
}

.nav-button.active .nav-icon {
  background: var(--blue);
  color: white;
}

.nav-label {
  display: grid;
  gap: 2px;
}

.nav-title {
  font-weight: 760;
  font-size: 14px;
}

.nav-caption {
  font-size: 12px;
  color: var(--muted);
}

.nav-count {
  min-width: 28px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef4fb;
  color: #6d7e99;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.sidebar-footer {
  margin-top: 22px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.footer-kicker {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.footer-number {
  font-size: 34px;
  font-weight: 850;
  color: var(--green);
  line-height: 1;
}

.footer-note {
  color: #64748b;
  margin-top: 7px;
  line-height: 1.35;
  font-size: 13px;
}

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

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 66px;
  margin-bottom: 18px;
}

.page-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.page-heading h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: 0;
}

.page-heading span {
  color: var(--muted);
  font-weight: 650;
}

.top-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 11px;
  color: #60708c;
}

.select-wrap select {
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 750;
}

.workspace {
  display: grid;
  gap: 18px;
  animation: pageIn 260ms ease both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel.pad {
  padding: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 26px;
  min-height: 190px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 22px;
  align-items: stretch;
  background:
    linear-gradient(112deg, #ffffff 0%, #f9fbff 48%, #ecfff4 100%);
}

.hero::after {
  content: none;
}

.hero-copy {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: center;
}

.mode-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-deep);
  background: var(--green-soft);
  border: 1px solid #a7efc9;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 850;
}

.hero-title {
  font-size: 42px;
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 900;
  max-width: 850px;
}

.hero-text {
  max-width: 720px;
  color: #66738d;
  font-size: 18px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.hero-side {
  position: relative;
  border-radius: 20px;
  border: 1px solid #cfeadc;
  background: #f2fff7;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 12px;
}

.side-number {
  font-size: 58px;
  line-height: 0.9;
  font-weight: 900;
  color: var(--green);
}

.side-label {
  color: #5b6b83;
  line-height: 1.35;
  font-weight: 680;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 13px;
  padding: 10px 16px;
  font-weight: 850;
  background: var(--green);
  color: white;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(22, 199, 106, 0.24);
}

.button.secondary {
  background: #eef5ff;
  color: var(--blue);
  border: 1px solid #bbd6ff;
}

.button.secondary:hover {
  box-shadow: 0 14px 28px rgba(59, 124, 255, 0.16);
}

.button.ghost {
  background: #fff;
  color: #58708d;
  border: 1px solid var(--line);
}

.button.warning {
  background: var(--amber);
}

.button.small {
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 11px;
  font-size: 13px;
}

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

.kpi {
  min-height: 132px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  display: grid;
  align-content: space-between;
}

.kpi-label {
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 820;
  font-size: 12px;
}

.kpi-value {
  font-size: 38px;
  line-height: 0.95;
  font-weight: 900;
  color: var(--text);
}

.kpi-value.green { color: var(--green); }
.kpi-value.blue { color: var(--blue); }
.kpi-value.amber { color: var(--amber); }

.kpi-foot {
  color: #6e7f98;
  font-size: 13px;
  line-height: 1.3;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 18px;
}

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

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 16px;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.panel-title span {
  color: var(--muted);
  font-weight: 650;
}

.panel-title.tight {
  margin-top: 18px;
}

.queue {
  display: grid;
  gap: 11px;
}

.queue-item,
.lead-item,
.activity-item,
.loss-item,
.listing-item,
.knowledge-item,
.report-line,
.trigger-row,
.connection-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 15px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.queue-item:hover,
.lead-item:hover,
.activity-item:hover,
.loss-item:hover,
.listing-item:hover,
.knowledge-item:hover {
  transform: translateY(-1px);
  border-color: #b9d3ef;
}

.queue-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.queue-icon,
.avatar,
.status-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  flex: 0 0 auto;
}

.queue-icon.green,
.avatar.green,
.status-icon.green {
  background: var(--green-soft);
  color: var(--green-deep);
}

.queue-icon.blue,
.avatar.blue,
.status-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.queue-icon.amber,
.avatar.amber,
.status-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.queue-title {
  display: block;
  font-size: 17px;
  font-weight: 850;
  margin-bottom: 4px;
}

.queue-subtitle {
  display: block;
  color: #63728d;
  line-height: 1.35;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4fb;
  color: #6b7b95;
  font-weight: 760;
  font-size: 12px;
}

.tag.green {
  background: var(--green-soft);
  color: var(--green-deep);
}

.tag.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.tag.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.tag.red {
  background: var(--red-soft);
  color: var(--red);
}

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

.bar-row {
  display: grid;
  grid-template-columns: 150px 1fr 44px;
  gap: 12px;
  align-items: center;
  color: #60708c;
}

.bar-track {
  height: 13px;
  border-radius: 999px;
  background: #e5ecf5;
  overflow: hidden;
}

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

.bar-fill.blue { background: #8ab4f8; }
.bar-fill.amber { background: #f5bd61; }
.bar-fill.gray { background: #c8d2df; }

.bar-value {
  font-weight: 850;
  color: var(--text);
  text-align: right;
}

.chart-card {
  height: 286px;
  display: grid;
  align-items: end;
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  gap: 12px;
  padding: 22px 18px 48px;
  position: relative;
}

.chart-card::before,
.chart-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  border-top: 1px solid #e9eef5;
}

.chart-card::before { top: 78px; }
.chart-card::after { top: 145px; }

.bar-col {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: center;
  height: 196px;
}

.bar-bg {
  width: 68%;
  min-width: 34px;
  border-radius: 9px 9px 3px 3px;
  background: #dfe7f2;
  height: var(--h);
  display: grid;
  align-items: end;
  overflow: hidden;
}

.bar-saved {
  height: var(--s);
  background: linear-gradient(180deg, #65d895, var(--green));
  border-radius: inherit;
}

.bar-label {
  position: absolute;
  bottom: -32px;
  color: #8b9ab5;
  font-weight: 720;
}

.audit-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.loss-estimate {
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff7e3, #ffffff 80%);
  border: 1px solid #ffd99c;
}

.loss-estimate .amount {
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
  color: #d97706;
  margin: 10px 0;
}

.loss-title {
  font-size: 18px;
  font-weight: 880;
  margin: 12px 0 6px;
}

.loss-copy {
  color: #60708c;
  line-height: 1.42;
  margin: 0 0 12px;
}

.row-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  margin-left: 8px;
  border-radius: 999px;
  background: #f1f6fb;
  color: #52627d;
  font-weight: 860;
  font-size: 12px;
}

.table-like {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) minmax(220px, 0.65fr);
  gap: 0;
  background: #fff;
}

.table-row:not(:last-child) {
  border-bottom: 1px solid var(--line);
}

.table-row.header {
  background: #f1f6fb;
  color: #63728d;
  font-weight: 840;
}

.table-cell {
  padding: 13px 15px;
  border-right: 1px solid var(--line);
  line-height: 1.35;
}

.table-cell:last-child {
  border-right: 0;
}

.lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.82fr);
  gap: 18px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 15px;
}

.filter-select {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  padding: 9px 12px;
  color: #43536d;
  font-weight: 720;
}

.filter-select select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 760;
}

.lead-list,
.activity-list,
.listing-list,
.knowledge-list {
  display: grid;
  gap: 12px;
}

.lead-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
}

.lead-item.selected {
  border-color: #9beabc;
  background: #effff5;
}

.lead-name {
  font-size: 18px;
  font-weight: 870;
  margin-bottom: 4px;
}

.lead-meta {
  color: #60708c;
  line-height: 1.35;
}

.score-stack {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 38px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 900;
  background: var(--green-soft);
  color: var(--green-deep);
}

.detail-panel {
  min-height: 460px;
}

.detail-head {
  display: grid;
  gap: 9px;
  margin-bottom: 17px;
}

.detail-title {
  font-size: 26px;
  line-height: 1.12;
  font-weight: 900;
}

.detail-copy {
  color: #5b6b83;
  line-height: 1.46;
}

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

.message-preview {
  display: grid;
  gap: 11px;
  padding: 18px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid var(--line);
  max-height: 280px;
  overflow: auto;
}

.score-cards {
  margin-bottom: 14px;
}

.mini-score {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.bubble {
  max-width: 82%;
  border-radius: 16px;
  padding: 12px 14px;
  line-height: 1.35;
  border: 1px solid transparent;
}

.bubble.client {
  background: #ecfff4;
  border-color: #b5efcc;
}

.bubble.ai {
  justify-self: end;
  background: #eaf3ff;
  border-color: #b8d6ff;
}

.trigger-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 140px;
  gap: 14px;
  align-items: center;
}

.switch {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #d8e3f0;
  padding: 3px;
  transition: background 160ms ease;
}

.switch::after {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  transition: transform 160ms ease;
  box-shadow: 0 4px 10px rgba(28, 45, 70, 0.18);
}

.switch.on {
  background: var(--green);
}

.switch.on::after {
  transform: translateX(20px);
}

.trigger-title {
  font-weight: 850;
  margin-bottom: 3px;
}

.trigger-copy {
  color: #687893;
  line-height: 1.35;
}

.activity-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
}

.activity-main {
  display: grid;
  gap: 6px;
}

.activity-title {
  font-weight: 880;
  font-size: 17px;
}

.activity-copy {
  color: #61718d;
  line-height: 1.35;
}

.listing-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(240px, 0.7fr);
  gap: 16px;
}

.vertical-tags {
  display: grid;
  justify-content: start;
  margin-top: 12px;
}

.health {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 34px;
  font-weight: 900;
}

.before-after {
  display: grid;
  gap: 9px;
}

.text-box {
  border-radius: 14px;
  padding: 12px;
  background: #f7faff;
  border: 1px solid var(--line);
  line-height: 1.38;
}

.text-box.good {
  background: var(--green-soft);
  border-color: #b7efcf;
}

.impact {
  width: fit-content;
  min-width: 96px;
  margin: 10px 0 16px;
  padding: 9px 12px;
  border-radius: 14px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  background: var(--green-soft);
  color: var(--green-deep);
}

.impact.medium {
  background: var(--blue-soft);
  color: var(--blue);
}

.one-col {
  grid-template-columns: 1fr;
}

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

.step {
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  display: grid;
  gap: 5px;
  align-content: start;
}

.step.done {
  background: var(--green-soft);
  border-color: #b6efcd;
}

.step.active {
  background: var(--blue-soft);
  border-color: #b8d7ff;
}

.step-number {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e9f0f8;
  color: #64748b;
  font-weight: 900;
}

.step.done .step-number {
  background: var(--green);
  color: white;
}

.step.active .step-number {
  background: var(--blue);
  color: white;
}

.step-label {
  font-size: 12px;
  line-height: 1.25;
  color: #5c6d88;
  font-weight: 760;
}

.knowledge-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 15px;
  align-items: start;
}

.knowledge-title {
  font-weight: 870;
  margin-bottom: 5px;
}

.knowledge-copy {
  color: #61718d;
  line-height: 1.36;
}

.report {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.report-head {
  padding: 24px;
  background: #f5f9ff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.report-body {
  padding: 24px;
  display: grid;
  gap: 12px;
}

.report-line {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

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

.connection-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.connection-title {
  display: block;
  font-size: 20px;
  font-weight: 880;
  margin-bottom: 4px;
}

.connection-subtitle {
  display: block;
  color: #61718d;
  line-height: 1.35;
}

.progress {
  display: block;
  height: 11px;
  margin-top: 13px;
  background: #dfe8f2;
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: var(--green);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 13px 16px;
  border-radius: 16px;
  background: #0f172a;
  color: white;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.24);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 20;
  max-width: 360px;
  line-height: 1.35;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.36);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 30;
}

.modal {
  width: min(720px, 100%);
  background: white;
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.modal-head {
  padding: 20px 22px;
  background: #f5f9ff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.modal-body {
  padding: 22px;
}

.close-button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #edf3fa;
  color: #52627d;
  font-weight: 900;
}

.svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

  .sidebar {
    position: static;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .sidebar-footer {
    display: none;
  }

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

  .hero,
  .grid-2,
  .lead-layout,
  .audit-summary {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .main,
  .sidebar {
    padding: 14px;
  }

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

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

  .top-controls {
    justify-content: stretch;
  }

  .select-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding: 18px;
  }

  .page-heading h1 {
    font-size: 28px;
  }

  .hero-title {
    font-size: 32px;
  }

  .kpi-grid,
  .grid-3,
  .connections-grid {
    grid-template-columns: 1fr;
  }

  .queue-item,
  .lead-item,
  .activity-item,
  .trigger-row,
  .listing-item,
  .knowledge-item,
  .connection-card,
  .report-line {
    grid-template-columns: 1fr;
  }

  .score-stack {
    justify-items: start;
  }

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

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

  .table-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .table-cell:last-child {
    border-bottom: 0;
  }

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