@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #17383a;
  --ink-strong: #102c2f;
  --ink-soft: #486265;
  --ink-muted: #6f8585;
  --sidebar: #122f32;
  --sidebar-deep: #0d272a;
  --sidebar-line: rgba(224, 244, 239, 0.11);
  --sidebar-text: #d8e8e4;
  --teal: #087f73;
  --teal-dark: #05675f;
  --teal-deep: #04554f;
  --teal-soft: #e1f2ed;
  --teal-wash: #f0f8f5;
  --canvas: #f6f8f7;
  --surface: #ffffff;
  --surface-soft: #fbfcfc;
  --line: #e1e9e6;
  --line-strong: #cbdad5;
  --amber: #b86f16;
  --amber-dark: #8f530f;
  --amber-soft: #fff2dc;
  --red: #ba4b4b;
  --red-dark: #983838;
  --red-soft: #fee9e7;
  --gray-soft: #edf2f1;
  --shadow-xs: 0 1px 2px rgba(20, 50, 49, 0.04);
  --shadow-sm: 0 5px 18px rgba(24, 62, 60, 0.06);
  --shadow-md: 0 16px 38px rgba(17, 58, 54, 0.12);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --sidebar-width: 224px;
  --topbar-height: 72px;
  --focus-ring: 0 0 0 3px rgba(8, 127, 115, 0.18);
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
[role="button"] {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

img,
svg {
  display: block;
  max-width: 100%;
}

svg {
  overflow: visible;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  color: var(--teal-dark);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4,
button,
.tab,
.nav-item,
.metric-value,
.lead-name,
.brand-name {
  font-family: var(--font-display);
}

h1,
h2,
h3,
h4 {
  color: var(--ink-strong);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(1.6rem, 1.7vw, 2rem);
  line-height: 1.12;
}

h2 {
  font-size: 1.12rem;
  line-height: 1.25;
}

h3 {
  font-size: 0.98rem;
  line-height: 1.3;
}

h4 {
  font-size: 0.88rem;
  line-height: 1.35;
}

::selection {
  background: rgba(8, 127, 115, 0.18);
  color: var(--ink-strong);
}

:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.compact {
  letter-spacing: -0.02em;
}

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  overflow: hidden;
  padding: 23px 14px 17px;
  background: var(--sidebar);
  color: var(--sidebar-text);
}

.brand {
  display: flex;
  align-items: center;
  min-height: 47px;
  gap: 10px;
  padding: 0 9px 24px;
  border-bottom: 1px solid var(--sidebar-line);
}

.brand-mark {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #ccefe7;
}

.brand-mark svg {
  width: 32px;
  height: 32px;
}

.brand-mark path,
.brand-mark polyline,
.brand-mark line {
  vector-effect: non-scaling-stroke;
}

.brand-name {
  color: #f2faf8;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.brand-product {
  margin-top: 3px;
  color: #86aba6;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.workspace {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 19px 4px 17px;
  padding: 9px 9px;
  border: 1px solid var(--sidebar-line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  color: #ecf7f4;
  font-size: 11px;
  font-weight: 700;
}

.workspace::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #70d2b8;
  box-shadow: 0 0 0 4px rgba(112, 210, 184, 0.13);
  content: "";
}

.sidebar nav {
  display: grid;
  gap: 4px;
}

.nav-label {
  display: block;
  padding: 0 11px 8px;
  color: #789b98;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 11px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: #acc5c1;
  font-size: 12px;
  font-weight: 700;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.nav-item svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: #7fa39e;
  stroke-width: 1.7;
}

.nav-item:hover {
  border-color: rgba(230, 249, 244, 0.11);
  background: rgba(255, 255, 255, 0.055);
  color: #f2faf8;
}

.nav-item.active {
  border-color: rgba(112, 210, 184, 0.17);
  background: rgba(8, 127, 115, 0.28);
  color: #f5fffc;
  box-shadow: inset 3px 0 0 #62cdb1;
}

.nav-item.active svg {
  color: #76dcc1;
}

.nav-count {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  margin-left: auto;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #cce8e2;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
}

.nav-item.active .nav-count {
  background: rgba(131, 229, 202, 0.15);
  color: #abf1da;
}

.sidebar-bottom {
  display: grid;
  gap: 13px;
  margin-top: auto;
  padding: 16px 4px 0;
  border-top: 1px solid var(--sidebar-line);
}

.local-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 7px;
  color: #91b3ae;
  font-size: 10px;
  font-weight: 600;
}

