:root {
  --brand: #b21f35;
  --brand-dark: #7f1425;
  --ink: #171923;
  --muted: #747b8a;
  --line: #e6e8ef;
  --panel: #ffffff;
  --page: #f4f6fb;
  --nav: #111827;
  --nav-soft: #1f2937;
  --green: #0f9f6e;
  --blue: #4f46e5;
  --cyan: #0891b2;
  --amber: #f59e0b;
  --red: #dc2626;
  --shadow: 0 16px 36px rgba(17, 24, 39, 0.10);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(178, 31, 53, 0.09), transparent 34rem),
    linear-gradient(180deg, #f8f9fd 0%, #eef2f7 100%);
  color: var(--ink);
}

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

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.crm-icon {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: currentColor;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 1.5rem;
  bottom: 1.5rem;
  max-width: min(26rem, calc(100vw - 2rem));
  padding: 0.95rem 1rem;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(0.8rem);
  pointer-events: none;
  transition: 180ms ease;
}

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

.toast[data-tone="error"] {
  background: #991b1b;
}

.login-page,
.loading-page {
  min-height: 100vh;
  display: grid;
  place-items: stretch;
}

.login-page {
  grid-template-columns: minmax(0, 1.1fr) minmax(22rem, 0.9fr);
  background: #f4f6fb;
}

