:root {
  --navy: #10233f;
  --navy-2: #17365f;
  --teal: #0f9f9a;
  --teal-2: #dff8f5;
  --ink: #172033;
  --muted: #667085;
  --line: #e6e9ef;
  --page: #f7f9fc;
  --white: #ffffff;
  --red: #c24135;
  --amber: #b7791f;
  --green: #16794c;
  --blue: #2463b7;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

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

button {
  border: 0;
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(16, 35, 63, 0.92), rgba(16, 35, 63, 0.84)),
    url("data:image/svg+xml,%3Csvg width='1200' height='800' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1200' height='800' fill='%23f7f9fc'/%3E%3Cg fill='none' stroke='%230f9f9a' stroke-width='4' opacity='.35'%3E%3Cpath d='M120 520h260v70H120zM450 420h280v170H450zM800 500h240v90H800zM160 300h180v120H160zM860 260h120v180H860z'/%3E%3Cpath d='M480 390h220l35 30H445zM150 500l25-65h150l25 65'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}

.login-card {
  width: min(460px, 100%);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(6, 24, 44, 0.28);
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-card h1 {
  color: var(--navy);
  font-size: 30px;
  line-height: 1.1;
}

.login-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 204px 1fr;
}

.sidebar {
  background: var(--navy);
  color: var(--white);
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0 6px 20px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--teal);
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 34px;
}

.brand h1 {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
}

.brand span {
  display: block;
  color: #a8c4df;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  margin-top: 2px;
}

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

.nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 39px;
  color: #dce8f5;
  background: transparent;
  border-radius: 8px;
  padding: 9px 10px;
  text-align: left;
  font-size: 14px;
}

.nav button:hover,
.nav button.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.nav-icon {
  width: 20px;
  text-align: center;
  color: #8fe2dd;
}

.main {
  min-width: 0;
}

.topbar {
  height: 68px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar h2 {
  margin: 0;
  font-size: 20px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.content {
  padding: 20px 18px 40px;
}

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

.kpi-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

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

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

.dashboard-insights-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(340px, 1.12fr) minmax(330px, 1fr);
  gap: 16px;
}

.dashboard-ops-grid {
  display: grid;
  grid-template-columns: minmax(286px, 0.92fr) minmax(300px, 1fr) minmax(390px, 1.28fr);
  gap: 16px;
  align-items: stretch;
}

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

.metric-card {
  height: 88px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  padding: 10px 7px;
  box-shadow: 0 6px 16px rgba(16, 35, 63, 0.06);
  overflow: hidden;
}

.metric-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-2);
}

.metric-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-icon.mint {
  color: #139d63;
  background: #def7e8;
}

.metric-icon.blue {
  color: #1466d8;
  background: #e6f0ff;
}

.metric-icon.orange {
  color: #df7a13;
  background: #fff0d8;
}

.metric-icon.violet {
  color: #7257d7;
  background: #eee9ff;
}

.metric-icon.cyan {
  color: #0a929d;
  background: #def8fb;
}

.metric-icon.green {
  color: #19a05d;
  background: #e0f8e8;
}

.metric-body {
  min-width: 0;
  flex: 1;
}

.metric-label {
  color: var(--navy);
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.6px;
  font-weight: 800;
  line-height: 1.1;
}

.metric-value {
  margin-top: 6px;
  color: var(--navy);
  font-size: 23px;
  line-height: 1;
  font-weight: 850;
}