.local-indicator::before {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #69c8a6;
  box-shadow: 0 0 0 4px rgba(105, 200, 166, 0.12);
  content: "";
}

.user-avatar,
.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #d7e8e1;
  color: var(--teal-deep);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sidebar-bottom .user-avatar {
  width: 29px;
  height: 29px;
  background: rgba(225, 245, 239, 0.13);
  color: #d5eee7;
}

.main {
  min-width: 0;
  min-height: 100vh;
  background: var(--canvas);
}

.topbar {
  display: flex;
  align-items: center;
  min-height: var(--topbar-height);
  gap: 20px;
  padding: 0 clamp(22px, 3vw, 46px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.breadcrumb {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  color: var(--ink-muted);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover {
  color: var(--teal);
}

.breadcrumb > *:not(:last-child)::after {
  display: inline-block;
  margin-left: 9px;
  color: #a8bbb8;
  content: "/";
}

.global-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 360px;
  max-width: 404px;
  min-width: 150px;
  margin-left: auto;
}

.global-search::before {
  position: absolute;
  left: 13px;
  width: 15px;
  height: 15px;
  border: 1.6px solid #87a09d;
  border-radius: 50%;
  content: "";
}

.global-search::after {
  position: absolute;
  left: 26px;
  width: 6px;
  height: 1.6px;
  transform: rotate(45deg);
  transform-origin: left center;
  background: #87a09d;
  content: "";
}

.global-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 12px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.global-search input::placeholder {
  color: #8ca09e;
}

.global-search input:focus {
  border-color: rgba(8, 127, 115, 0.55);
  background: var(--surface);
  box-shadow: var(--focus-ring);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 13px;
}

.topbar-right .avatar {
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.topbar-right > a,
.topbar-right > button {
  color: var(--ink-soft);
}

.main > .page-header,
.main > .source-banner,
.main > .dashboard-grid,
.main > .panel,
.main > .page-footer,
.main > .data-disclaimer,
.main > .section-heading,
.main > .blank-state,
.main > .table-wrap,
.main > .pagination {
  width: min(100% - clamp(44px, 6vw, 92px), 1392px);
  margin-right: auto;
  margin-left: auto;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 150px;
  gap: 26px;
  padding-top: 35px;
  padding-bottom: 25px;
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.page-subtitle {
  max-width: 640px;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.52;
  pointer-events: none;
}

.button.primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 4px 12px rgba(8, 127, 115, 0.16);
}

.button.primary:hover {
  background: var(--teal-dark);
  box-shadow: 0 6px 16px rgba(8, 127, 115, 0.21);
}

.button.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.button.secondary:hover {
  border-color: #a6c2bb;
  background: var(--teal-wash);
}

.button.ghost {
  color: var(--ink-soft);
}

.button.ghost:hover {
  background: var(--teal-wash);
  color: var(--teal-dark);
}

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

.button.danger {
  border-color: #efc9c5;
  background: #fffafa;
  color: var(--red-dark);
}

.button.danger:hover {
  border-color: #e3aba5;
  background: var(--red-soft);
}

.icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  vertical-align: middle;
}

.button .icon {
  width: 16px;
  height: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  gap: 5px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.pill.green {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

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

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

.pill.gray {
  background: var(--gray-soft);
  color: #607572;
}

.source-banner {
  display: flex;
  align-items: center;
  min-height: 58px;
  gap: 13px;
  padding: 11px 15px;
  border: 1px solid #cbe4dc;
  border-radius: var(--radius-sm);
  background: #edf9f5;
  color: var(--ink-soft);
}

.source-banner.info {
  border-color: #cbe4dc;
  background: #edf9f5;
}

.banner-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #d9f0e8;
  color: var(--teal-dark);
}

.banner-icon .icon {
  width: 16px;
  height: 16px;
}

.source-banner strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
}

.source-banner p {
  font-size: 11px;
  line-height: 1.45;
}

.source-banner .button {
  flex: 0 0 auto;
  margin-left: auto;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 23px;
  padding-top: 22px;
  padding-bottom: 32px;
}

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

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 27px;
}

.metric {
  position: relative;
  min-width: 0;
  min-height: 135px;
  padding: 17px 17px 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.metric::after {
  position: absolute;
  right: -22px;
  bottom: -24px;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(8, 127, 115, 0.07);
  border-radius: 50%;
  content: "";
}

.metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 24px;
  gap: 7px;
}

.metric-label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

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

.metric-icon .icon {
  width: 14px;
  height: 14px;
}

.metric-value,
.metric-number {
  display: block;
  margin-top: 13px;
  color: var(--ink-strong);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1;
}

.metric-caption {
  display: block;
  margin-top: 9px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.35;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.section-heading h2 {
  font-size: 15px;
}

.section-subtitle {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 11px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.panel > .section-heading,
.panel > .section-actions,
.panel > .panel-header {
  padding-right: 19px;
  padding-left: 19px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 14px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 19px;
  min-width: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 45px;
  gap: 7px;
  padding: 0 1px;
  border: 0;
  background: none;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  background: var(--teal);
  content: "";
  transition: transform 120ms ease;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  color: var(--teal-dark);
}

.tab.active::after {
  transform: scaleX(1);
}

.tab-count {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gray-soft);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 9px;
}

.tab.active .tab-count {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 9px;
  padding: 14px 19px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.filter-field {
  display: grid;
  gap: 5px;
  min-width: 127px;
}

.filter-field > label {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.filter-field select,
.filter-field input,
.search-input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.filter-field select {
  min-width: 130px;
  padding-right: 28px;
}

.filter-field select:focus,
.filter-field input:focus,
.search-input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(8, 127, 115, 0.55);
  box-shadow: var(--focus-ring);
}

.search-input {
  min-width: 190px;
  padding-left: 34px;
}

.lead-list {
  display: grid;
  gap: 9px;
  padding: 15px 19px 19px;
}

.lead-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 15px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.lead-card:hover {
  border-color: #b6d1ca;
  box-shadow: 0 5px 16px rgba(17, 60, 56, 0.055);
  transform: translateY(-1px);
}

.lead-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 11px;
}

.company-mark {
  display: grid;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid #d9e8e4;
  border-radius: 9px;
  background: #f1f7f5;
  color: var(--teal-dark);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.lead-title {
  min-width: 0;
}

.lead-name {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-person {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 11px;
}

.lead-badges,
.lead-context,
.lead-meta,
.lead-footer,
.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.lead-badges {
  margin-top: 11px;
}

.lead-context {
  margin-top: 11px;
  color: var(--ink-soft);
  font-size: 11px;
}

.lead-context > span + span::before,
.lead-meta > span + span::before {
  display: inline-block;
  margin: 0 8px 0 2px;
  color: #afc1be;
  content: "·";
}

.lead-recommendation {
  max-width: 440px;
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 2px solid #a8d9cb;
  background: var(--teal-wash);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.lead-recommendation strong {
  color: var(--teal-dark);
  font-weight: 800;
}

.lead-meta {
  align-self: start;
  justify-content: flex-end;
  color: var(--ink-muted);
  font-size: 10px;
  text-align: right;
}

.lead-footer {
  grid-column: 1 / -1;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.card-actions {
  justify-content: flex-end;
}

.empty-state,
.blank-state {
  display: grid;
  justify-items: center;
  padding: 43px 26px 46px;
  text-align: center;
}

.empty-state {
  min-height: 370px;
}

.empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid #cce4dc;
  border-radius: 17px;
  background: var(--teal-wash);
  color: var(--teal);
}

.empty-icon .icon {
  width: 25px;
  height: 25px;
  stroke-width: 1.45;
}

.empty-state h3,
.blank-state h3 {
  font-size: 16px;
}

.empty-state > p,
.blank-state > p {
  max-width: 420px;
  margin-top: 9px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.6;
}

.empty-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 620px);
  gap: 8px;
  margin-top: 25px;
  text-align: left;
}

.empty-step {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.step-num {
  display: inline-grid;
  width: 21px;
  height: 21px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
}

.empty-title {
  display: block;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
}

.empty-description {
  display: block;
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.45;
}

.data-disclaimer {
  margin-top: 16px;
  padding: 10px 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.data-disclaimer strong {
  color: var(--ink-soft);
  font-weight: 800;
}

.day-panel {
  position: sticky;
  top: 23px;
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.day-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.day-heading h2 {
  font-size: 15px;
}

.day-heading p {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 10px;
}

.routine-list {
  display: grid;
  gap: 0;
  padding: 7px 0 1px;
}

.routine-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 0;
}

.routine-item:not(:last-child)::after {
  position: absolute;
  top: 37px;
  bottom: -1px;
  left: 10px;
  border-left: 1px dashed #ccddd8;
  content: "";
}

.routine-check {
  position: relative;
  z-index: 1;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1.5px solid #bed3cd;
  border-radius: 50%;
  background: var(--surface);
  color: transparent;
}

.routine-item.done .routine-check {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.routine-item.current .routine-check {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(8, 127, 115, 0.12);
}

.routine-check .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.3;
}

.routine-content {
  min-width: 0;
}

.routine-content strong {
  display: block;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.routine-item.done .routine-content strong {
  color: var(--ink-muted);
  text-decoration: line-through;
  text-decoration-color: #acc2bd;
}

.routine-content p {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.45;
}

.routine-duration {
  align-self: start;
  padding-top: 1px;
  color: var(--ink-muted);
  font-size: 10px;
  white-space: nowrap;
}

.cadence-summary {
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cadence-summary > strong {
  display: block;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
}

.cadence-track {
  display: flex;
  align-items: flex-start;
  margin-top: 15px;
}

.cadence-node {
  position: relative;
  display: grid;
  flex: 1 1 0;
  justify-items: center;
  min-width: 0;
  color: var(--ink-muted);
  font-size: 9px;
  text-align: center;
}

.cadence-node:not(:last-child)::after {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 100%;
  border-top: 1px solid #cfe0db;
  content: "";
}

.cadence-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 11px;
  height: 11px;
  border: 2px solid #c1d5cf;
  border-radius: 50%;
  background: var(--surface);
}

.cadence-node:first-child .cadence-dot,
.cadence-node.is-complete .cadence-dot {
  border-color: var(--teal);
  background: var(--teal);
}

.cadence-node span:last-child {
  margin-top: 7px;
  line-height: 1.25;
}

.progress-bar {
  height: 6px;
  margin-top: 17px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eeeb;
}

.progress-bar > span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.mini-note {
  margin-top: 13px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.text-link {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 800;
}

.text-link:hover {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blank-state {
  min-height: 220px;
  margin-top: 15px;
  border: 1px dashed #c9ddd7;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.44);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.table-wrap table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 11px;
}

.table-wrap th {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-wrap td {
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: middle;
}

.table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.table-wrap tbody tr:hover {
  background: #fbfdfc;
}

.table-wrap td strong {
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 11px;
}

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

.cadence-card {
  min-width: 0;
  min-height: 105px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.cadence-day {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.cadence-card strong {
  display: block;
  margin-top: 10px;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.25;
}

.rule-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.rule-card h3 {
  margin-bottom: 14px;
}

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

.priority-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.priority-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.priority-item::before {
  display: grid;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  content: attr(data-priority);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
}

.history-list {
  display: grid;
}

.history-item {
  display: grid;
  grid-template-columns: 75px minmax(0, 1fr);
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.history-date {
  color: var(--ink-muted);
  font-size: 10px;
}

.history-title {
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
}

.history-note {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.45;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 17px;
  padding-bottom: 28px;
  color: var(--ink-muted);
  font-size: 10px;
}

.page-footer a {
  color: var(--ink-soft);
}

.page-footer a:hover {
  color: var(--teal);
}

.toast {
  position: fixed;
  right: 23px;
  bottom: 23px;
  z-index: 100;
  display: flex;
  align-items: center;
  max-width: min(390px, calc(100vw - 32px));
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid #beded4;
  border-radius: 10px;
  background: #f2fbf7;
  box-shadow: var(--shadow-md);
  color: var(--ink-strong);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.toast::before {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  content: "";
}

dialog.modal,
dialog.drawer {
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 72px rgba(13, 44, 43, 0.22);
}

dialog.modal {
  width: min(590px, calc(100vw - 32px));
}

dialog.drawer {
  width: min(660px, calc(100vw - 32px));
  min-height: 100vh;
  max-height: none;
  margin: 0 0 0 auto;
  border-width: 0 0 0 1px;
  border-radius: 0;
}

dialog::backdrop {
  background: rgba(11, 37, 38, 0.48);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

dialog.modal[open],
dialog.drawer[open] {
  animation: dialog-in 120ms ease-out both;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-head,
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 23px 17px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2,
.drawer-head h2 {
  font-size: 17px;
}

.modal-head p,
.drawer-head p {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.5;
}

.modal-close {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  margin: -5px -7px 0 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
}

.modal-close:hover {
  border-color: var(--line);
  background: var(--canvas);
  color: var(--ink);
}

.modal-body,
.drawer-body {
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  padding: 21px 23px;
}

.drawer-body {
  max-height: calc(100vh - 76px);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 15px 23px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

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

.form-grid > .field:only-child,
.form-grid > .field.full,
.form-grid > .form-help.full {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.field label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

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

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa9a6;
}

.field input[type="file"] {
  padding: 8px;
}

.field input[type="checkbox"],
.field input[type="radio"] {
  width: 17px;
  min-height: 17px;
  accent-color: var(--teal);
}

.form-help {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.form-error {
  display: none;
  color: var(--red-dark);
  font-size: 10px;
  line-height: 1.45;
}

.form-error:not(:empty) {
  display: block;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.check-row input {
  flex: 0 0 auto;
  margin-top: 1px;
}

.drawer-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.drawer-section:first-child {
  padding-top: 0;
}

.drawer-section:last-child {
  border-bottom: 0;
}

.drawer-section > h3 {
  margin-bottom: 13px;
  color: var(--ink-strong);
}

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

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

.detail-label {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-value {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 600;
}

.checklist {
  display: grid;
  gap: 9px;
}

.checklist .check-row {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.message-box {
  border: 1px solid #d4e7e1;
  border-radius: 10px;
  background: var(--teal-wash);
}

.message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #d4e7e1;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 800;
}

.quote {
  margin: 0;
  padding: 13px 12px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.event-form {
  display: grid;
  gap: 15px;
}

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

.action-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
}

.action-option:has(input:checked) {
  border-color: #9bcfc1;
  background: var(--teal-wash);
}

.action-option input {
  flex: 0 0 auto;
  margin-top: 1px;
}

.import-zone {
  display: grid;
  justify-items: center;
  padding: 31px 20px;
  border: 1px dashed #9ecbc0;
  border-radius: 12px;
  background: var(--teal-wash);
  text-align: center;
}

.import-zone .icon {
  width: 25px;
  height: 25px;
  margin-bottom: 10px;
  color: var(--teal);
}

.import-zone strong {
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 13px;
}

.import-zone p {
  max-width: 350px;
  margin: 5px 0 14px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.5;
}

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

.settings-panel {
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}

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

.stat-row strong {
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-weight: 800;
}

.cadence-step {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 19px;
}

.cadence-step:not(:last-child)::after {
  position: absolute;
  top: 27px;
  bottom: 4px;
  left: 12px;
  border-left: 1px solid #cfdfda;
  content: "";
}

.cadence-step > span:first-child {
  position: relative;
  z-index: 1;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid #c9dad5;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
}

.cadence-step.completed > span:first-child {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.cadence-step.next > span:first-child {
  border-color: var(--teal);
  color: var(--teal-dark);
  box-shadow: 0 0 0 4px rgba(8, 127, 115, 0.1);
}

.cadence-step strong {
  display: block;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 11px;
}

.cadence-step p {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.45;
}

.footnote {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.55;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 17px;
  padding-bottom: 30px;
  color: var(--ink-muted);
  font-size: 10px;
}

.pagination > div,
.pagination > nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination .button {
  min-width: 34px;
  padding: 0 9px;
}

.mobile-menu {
  display: none;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 204px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 17px;
  }

  .metrics-grid {
    gap: 9px;
  }

  .metric {
    padding-right: 13px;
    padding-left: 13px;
  }

  .metric-value,
  .metric-number {
    font-size: 24px;
  }
}

@media (max-width: 1000px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .day-panel {
    position: static;
  }

  .day-panel .routine-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
  }

  .day-panel .routine-item:not(:last-child)::after {
    display: none;
  }

  .day-panel .cadence-summary {
    max-width: 510px;
  }
}

@media (max-width: 820px) {
  :root {
    --sidebar-width: 76px;
  }

  .sidebar {
    align-items: center;
    padding-right: 10px;
    padding-left: 10px;
  }

  .brand {
    justify-content: center;
    width: 100%;
    padding-right: 0;
    padding-left: 0;
  }

  .brand > div:not(.brand-mark),
  .workspace,
  .nav-label,
  .nav-item span:not(.nav-count),
  .sidebar-bottom .local-indicator,
  .sidebar-bottom .user-avatar + span {
    display: none;
  }

  .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .brand-mark svg {
    width: 36px;
    height: 36px;
  }

  .sidebar nav {
    width: 100%;
    margin-top: 18px;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-item svg {
    width: 19px;
    height: 19px;
  }

  .nav-count {
    position: absolute;
    top: 3px;
    right: 8px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    font-size: 8px;
  }

  .sidebar-bottom {
    width: 100%;
  }

  .sidebar-bottom .user-avatar {
    margin: auto;
  }

  .topbar {
    gap: 12px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .global-search {
    max-width: none;
  }

  .main > .page-header,
  .main > .source-banner,
  .main > .dashboard-grid,
  .main > .panel,
  .main > .page-footer,
  .main > .data-disclaimer,
  .main > .section-heading,
  .main > .blank-state,
  .main > .table-wrap,
  .main > .pagination {
    width: min(100% - 44px, 1392px);
  }
}

@media (max-width: 680px) {
  .topbar {
    flex-wrap: wrap;
    min-height: 62px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .breadcrumb {
    order: 1;
    flex: 1 1 auto;
  }

  .global-search {
    order: 3;
    flex-basis: 100%;
  }

  .topbar-right {
    order: 2;
  }

  .page-header {
    display: block;
    min-height: 0;
    padding-top: 29px;
    padding-bottom: 20px;
  }

  .page-header-actions {
    justify-content: flex-start;
    margin-top: 17px;
  }

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

  .metric {
    min-height: 119px;
  }

  .metric-value,
  .metric-number {
    margin-top: 11px;
    font-size: 24px;
  }

  .source-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .source-banner .button {
    margin-left: 43px;
  }

  .empty-steps,
  .rule-columns,
  .form-grid,
  .detail-grid,
  .action-options {
    grid-template-columns: 1fr;
  }

  .form-grid > .field:only-child,
  .form-grid > .field.full,
  .form-grid > .form-help.full {
    grid-column: auto;
  }

  .lead-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead-meta {
    justify-content: flex-start;
    text-align: left;
  }

  .lead-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-actions {
    justify-content: flex-start;
  }

  .day-panel .routine-list {
    grid-template-columns: 1fr;
  }

  .day-panel .routine-item:not(:last-child)::after {
    display: block;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  :root {
    --sidebar-width: 0px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding-bottom: 65px;
  }

  .topbar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .topbar-right .avatar {
    width: 29px;
    height: 29px;
  }

  .main > .page-header,
  .main > .source-banner,
  .main > .dashboard-grid,
  .main > .panel,
  .main > .page-footer,
  .main > .data-disclaimer,
  .main > .section-heading,
  .main > .blank-state,
  .main > .table-wrap,
  .main > .pagination {
    width: calc(100% - 32px);
  }

  .page-header h1 {
    font-size: 1.55rem;
  }

  .page-header-actions,
  .page-header-actions .button {
    width: 100%;
  }

  .page-header-actions .button {
    min-height: 44px;
  }

  .source-banner .button {
    width: calc(100% - 43px);
    margin-left: 43px;
  }

  .dashboard-grid {
    padding-top: 16px;
    padding-bottom: 23px;
  }

  .metrics-grid {
    gap: 8px;
    margin-bottom: 22px;
  }

  .metric {
    padding: 13px;
  }

  .metric-label {
    max-width: 84px;
  }

  .metric-icon {
    width: 23px;
    height: 23px;
  }

  .metric-value,
  .metric-number {
    font-size: 22px;
  }

  .panel-header {
    padding-right: 14px;
    padding-left: 14px;
  }

  .tabs {
    gap: 15px;
    padding: 0 14px;
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-right: 14px;
    padding-left: 14px;
  }

  .filter-field,
  .filter-field select,
  .filter-field input,
  .filter-field .search-input {
    min-width: 0;
    width: 100%;
  }

  .filter-field:first-child,
  .filter-field:first-child .search-input {
    grid-column: 1 / -1;
  }

  .lead-list {
    padding-right: 11px;
    padding-left: 11px;
  }

  .lead-card {
    padding: 13px;
  }

  .empty-state,
  .blank-state {
    padding-right: 15px;
    padding-left: 15px;
  }

  .empty-steps {
    width: 100%;
  }

  .day-panel {
    padding: 15px;
  }

  .cadence-track {
    margin-right: -3px;
    margin-left: -3px;
  }

  dialog.modal,
  dialog.drawer {
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  dialog.modal {
    width: calc(100vw - 16px);
  }

  dialog.drawer {
    width: 100vw;
    min-height: 100vh;
    max-height: 100vh;
  }

  .modal-head,
  .drawer-head,
  .modal-body,
  .drawer-body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .modal-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .modal-actions .button {
    flex: 1 1 0;
  }

  .mobile-menu {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 61px;
    padding: 5px 8px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -5px 18px rgba(20, 50, 49, 0.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .mobile-menu a,
  .mobile-menu button {
    display: grid;
    min-width: 58px;
    height: 49px;
    place-items: center;
    gap: 2px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--ink-muted);
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 800;
  }

  .mobile-menu a.active,
  .mobile-menu button.active {
    background: var(--teal-wash);
    color: var(--teal-dark);
  }

  .mobile-menu .icon {
    width: 17px;
    height: 17px;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .metric {
    min-height: 106px;
  }

  .metric-value,
  .metric-number {
    margin-top: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .button:hover,
  .lead-card:hover {
    transform: none;
  }
}

/* Application composition: main workspace is not the sidebar switcher. */
.workspace { display: block; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--canvas); color: var(--ink); font-size: 14px; font-weight: 400; }
.workspace::before { display: none; }
.nav-item { width: 100%; background: transparent; text-align: left; position: relative; }
.brand > span { display: grid; gap: 4px; }
.brand-name { font-size: 23px; }
.brand-product { font-size: 8px; }
.sidebar-bottom .user-avatar { width: auto; height: auto; display: flex; justify-content: flex-start; gap: 10px; background: transparent; border-radius: 0; }
.user-avatar > div { display: grid; gap: 2px; }
.user-avatar small { font-size: 10px; color: #95b7b1; font-weight: 400; }
.breadcrumb > *:not(:last-child)::after, .global-search::before, .global-search::after { display: none; }
.global-search > .icon { position: absolute; left: 12px; color: var(--ink-muted); }
.main > .metrics-grid, .main > .cadence-grid, .main > .rule-columns, .main > .rule-card { width: min(100% - clamp(44px, 6vw, 92px), 1392px); margin: 22px auto; }
.lead-list { padding: 14px 0; }
.lead-card { display: block; padding: 20px; }
.lead-header { align-items: center; }
.lead-header .lead-badges { margin-top: 0; margin-left: auto; flex-shrink: 0; }
.lead-name { padding: 0; background: none; border: 0; text-align: left; white-space: normal; font-size: 16px; }
.lead-name:hover { color: var(--teal); }
.lead-person { font-size: 12px; line-height: 1.5; }
.lead-context { gap: 12px; font-size: 12px; }
.lead-context .icon { width: 14px; height: 14px; }
.lead-recommendation { max-width: none; margin: 16px 0; padding: 13px 15px; font-size: 13px; }
.lead-recommendation .eyebrow { display: block; margin-bottom: 6px; font-size: 9px; }
.lead-meta { justify-content: flex-start; text-align: left; font-size: 11px; }
.tabs { padding: 0 18px; gap: 15px; }
.filters .filter-field { flex: 1 1 135px; }
.filters .filter-field select { width: 100%; }
.metric-label, .metric-caption { font-size: 12px; }
.metric-value { font-size: 32px; }
.day-panel > .panel { border: 0; box-shadow: none; }
.routine-item { grid-template-columns: 22px minmax(0, 1fr); }
.routine-content { display: grid; gap: 4px; font-size: 12px; font-weight: 600; }
.routine-duration { display: block; font-weight: 400; font-size: 11px; }
.routine-check { accent-color: var(--teal); }
.routine-item.done .routine-content > span { text-decoration: line-through; color: var(--ink-muted); }
.text-link { display: inline-flex; gap: 7px; align-items: center; border: 0; background: transparent; padding: 8px 0; font-size: 12px; }
.mini-note { font-size: 12px; }
.cadence-summary h3 { margin: 8px 0; font-size: 20px; }
.cadence-summary p { font-size: 12px; color: var(--ink-soft); }
.cadence-node small { margin-top: 7px; }
.empty-state { border: 1px solid var(--line); border-radius: 14px; background: white; }
.empty-state .card-actions { margin-top: 22px; justify-content: center; }
.empty-step strong, .empty-step small { display: block; }
.empty-step small { color: var(--ink-muted); margin-top: 4px; font-size: 11px; }
.rule-card p + p { margin-top: 14px; }
.settings-panel { padding: 24px; }
.settings-panel h2 { margin: 10px 0; }
.settings-panel p { margin: 14px 0; }
.cadence-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cadence-card { padding: 24px; }
.cadence-card > .cadence-day { display: block; font-family: var(--font-display); font-size: 30px; color: var(--teal); margin-bottom: 12px; }
.cadence-card h3 { margin: 16px 0 10px; }
.cadence-card .footnote { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; font-size: 11px; }
.modal-body > .field, #action-fields > .field, #action-fields > .form-grid, .modal-body > .form-grid { margin-bottom: 18px; }
.checklist { margin: 16px 0; }
.field label, .form-help, .form-error, .check-row { font-size: 12px; }
.form-help { margin-top: 12px; }
.field input, .field select, .field textarea { font-size: 14px; }
.event-form { gap: 0; }
.drawer-body > .detail-grid { margin-top: 22px; }
.drawer-body .card-actions { justify-content: flex-start; margin-top: 16px; }
.message-box + .message-box { margin-top: 16px; }
.message-header { font-size: 12px; }
.quote { font-size: 13px; }
.history-item { display: block; }
.history-title { display: block; margin-top: 5px; font-size: 13px; }
.history-date, .history-note { font-size: 12px; }
.cadence-step { grid-template-columns: 30px minmax(0, 1fr) auto; }
.cadence-step strong { font-size: 13px; }
.cadence-step small { font-size: 12px; color: var(--ink-muted); }
.data-disclaimer, .page-footer { font-size: 11px; }
.source-banner strong { font-size: 12px; }
.source-banner p { font-size: 12px; }
@media (max-width: 820px) {
  .workspace { display: block; }
  .brand > span, .sidebar .user-avatar > div { display: none; }
  .main > .metrics-grid, .main > .cadence-grid, .main > .rule-columns, .main > .rule-card { width: calc(100% - 44px); }
  .sidebar .nav-item { min-height: 44px; }
  .cadence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .lead-header { flex-wrap: wrap; }
  .lead-header .lead-badges { width: 100%; margin-left: 46px; }
  .rule-columns, .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .metric-label { max-width: none; }
}
@media (max-width: 520px) {
  .main > .metrics-grid, .main > .cadence-grid, .main > .rule-columns, .main > .rule-card { width: calc(100% - 32px); }
  .cadence-grid { grid-template-columns: 1fr; }
  .topbar-right .pill { display: none; }
  .card-actions .button, .modal-actions .button, .filter-field select, .modal-close { min-height: 44px; }
  .mobile-menu button { font-size: 11px; }
  .toast { bottom: 75px; }
}

.main > .notifications-page { width: min(100% - clamp(44px, 6vw, 92px), 1392px); margin: 0 auto 30px; }
.notifications-hero h1 { font-size: 21px; }
@media (max-width: 820px) { .main > .notifications-page { width: calc(100% - 44px); } }
@media (max-width: 520px) { .main > .notifications-page { width: calc(100% - 32px); } }