.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 5rem);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(36, 45, 69, 0.94)),
    linear-gradient(135deg, #b21f35, #0f9f6e);
  overflow: hidden;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -8rem -10rem auto;
  width: 28rem;
  height: 28rem;
  border: 4rem solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.brand-block {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #ef704f);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 14px 30px rgba(178, 31, 53, 0.28);
}

.brand-block h1,
.login-card h2,
.loader-card h1,
.page-title h1,
.welcome-panel h1 {
  margin: 0;
  letter-spacing: 0;
}

.brand-block p,
.login-card p,
.loader-card p,
.page-title p,
.welcome-panel p {
  margin: 0.35rem 0 0;
  color: inherit;
  opacity: 0.78;
}

.login-intro {
  position: relative;
  z-index: 1;
  width: min(42rem, 100%);
}

.login-intro span {
  display: inline-flex;
  margin-bottom: 0.75rem;
  color: #ff6b7f;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-intro h2 {
  margin: 0;
  max-width: 38rem;
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.login-intro p {
  max-width: 34rem;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
  line-height: 1.65;
}

.login-intro-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 34rem;
  margin-top: 1.5rem;
}

.login-intro-stats div {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.8rem;
  backdrop-filter: blur(14px);
}

.login-intro-stats strong,
.login-intro-stats small {
  display: block;
}

.login-intro-stats strong {
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
}

.login-intro-stats small {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
}

.login-feature-list {
  display: grid;
  gap: 0.7rem;
  max-width: 42rem;
  margin-top: 1.25rem;
}

.login-feature-list div {
  display: grid;
  gap: 0.25rem;
  border-left: 3px solid rgba(255, 107, 127, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.85rem 1rem;
}

.login-feature-list strong {
  color: #fff;
  font-size: 0.92rem;
}

.login-feature-list span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
  line-height: 1.45;
}

.login-card {
  align-self: center;
  justify-self: center;
  width: min(28rem, calc(100vw - 2rem));
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-eyebrow,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.login-form label,
.crm-form label,
.filter-panel label {
  display: grid;
  gap: 0.4rem;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 0.78rem 0.85rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(178, 31, 53, 0.55);
  box-shadow: 0 0 0 3px rgba(178, 31, 53, 0.10);
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  min-height: 2.65rem;
  padding: 0.72rem 1rem;
  white-space: nowrap;
}

.button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.button.light {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.button.ghost {
  background: transparent;
}

.button.danger {
  border-color: rgba(220, 38, 38, 0.25);
  background: #fef2f2;
  color: #b91c1c;
}

.button.small {
  min-height: 2.2rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}

.button.full {
  width: 100%;
}

.icon-button {
  width: 2.55rem;
  padding: 0;
}

.icon-button .crm-icon,
.button.primary .crm-icon,
.new-lead-button .crm-icon {
  background: rgba(255, 255, 255, 0.20);
}

.crm-table small,
.lead-person small,
.compact-list small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.loading-page {
  place-items: center;
}

.loader-card {
  width: min(28rem, calc(100vw - 2rem));
  padding: 2rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.loader-card .brand-mark {
  margin: 0 auto 1rem;
}

.loader-line {
  height: 0.45rem;
  border-radius: 99px;
  background: #eceff5;
  overflow: hidden;
  margin-top: 1.4rem;
}

.loader-line span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #ef704f);
  animation: load 1.15s ease-in-out infinite alternate;
}

@keyframes load {
  from { transform: translateX(-15%); }
  to { transform: translateX(135%); }
}

#main-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  grid-template-rows: 4.8rem minmax(0, 1fr);
}

.nav-header {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: var(--nav);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1rem;
}

.header {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: auto auto minmax(10rem, 1fr) minmax(15rem, 28rem) auto;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.menu-button {
  display: none;
}

.app-back-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.dashboard-bar {
  display: grid;
  gap: 0.1rem;
}

.dashboard-bar strong {
  font-size: 1.05rem;
}

.dashboard-bar span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.top-search input {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
}

.top-search .crm-icon {
  background: #eef2ff;
  color: #4f46e5;
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.role-badge,
.profile-card b {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.role-badge.dark,
.profile-card b.dark {
  background: #111827;
  color: #fff;
}

.role-badge.owner,
.profile-card b.owner {
  background: #fdf2f8;
  color: #9d174d;
}

.role-badge.manager,
.profile-card b.manager {
  background: #eef2ff;
  color: #3730a3;
}

.role-badge.sales,
.profile-card b.sales {
  background: #ecfdf5;
  color: #047857;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
}

.profile-pill span,
.workspace-card span,
.lead-person > span,
.compact-lead-item > span,
.lead-card > span,
.sales-person-cell > span,
.sales-profile-identity > span,
.profile-card > span,
.lead-profile-hero > div > span {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  background: var(--accent, var(--brand));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.profile-pill strong {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deznav {
  grid-column: 1;
  grid-row: 2;
  background: var(--nav);
  color: rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.deznav-scroll {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  position: sticky;
  top: 0;
}

.workspace-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.3rem 0.75rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.workspace-card span {
  grid-row: span 2;
}

.workspace-card strong {
  color: #fff;
}

.workspace-card small,
.sidebar-note small {
  color: rgba(255, 255, 255, 0.56);
}

.metismenu {
  display: grid;
  gap: 0.35rem;
}

.deznav-link,
.new-lead-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.85rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 0.75rem 0.8rem;
  text-align: left;
  font-weight: 800;
}

.deznav-link:hover,
.deznav-link.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.deznav-link.active {
  box-shadow: inset 3px 0 0 #ef704f;
}

.new-lead-button {
  justify-content: center;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 16px 24px rgba(178, 31, 53, 0.22);
}

.sidebar-note {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-note strong {
  color: #fff;
}

.content-body {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  padding: 1.5rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.page-inner {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
  max-width: 100rem;
  margin: 0 auto;
}

.welcome-panel,
.lead-profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  border-radius: 8px;
  padding: 1.35rem;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(31, 41, 55, 0.90)),
    linear-gradient(135deg, var(--brand), #0f9f6e);
  box-shadow: var(--shadow);
}

.welcome-panel > div,
.page-title > div {
  min-width: 0;
}

.welcome-panel h1,
.lead-profile-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.welcome-actions,
.header-actions,
.form-actions,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.welcome-actions {
  justify-content: flex-end;
  flex: 0 0 auto;
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.page-title h1 {
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
}

.page-title p {
  color: var(--muted);
  opacity: 1;
}

.clickable-card:hover,
.clickable-card:focus-visible,
.clickable-row:hover,
.clickable-row:focus-visible,
.stage-row:hover,
.stage-row:focus-visible {
  border-color: color-mix(in srgb, var(--accent, var(--brand)) 42%, var(--line));
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.10);
  transform: translateY(-1px);
}

.clickable-card:focus-visible,
.clickable-row:focus-visible,
.stage-row:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent, var(--brand)) 20%, transparent);
  outline-offset: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 1rem;
}

.stat-card,
.card,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.stat-card {
  position: relative;
  display: flex;
  gap: 0.8rem;
  width: 100%;
  min-width: 0;
  min-height: 8.4rem;
  padding: 1rem;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -2.4rem -2.6rem auto;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.stat-icon {
  width: 0.35rem;
  border-radius: 99px;
  background: var(--accent);
}

.stat-card div {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  min-width: 0;
}

.stat-card small,
.stat-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.stat-card strong {
  font-size: clamp(1.45rem, 2.1vw, 2rem);
  overflow-wrap: anywhere;
}

.stat-action {
  position: absolute;
  right: 0.75rem;
  bottom: 0.65rem;
  z-index: 1;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-grid,
.lead-detail-grid,
.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.home-lite {
  gap: 1rem;
}

.home-command-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
  gap: 1rem;
  align-items: stretch;
  border-radius: 8px;
  background: #121826;
  color: #fff;
  padding: 1rem;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.16);
}

.home-command-copy {
  display: grid;
  align-content: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.35rem;
}

.home-command-copy .eyebrow {
  color: #f43f5e;
}

.home-command-copy h1 {
  margin: 0;
  font-size: clamp(1.8rem, 2.8vw, 2.7rem);
}

.home-command-copy p {
  max-width: 46rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

.home-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.3rem;
}

.home-command-panel .button:not(.primary) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.home-command-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.home-command-summary div {
  display: grid;
  gap: 0.18rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid #f43f5e;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.85rem;
}

.home-command-summary div:nth-child(2) {
  border-left-color: #0891b2;
}

.home-command-summary div:nth-child(3) {
  border-left-color: #0f9f6e;
}

.home-command-summary small,
.home-command-summary span {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 900;
}

.home-command-summary strong {
  font-size: 1.45rem;
  line-height: 1;
}

.home-chart-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}

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

.chart-wide {
  grid-column: span 2;
}

.chart-card {
  overflow: hidden;
}

.stage-overview-card .card-header {
  border-bottom: 1px solid var(--line);
}

.lead-stage-view {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
}

.lead-stage-head,
.lead-stage-row {
  display: grid;
  grid-template-columns: minmax(7rem, 12rem) minmax(10rem, 1fr) 5rem;
  align-items: center;
  gap: 0.8rem;
}

.lead-stage-head {
  padding: 0.35rem 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lead-stage-row {
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 0.55rem;
  text-align: left;
}

.lead-stage-row > span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.55rem;
  font-weight: 900;
}

.lead-stage-row > span i {
  width: 0.75rem;
  height: 0.75rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

.lead-stage-row div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.2rem;
  align-items: center;
  gap: 0.55rem;
}

.lead-stage-row b {
  display: block;
  height: 0.65rem;
  border-radius: 99px;
  background: #edf0f6;
  overflow: hidden;
}

.lead-stage-row b::before {
  content: "";
  display: block;
  width: var(--width);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.lead-stage-row em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.lead-stage-row strong {
  justify-self: end;
}

.lead-stage-row:hover,
.lead-stage-row:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, white);
  outline: none;
}

.stacked-chart,
.donut-chart,
.horizontal-chart {
  padding: 1rem;
}

.stack-track {
  display: flex;
  min-height: 3rem;
  border-radius: 8px;
  overflow: hidden;
  background: #edf0f6;
}

.stack-segment {
  flex: 0 0 var(--width);
  min-width: 0.35rem;
  border: 0;
  background: var(--accent);
  color: transparent;
}

.stack-segment:hover,
.stack-segment:focus-visible {
  filter: brightness(0.92);
  outline: none;
}

.chart-legend,
.horizontal-chart {
  display: grid;
  gap: 0.55rem;
}

.stacked-chart .chart-legend {
  margin-top: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-legend-row,
.chart-bar-row {
  display: grid;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.chart-legend-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  padding: 0.25rem 0;
}

.chart-legend-row i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
}

.chart-legend-row span,
.chart-bar-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-legend-row strong,
.chart-bar-row strong {
  color: #374151;
  font-size: 0.86rem;
}

.vertical-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
  min-height: 15rem;
  padding: 1rem;
}

.vertical-bar {
  display: grid;
  grid-template-rows: auto minmax(8rem, 1fr) auto;
  gap: 0.45rem;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
}

.vertical-bar i {
  align-self: end;
  justify-self: center;
  width: min(100%, 3.4rem);
  height: var(--height);
  min-height: 0.5rem;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, white), var(--accent));
}