.metric-trend {
  margin-top: 6px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.metric-trend span {
  color: #159447;
  font-weight: 800;
}

.metric-trend.down span,
.metric-trend.down {
  color: var(--red);
}

.metric-trend.flat span,
.metric-trend.flat {
  color: #667085;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(16, 35, 63, 0.04);
}

.card.compact {
  padding: 14px;
}

.kpi {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi .label {
  color: var(--muted);
  font-size: 13px;
}

.kpi .value {
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h3 {
  margin: 0;
  font-size: 16px;
}

.section-menu {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 1px;
}

.link-btn {
  border: 0;
  background: transparent;
  color: #0d5fc1;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.link-btn:hover {
  color: var(--navy);
}

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

.small {
  font-size: 12px;
}

.donut-panel {
  min-height: 214px;
  display: grid;
  grid-template-columns: minmax(132px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: center;
}

.donut-visual {
  display: grid;
  place-items: center;
  min-width: 0;
}

.donut-chart {
  width: min(168px, 100%);
  min-width: 124px;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
}

.donut-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 10px 18px rgba(16, 35, 63, 0.08));
}

.donut-track,
.donut-segment {
  fill: none;
  stroke-width: 13;
}

.donut-track {
  stroke: #edf2f7;
}

.donut-segment {
  cursor: pointer;
  stroke-linecap: butt;
  transition:
    opacity 160ms ease,
    stroke-width 160ms ease,
    filter 160ms ease;
}

.donut-panel.is-hovering .donut-segment {
  opacity: 0.28;
}

.donut-panel.is-hovering .donut-segment.active {
  opacity: 1;
  stroke-width: 16;
  filter: drop-shadow(0 3px 6px rgba(16, 35, 63, 0.22));
}

.donut-panel:has(.donut-segment:hover) .donut-segment,
.donut-panel:has(.donut-legend-row:hover) .donut-segment {
  opacity: 0.28;
}

.donut-panel:has(.donut-segment[data-slice-index="0"]:hover) .donut-segment[data-slice-index="0"],
.donut-panel:has(.donut-legend-row[data-slice-index="0"]:hover) .donut-segment[data-slice-index="0"],
.donut-panel:has(.donut-segment[data-slice-index="1"]:hover) .donut-segment[data-slice-index="1"],
.donut-panel:has(.donut-legend-row[data-slice-index="1"]:hover) .donut-segment[data-slice-index="1"],
.donut-panel:has(.donut-segment[data-slice-index="2"]:hover) .donut-segment[data-slice-index="2"],
.donut-panel:has(.donut-legend-row[data-slice-index="2"]:hover) .donut-segment[data-slice-index="2"],
.donut-panel:has(.donut-segment[data-slice-index="3"]:hover) .donut-segment[data-slice-index="3"],
.donut-panel:has(.donut-legend-row[data-slice-index="3"]:hover) .donut-segment[data-slice-index="3"],
.donut-panel:has(.donut-segment[data-slice-index="4"]:hover) .donut-segment[data-slice-index="4"],
.donut-panel:has(.donut-legend-row[data-slice-index="4"]:hover) .donut-segment[data-slice-index="4"],
.donut-panel:has(.donut-segment[data-slice-index="5"]:hover) .donut-segment[data-slice-index="5"],
.donut-panel:has(.donut-legend-row[data-slice-index="5"]:hover) .donut-segment[data-slice-index="5"],
.donut-panel:has(.donut-segment[data-slice-index="6"]:hover) .donut-segment[data-slice-index="6"],
.donut-panel:has(.donut-legend-row[data-slice-index="6"]:hover) .donut-segment[data-slice-index="6"] {
  opacity: 1;
  stroke-width: 16;
  filter: drop-shadow(0 3px 6px rgba(16, 35, 63, 0.22));
}

.donut-center {
  position: absolute;
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 0 0 1px #e8edf4;
  pointer-events: none;
}

.donut-center strong {
  font-size: 22px;
  line-height: 1;
  font-weight: 850;
}

.donut-center span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.donut-legend {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.donut-legend-row {
  display: grid;
  grid-template-columns: 12px minmax(86px, 1fr) 42px 58px;
  gap: 9px;
  align-items: center;
  min-height: 29px;
  padding: 3px 6px;
  border-radius: 8px;
  color: var(--navy);
  font-size: 13px;
  transition:
    background 160ms ease,
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.donut-panel.is-hovering .donut-legend-row {
  opacity: 0.42;
}

.donut-panel.is-hovering .donut-legend-row.active {
  opacity: 1;
  background: #f3f8ff;
  transform: translateX(2px);
}

.donut-panel:has(.donut-segment:hover) .donut-legend-row,
.donut-panel:has(.donut-legend-row:hover) .donut-legend-row {
  opacity: 0.42;
}

.donut-panel:has(.donut-segment[data-slice-index="0"]:hover) .donut-legend-row[data-slice-index="0"],
.donut-panel:has(.donut-legend-row[data-slice-index="0"]:hover) .donut-legend-row[data-slice-index="0"],
.donut-panel:has(.donut-segment[data-slice-index="1"]:hover) .donut-legend-row[data-slice-index="1"],
.donut-panel:has(.donut-legend-row[data-slice-index="1"]:hover) .donut-legend-row[data-slice-index="1"],
.donut-panel:has(.donut-segment[data-slice-index="2"]:hover) .donut-legend-row[data-slice-index="2"],
.donut-panel:has(.donut-legend-row[data-slice-index="2"]:hover) .donut-legend-row[data-slice-index="2"],
.donut-panel:has(.donut-segment[data-slice-index="3"]:hover) .donut-legend-row[data-slice-index="3"],
.donut-panel:has(.donut-legend-row[data-slice-index="3"]:hover) .donut-legend-row[data-slice-index="3"],
.donut-panel:has(.donut-segment[data-slice-index="4"]:hover) .donut-legend-row[data-slice-index="4"],
.donut-panel:has(.donut-legend-row[data-slice-index="4"]:hover) .donut-legend-row[data-slice-index="4"],
.donut-panel:has(.donut-segment[data-slice-index="5"]:hover) .donut-legend-row[data-slice-index="5"],
.donut-panel:has(.donut-legend-row[data-slice-index="5"]:hover) .donut-legend-row[data-slice-index="5"],
.donut-panel:has(.donut-segment[data-slice-index="6"]:hover) .donut-legend-row[data-slice-index="6"],
.donut-panel:has(.donut-legend-row[data-slice-index="6"]:hover) .donut-legend-row[data-slice-index="6"] {
  opacity: 1;
  background: #f3f8ff;
  transform: translateX(2px);
}

.donut-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(16, 35, 63, 0.04);
}

.donut-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend-row strong {
  text-align: right;
  font-weight: 850;
}

.donut-count {
  color: var(--muted);
  font-weight: 650;
}

.line-card-body {
  min-height: 214px;
  display: grid;
  grid-template-rows: minmax(170px, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.line-chart {
  width: 100%;
  height: auto;
  min-height: 214px;
  overflow: visible;
}

.line-grid {
  stroke: #e5eaf1;
  stroke-width: 1;
}

.line-y-label,
.line-x-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.line-y-label {
  text-anchor: end;
}

.line-x-label {
  text-anchor: middle;
}

.line-area {
  fill: url("#lineAreaFill");
}

.line-path {
  fill: none;
  stroke: #0f9f9a;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-point circle {
  fill: #0f9f9a;
  stroke: var(--white);
  stroke-width: 3;
  cursor: pointer;
  transition:
    opacity 160ms ease,
    r 160ms ease,
    filter 160ms ease,
    stroke-width 160ms ease;
}

.line-point text {
  fill: var(--navy);
  text-anchor: middle;
  font-size: 12px;
  font-weight: 850;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.line-card-body.is-hovering .line-point {
  opacity: 0.32;
}

.line-card-body.is-hovering .line-point.active {
  opacity: 1;
}

.line-card-body.is-hovering .line-point.active circle,
.line-point:hover circle,
.line-point:focus circle {
  r: 7;
  stroke-width: 4;
  filter: drop-shadow(0 4px 7px rgba(15, 159, 154, 0.34));
}

.line-card-body.is-hovering .line-point.active text,
.line-point:hover text,
.line-point:focus text {
  opacity: 1;
  transform: translateY(-2px);
}

.vertical-chart {
  min-height: 214px;
  display: grid;
  grid-template-columns: repeat(6, minmax(34px, 1fr));
  grid-template-rows: 1fr auto;
  gap: 12px 7px;
  align-items: end;
  padding: 6px 4px 0;
}

.vertical-bar-item {
  min-width: 0;
  display: grid;
  grid-template-rows: 18px 140px auto;
  justify-items: center;
  align-items: end;
  gap: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.vertical-bar-item strong {
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}

.vertical-bar-track {
  width: clamp(24px, 64%, 34px);
  height: 140px;
  display: flex;
  align-items: flex-end;
  border-radius: 8px 8px 4px 4px;
  background: #eef6f7;
  overflow: hidden;
}

.vertical-bar-fill {
  width: 100%;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #0fabb2 0%, #087f89 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition:
    filter 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.vertical-bar-item span {
  max-width: 100%;
  min-height: 30px;
  color: var(--navy);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.vertical-chart.is-hovering .vertical-bar-item {
  opacity: 0.34;
}

.vertical-chart.is-hovering .vertical-bar-item.active,
.vertical-bar-item:hover,
.vertical-bar-item:focus {
  opacity: 1;
  transform: translateY(-3px);
  background: #f3fbfb;
}

.vertical-chart.is-hovering .vertical-bar-item.active .vertical-bar-fill,
.vertical-bar-item:hover .vertical-bar-fill,
.vertical-bar-item:focus .vertical-bar-fill {
  background: linear-gradient(180deg, #12c7cb 0%, #07808a 100%);
  filter: drop-shadow(0 6px 8px rgba(15, 159, 154, 0.2));
}

.chart-tooltip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 7px;
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--muted);
  background: #f7fafc;
  border: 1px solid #e7edf4;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chart-tooltip strong {
  color: var(--navy);
}

.chart-tooltip span {
  color: var(--teal);
}

.chart-tooltip i {
  color: #98a2b3;
  font-style: normal;
}

.vertical-tooltip {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.funnel-panel {
  min-height: 218px;
  display: grid;
  grid-template-columns: minmax(128px, 0.95fr) minmax(126px, 1.05fr);
  gap: 14px;
  align-items: center;
}

.funnel-shape {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-width: 0;
}

.funnel-segment {
  height: clamp(28px, 4.2vw, 36px);
  max-height: 36px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 11px;
  font-weight: 850;
  clip-path: polygon(5% 0, 95% 0, 86% 100%, 14% 100%);
  box-shadow: 0 8px 14px rgba(16, 35, 63, 0.08);
}

.funnel-segment span {
  max-width: 78%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.funnel-legend {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.funnel-row {
  display: grid;
  grid-template-columns: 10px minmax(52px, 1fr) minmax(34px, auto) minmax(30px, auto);
  gap: 7px;
  align-items: center;
  color: var(--navy);
  font-size: 12px;
}

.funnel-row span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.funnel-row strong {
  text-align: right;
  font-weight: 850;
}

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

.funnel-total {
  grid-column: 1 / -1;
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
  padding-left: 8px;
}

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

.bar-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(120px, 2fr) 42px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

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

.bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 999px;
}

.staff-performance-list {
  min-height: 156px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.staff-performance-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(140px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f6;
}

.staff-performance-row:last-child {
  border-bottom: 0;
}

.staff-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.staff-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.staff-copy strong {
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
}

.staff-copy span,
.staff-progress-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.staff-copy strong,
.staff-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-progress {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.staff-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--navy);
  font-size: 12px;
}

.staff-progress-meta strong {
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}

.staff-progress-track {
  height: 9px;
  border-radius: 999px;
  background: #eef2f6;
  overflow: hidden;
}

.staff-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f9f9a, #22b8a8);
}

.staff-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.mini-stat {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  background: #eef2f6;
  color: #475467;
}

.mini-stat.done {
  color: var(--green);
  background: #e8f7ef;
}

.mini-stat.pending {
  color: var(--amber);
  background: #fff7df;
}

.mini-stat.overdue {
  color: var(--red);
  background: #fff0ed;
}

.owner-summary-panel {
  min-height: 156px;
  display: grid;
  align-content: start;
  gap: 14px;
}

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

.owner-summary-metric {
  min-width: 0;
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid #e7edf4;
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}

.owner-summary-metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-summary-metric strong {
  color: var(--navy);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.owner-summary-metric.blue strong {
  color: var(--blue);
}

.owner-summary-metric.green strong {
  color: var(--green);
}

.owner-summary-metric.amber strong {
  color: var(--amber);
}

.owner-summary-metric.red strong {
  color: var(--red);
}

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

.owner-summary-insights > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7fafc;
}

.owner-summary-insights span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.owner-summary-insights strong {
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-action-list {
  min-height: 214px;
  display: grid;
  align-content: start;
}

.lead-action-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, auto);
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 9px 8px;
  border-bottom: 1px solid #edf1f6;
  cursor: pointer;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.lead-action-row:last-child {
  border-bottom: 0;
}

.lead-action-row:hover {
  background: #f8fbff;
  transform: translateY(-1px);
}

.lead-row-main,
.lead-row-copy {
  min-width: 0;
}

.lead-row-main {
  display: grid;
  gap: 8px;
}

.lead-row-top {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.lead-row-copy {
  display: grid;
  gap: 2px;
}

.lead-row-copy strong {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.lead-row-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.lead-row-copy strong,
.lead-row-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-row-tags {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-owner-chip {
  min-height: 21px;
  max-width: 150px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  color: #475467;
  background: #eef2f6;
  font-size: 10.5px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-row-side {
  display: grid;
  justify-items: end;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.lead-row-side span {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-row-side.assign {
  align-content: center;
}

.lead-row-side .btn {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.hot-lead-row,
.unassigned-lead-row {
  border-left: 3px solid transparent;
}

.hot-lead-row:hover {
  border-left-color: var(--red);
}

.unassigned-lead-row:hover {
  border-left-color: var(--blue);
}

.lead-panel-empty {
  min-height: 214px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #ccd5e2;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  background: #fbfcfe;
}

.lead-panel-empty strong {
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.lead-panel-empty span {
  max-width: 320px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.lead-panel-empty.success {
  border-color: #bfe8d1;
  background: #f8fffb;
}

.social-enquiry-list {
  min-height: 214px;
  display: grid;
  align-content: start;
}

.social-enquiry-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(92px, 0.65fr) minmax(0, 1.35fr) minmax(86px, auto);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  border-bottom: 1px solid #edf1f6;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.social-enquiry-row:last-child {
  border-bottom: 0;
}

.social-enquiry-row.linked {
  cursor: pointer;
}

.social-enquiry-row:hover {
  background: #f8fbff;
  transform: translateY(-1px);
}

.social-enquiry-platform,
.social-enquiry-main,
.social-enquiry-status {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.social-enquiry-platform span:not(.source-pill),
.social-enquiry-main span,
.social-enquiry-status span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.social-enquiry-main strong {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.social-enquiry-main strong,
.social-enquiry-main span,
.social-enquiry-platform span:not(.source-pill),
.social-enquiry-status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-enquiry-status {
  justify-items: end;
  text-align: right;
}

.source-pill.instagram {
  color: #087a7e;
  background: #ddf7f5;
}

.source-pill.facebook {
  color: #1466d8;
  background: #e7f0ff;
}

.source-pill.youtube {
  color: #c24135;
  background: #fff0ed;
}

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

.dashboard-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.dashboard-list {
  min-height: 214px;
  display: grid;
  align-content: start;
}

.dashboard-list-head,
.dashboard-list-row {
  display: grid;
  align-items: center;
}

.dashboard-list-head {
  min-height: 28px;
  padding: 0 8px 6px;
  color: #58657a;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-list-row {
  min-width: 0;
  border-bottom: 1px solid #edf1f6;
  cursor: pointer;
  transition: background 160ms ease;
}

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

.dashboard-list-row:hover {
  background: #f8fbff;
}

.followup-list-head,
.followup-list-row {
  grid-template-columns: 48px minmax(0, 1fr) 32px;
  gap: 8px;
}

.followup-list-row {
  min-height: 58px;
  padding: 7px 8px;
}

.followup-actions {
  display: flex;
  justify-content: flex-end;
}

.followup-status-inline {
  margin-top: 4px;
}

.followup-status-inline .badge {
  min-height: 20px;
  padding: 2px 8px;
  font-size: 11px;
}

.enquiry-list-head,
.enquiry-list-row {
  grid-template-columns: minmax(0, 1.34fr) minmax(112px, 0.8fr) minmax(52px, auto);
  gap: 10px;
}

.enquiry-list-row {
  min-height: 48px;
  padding: 7px 8px;
}

.enquiry-main,
.enquiry-source {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.enquiry-main strong {
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 850;
}

.enquiry-main span,
.enquiry-source span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.enquiry-main strong,
.enquiry-main span,
.enquiry-source span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enquiry-status {
  justify-self: end;
}

.source-pill {
  width: fit-content;
  max-width: 100%;
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  color: #0d66d0;
  background: #eaf3ff;
  font-size: 10.5px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-pill.instagram-dm,
.source-pill.instagram-comment {
  color: #087a7e;
  background: #ddf7f5;
}

.source-pill.facebook-messenger,
.source-pill.facebook-comment,
.source-pill.facebook-lead-ad {
  color: #1466d8;
  background: #e7f0ff;
}

.source-pill.youtube-comment {
  color: #c24135;
  background: #fff0ed;
}

.source-pill.walk-in,
.source-pill.manual {
  color: #7257d7;
  background: #eee9ff;
}

.dashboard-mini-table {
  min-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}

.dashboard-mini-table th,
.dashboard-mini-table td {
  height: 42px;
  padding: 8px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #edf1f6;
}

.dashboard-mini-table th {
  color: #58657a;
  background: var(--white);
  font-size: 11px;
  font-weight: 750;
}

.dashboard-mini-table tr:last-child td {
  border-bottom: 0;
}

.dashboard-mini-table tbody tr {
  cursor: default;
}

.dashboard-mini-table tbody tr[data-action] {
  cursor: pointer;
}

.dashboard-mini-table tbody tr:hover td {
  background: #f8fbff;
}

.dashboard-mini-table strong {
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}

.followups-mini-table th:nth-child(1),
.followups-mini-table td:nth-child(1) {
  width: 64px;
}

.followups-mini-table th:nth-child(2),
.followups-mini-table td:nth-child(2) {
  width: 35%;
}

.followups-mini-table th:nth-child(3),
.followups-mini-table td:nth-child(3) {
  width: 28%;
}

.followups-mini-table th:nth-child(4),
.followups-mini-table td:nth-child(4) {
  width: 78px;
}

.followups-mini-table th:nth-child(5),
.followups-mini-table td:nth-child(5) {
  width: 38px;
  text-align: right;
}

.enquiries-mini-table {
  min-width: 100%;
}

.enquiries-mini-table th:nth-child(1),
.enquiries-mini-table td:nth-child(1) {
  width: 22%;
}

.enquiries-mini-table th:nth-child(2),
.enquiries-mini-table td:nth-child(2) {
  width: 30px;
  text-align: center;
}

.enquiries-mini-table th:nth-child(3),
.enquiries-mini-table td:nth-child(3) {
  width: 17%;
}

.enquiries-mini-table th:nth-child(4),
.enquiries-mini-table td:nth-child(4) {
  width: 20%;
}

.enquiries-mini-table th:nth-child(5),
.enquiries-mini-table td:nth-child(5) {
  width: 18%;
}

.enquiries-mini-table th:nth-child(6),
.enquiries-mini-table td:nth-child(6) {
  width: 52px;
}

.dashboard-mini-table td,
.dashboard-mini-table th {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-cell,
.owner-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.person-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.person-copy strong,
.person-copy span,
.owner-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.mobile-product {
  display: none;
}

.person-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--avatar-color, var(--teal));
  font-size: 10px;
  font-weight: 850;
}

.owner-cell .person-avatar {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  font-size: 9px;
}

.time-cell {
  color: var(--navy);
  font-weight: 750;
}

.icon-btn {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #0d66d0;
  background: #eef6ff;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--white);
  background: #0d66d0;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.source-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #0d66d0;
  background: #eaf3ff;
  font-size: 9px;
  font-weight: 900;
}

.source-icon.instagram-dm,
.source-icon.instagram-comment {
  color: #087a7e;
  background: #ddf7f5;
}

.source-icon.facebook-messenger,
.source-icon.facebook-comment,
.source-icon.facebook-lead-ad {
  color: #1466d8;
  background: #e7f0ff;
}

.source-icon.youtube-comment {
  color: #c24135;
  background: #fff0ed;
}

.source-icon.walk-in,
.source-icon.manual {
  color: #7257d7;
  background: #eee9ff;
}

.compact-empty {
  min-height: 210px;
}

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

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: #fbfcfe;
}

tr:hover td {
  background: #fbfcfe;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  background: #eef2f6;
  color: var(--ink);
  white-space: nowrap;
}

.badge.hot,
.badge.high,
.badge.overdue {
  background: #fff0ed;
  color: var(--red);
}

.badge.warm,
.badge.medium,
.badge.pending {
  background: #fff7df;
  color: var(--amber);
}

.badge.due {
  background: #eaf3ff;
  color: #0d5fc1;
}

.badge.won,
.badge.completed {
  background: #e8f7ef;
  color: var(--green);
}

.badge.new,
.badge.teal {
  background: var(--teal-2);
  color: #08736f;
}

.badge.lost,
.badge.spam,
.badge.low {
  background: #eef2f6;
  color: #475467;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar > * {
  min-width: 150px;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d8deea;
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
  min-height: 40px;
  padding: 9px 11px;
  outline: none;
}

textarea {
  min-height: 98px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 159, 154, 0.14);
}

.btn {
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 13px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #eef2f6;
  color: var(--ink);
}

.btn.primary {
  background: var(--teal);
  color: var(--white);
}

.btn.navy {
  background: var(--navy);
  color: var(--white);
}

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

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

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.detail-title h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

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

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  border-left: 3px solid var(--teal);
  padding: 2px 0 2px 12px;
}

.message-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.notice {
  border: 1px solid #bee7e3;
  background: #f2fffd;
  color: #085f5b;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.error {
  border-color: #ffd5cd;
  background: #fff6f4;
  color: var(--red);
}

.empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #ccd5e2;
  border-radius: 8px;
  background: #fbfcfe;
}

.split-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

@media (max-width: 1340px) {
  .staff-performance-row {
    grid-template-columns: minmax(150px, 1.05fr) minmax(120px, 0.9fr);
  }

  .staff-stats {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

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

  .followups-mini-table .followup-product-heading,
  .followups-mini-table .followup-product-cell {
    display: none;
  }

  .followups-mini-table th:nth-child(1),
  .followups-mini-table td:nth-child(1) {
    width: 58px;
  }

  .followups-mini-table th:nth-child(2),
  .followups-mini-table td:nth-child(2) {
    width: auto;
  }

  .followups-mini-table th:nth-child(4),
  .followups-mini-table td:nth-child(4) {
    width: 76px;
  }

  .followups-mini-table th:nth-child(5),
  .followups-mini-table td:nth-child(5) {
    width: 34px;
  }

  .mobile-product {
    display: inline;
  }

  .enquiries-mini-table .budget-col {
    display: none;
  }

  .enquiries-mini-table th:nth-child(1),
  .enquiries-mini-table td:nth-child(1) {
    width: 26%;
  }

  .enquiries-mini-table th:nth-child(3),
  .enquiries-mini-table td:nth-child(3) {
    width: 20%;
  }

  .enquiries-mini-table th:nth-child(5),
  .enquiries-mini-table td:nth-child(5) {
    width: 24%;
  }
}

@media (max-width: 1240px) {
  .dashboard-ops-grid {
    grid-template-columns: 1fr;
  }

  .funnel-panel {
    grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1.2fr);
  }
}

@media (max-width: 1100px) {
  .dashboard-insights-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-ops-grid {
    grid-template-columns: 1fr;
  }

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

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

  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .donut-panel {
    grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1.3fr);
  }

  .funnel-panel {
    grid-template-columns: minmax(180px, 0.75fr) minmax(220px, 1.25fr);
  }

  .vertical-chart {
    grid-template-columns: repeat(6, minmax(40px, 1fr));
  }
}

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

  .sidebar {
    position: relative;
    height: auto;
  }

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

  .topbar {
    position: relative;
    height: auto;
    padding: 18px;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .content {
    padding: 18px;
  }

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

  .dashboard-strip {
    grid-template-columns: 1fr;
  }

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

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

  .line-card-body {
    min-height: 190px;
  }

  .vertical-chart {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }

  .chart-tooltip {
    white-space: normal;
    text-align: center;
  }

  .staff-performance-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

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

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

  .social-enquiry-status {
    justify-items: start;
    text-align: left;
  }

  .lead-row-side {
    justify-items: start;
    text-align: left;
  }

  .staff-stats {
    justify-content: flex-start;
  }

  .owner-summary-grid,
  .owner-summary-insights {
    grid-template-columns: 1fr;
  }

  .dashboard-mini-table {
    font-size: 11px;
  }

  .followups-mini-table,
  .enquiries-mini-table {
    min-width: 520px;
  }
}