.vertical-bar span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.donut-chart {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.donut-ring {
  display: grid;
  place-items: center;
  width: 10rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--donut);
}

.donut-ring span {
  display: grid;
  place-items: center;
  width: 6.4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.donut-ring strong {
  font-size: 1.2rem;
}

.donut-ring em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.chart-bar-row {
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.35rem 0;
}

.chart-bar-row div {
  height: 0.75rem;
  border-radius: 99px;
  background: #edf0f6;
  overflow: hidden;
}

.chart-bar-row i {
  display: block;
  width: var(--width);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.chart-legend-row:hover,
.chart-legend-row:focus-visible,
.chart-bar-row:hover,
.chart-bar-row:focus-visible,
.vertical-bar:hover,
.vertical-bar:focus-visible {
  color: var(--brand);
  outline: none;
}

.card {
  min-width: 0;
}

.card.wide,
.settings-layout .wide,
.reports-grid .wide {
  grid-column: 1 / -1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--line);
}

.card-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.card-header p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.stage-stack,
.compact-list,
.role-list,
.snapshot-list,
.timeline,
.recent-grid {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.stage-row {
  display: grid;
  grid-template-columns: auto minmax(7rem, 9rem) minmax(0, 1fr) 4rem;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: var(--ink);
  border-radius: 8px;
  transition: background 160ms ease, transform 160ms ease;
}

.stage-row:hover,
.stage-row:focus-visible {
  background: #fbfcff;
}

.stage-row > span {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--accent);
}

.stage-row div,
.bar-row div {
  height: 0.55rem;
  border-radius: 99px;
  background: #edf0f6;
  overflow: hidden;
}

.stage-row i,
.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.stage-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr) 4rem;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  padding: 0.7rem 1rem;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(15rem, 1.5fr) repeat(7, minmax(8.25rem, 1fr)) auto;
  gap: 0.85rem;
  align-items: end;
  padding: 1rem;
}

.active-scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(178, 31, 53, 0.18);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(178, 31, 53, 0.08), rgba(8, 145, 178, 0.06)),
    #fff;
  padding: 0.95rem 1rem;
}

.active-scope strong {
  display: block;
  margin-top: 0.15rem;
}

.active-scope p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.55rem 0 0;
}

.active-scope p span {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4b5563;
  padding: 0.35rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 900;
}

.filter-panel label:first-child {
  position: relative;
}

.filter-panel label:first-child .crm-icon {
  position: absolute;
  left: 0.75rem;
  bottom: 0.77rem;
  background: #eef2ff;
  color: #4f46e5;
}

.filter-panel label:first-child input {
  padding-left: 2.5rem;
}

.table-card {
  overflow: hidden;
}

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

.crm-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 56rem;
}

.crm-table th,
.crm-table td {
  padding: 0.88rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.crm-table th {
  color: #677083;
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crm-table tr[data-open-lead],
.crm-table tr[data-owner-jump],
.crm-table tr[data-open-sales-person] {
  cursor: pointer;
}

.crm-table tbody tr:hover {
  background: #fbfcff;
}

.lead-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 15rem;
}

.lead-person strong {
  display: block;
  max-width: 19rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.lead-badges span,
.lead-badges button,
.follow-chip,
.lead-card em {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  min-height: 1.7rem;
  padding: 0.3rem 0.5rem;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.72rem;
  font-weight: 900;
}

.lead-badges button {
  border: 0;
}

.lead-badges button:hover,
.lead-badges button:focus-visible {
  background: #eef2ff;
  color: #3730a3;
  outline: 2px solid rgba(79, 70, 229, 0.18);
}

.lead-badges .stage-chip {
  background: color-mix(in srgb, var(--accent) 13%, white);
  color: var(--accent);
}

.stage-chip.table-stage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 1.9rem;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  background: color-mix(in srgb, var(--accent) 13%, white);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
}

.muted-cell {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.follow-chip.overdue,
.lead-card em.overdue {
  background: #fef2f2;
  color: #b91c1c;
}

.follow-chip.today,
.lead-card em.today {
  background: #ecfeff;
  color: #0e7490;
}

.follow-chip.scheduled,
.lead-card em.scheduled {
  background: #eff6ff;
  color: #1d4ed8;
}

.follow-chip.closed,
.lead-card em.closed {
  background: #ecfdf5;
  color: #047857;
}

.follow-chip.missing,
.lead-card em.missing {
  background: #fffbeb;
  color: #a16207;
}

.table-note {
  padding: 0.85rem 1rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

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

.lead-card,
.compact-lead-item {
  display: grid;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0.85rem;
  text-align: left;
}

.lead-card:hover,
.compact-lead-item:hover {
  border-color: color-mix(in srgb, var(--accent, var(--brand)) 40%, var(--line));
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
}

.lead-card strong,
.compact-lead-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-card p {
  min-height: 3.1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

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

.compact-lead-item small {
  grid-column: 2;
}

.empty-soft {
  padding: 1rem;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
}

.sales-filter-card {
  display: grid;
  grid-template-columns: minmax(16rem, 24rem) minmax(12rem, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 1rem;
}

.sales-filter-card label {
  display: grid;
  gap: 0.45rem;
  color: #1f2937;
  font-size: 0.76rem;
  font-weight: 900;
}

.sales-filter-card select {
  min-height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 0.8rem;
  font: inherit;
}

.sales-filter-card div {
  display: grid;
  gap: 0.15rem;
}

.sales-filter-card div strong {
  font-size: 1.3rem;
}

.sales-filter-card div small {
  color: var(--muted);
  font-weight: 800;
}

.sales-team-table {
  min-width: 70rem;
}

.sales-person-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 17rem;
}

.sales-person-cell strong {
  display: block;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-stat-link {
  display: grid;
  gap: 0.1rem;
  min-width: 5.5rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 0.3rem 0.4rem;
  text-align: left;
}

.sales-stat-link strong {
  font-size: 1rem;
}

.sales-stat-link small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.sales-stat-link:hover,
.sales-stat-link:focus-visible {
  background: #f4f7fb;
  outline: 2px solid rgba(178, 31, 53, 0.14);
}

.sales-performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}

.sales-metric-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 5.25rem;
  gap: 0.35rem 0.7rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0.85rem;
  text-align: left;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
}

.sales-metric-card > span {
  grid-row: 1 / 3;
  display: block;
  width: 0.6rem;
  height: 3rem;
  border-radius: 99px;
  background: var(--accent);
}

.sales-metric-card small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
}

.sales-metric-card strong {
  font-size: 1.65rem;
  line-height: 1;
}

.sales-metric-card.is-active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, white), #fff 62%);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 13%, transparent);
}

.sales-metric-card:hover,
.sales-metric-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 16px 30px rgba(17, 24, 39, 0.08);
  outline: none;
}

.sales-profile-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.sales-profile-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.9rem;
}

.sales-profile-identity > div {
  min-width: 0;
}

.sales-profile-identity > span {
  width: 3.5rem;
  height: 3.5rem;
}

.sales-profile-identity h1,
.sales-profile-identity p {
  margin: 0;
}

.sales-profile-identity h1,
.sales-profile-identity p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-profile-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(5.5rem, 1fr));
  gap: 0.5rem;
}

.sales-profile-summary div {
  display: grid;
  gap: 0.2rem;
  min-width: 5.5rem;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.65rem;
}

.sales-profile-summary small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.sales-profile-summary strong {
  font-size: 1rem;
}

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

.sales-profile-leads-table {
  min-width: 64rem;
}

.settings-layout {
  grid-template-columns: 22rem minmax(0, 1fr);
}

.profile-card {
  display: grid;
  justify-items: start;
  gap: 0.65rem;
  padding: 1rem;
}

.profile-card h2,
.profile-card p {
  margin: 0;
}

.profile-card p {
  color: var(--muted);
}

.role-list div,
.snapshot-list div {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.role-list small,
.snapshot-list span,
.snapshot-list small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.76rem;
  font-weight: 900;
}

.connection-status.ready {
  background: #dcfce7;
  color: #047857;
}

.connection-status.setup {
  background: #fff7ed;
  color: #c2410c;
}

.connection-status.muted {
  background: #f3f4f6;
  color: var(--muted);
}

.meta-connect-card {
  overflow: hidden;
}

.meta-connect-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.meta-form {
  padding: 0;
}

.meta-webhook-box {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  padding: 1rem;
}

.meta-webhook-box small {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 900;
  text-transform: uppercase;
}

.meta-webhook-box strong {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.meta-webhook-box ul {
  display: grid;
  gap: 0.45rem;
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
}

.secret-checks,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.secret-checks span {
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
  padding: 0.28rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.secret-checks .ok {
  background: #dcfce7;
  color: #047857;
}

.meta-connections-table {
  padding: 0;
}

.sources-page {
  gap: 1rem;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
}

.source-card {
  display: grid;
  align-content: start;
  min-height: 10rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 58%),
    #fff;
  color: var(--ink);
  padding: 1rem;
  text-align: left;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.source-card:hover,
.source-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.09);
  outline: none;
}

.source-card span {
  justify-self: start;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.source-card strong {
  margin-top: 0.9rem;
  font-size: 1rem;
}

.source-card small {
  min-height: 2.4rem;
  margin-top: 0.25rem;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.source-card b {
  margin-top: 0.85rem;
  color: var(--accent);
  font-size: 1.8rem;
  line-height: 1;
}

.source-setup-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(17rem, 0.9fr);
}

.readiness-list,
.endpoint-list {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.readiness-list div,
.endpoint-list div {
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  background: #fbfcff;
  padding: 0.85rem;
}

.readiness-list div.done {
  border-left-color: #0f9f6e;
}

.readiness-list small,
.endpoint-list small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.endpoint-list strong {
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 0.88rem;
}

.lead-profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.lead-profile-hero > div {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.lead-profile-hero > div > span {
  width: 4rem;
  height: 4rem;
  background: var(--accent);
}

.lead-profile-hero h1,
.lead-profile-hero p {
  overflow-wrap: anywhere;
}

.lead-detail-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.55fr);
}

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

.crm-form .wide-field,
.form-actions {
  grid-column: 1 / -1;
}

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

.activity-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem minmax(12rem, 18rem) auto;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.7rem;
}

.timeline-item span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
}

.timeline-item p {
  margin: 0;
  color: #374151;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.lead-brief {
  padding: 1rem;
  color: #374151;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.form-card {
  max-width: 62rem;
}

.blocked-login {
  grid-template-columns: 1fr;
}

@media (max-width: 1280px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

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

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

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

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

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

  .login-brand-panel {
    min-height: 24rem;
  }

  #main-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: 4.8rem minmax(0, 1fr);
  }

  .nav-header {
    display: none;
  }

  .header {
    grid-column: 1;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
  }

  .menu-button {
    display: inline-flex;
  }

  .top-search,
  .role-badge {
    display: none;
  }

  .deznav {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: 18rem;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .nav-open .deznav {
    transform: translateX(0);
  }

  .content-body {
    grid-column: 1;
    padding: 1rem;
  }

  .dashboard-grid,
  .home-chart-grid,
  .profile-breakdown-grid,
  .lead-detail-grid,
  .meta-connect-layout,
  .source-setup-grid,
  .settings-layout {
    grid-template-columns: 1fr;
  }

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

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

  .sales-filter-card {
    grid-template-columns: 1fr auto;
  }

  .sales-profile-hero-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .sales-filter-card label {
    grid-column: 1 / -1;
  }

  .chart-wide {
    grid-column: auto;
  }

  .lead-profile-hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .login-card {
    padding: 1.25rem;
  }

  .stats-grid,
  .home-chart-grid,
  .home-command-summary,
  .source-grid,
  .sales-filter-card,
  .sales-performance-grid,
  .filter-panel,
  .recent-grid,
  .meta-connect-layout,
  .crm-form {
    grid-template-columns: 1fr;
  }

  .home-command-actions {
    flex-direction: column;
  }

  .lead-stage-head {
    display: none;
  }

  .lead-stage-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .lead-stage-row div {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .lead-stage-row strong {
    justify-self: start;
  }

  .stacked-chart .chart-legend,
  .donut-chart,
  .vertical-chart {
    grid-template-columns: 1fr;
  }

  .donut-ring {
    justify-self: center;
  }

  .chart-bar-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .welcome-panel,
  .page-title,
  .active-scope {
    align-items: stretch;
    flex-direction: column;
  }

  .header {
    padding: 0 0.75rem;
  }

  .profile-pill strong {
    display: none;
  }
}
