:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #050505;
  --muted: #5f6670;
  --line: #d8dde5;
  --teal: #0b2f63;
  --teal-dark: #071f42;
  --navy: #0b2f63;
  --navy-dark: #071f42;
  --navy-soft: #eef4ff;
  --black: #050505;
  --soft: #f6f8fb;
  --soft-strong: #eef2f7;
  --surface-elevated: #ffffff;
  --success: #0f7a4f;
  --warning: #a16207;
  --danger: #b42318;
  --ring: rgba(11, 47, 99, 0.16);
  --amber: #c57b22;
  --coral: #c85a54;
  --blue: #174b8f;
  --shadow: 0 12px 30px rgba(5, 5, 5, 0.08);
  --shadow-soft: 0 18px 50px rgba(5, 5, 5, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

[hidden] {
  display: none !important;
}

.auth-panel {
  align-items: center;
  background: #f4f6f9;
  display: flex;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: 460px;
  padding: 26px;
  width: 100%;
}

.auth-brand {
  color: var(--ink);
  margin-bottom: 12px;
}

.auth-brand span:last-child,
.auth-copy,
.auth-message {
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 6px;
}

.auth-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  padding: 0 12px;
}

.auth-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.auth-message {
  min-height: 20px;
}

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

.sidebar {
  background: var(--black);
  color: #f4faf7;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  align-items: center;
  background: #ffffff;
  border-radius: 8px;
  color: var(--navy-dark);
  display: inline-flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.brand strong,
.brand span,
.workspace-card strong,
.workspace-card span {
  display: block;
}

.brand span,
.workspace-card span {
  color: #aab2bf;
  font-size: 0.88rem;
}

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

.nav-links a {
  border-radius: 8px;
  color: #dfe5ef;
  padding: 11px 12px;
  text-decoration: none;
}

.nav-links a.active,
.nav-links a:hover {
  background: var(--navy);
  color: #ffffff;
}

.workspace-card {
  margin-top: auto;
}

.workspace-card img {
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  display: block;
  margin-bottom: 12px;
  object-fit: cover;
  width: 100%;
}

.main {
  align-content: start;
  display: grid;
  gap: 22px;
  padding: 26px;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(5, 5, 5, 0.04);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 1.65rem;
  line-height: 1.12;
  margin-bottom: 0;
}

h2 {
  font-size: 1.25rem;
  margin-bottom: 0;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.subpage-nav {
  align-items: center;
  background: #f4f6f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
}

.subpage-nav button {
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 850;
  min-height: 34px;
  padding: 0 12px;
}

.subpage-nav button.active {
  background: var(--navy);
  box-shadow: 0 4px 12px rgba(11, 47, 99, 0.16);
  color: #ffffff;
}

.search {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-width: min(360px, 40vw);
  padding: 0 12px;
}

.search input {
  border: 0;
  min-height: 42px;
  outline: 0;
  width: 100%;
}

.primary-button,
.secondary-button,
.task-form button {
  align-items: center;
  background: var(--navy);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 850;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  white-space: nowrap;
}

.primary-button:hover,
.task-form button:hover {
  background: var(--navy-dark);
  box-shadow: 0 12px 24px var(--ring);
  transform: translateY(-1px);
}

.secondary-button {
  background: var(--navy);
  color: #ffffff;
  font-size: 0.84rem;
  min-height: 38px;
  padding: 0 14px;
}

.secondary-button:hover {
  background: var(--navy-dark);
  box-shadow: 0 10px 20px var(--ring);
  transform: translateY(-1px);
}

.mode-pill {
  background: #f4f6f9;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--black);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
  white-space: nowrap;
}

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

.metrics article,
.panel,
.onboarding-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metrics article {
  padding: 18px;
}

.metrics span {
  color: var(--muted);
  display: block;
  font-size: 0.88rem;
}

.metrics strong {
  display: block;
  font-size: 1.8rem;
  margin-top: 6px;
}

.daily-command-center {
  animation: dashboard-rise 420ms ease both;
  display: grid;
  gap: 18px;
}

.dashboard-greeting,
.today-focus-card,
.dashboard-follow-up-card,
.time-saved-widget,
.dashboard-section {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.dashboard-greeting {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.45fr) minmax(240px, 0.8fr);
  padding: 22px;
}

.dashboard-greeting h2,
.today-focus-card h2,
.dashboard-section h2 {
  letter-spacing: 0;
}

.dashboard-greeting h2 {
  font-size: clamp(1.65rem, 2.2vw, 2.35rem);
  line-height: 1;
}

#dashboardDate,
.daily-message {
  color: var(--muted);
  margin: 7px 0 0;
}

.dashboard-weather {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.dashboard-weather span,
.soft-pill,
.focus-grid span,
.revenue-snapshot-grid span,
.sales-activity-grid span,
.communication-stats-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

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

.daily-message {
  border-left: 3px solid var(--navy);
  font-weight: 750;
  padding-left: 14px;
}

.today-focus-card {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr) auto;
  padding: 22px;
}

.focus-copy p:last-child {
  color: var(--muted);
  line-height: 1.55;
  margin: 8px 0 0;
}

.focus-grid,
.sales-activity-grid,
.communication-stats-grid,
.opportunity-health-grid {
  display: grid;
  gap: 10px;
}

.focus-grid,
.sales-activity-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.communication-stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.focus-grid article,
.sales-activity-grid article,
.revenue-snapshot-grid article,
.communication-stats-grid article,
.opportunity-health-grid article {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.focus-grid article:hover,
.sales-activity-grid article:hover,
.revenue-snapshot-grid article:hover,
.communication-stats-grid article:hover,
.opportunity-health-grid article:hover {
  border-color: rgba(11, 47, 99, 0.28);
  transform: translateY(-1px);
}

.focus-grid strong,
.sales-activity-grid strong,
.revenue-snapshot-grid strong,
.communication-stats-grid strong,
.opportunity-health-grid strong {
  display: block;
  font-size: 1.4rem;
  line-height: 1.1;
  margin-top: 8px;
}

.opportunity-health-grid span,
.opportunity-health-grid small {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  font-weight: 850;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.opportunity-health-grid small {
  font-size: 0.72rem;
  margin-top: 6px;
  text-transform: none;
}

.best-next-opportunity {
  border-color: rgba(11, 47, 99, 0.28) !important;
}

.command-start-button {
  align-self: stretch;
  border-radius: 8px;
  font-size: 1rem;
  min-width: 176px;
  padding-inline: 26px;
}

.dashboard-follow-up-card {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.28fr) auto;
  padding: 20px;
}

.dashboard-follow-up-card h2 {
  font-size: clamp(1.28rem, 1.7vw, 1.75rem);
  line-height: 1.05;
}

.dashboard-follow-up-card p:last-child {
  color: var(--muted);
  margin: 7px 0 0;
}

.dashboard-follow-up-count {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.dashboard-follow-up-count span,
.follow-up-queue-summary span,
.follow-up-item-grid span,
.suggested-message span {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.dashboard-follow-up-count strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
  margin-top: 7px;
}

.time-saved-widget {
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 20px;
  position: relative;
}

.time-saved-widget::before {
  background: linear-gradient(90deg, var(--navy), rgba(11, 47, 99, 0));
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.time-saved-hero {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.time-saved-hero h2 {
  font-size: clamp(1.35rem, 1.8vw, 1.8rem);
  line-height: 1.05;
}

.time-saved-total {
  background: var(--black);
  border-radius: 8px;
  color: #ffffff;
  min-width: 180px;
  padding: 14px;
}

.time-saved-total span,
.time-saved-grid span,
.time-saved-source span,
.team-time-saved-row span {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.time-saved-total span {
  color: rgba(255, 255, 255, 0.72);
}

.time-saved-total strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  margin-top: 6px;
}

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

.time-saved-grid article,
.time-saved-source,
.team-time-saved-row {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
}

.time-saved-grid strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.1;
  margin-top: 7px;
}

.time-saved-breakdown {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.time-saved-breakdown h3 {
  font-size: 0.82rem;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.time-saved-source-list,
.team-time-saved-list {
  display: grid;
  gap: 8px;
}

.time-saved-source {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.time-saved-source strong {
  display: block;
}

.time-saved-source b {
  color: var(--navy);
  font-size: 1rem;
  white-space: nowrap;
}

.team-time-saved-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.team-time-saved-row strong {
  color: var(--navy);
  white-space: nowrap;
}

.time-saved-activity-badge {
  align-items: center;
  background: var(--navy-soft);
  border: 1px solid rgba(11, 47, 99, 0.18);
  border-radius: 999px;
  color: var(--navy);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  justify-self: start;
  line-height: 1;
  padding: 5px 8px;
  width: fit-content;
}

.dashboard-section {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.section-heading {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.ai-recommendations-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 9px;
  min-height: 172px;
  padding: 16px;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  width: 100%;
}

button.ai-card:hover {
  background: var(--surface-elevated);
  border-color: rgba(11, 47, 99, 0.32);
  box-shadow: 0 16px 32px rgba(5, 5, 5, 0.08);
  transform: translateY(-2px);
}

.ai-card span {
  color: var(--navy);
  font-size: 0.74rem;
  font-weight: 900;
}

.ai-card strong,
.dashboard-feed-item strong,
.dashboard-schedule-item strong {
  display: block;
}

.ai-card b {
  font-size: 1.45rem;
}

.ai-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.revenue-snapshot-grid {
  margin-bottom: 0;
}

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

.dashboard-split {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
}

.soft-pill {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  padding: 7px 10px;
  white-space: nowrap;
}

.dashboard-activity-feed,
.dashboard-schedule {
  display: grid;
  gap: 10px;
}

.dashboard-feed-item,
.dashboard-schedule-item {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 12px;
}

.dashboard-feed-item span,
.dashboard-feed-item p,
.dashboard-schedule-item span {
  color: var(--muted);
  margin: 0;
}

.dashboard-feed-item .time-saved-activity-badge,
.activity-feed-item .time-saved-activity-badge,
.activity-timeline .time-saved-activity-badge {
  color: var(--navy);
  display: inline-flex;
  margin: 2px 0;
}

.dashboard-feed-item span,
.dashboard-schedule-item time {
  font-size: 0.78rem;
  font-weight: 850;
}

.dashboard-schedule-item {
  align-items: center;
  grid-template-columns: 74px minmax(0, 1fr);
}

.dashboard-schedule-item time {
  color: var(--navy);
}

.flow-mode-panel {
  animation: flow-enter 360ms ease both;
  background: var(--surface-elevated);
  border: 1px solid rgba(11, 47, 99, 0.24);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(11, 47, 99, 0.12);
  display: grid;
  gap: 16px;
  padding: 20px;
}

.flow-mode-header {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
}

.flow-mode-header h2,
.flow-completion h3 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.05;
  margin-bottom: 4px;
}

#flowProgressLabel,
.flow-action-status,
.flow-lead-card p,
.flow-completion p {
  color: var(--muted);
}

.flow-progress-stats,
.flow-results,
.flow-lead-grid {
  display: grid;
  gap: 8px;
}

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

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

.flow-progress-stats article,
.flow-results article,
.flow-lead-grid article {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 10px;
}

.flow-progress-stats span,
.flow-results span,
.flow-lead-grid span,
.flow-lead-hero span {
  color: var(--muted);
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.flow-progress-stats strong,
.flow-results strong,
.flow-lead-grid strong {
  display: block;
  font-size: 1.18rem;
  margin-top: 5px;
}

.flow-step-card {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.76fr);
  min-height: 520px;
}

.flow-action-main,
.flow-lead-card,
.flow-completion {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.flow-action-main,
.flow-lead-card {
  align-content: start;
  max-height: 520px;
  overflow: auto;
}

.flow-action-main h3 {
  font-size: clamp(1.3rem, 1.8vw, 1.75rem);
  line-height: 1.1;
  margin: 0;
}

#flowActionWhy {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
}

.flow-talking-points {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.flow-talking-points h4 {
  font-size: 0.82rem;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.flow-talking-points ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.flow-talking-points li {
  color: var(--muted);
  line-height: 1.45;
}

.flow-lead-hero {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.flow-lead-hero strong {
  display: block;
  font-size: 1.12rem;
}

.flow-lead-hero p {
  margin: 4px 0 0;
}

.flow-lead-hero b {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  padding: 7px 10px;
  white-space: nowrap;
}

.flow-badge {
  box-shadow: 0 10px 22px rgba(5, 5, 5, 0.06);
}

.flow-intelligence-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(180px, 1.12fr);
}

.flow-intelligence-summary div,
.flow-intelligence-summary ul {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  margin: 0;
  min-width: 0;
  padding: 10px;
}

.flow-intelligence-summary ul {
  list-style: none;
}

.flow-intelligence-summary span,
.flow-intelligence-summary li {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.flow-intelligence-summary strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.15;
}

.flow-intelligence-summary small {
  color: var(--muted);
  font-size: 0.74rem;
}

.flow-score-breakdown {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

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

.flow-action-buttons button {
  min-width: 0;
}

.flow-action-buttons button.active {
  background: var(--black);
  box-shadow: inset 0 0 0 2px #ffffff, 0 0 0 2px var(--black);
}

.flow-action-status {
  font-weight: 800;
  margin: 0;
  min-height: 1.2rem;
}

.flow-savings-message {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  font-weight: 900;
  margin: 0;
  min-height: 42px;
  padding: 11px 12px;
}

.flow-completion {
  background: var(--navy);
  color: #ffffff;
  overflow: hidden;
  position: relative;
}

.flow-completion::after {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  content: "";
  height: 180px;
  position: absolute;
  right: -70px;
  top: -80px;
  width: 180px;
}

.flow-completion .eyebrow,
.flow-completion p {
  color: rgba(255, 255, 255, 0.78);
}

.flow-results article {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.flow-results span {
  color: rgba(255, 255, 255, 0.72);
}

.flow-results strong {
  color: #ffffff;
}

.flow-completion button {
  justify-self: start;
  position: relative;
}

@keyframes dashboard-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flow-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.revenue-goal-panel {
  margin-bottom: 22px;
}

.goal-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.goal-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 4px;
  text-transform: uppercase;
}

.goal-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 38px;
  padding: 0 10px;
  width: 140px;
}

.goal-progress {
  background: #eef1f5;
  border-radius: 999px;
  height: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}

.goal-progress span {
  background: linear-gradient(90deg, var(--teal), var(--blue));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 6px;
  transition: width 0.2s ease;
}

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

.goal-summary article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.goal-summary span,
.goal-summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.goal-summary span {
  text-transform: uppercase;
}

.goal-summary strong {
  font-size: 1.28rem;
}

.goal-message {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 12px 0 0;
  min-height: 1.25rem;
}

.onboarding-panel {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px;
}

.onboarding-panel p {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 660px;
}

.onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.setup-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  min-width: min(100%, 620px);
}

.setup-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.85rem;
  font-weight: 800;
  gap: 6px;
}

.setup-form input,
.setup-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  padding: 0 10px;
}

.workspace-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

body[data-active-page="automation"] .workspace-grid,
body[data-active-page="activity"] .workspace-grid {
  grid-template-columns: minmax(0, 1fr);
}

.insights-panel {
  display: grid;
  gap: 4px;
}

.source-report-panel {
  margin-bottom: 22px;
}

.source-report-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.source-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.source-card-main {
  background: transparent;
  border: 0;
  color: inherit;
  display: grid;
  gap: 5px;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.source-card-main:hover {
  background: #eef4ff;
}

.source-card-main span,
.source-card-main small,
.source-card-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.source-card-main span {
  text-transform: uppercase;
}

.source-card-main strong {
  font-size: 1.35rem;
}

.source-card-meta {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.source-card-meta strong {
  color: var(--ink);
}

.follow-up-queue-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.follow-up-queue-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
}

.follow-up-queue-summary article {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 10px;
}

.follow-up-queue-summary strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1;
  margin-top: 5px;
}

.follow-up-queue-list {
  display: grid;
  gap: 12px;
}

.follow-up-item {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.follow-up-item.critical {
  border-left-color: var(--danger);
}

.follow-up-item.high {
  border-left-color: var(--amber);
}

.follow-up-item.medium {
  border-left-color: var(--blue);
}

.follow-up-item-main {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.follow-up-item-main h3 {
  font-size: 1.15rem;
  margin: 8px 0 3px;
}

.follow-up-item-main p {
  color: var(--muted);
  margin: 0;
}

.priority-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  padding: 6px 8px;
  text-transform: uppercase;
}

.priority-pill.critical {
  background: #fde8e5;
  color: var(--danger);
}

.priority-pill.high {
  background: #fff3d8;
  color: var(--warning);
}

.priority-pill.medium,
.priority-pill.low {
  background: var(--navy-soft);
  color: var(--navy);
}

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

.follow-up-item-grid article,
.suggested-message {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 10px;
}

.follow-up-item-grid strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.25;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.follow-up-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.follow-up-reasons span {
  background: var(--navy-soft);
  border: 1px solid rgba(11, 47, 99, 0.16);
  border-radius: 999px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 850;
  padding: 5px 8px;
}

.suggested-message {
  display: grid;
  gap: 6px;
}

.suggested-message p {
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0;
}

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

.follow-up-actions button {
  min-height: 36px;
}

.follow-up-queue-message {
  color: var(--muted);
  font-weight: 800;
  margin: 0;
  min-height: 1.3rem;
}

.insight-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.insight-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 5px;
  min-height: 132px;
  padding: 12px;
  text-align: left;
}

button.insight-card:hover {
  background: #eef4ff;
}

.insight-card span {
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.insight-card strong {
  font-size: 1rem;
}

.insight-card b {
  font-size: 1.2rem;
}

.insight-card p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
  margin: 0;
}

.lower-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}

.backup-panel {
  margin-top: 22px;
}

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

.backup-summary article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.backup-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.backup-summary strong {
  font-size: 1.35rem;
}

.backup-message {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 12px 0 0;
  min-height: 1.25rem;
}

.saas-admin-panel {
  margin-top: 22px;
}

.saas-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.admin-dropdown {
  background: #ffffff;
}

.admin-dropdown summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
}

.admin-dropdown summary::-webkit-details-marker {
  display: none;
}

.admin-dropdown summary::after {
  background: var(--navy);
  border-radius: 999px;
  color: #ffffff;
  content: "+";
  display: inline-grid;
  font-weight: 900;
  height: 26px;
  place-items: center;
  width: 26px;
}

.admin-dropdown[open] summary::after {
  content: "-";
}

.admin-card h3 {
  margin: 0;
}

.admin-form,
.invite-form {
  display: grid;
  gap: 10px;
}

.admin-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.85rem;
  font-weight: 800;
  gap: 6px;
}

.admin-form input,
.admin-form select,
.invite-form input,
.invite-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  padding: 0 10px;
}

.invite-form {
  grid-template-columns: minmax(0, 1fr) 120px auto;
}

.plan-summary,
.team-summary,
.workspace-profile-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.plan-summary article,
.team-summary article,
.workspace-profile-summary article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.plan-summary span,
.plan-summary small,
.team-summary span,
.workspace-profile-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.plan-summary span,
.team-summary span,
.workspace-profile-summary span {
  text-transform: uppercase;
}

.plan-addon-list {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
  padding: 10px;
}

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

.workspace-profile-summary strong {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.plan-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-options .active {
  background: var(--navy-soft);
  border-color: rgba(11, 47, 99, 0.24);
  color: var(--teal-dark);
}

.team-card,
.extensions-card,
.launch-card,
.audit-card {
  align-content: start;
}

.team-list,
.extension-grid,
.launch-checklist,
.audit-list {
  display: grid;
  gap: 8px;
}

.team-row,
.extension-grid article,
.launch-check,
.audit-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.extension-grid article {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.extension-grid strong,
.extension-grid span {
  display: block;
}

.extension-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  margin-top: 2px;
}

.extension-grid a.primary-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 36px;
  text-decoration: none;
  white-space: nowrap;
}

.team-row div,
.launch-check div,
.audit-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.team-row span,
.audit-row span,
.audit-row time,
.launch-check small {
  color: var(--muted);
  font-size: 0.82rem;
}

.launch-check > span {
  background: #fff8ef;
  border-radius: 999px;
  color: #8b5d17;
  flex: 0 0 auto;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 5px 9px;
  text-transform: uppercase;
}

.launch-check.ready > span {
  background: var(--navy-soft);
  color: var(--teal-dark);
}

.launch-check.readiness-score {
  background: linear-gradient(180deg, var(--surface), var(--soft));
  border-color: rgba(11, 47, 99, 0.22);
}

.launch-check.readiness-score > span {
  align-items: center;
  background: var(--black);
  color: #ffffff;
  display: inline-flex;
  min-height: 40px;
}

.audit-row time {
  flex: 0 0 auto;
  font-weight: 800;
}

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

.status-pill {
  background: var(--navy-soft);
  border-radius: 999px;
  color: var(--teal-dark) !important;
  flex: 0 0 auto;
  font-weight: 800;
  padding: 5px 9px;
}

.status-pill.pending {
  background: #fff8ef;
  color: #8b5d17 !important;
}

.admin-message {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 12px 0 0;
  min-height: 1.25rem;
}

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

.panel-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.panel-heading.compact {
  margin-bottom: 12px;
}

.segmented-control {
  background: #f4f6f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  padding: 3px;
}

.segmented-control button {
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--navy);
  font-weight: 700;
  min-height: 34px;
  padding: 0 12px;
}

.segmented-control button.active {
  background: var(--navy);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(11, 47, 99, 0.18);
}

.task-filters {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.contact-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.lead-generator-status {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  margin: -4px 0 12px;
  min-height: 1.25rem;
}

.ai-sales-manager-page {
  display: grid;
  gap: 18px;
}

.manager-hero,
.manager-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.manager-hero {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 20px;
}

.manager-hero p:last-child {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 760px;
}

.manager-hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.manager-section {
  display: grid;
  gap: 14px;
  padding: 18px;
}

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

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

.manager-kpi-card,
.leaderboard-row,
.manager-insight-card,
.forecast-chart-card,
.manager-stage-card,
.coaching-card,
.risk-card,
.manager-notification,
.manager-analytics-chart {
  animation: dashboard-rise 220ms ease both;
  animation-delay: var(--delay, 0ms);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.manager-kpi-card {
  display: grid;
  gap: 4px;
  min-height: 112px;
  padding: 12px;
}

.manager-kpi-card span,
.manager-kpi-card small,
.leaderboard-row span,
.forecast-chart-card span,
.forecast-chart-card small,
.manager-stage-card span,
.manager-stage-card small,
.coaching-grid span,
.risk-card span,
.manager-notification span,
.analytics-chart-heading span,
.analytics-chart-heading small,
.analytics-bars small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.manager-kpi-card span,
.leaderboard-row span,
.forecast-chart-card span,
.manager-stage-card span,
.coaching-grid span,
.risk-card span,
.analytics-chart-heading span {
  text-transform: uppercase;
}

.manager-kpi-card strong {
  font-size: clamp(1.35rem, 2vw, 1.95rem);
  line-height: 1;
}

.sales-leaderboard {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.leaderboard-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1.6fr) repeat(9, minmax(96px, 1fr));
  min-width: 1180px;
  padding: 10px;
}

.rep-profile {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.rep-photo {
  align-items: center;
  background: var(--black);
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.rep-profile strong,
.rep-profile span,
.leaderboard-row strong,
.leaderboard-row span {
  display: block;
}

.leaderboard-row strong {
  font-size: 0.92rem;
}

.trend strong {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.trend.up strong {
  color: var(--teal-dark);
}

.trend.down strong {
  color: var(--danger);
}

.trend.flat strong {
  color: var(--warning);
}

.manager-ai-insights,
.forecast-charts,
.manager-pipeline-health,
.risk-center,
.manager-notifications {
  display: grid;
  gap: 10px;
}

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

.manager-insight-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.manager-insight-card span,
.performance-pill {
  background: var(--navy);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  justify-self: start;
  padding: 5px 8px;
}

.manager-insight-card p,
.risk-card p,
.coaching-grid p {
  margin-bottom: 0;
}

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

.forecast-chart-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.forecast-chart-card strong {
  display: block;
  font-size: 1.22rem;
}

.manager-bar,
.manager-stage-bar {
  background: #e8edf4;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.manager-bar span,
.manager-stage-bar span {
  background: linear-gradient(90deg, var(--navy), var(--teal));
  border-radius: inherit;
  display: block;
  height: 100%;
}

.manager-stage-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.manager-stage-card > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.manager-stage-card.new .manager-stage-bar span {
  background: #5f8edb;
}

.manager-stage-card.qualified .manager-stage-bar span {
  background: #0f7a4f;
}

.manager-stage-card.quoted .manager-stage-bar span {
  background: #7758d1;
}

.manager-stage-card.negotiating .manager-stage-bar span {
  background: #a16207;
}

.manager-stage-card.won .manager-stage-bar span {
  background: #111827;
}

.manager-stage-card.lost .manager-stage-bar span {
  background: #b42318;
}

.manager-stage-card.stalled .manager-stage-bar span {
  background: #64748b;
}

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

.coaching-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.coaching-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

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

.coaching-grid section {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.risk-card {
  border-left: 4px solid var(--navy);
  display: grid;
  gap: 5px;
  padding: 12px;
}

.risk-card.critical,
.risk-card.high {
  border-left-color: var(--danger);
}

.risk-card.medium {
  border-left-color: var(--warning);
}

.risk-card.low {
  border-left-color: var(--teal);
}

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

.manager-actions .primary-button {
  grid-column: 1 / -1;
}

.manager-status {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  margin: 0;
  min-height: 1.25rem;
}

.manager-notification {
  border-left: 4px solid var(--teal);
  display: grid;
  gap: 4px;
  padding: 10px;
}

.manager-notification.warning {
  border-left-color: var(--warning);
}

.manager-notification.danger {
  border-left-color: var(--danger);
}

.manager-analytics-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.manager-analytics-tabs button {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 850;
  min-height: 34px;
  padding: 0 10px;
}

.manager-analytics-tabs button.active,
.manager-analytics-tabs button:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.manager-analytics-chart {
  display: grid;
  gap: 14px;
  padding: 12px;
}

.analytics-chart-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.analytics-chart-heading strong {
  display: block;
}

.analytics-bars {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-height: 210px;
}

.analytics-bars article {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-width: 0;
}

.analytics-bar-track {
  align-items: end;
  background: #e8edf4;
  border-radius: 8px;
  display: flex;
  height: 150px;
  overflow: hidden;
  width: 100%;
}

.analytics-bar-track span {
  background: linear-gradient(180deg, var(--teal), var(--navy));
  border-radius: inherit inherit 0 0;
  display: block;
  transition: height 180ms ease;
  width: 100%;
}

.recruiting-inbox-panel {
  display: grid;
  gap: 14px;
}

.recruiting-inbox-summary,
.recruiting-candidate-grid {
  display: grid;
  gap: 10px;
}

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

.recruiting-inbox-summary article,
.recruiting-candidate-grid article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px;
}

.recruiting-inbox-summary span,
.recruiting-candidate-grid span,
.recruiting-inbox-message {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.recruiting-inbox-summary span,
.recruiting-candidate-grid span {
  text-transform: uppercase;
}

.recruiting-inbox-summary strong {
  font-size: 1.34rem;
  line-height: 1.1;
}

.recruiting-candidate-list {
  display: grid;
  gap: 12px;
}

.recruiting-candidate-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  padding: 14px;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.recruiting-candidate-card:hover {
  border-color: rgba(11, 47, 99, 0.28);
  transform: translateY(-1px);
}

.recruiting-candidate-card.converted {
  border-color: rgba(15, 122, 79, 0.28);
}

.recruiting-candidate-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.recruiting-candidate-head strong,
.recruiting-candidate-head span {
  display: block;
}

.recruiting-candidate-head span {
  color: var(--muted);
  margin-top: 3px;
}

.recruiting-candidate-head b {
  background: var(--navy);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 7px 10px;
}

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

.candidate-tags,
.recruiting-candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.candidate-tags span {
  background: #eef4ff;
  border-radius: 999px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 8px;
}

.communications-page {
  display: grid;
  gap: 12px;
}

.communications-shell {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1.45fr) minmax(280px, 0.82fr);
  min-height: min(76vh, 860px);
}

.communications-column {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.conversation-list-column,
.customer-info-column {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.conversation-list-column {
  align-content: start;
}

.conversation-window-column {
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
}

.communications-column-heading,
.conversation-window-header,
.conversation-timeline-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.conversation-window-header {
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.conversation-window-header span,
.communications-column-heading span,
.conversation-timeline-heading span,
.conversation-preview small,
.conversation-preview em,
.customer-detail-grid span,
.ai-assistant-grid span,
.communication-notification-feed span,
.composer-tool span,
.composer-status,
.communications-status {
  color: var(--muted);
}

.conversation-header-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.communication-search,
.composer-input-label,
.composer-customer-select {
  color: var(--muted);
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 6px;
}

.communication-search input,
.composer-input-label textarea,
.composer-tool select,
.composer-customer-select select {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 10px;
}

.communication-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.communication-filters button,
.composer-tabs button,
.quick-replies button,
.emoji-picker button,
.call-control-grid button,
.call-log-actions button {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 850;
  min-height: 32px;
  padding: 0 10px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.communication-filters button.active,
.composer-tabs button.active,
.call-control-grid button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.communication-filters button:hover,
.composer-tabs button:hover,
.quick-replies button:hover,
.emoji-picker button:hover,
.call-control-grid button:hover,
.call-log-actions button:hover {
  border-color: var(--navy);
  box-shadow: 0 8px 18px var(--ring);
  transform: translateY(-1px);
}

.conversation-list {
  display: grid;
  gap: 8px;
  max-height: calc(76vh - 168px);
  overflow: auto;
  padding-right: 2px;
}

.conversation-item {
  align-items: start;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 10px;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  width: 100%;
}

.conversation-item.active,
.conversation-item:hover {
  background: #f4f8ff;
  border-color: rgba(11, 47, 99, 0.28);
  box-shadow: 0 12px 28px rgba(11, 47, 99, 0.1);
  transform: translateY(-1px);
}

.conversation-avatar,
.customer-photo {
  align-items: center;
  background: var(--black);
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
}

.conversation-avatar {
  height: 42px;
  width: 42px;
}

.conversation-preview {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.conversation-preview > span {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.conversation-preview strong,
.conversation-preview em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-preview em {
  display: block;
  font-style: normal;
}

.conversation-preview time {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
}

.conversation-meta {
  align-items: end;
  display: grid;
  gap: 5px;
  justify-items: end;
}

.unread-badge,
.pin-badge,
.stage-pill,
.customer-tags span {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 4px 7px;
  white-space: nowrap;
}

.unread-badge {
  background: #0f7a4f;
  color: #ffffff;
}

.pin-badge,
.customer-tags span {
  background: #eef4ff;
  color: var(--navy);
}

.stage-dot {
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.stage-pill {
  background: #eef4ff;
  color: var(--navy);
}

.stage-new {
  background: #5f8edb;
}

.stage-qualified {
  background: #0f7a4f;
}

.stage-proposal {
  background: #a16207;
}

.stage-won {
  background: #111827;
}

.stage-pill.stage-new,
.stage-pill.stage-qualified,
.stage-pill.stage-proposal,
.stage-pill.stage-won {
  color: #ffffff;
}

.call-controls {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1fr);
  padding: 14px 16px;
}

.call-primary {
  align-items: center;
  display: flex;
  gap: 12px;
}

.call-primary span,
.call-primary strong {
  display: block;
}

.call-primary span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.call-primary strong {
  font-size: 1.25rem;
}

.call-button {
  background: var(--navy);
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 900;
  height: 76px;
  width: 76px;
}

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

.call-control-grid button {
  min-height: 42px;
}

.call-log-actions {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  padding-top: 12px;
}

.call-log-actions span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.call-log-actions div {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.call-log-actions button {
  min-height: 38px;
}

.call-control-grid button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.end-call-button {
  background: #b42318 !important;
  border-color: #b42318 !important;
  color: #ffffff !important;
}

.conversation-timeline {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 16px;
}

.message-thread {
  display: grid;
  gap: 10px;
}

.message-bubble {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  max-width: min(86%, 680px);
  padding: 12px;
}

.message-bubble.incoming {
  background: #ffffff;
  justify-self: start;
}

.message-bubble.outgoing {
  background: #eef4ff;
  border-color: rgba(11, 47, 99, 0.18);
  justify-self: end;
}

.message-bubble.system {
  background: #f8fafc;
  justify-self: center;
  max-width: min(92%, 760px);
}

.message-bubble-header,
.message-bubble-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.message-bubble-header span {
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.message-bubble-header small {
  color: var(--muted);
  display: block;
  font-size: 0.7rem;
  font-weight: 750;
  margin-top: 2px;
}

.message-bubble-header time,
.message-bubble-footer span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.message-bubble p {
  margin-bottom: 0;
}

.message-composer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}

.composer-tabs,
.composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.composer-tool-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 0.48fr) minmax(160px, 0.55fr) minmax(0, 1fr);
}

.composer-tool {
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.composer-tool span,
.composer-tool label {
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.emoji-picker,
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-info-column {
  max-height: min(76vh, 860px);
  overflow: auto;
}

.customer-sidebar,
.ai-assistant-panel,
.quick-actions-panel,
.communication-notifications {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.customer-profile-card {
  align-items: center;
  display: flex;
  gap: 10px;
}

.customer-photo {
  height: 54px;
  width: 54px;
}

.customer-profile-card strong,
.customer-profile-card span,
.customer-detail-grid strong,
.customer-detail-grid span {
  display: block;
}

.customer-detail-grid,
.ai-assistant-grid,
.quick-action-grid,
.communication-notification-feed {
  display: grid;
  gap: 8px;
}

.customer-detail-grid article,
.ai-assistant-grid article,
.communication-notification-feed article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.customer-detail-grid span,
.ai-assistant-grid span,
.communication-notification-feed span {
  font-size: 0.72rem;
  font-weight: 850;
}

.ai-assistant-grid p,
.ai-assistant-grid ul {
  margin: 0;
}

.ai-assistant-grid ul {
  padding-left: 18px;
}

.customer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.communication-notification-feed article {
  animation: dashboard-rise 220ms ease both;
}

.communications-status {
  font-size: 0.9rem;
  font-weight: 800;
  min-height: 1.25rem;
}

.toast-region {
  bottom: 18px;
  display: grid;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  position: fixed;
  right: 18px;
  z-index: 40;
}

.communication-toast {
  animation: toast-enter 180ms ease both;
  background: var(--black);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  color: #ffffff;
  display: grid;
  gap: 3px;
  padding: 12px 14px;
}

.communication-toast span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
}

.communication-toast.leaving {
  opacity: 0;
  transform: translateY(8px);
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dial-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
}

.dial-panel,
.appointments-panel {
  align-content: start;
}

.dial-panel {
  grid-row: span 2;
}

.dial-summary,
.dial-info-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

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

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

.dial-summary article,
.dial-info-grid article,
.appointment-row {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.dial-summary span,
.dial-info-grid span,
.appointment-row span,
.dial-script-card small {
  color: var(--muted);
}

.dial-summary strong,
.dial-info-grid strong,
.appointment-row strong,
.appointment-row span {
  display: block;
}

.dial-lead {
  display: grid;
  gap: 12px;
}

.dial-lead-hero {
  align-items: center;
  background: linear-gradient(180deg, #ffffff, #f4f7fb);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
}

.dial-lead-hero h3 {
  font-size: 1.4rem;
  margin: 0;
}

.dial-lead-hero span {
  color: var(--muted);
}

.dial-script-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.dial-script-card p {
  margin-bottom: 0;
}

.dial-script-card pre {
  color: var(--muted);
  font: inherit;
  margin: 0;
  white-space: pre-wrap;
}

.dial-form,
.appointment-fields,
.appointment-list {
  display: grid;
  gap: 12px;
}

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

.time-button {
  background: var(--navy);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 850;
  min-height: 38px;
  padding: 0 10px;
}

.time-button.active {
  background: var(--black);
  box-shadow: inset 0 0 0 2px #ffffff, 0 0 0 2px var(--black);
}

.dial-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.86rem;
  font-weight: 800;
  gap: 6px;
}

.dial-message {
  color: var(--muted);
  font-weight: 800;
  min-height: 1.25rem;
}

.appointment-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.appointment-row time {
  color: var(--teal-dark);
  font-weight: 850;
  white-space: nowrap;
}

.dial-switch-panel,
.dial-schedule-panel {
  grid-column: 1 / -1;
}

.schedule-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: 92px repeat(16, minmax(64px, 1fr));
  overflow-x: auto;
}

.schedule-corner,
.schedule-day,
.schedule-hour {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: flex;
  font-size: 0.78rem;
  font-weight: 850;
  min-height: 34px;
  padding: 0 8px;
}

.schedule-day {
  color: var(--black);
  justify-content: flex-start;
}

.schedule-cell {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  min-height: 34px;
}

.schedule-cell.active {
  background: var(--navy);
  border-color: var(--navy);
}

.calendar-panel {
  align-content: start;
}

.calendar-board {
  display: grid;
  gap: 10px;
}

.calendar-appointment {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 160px minmax(0, 1fr);
  padding: 12px;
}

.calendar-appointment time {
  color: var(--navy);
  font-weight: 900;
}

.calendar-appointment strong,
.calendar-appointment span {
  display: block;
}

.calendar-appointment span,
.calendar-appointment p {
  color: var(--muted);
}

.contact-filters {
  flex-wrap: wrap;
}

.contact-sort {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 8px;
  margin-left: auto;
}

.contact-sort select {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 38px;
  padding: 0 10px;
}

#selectVisibleContacts,
#clearSelectedContacts,
#exportSelectedContacts,
#bulkContactTask,
#bulkContactWon,
#bulkContactNext {
  min-height: 38px;
}

.selection-status {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.contact-summary,
.task-summary,
.pipeline-health {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.contact-summary article,
.task-summary article,
.pipeline-health article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.contact-summary span,
.task-summary span,
.pipeline-health span {
  color: var(--muted);
  font-size: 0.76rem;
}

.contact-summary strong,
.task-summary strong,
.pipeline-health strong {
  font-size: 1rem;
}

.pipeline-health span {
  font-weight: 800;
  text-transform: uppercase;
}

.task-filters button,
.contact-filters button {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.task-filters span,
.contact-filters span {
  background: #dbe8ff;
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 0.7rem;
  min-width: 20px;
  padding: 2px 6px;
}

.pipeline-board {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 174px);
  overflow-x: auto;
  padding-bottom: 4px;
}

.stage-column {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 320px;
  padding: 10px;
}

.stage-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stage-heading div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.stage-heading strong {
  font-size: 0.95rem;
}

.stage-value {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
}

.count-pill,
.score-pill,
.status-pill {
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 8px;
}

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

.intelligence-badge {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
  line-height: 1;
  padding: 5px 9px;
  white-space: nowrap;
}

.intelligence-badge strong {
  color: inherit;
  font-size: 0.82rem;
  line-height: 1;
}

.intelligence-badge span {
  color: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.intelligence-badge.hot {
  background: #e8f7ef;
  border-color: rgba(15, 122, 79, 0.28);
  color: #0d6b46;
}

.intelligence-badge.warm {
  background: #fff3d8;
  border-color: rgba(161, 98, 7, 0.26);
  color: #88540a;
}

.intelligence-badge.nurture {
  background: #eaf1ff;
  border-color: rgba(11, 47, 99, 0.24);
  color: var(--navy);
}

.intelligence-badge.cold {
  background: #eef2f7;
  border-color: rgba(39, 49, 66, 0.24);
  color: #475569;
}

.opportunity-health-badge {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
  line-height: 1;
  padding: 5px 9px;
  white-space: nowrap;
}

.opportunity-health-badge strong,
.opportunity-health-badge span {
  color: inherit;
  line-height: 1;
}

.opportunity-health-badge strong {
  font-size: 0.82rem;
}

.opportunity-health-badge span {
  font-size: 0.72rem;
  font-weight: 900;
}

.opportunity-health-badge.hot {
  background: #e8f7ef;
  border-color: rgba(15, 122, 79, 0.28);
  color: #0d6b46;
}

.opportunity-health-badge.warm {
  background: #eaf1ff;
  border-color: rgba(11, 47, 99, 0.24);
  color: var(--navy);
}

.opportunity-health-badge.at-risk {
  background: #fff3d8;
  border-color: rgba(161, 98, 7, 0.26);
  color: #88540a;
}

.opportunity-health-badge.cold {
  background: #feecec;
  border-color: rgba(180, 35, 24, 0.24);
  color: #9a1b12;
}

.intelligence-badge.compact {
  padding: 4px 8px;
}

.opportunity-health-badge.compact {
  padding: 4px 8px;
}

.deal-card .intelligence-badge,
.deal-card .opportunity-health-badge,
.contact-row .intelligence-badge {
  display: inline-flex;
}

.deal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.deal-summary {
  background: transparent;
  border: 0;
  display: grid;
  gap: 8px;
  padding: 0;
  text-align: left;
  width: 100%;
}

.deal-card.active {
  outline: 3px solid rgba(11, 47, 99, 0.16);
}

.deal-card strong,
.deal-card span:not(.intelligence-badge):not(.opportunity-health-badge) {
  display: block;
}

.deal-card span:not(.intelligence-badge):not(.opportunity-health-badge),
.lead-brief p,
.task-item span,
.contact-row span:not(.intelligence-badge) {
  color: var(--muted);
}

.deal-card .intelligence-badge,
.contact-row .intelligence-badge {
  display: inline-flex;
}

.intelligence-badge span {
  color: inherit;
  display: inline;
}

.opportunity-health-badge span {
  color: inherit;
  display: inline;
}

.contact-row p span,
.task-item p span {
  display: block;
}

.deal-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
}

.card-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}

.card-actions button,
.task-item button,
.automation-row button {
  background: var(--navy);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 34px;
  padding: 0 10px;
}

.forecast-view {
  display: grid;
  gap: 12px;
  min-width: 760px;
}

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

.forecast-summary article,
.forecast-row {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.forecast-summary article {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.forecast-summary span,
.forecast-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

.forecast-summary strong {
  font-size: 1.05rem;
}

.forecast-table {
  display: grid;
  gap: 8px;
}

.forecast-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1.1fr 0.8fr 0.8fr 0.7fr minmax(150px, 0.9fr);
  padding: 12px;
}

.forecast-row div {
  display: grid;
  gap: 3px;
}

.forecast-row .secondary-button {
  justify-self: start;
  min-height: 34px;
  text-align: left;
}

.right-rail {
  display: grid;
  gap: 22px;
  align-content: start;
}

.lead-brief {
  display: grid;
  gap: 12px;
}

.lead-brief h3 {
  font-size: 1.1rem;
  margin: 0;
}

.brief-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.lead-intelligence-panel,
.opportunity-health-panel {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.lead-intelligence-panel.compact,
.opportunity-health-panel.compact {
  padding: 12px;
}

.lead-intelligence-header,
.opportunity-health-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.lead-intelligence-header h3,
.opportunity-health-header h3 {
  font-size: 1.34rem;
  line-height: 1.05;
  margin: 0;
}

.lead-intelligence-header h3 span,
.opportunity-health-header h3 span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  margin-left: 4px;
  text-transform: uppercase;
}

.lead-intelligence-action,
.opportunity-next-action {
  display: grid;
  gap: 4px;
  text-align: right;
}

.lead-intelligence-action span,
.opportunity-next-action span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lead-intelligence-action strong,
.opportunity-next-action strong {
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.2;
}

.score-breakdown {
  display: grid;
  gap: 8px;
}

.score-breakdown ul,
.flow-score-breakdown ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.score-breakdown li,
.flow-score-breakdown li {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.score-breakdown li span,
.flow-score-breakdown li span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 850;
}

.score-breakdown li strong,
.flow-score-breakdown li strong {
  color: var(--navy);
  font-size: 0.84rem;
}

.score-breakdown li small,
.flow-score-breakdown li small {
  color: var(--muted);
  font-size: 0.78rem;
  grid-column: 1 / -1;
  line-height: 1.35;
}

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

.danger-button {
  background: var(--navy);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 800;
  min-height: 38px;
  padding: 0 12px;
}

.danger-button:hover {
  background: var(--navy-dark);
}

.sequence-preview {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.assistant-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.assistant-card p,
.assistant-card ul {
  margin: 0;
}

.assistant-card > p,
.assistant-card li {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.assistant-card ul {
  display: grid;
  gap: 4px;
  padding-left: 18px;
}

.assistant-card .secondary-button {
  justify-self: start;
}

.sales-copilot-panel {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(11, 47, 99, 0.08);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.sales-copilot-panel.detail {
  box-shadow: none;
}

.sales-copilot-header {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.sales-copilot-header h3 {
  font-size: 1.18rem;
  margin: 0 0 4px;
}

.sales-copilot-header span,
.sales-copilot-grid span,
.sales-copilot-scripts span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.sales-copilot-header b {
  align-items: center;
  background: var(--navy);
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-size: 1.25rem;
  font-weight: 950;
  min-height: 54px;
  padding: 0 14px;
}

.sales-copilot-grid,
.sales-copilot-scripts {
  display: grid;
  gap: 10px;
}

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

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

.sales-copilot-grid article,
.sales-copilot-scripts article {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
}

.sales-copilot-grid strong,
.sales-copilot-scripts p {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.38;
  margin: 0;
}

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

.sales-copilot-status {
  color: var(--navy);
  font-weight: 900;
  margin: 0;
  min-height: 1.2rem;
}

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

.sequence-preview span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sequence-preview strong {
  font-size: 0.86rem;
  line-height: 1.35;
}

.activity-timeline {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.activity-timeline article {
  border-left: 3px solid var(--teal);
  display: grid;
  gap: 2px;
  padding-left: 10px;
}

.activity-timeline strong {
  font-size: 0.9rem;
}

.activity-timeline span {
  color: var(--muted);
  font-size: 0.78rem;
}

.brief-grid div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.brief-grid span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
}

.automation-list,
.automation-template-list,
.task-list,
.contact-table,
.activity-feed {
  display: grid;
  gap: 10px;
}

.automation-row,
.task-item,
.contact-row,
.activity-feed-item {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

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

.automation-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 10px;
}

.automation-summary article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.automation-summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.automation-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.automation-actions button {
  min-height: 38px;
}

.automation-builder,
.automation-template-section,
.automation-run-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
}

.automation-builder h3,
.automation-template-section h3,
.automation-run-section h3 {
  font-size: 1rem;
  margin: 0;
}

.automation-builder-form {
  display: grid;
  gap: 10px;
}

.automation-builder-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 6px;
}

.automation-builder-form input,
.automation-builder-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  padding: 0 10px;
}

.automation-step-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(130px, 0.35fr) minmax(220px, 1fr);
}

.automation-builder-actions,
.automation-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.automation-builder-actions button,
.automation-template-actions button {
  min-height: 38px;
}

.automation-preview {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.automation-preview > article,
.automation-preview div article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 10px;
}

.automation-preview div {
  display: grid;
  gap: 8px;
}

.automation-preview span,
.automation-template-card ol span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.automation-builder-message {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  min-height: 1.25rem;
}

.workflow-builder-panel,
.workflow-templates-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.workflow-builder-toolbar {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.workflow-builder-toolbar h3,
.workflow-templates-panel h4,
.node-palette h4,
.properties-panel h4,
.ai-workflow-assistant h4 {
  margin: 0;
}

.workflow-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.autosave-pill {
  background: #eef4ff;
  border: 1px solid rgba(11, 47, 99, 0.16);
  border-radius: 999px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 7px 9px;
  white-space: nowrap;
}

.workflow-designer-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 230px minmax(420px, 1fr) 260px;
}

.node-palette,
.properties-panel,
.workflow-canvas-viewport,
.ai-workflow-assistant,
.automation-analytics,
.execution-log {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.node-palette,
.properties-panel,
.ai-workflow-assistant {
  align-content: start;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.node-palette-group {
  display: grid;
  gap: 6px;
}

.node-group-heading {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0;
  text-align: left;
  text-transform: uppercase;
}

.node-palette-group > div {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.palette-node,
.workflow-node {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  display: grid;
  gap: 3px;
  padding: 9px;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.palette-node:hover,
.workflow-node:hover,
.workflow-node.active {
  border-color: var(--navy);
  box-shadow: 0 10px 22px var(--ring);
  transform: translateY(-1px);
}

.palette-node span,
.workflow-node span,
.workflow-properties-card span,
.ai-workflow-assistant label,
.execution-log-heading span,
.execution-log-row span,
.execution-log-row time,
.automation-analytics span,
.workflow-template-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.palette-node.trigger,
.workflow-node.trigger {
  border-left: 4px solid #0f7a4f;
}

.palette-node.condition,
.workflow-node.condition {
  border-left: 4px solid #a16207;
}

.palette-node.action,
.workflow-node.action {
  border-left: 4px solid var(--navy);
}

.workflow-canvas-viewport {
  min-height: 560px;
  overflow: hidden;
  position: relative;
}

.workflow-canvas {
  background:
    linear-gradient(#edf1f6 1px, transparent 1px),
    linear-gradient(90deg, #edf1f6 1px, transparent 1px),
    #ffffff;
  background-size: 28px 28px;
  height: 100%;
  min-height: 560px;
  overflow: hidden;
  position: relative;
}

.workflow-canvas-inner {
  height: 560px;
  position: relative;
  transform-origin: top left;
  transition: transform 160ms ease;
  width: 960px;
}

.workflow-connections {
  height: 560px;
  inset: 0;
  pointer-events: none;
  position: absolute;
  width: 960px;
}

.workflow-connections path {
  fill: none;
  marker-end: url(#workflowArrow);
  stroke: var(--navy);
  stroke-linecap: round;
  stroke-width: 2.5;
}

.workflow-connections marker path {
  fill: var(--navy);
}

.workflow-canvas-nodes {
  inset: 0;
  position: absolute;
}

.workflow-node {
  cursor: grab;
  min-height: 76px;
  position: absolute;
  width: 178px;
}

.workflow-node:active {
  cursor: grabbing;
}

.workflow-node small {
  color: var(--muted);
  line-height: 1.25;
}

.workflow-properties-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.workflow-properties-card label,
.ai-workflow-assistant label {
  display: grid;
  gap: 6px;
}

.workflow-properties-card input,
.workflow-properties-card textarea,
.ai-workflow-assistant textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 38px;
  padding: 9px;
}

.workflow-properties-card p,
.ai-workflow-message {
  color: var(--muted);
  margin: 0;
}

.ai-workflow-assistant {
  grid-template-columns: minmax(180px, 0.55fr) minmax(280px, 1fr) auto;
}

.ai-workflow-message {
  grid-column: 1 / -1;
  min-height: 1.25rem;
}

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

.workflow-template-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.workflow-template-card div {
  display: grid;
  gap: 3px;
}

.automation-analytics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 10px;
}

.automation-analytics article {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.execution-log {
  display: grid;
  gap: 6px;
  overflow-x: auto;
  padding: 10px;
}

.execution-log-heading,
.execution-log-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 1.3fr) minmax(140px, 1fr) 96px 110px 90px 92px;
  min-width: 800px;
}

.execution-log-heading {
  padding: 0 8px;
}

.execution-log-row {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.execution-log-row.success {
  border-left: 4px solid var(--teal);
}

.execution-log-row.failure {
  border-left: 4px solid var(--danger);
}

.automation-run-list {
  display: grid;
  gap: 8px;
}

.automation-template-card,
.automation-run-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.automation-run-row {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.automation-run-row div {
  display: grid;
  gap: 3px;
}

.automation-run-row span,
.automation-run-row time {
  color: var(--muted);
  font-size: 0.82rem;
}

.automation-run-row div:last-child {
  text-align: right;
}

.automation-template-card.paused {
  background: #fbf8f4;
}

.automation-template-card > div:first-child {
  display: grid;
  gap: 5px;
}

.automation-template-card > div:first-child p {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0;
}

.automation-template-card ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.automation-template-card li {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.automation-template-card li span {
  display: block;
}

.automation-row p,
.task-item p,
.contact-row p {
  margin: 0;
}

.activity-feed-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.activity-filters {
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.activity-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.activity-actions button {
  min-height: 38px;
}

.activity-search {
  color: var(--muted);
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 6px;
  margin-bottom: 12px;
}

.activity-search input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 38px;
  padding: 0 10px;
}

.activity-feed-item div {
  display: grid;
  gap: 3px;
}

.activity-feed-item span,
.activity-feed-item time {
  color: var(--muted);
  font-size: 0.78rem;
}

.activity-feed-item strong {
  font-size: 0.9rem;
  line-height: 1.35;
}

.activity-feed-item button {
  min-height: 34px;
  padding: 0 10px;
}

.status-pill.on {
  background: #dbe8ff;
  color: var(--teal-dark);
}

.status-pill.off {
  background: #f4e1df;
  color: var(--coral);
}

.contact-row {
  grid-template-columns: auto 1.35fr 0.85fr 0.7fr 0.45fr 0.7fr auto;
}

.contact-row.active {
  border-color: rgba(11, 47, 99, 0.35);
  box-shadow: inset 4px 0 0 var(--teal);
}

.contact-select {
  align-items: center;
  display: flex;
  justify-content: center;
}

.contact-select input {
  accent-color: var(--navy);
  height: 18px;
  width: 18px;
}

.contact-score:not(.intelligence-badge) {
  background: var(--navy-soft);
  color: var(--navy-dark);
  display: inline-block;
  min-width: 34px;
  text-align: center;
}

.intelligence-badge.contact-score {
  min-width: 58px;
  text-align: left;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.contact-actions button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.contact-profile-content {
  display: grid;
  gap: 12px;
}

.contact-profile-hero {
  align-items: start;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.contact-profile-hero h3 {
  font-size: 1.3rem;
  margin: 0 0 4px;
}

.contact-profile-hero span {
  color: var(--muted);
}

.contact-profile-hero > strong {
  font-size: 1.2rem;
  white-space: nowrap;
}

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

.contact-profile-stats article,
.contact-profile-section {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.contact-profile-stats span {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-profile-stats strong {
  display: block;
  font-size: 0.96rem;
  margin-top: 3px;
}

.contact-next-form {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.contact-next-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 6px;
}

.contact-next-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  padding: 0 10px;
}

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

.contact-profile-actions button,
.contact-next-form button {
  min-height: 38px;
}

.contact-profile-section {
  display: grid;
  gap: 8px;
}

.contact-profile-section .eyebrow,
.profile-message {
  margin: 0;
}

.profile-message {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 1.25rem;
}

.linked-task-list {
  display: grid;
  gap: 8px;
}

.linked-task-list article {
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 10px;
}

.linked-task-list article.done {
  opacity: 0.68;
}

.linked-task-list span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-profile-timeline {
  border-top: 0;
  padding-top: 0;
}

.task-controls {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.task-form {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto) auto;
}

#completeVisibleTasks,
#snoozeVisibleTasks,
#exportVisibleTasks,
#clearDoneTasks,
#selectVisibleTasks,
#clearSelectedTasks,
#exportSelectedTasks,
#completeSelectedTasks,
#snoozeSelectedTasks,
#applySelectedTaskDue,
#duplicateSelectedTasks,
#deleteSelectedTasks {
  width: 100%;
}

.task-search,
.task-sort,
.task-bulk-due {
  color: var(--muted);
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 6px;
}

.task-search {
  grid-column: 1 / 2;
}

.task-sort {
  grid-column: 2 / 3;
}

.task-form input,
.task-form select,
.task-search input,
.task-sort select,
.task-bulk-due select,
.task-edit-form input,
.task-edit-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  padding: 0 12px;
}

.task-item {
  grid-template-columns: auto auto 1fr auto;
}

.task-item > input {
  height: 18px;
  width: 18px;
}

.task-select {
  align-items: center;
  display: flex;
  justify-content: center;
}

.task-select input {
  accent-color: var(--teal);
  height: 18px;
  width: 18px;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.task-edit-form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto) auto auto;
  width: 100%;
}

.task-item.editing {
  grid-template-columns: 1fr;
}

.task-item.done p {
  color: var(--muted);
  text-decoration: line-through;
}

.modal-backdrop {
  align-items: center;
  background: rgba(23, 33, 30, 0.46);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 14px;
  position: fixed;
  z-index: 20;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 28px);
  max-width: 520px;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.import-card {
  max-width: 640px;
}

.detail-card {
  max-width: 760px;
}

.lead-detail-content {
  display: grid;
  gap: 14px;
}

.detail-hero {
  align-items: start;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px;
}

.detail-hero h3 {
  font-size: 1.45rem;
  margin: 0 0 4px;
}

.detail-hero span,
.detail-section p {
  color: var(--muted);
}

.detail-hero > strong {
  font-size: 1.35rem;
  white-space: nowrap;
}

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

.detail-grid article,
.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.detail-grid span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
}

.detail-grid strong {
  display: block;
  font-size: 1.12rem;
  margin-top: 4px;
}

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

.detail-section {
  display: grid;
  gap: 8px;
}

.detail-section > strong,
.detail-section p {
  margin: 0;
}

.detail-activity {
  border-top: 0;
  padding-top: 0;
}

.note-form {
  display: grid;
  gap: 8px;
}

.note-form textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 78px;
  padding: 10px;
  resize: vertical;
}

.note-form button {
  justify-self: start;
}

.import-preview {
  display: grid;
  gap: 12px;
}

.import-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.import-summary article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.import-summary span,
.import-preview-list span,
.import-errors p {
  color: var(--muted);
}

.import-summary strong {
  font-size: 1.4rem;
}

.import-preview-list {
  display: grid;
  gap: 8px;
}

.import-preview-list article {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 0.75fr 0.6fr;
  padding: 10px;
}

.import-preview-list article div {
  display: grid;
  gap: 2px;
}

.import-errors {
  background: #fff8ef;
  border: 1px solid #ead2b6;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.import-errors p {
  margin: 0;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.modal-card label {
  color: var(--muted);
  display: grid;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 6px;
}

.modal-card input,
.modal-card select,
.modal-card textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  padding: 9px 10px;
}

.icon-button {
  align-items: center;
  background: var(--navy);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-size: 1.4rem;
  height: 38px;
  justify-content: center;
  line-height: 1;
  width: 38px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080a0f;
    --surface: #0e1118;
    --surface-elevated: #121722;
    --ink: #f6f8fb;
    --muted: #a7b0bf;
    --line: #273142;
    --navy: #5f8edb;
    --navy-dark: #8ab4ff;
    --navy-soft: #16253d;
    --black: #05070b;
    --soft: #171d28;
    --soft-strong: #202838;
    --ring: rgba(138, 180, 255, 0.18);
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.32);
  }

  body {
    color-scheme: dark;
  }

  .auth-panel,
  .main {
    background: var(--bg);
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
  }

  input::placeholder,
  textarea::placeholder {
    color: var(--muted);
  }

  .topbar,
  .metrics article,
  .panel,
  .onboarding-panel,
  .auth-card,
  .dashboard-greeting,
  .today-focus-card,
  .dashboard-follow-up-card,
  .time-saved-widget,
  .dashboard-section,
  .flow-mode-panel,
  .manager-hero,
  .manager-section {
    background: var(--surface-elevated);
  }

  .subpage-nav,
  .mode-pill,
  .dashboard-weather,
  .dashboard-follow-up-count,
  .focus-grid article,
  .time-saved-grid article,
  .time-saved-source,
  .team-time-saved-row,
  .goal-summary article,
  .source-card,
  .insight-card,
  .backup-summary article,
  .admin-card,
  .admin-dropdown,
  .plan-summary article,
  .team-summary article,
  .workspace-profile-summary article,
  .launch-check,
  .communication-stats-grid article,
  .opportunity-health-grid article,
  .follow-up-queue-summary article,
  .follow-up-item,
  .follow-up-item-grid article,
  .suggested-message,
  .sales-activity-grid article,
  .revenue-snapshot-grid article,
  .ai-card,
  .dashboard-feed-item,
  .dashboard-schedule-item,
  .flow-intelligence-summary div,
  .flow-intelligence-summary ul,
  .flow-progress-stats article,
  .flow-results article,
  .flow-lead-grid article,
  .flow-action-main,
  .flow-lead-card,
  .flow-score-breakdown,
  .lead-intelligence-panel,
  .opportunity-health-panel,
  .score-breakdown li,
  .flow-score-breakdown li,
  .workflow-builder-panel,
  .workflow-templates-panel,
  .node-palette,
  .properties-panel,
  .workflow-canvas-viewport,
  .workflow-properties-card,
  .ai-workflow-assistant,
  .automation-analytics,
  .automation-analytics article,
  .execution-log,
  .execution-log-row,
  .workflow-template-card,
  .manager-kpi-card,
  .leaderboard-row,
  .manager-insight-card,
  .forecast-chart-card,
  .manager-stage-card,
  .coaching-card,
  .coaching-grid section,
  .risk-card,
  .manager-notification,
  .manager-analytics-chart,
  .segmented-control,
  .communications-column,
  .conversation-item,
  .message-bubble.incoming,
  .message-composer,
  .customer-sidebar,
  .ai-assistant-panel,
  .quick-actions-panel,
  .communication-notifications,
  .recruiting-inbox-summary article,
  .recruiting-candidate-card,
  .recruiting-candidate-grid article,
  .contact-summary article,
  .task-summary article,
  .pipeline-health article,
  .contact-profile-hero,
  .contact-profile-stats article,
  .contact-profile-section,
  .stage-column,
  .calendar-appointment,
  .dial-summary article,
  .dial-info-grid article,
  .appointment-row,
  .schedule-corner,
  .schedule-day,
  .schedule-hour,
  .automation-summary article,
  .automation-preview,
  .automation-template-card,
  .automation-run-row,
  .assistant-card,
  .sales-copilot-panel,
  .sales-copilot-grid article,
  .sales-copilot-scripts article,
  .sequence-preview,
  .detail-hero,
  .brief-grid div,
  .forecast-summary article,
  .forecast-row,
  .import-summary article,
  .import-errors {
    background: var(--soft);
  }

  .subpage-nav button,
  .segmented-control button,
  .search input,
  .communication-search input,
  .composer-input-label textarea,
  .composer-tool select,
  .composer-customer-select select,
  .communication-filters button,
  .manager-analytics-tabs button,
  .palette-node,
  .workflow-node,
  .workflow-properties-card input,
  .workflow-properties-card textarea,
  .ai-workflow-assistant textarea,
  .composer-tabs button,
  .quick-replies button,
  .emoji-picker button,
  .call-control-grid button,
  .call-log-actions button,
  .deal-card,
  .recruiting-candidate-card,
  .schedule-cell,
  .flow-talking-points,
  .flow-savings-message {
    background: var(--surface);
    color: var(--ink);
  }

  .conversation-item.active,
  .conversation-item:hover,
  .source-card-main:hover,
  button.insight-card:hover,
  .call-controls,
  .conversation-timeline,
  .message-bubble.system,
  .customer-detail-grid article,
  .ai-assistant-grid article,
  .communication-notification-feed article,
  .composer-tool,
  .call-log-actions {
    background: var(--soft);
  }

  .manager-bar,
  .manager-stage-bar,
  .analytics-bar-track,
  .workflow-canvas {
    background: var(--soft-strong);
  }

  .autosave-pill {
    background: rgba(95, 142, 219, 0.16);
    border-color: rgba(138, 180, 255, 0.28);
    color: #a9c8ff;
  }

  .message-bubble.outgoing,
  .pin-badge,
  .candidate-tags span,
  .customer-tags span,
  .stage-pill,
  .launch-check.ready > span,
  .status-pill.on {
    background: rgba(95, 142, 219, 0.16);
    color: #a9c8ff;
  }

  .launch-check > span,
  .status-pill.off,
  .automation-template-card.paused {
    background: rgba(161, 98, 7, 0.18);
    color: #f3c36e;
  }

  .launch-check.readiness-score {
    background: linear-gradient(180deg, var(--surface-elevated), var(--soft));
    border-color: rgba(138, 180, 255, 0.28);
  }

  .follow-up-reasons span,
  .priority-pill.medium,
  .priority-pill.low {
    background: rgba(95, 142, 219, 0.16);
    border-color: rgba(138, 180, 255, 0.28);
    color: #a9c8ff;
  }

  .priority-pill.critical {
    background: rgba(180, 35, 24, 0.18);
    color: #fca5a5;
  }

  .priority-pill.high {
    background: rgba(161, 98, 7, 0.18);
    color: #f3c36e;
  }

  .time-saved-total {
    background: #05070b;
  }

  .time-saved-activity-badge {
    background: rgba(95, 142, 219, 0.16);
    border-color: rgba(138, 180, 255, 0.28);
    color: #a9c8ff;
  }

  .dashboard-feed-item .time-saved-activity-badge,
  .activity-feed-item .time-saved-activity-badge,
  .activity-timeline .time-saved-activity-badge {
    color: #a9c8ff;
  }

  .intelligence-badge.hot {
    background: rgba(15, 122, 79, 0.18);
    border-color: rgba(64, 196, 136, 0.28);
    color: #7ee2ad;
  }

  .intelligence-badge.warm {
    background: rgba(161, 98, 7, 0.18);
    border-color: rgba(245, 180, 70, 0.28);
    color: #f3c36e;
  }

  .intelligence-badge.nurture {
    background: rgba(95, 142, 219, 0.16);
    border-color: rgba(138, 180, 255, 0.28);
    color: #a9c8ff;
  }

  .intelligence-badge.cold {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.26);
    color: #cbd5e1;
  }

  .primary-button,
  .secondary-button,
  .task-form button,
  .card-actions button,
  .task-item button,
  .automation-row button {
    background: #173f78;
    color: #ffffff;
  }

  .primary-button:hover,
  .secondary-button:hover,
  .task-form button:hover,
  .card-actions button:hover,
  .task-item button:hover,
  .automation-row button:hover {
    background: #245a9e;
  }

  .brand-mark {
    background: var(--surface-elevated);
    border: 1px solid var(--line);
    color: var(--ink);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .workspace-grid,
  .lower-grid,
  .dial-grid,
  .communications-shell,
  .saas-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .forecast-row .secondary-button {
    justify-self: stretch;
  }

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

  .right-rail {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-greeting,
  .today-focus-card,
  .dashboard-follow-up-card,
  .dashboard-split,
  .time-saved-breakdown,
  .sales-copilot-grid,
  .sales-copilot-scripts,
  .flow-mode-header,
  .flow-step-card {
    grid-template-columns: 1fr;
  }

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

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

  .communication-stats-grid,
  .opportunity-health-grid,
  .recruiting-inbox-summary,
  .recruiting-candidate-grid,
  .call-log-actions div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .manager-grid-two,
  .coaching-panel,
  .workflow-designer-grid,
  .ai-workflow-assistant {
    grid-template-columns: 1fr;
  }

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

  .node-palette-group > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .conversation-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
  }

  .customer-info-column {
    max-height: none;
  }

  .call-controls,
  .composer-tool-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    gap: 16px;
    height: auto;
    padding: 16px;
    position: static;
  }

  .nav-links {
    align-items: center;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links::-webkit-scrollbar,
  .subpage-nav::-webkit-scrollbar,
  .segmented-control::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;
    font-size: 0.82rem;
    min-height: 34px;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .workspace-card {
    display: none;
  }

  .topbar,
  .topbar-actions,
  .panel-heading,
  .sales-copilot-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .topbar-actions,
  .panel-actions,
  .contact-actions,
  .task-actions,
  .brief-actions,
  .detail-actions,
  .contact-profile-actions,
  .manager-hero-actions,
  .composer-actions,
  .workflow-toolbar-actions,
  .automation-builder-actions,
  .automation-template-actions {
    width: 100%;
  }

  .topbar-actions > *,
  .panel-actions > *,
  .search {
    width: 100%;
  }

  .subpage-nav,
  .segmented-control {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 3px;
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: auto;
    padding: 3px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .subpage-nav button,
  .segmented-control button {
    flex: 0 0 auto;
    font-size: 0.78rem;
    min-height: 30px;
    padding: 0 9px;
    white-space: nowrap;
  }

  .contact-controls,
  .activity-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-controls > *,
  .activity-actions > * {
    margin-left: 0;
    width: 100%;
  }

  .goal-form {
    justify-content: flex-start;
  }

  .contact-sort {
    margin-left: 0;
  }

  .mode-pill {
    justify-content: center;
  }

  .search {
    min-width: 0;
  }

  .metrics,
  .contact-summary,
  .customer-detail-grid,
  .ai-assistant-grid,
  .manager-kpi-grid,
  .manager-ai-insights,
  .forecast-charts,
  .manager-pipeline-health,
  .coaching-grid,
  .manager-actions,
  .automation-analytics,
  .workflow-template-grid,
  .dial-summary,
  .dial-info-grid,
  .pipeline-health,
  .task-summary,
  .plan-summary,
  .team-summary,
  .workspace-profile-summary,
  .source-report-grid,
  .follow-up-queue-summary,
  .follow-up-item-grid,
  .backup-summary,
  .automation-summary,
  .forecast-summary,
  .contact-profile-stats,
  .right-rail {
    grid-template-columns: 1fr 1fr;
  }

  .automation-step-grid,
  .appointment-time-picker,
  .call-control-grid,
  .task-edit-form {
    grid-template-columns: 1fr 1fr;
  }

  .forecast-view {
    min-width: 0;
  }

  .onboarding-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .main {
    padding: 18px;
  }

  .dashboard-greeting,
  .today-focus-card,
  .dashboard-follow-up-card,
  .time-saved-widget,
  .dashboard-section,
  .flow-mode-panel,
  .manager-hero,
  .manager-section,
  .workflow-builder-panel,
  .workflow-templates-panel,
  .communications-column {
    padding: 16px;
  }

  .manager-hero,
  .analytics-chart-heading,
  .coaching-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .workflow-builder-toolbar {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .workflow-toolbar-actions {
    justify-content: flex-start;
  }

  .conversation-window-column {
    padding: 0;
  }

  .conversation-list {
    grid-template-columns: 1fr;
  }

  .communication-stats-grid,
  .opportunity-health-grid,
  .recruiting-inbox-summary,
  .recruiting-candidate-grid,
  .call-log-actions div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .command-start-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .auth-panel {
    padding: 14px;
  }

  .auth-card,
  .panel,
  .topbar,
  .onboarding-panel {
    padding: 14px;
  }

  .brand {
    align-items: flex-start;
  }

  h1 {
    font-size: 1.42rem;
  }

  h2 {
    font-size: 1.12rem;
  }

  .modal-backdrop {
    align-items: flex-start;
    overflow-y: auto;
  }

  .modal-card {
    max-height: none;
  }

  .metrics,
  .contact-summary,
  .customer-detail-grid,
  .ai-assistant-grid,
  .coaching-grid,
  .manager-actions,
  .automation-analytics,
  .workflow-template-grid,
  .dial-summary,
  .dial-info-grid,
  .pipeline-health,
  .task-summary,
  .right-rail,
  .contact-row,
  .activity-feed-item,
  .detail-grid,
  .goal-summary,
  .source-report-grid,
  .insight-list,
  .follow-up-queue-summary,
  .follow-up-item-grid,
  .brief-grid,
  .backup-summary,
  .automation-summary,
  .automation-actions,
  .automation-step-grid,
  .workflow-builder-toolbar,
  .workflow-designer-grid,
  .ai-workflow-assistant,
  .automation-run-row,
  .forecast-summary,
  .forecast-row,
  .contact-profile-stats,
  .contact-next-form,
  .import-preview-list article,
  .task-controls,
  .task-form,
  .task-edit-form,
  .calendar-appointment,
  .appointment-time-picker,
  .invite-form,
  .plan-summary,
  .team-summary,
  .workspace-profile-summary,
  .auth-actions {
    grid-template-columns: 1fr;
  }

  .daily-command-center {
    gap: 12px;
  }

  .dashboard-greeting {
    gap: 10px;
  }

  .dashboard-greeting h2 {
    font-size: 1.36rem;
  }

  #dashboardDate,
  .daily-message,
  .focus-copy p:last-child,
  .ai-card p,
  .dashboard-feed-item p,
  .dashboard-schedule-item span {
    font-size: 0.72rem;
    line-height: 1.32;
  }

  .focus-grid,
  .time-saved-grid,
  .sales-activity-grid,
  .revenue-snapshot-grid,
  .ai-recommendations-grid {
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-canvas-viewport,
  .workflow-canvas {
    min-height: 420px;
  }

  .workflow-canvas-inner,
  .workflow-connections {
    height: 480px;
  }

  .focus-grid article,
  .dashboard-follow-up-count,
  .time-saved-grid article,
  .sales-activity-grid article,
  .revenue-snapshot-grid article,
  .ai-card,
  .dashboard-feed-item,
  .dashboard-schedule-item,
  .dashboard-weather {
    min-width: 0;
    padding: 9px;
  }

  .focus-grid span,
  .time-saved-grid span,
  .sales-activity-grid span,
  .revenue-snapshot-grid span,
  .dashboard-weather span,
  .soft-pill {
    font-size: 0.58rem;
    line-height: 1.18;
  }

  .focus-grid strong,
  .time-saved-grid strong,
  .sales-activity-grid strong,
  .revenue-snapshot-grid strong,
  .dashboard-weather strong,
  .ai-card b {
    font-size: 0.96rem;
    line-height: 1.12;
  }

  .ai-card {
    min-height: 146px;
  }

  .ai-card strong,
  .dashboard-feed-item strong,
  .dashboard-schedule-item strong {
    font-size: 0.78rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .dashboard-schedule-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .dashboard-schedule-item time {
    font-size: 0.66rem;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .task-form button {
    min-height: 42px;
    padding: 8px 12px;
    white-space: normal;
    width: 100%;
  }

  .metrics,
  .contact-summary,
  .dial-summary,
  .pipeline-health,
  .task-summary,
  .backup-summary,
  .plan-summary,
  .team-summary,
  .contact-profile-stats {
    gap: 6px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .source-report-grid,
  .insight-list,
  .follow-up-item-grid,
  .dial-info-grid,
  .detail-grid,
  .goal-summary,
  .brief-grid,
  .automation-summary,
  .forecast-summary,
  .workspace-profile-summary {
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .revenue-snapshot-grid.metrics,
  .sales-activity-grid,
  .focus-grid,
  .manager-kpi-grid,
  .manager-ai-insights,
  .forecast-charts,
  .manager-pipeline-health,
  .ai-recommendations-grid,
  .time-saved-grid,
  .flow-intelligence-summary,
  .flow-progress-stats,
  .flow-results,
  .flow-lead-grid,
  .flow-action-buttons,
  .call-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-step-card,
  .flow-mode-header {
    grid-template-columns: 1fr;
  }

  .flow-step-card {
    min-height: 0;
  }

  .flow-action-main,
  .flow-lead-card {
    max-height: none;
    overflow: visible;
  }

  .message-bubble,
  .message-bubble.system {
    max-width: 100%;
  }

  .conversation-window-header,
  .call-primary,
  .message-bubble-header,
  .message-bubble-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .toast-region {
    bottom: 12px;
    left: 12px;
    max-width: calc(100vw - 24px);
    right: 12px;
  }

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

  .metrics article,
  .contact-summary article,
  .dial-summary article,
  .dial-info-grid article,
  .pipeline-health article,
  .task-summary article,
  .backup-summary article,
  .plan-summary article,
  .team-summary article,
  .workspace-profile-summary article,
  .contact-profile-stats article,
  .goal-summary article,
  .forecast-summary article,
  .brief-grid div,
  .detail-grid article,
  .source-card-main,
  .source-card-meta,
  .insight-card,
  .follow-up-item,
  .follow-up-queue-summary article,
  .follow-up-item-grid article,
  .palette-node,
  .workflow-node,
  .workflow-properties-card,
  .workflow-template-card,
  .automation-analytics article,
  .execution-log-row,
  .manager-kpi-card,
  .manager-insight-card,
  .forecast-chart-card,
  .manager-stage-card,
  .coaching-card,
  .risk-card,
  .manager-notification,
  .manager-analytics-chart,
  .conversation-item,
  .message-bubble,
  .customer-detail-grid article,
  .ai-assistant-grid article,
  .communication-notification-feed article,
  .composer-tool,
  .suggested-message,
  .flow-progress-stats article,
  .flow-results article,
  .flow-lead-grid article,
  .flow-intelligence-summary div,
  .flow-intelligence-summary ul,
  .flow-action-main,
  .flow-lead-card,
  .flow-talking-points,
  .flow-savings-message,
  .time-saved-source,
  .team-time-saved-row,
  .flow-score-breakdown,
  .lead-intelligence-panel,
  .score-breakdown li,
  .flow-score-breakdown li {
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 8px;
  }

  .metrics span,
  .contact-summary span,
  .dial-summary span,
  .dial-info-grid span,
  .pipeline-health span,
  .task-summary span,
  .backup-summary span,
  .plan-summary span,
  .team-summary span,
  .workspace-profile-summary span,
  .contact-profile-stats span,
  .goal-summary span,
  .goal-summary small,
  .source-card-main span,
  .source-card-main small,
  .source-card-meta span,
  .insight-card span,
  .insight-card p,
  .palette-node span,
  .workflow-node span,
  .workflow-node small,
  .workflow-properties-card span,
  .workflow-template-card span,
  .automation-analytics span,
  .execution-log-row span,
  .manager-kpi-card span,
  .manager-kpi-card small,
  .manager-insight-card p,
  .forecast-chart-card span,
  .forecast-chart-card small,
  .manager-stage-card span,
  .manager-stage-card small,
  .coaching-grid span,
  .coaching-grid p,
  .risk-card p,
  .manager-notification span,
  .analytics-bars small,
  .conversation-preview small,
  .conversation-preview em,
  .message-bubble-footer span,
  .customer-detail-grid span,
  .ai-assistant-grid span,
  .follow-up-queue-summary span,
  .follow-up-item-grid span,
  .suggested-message span,
  .follow-up-reasons span,
  .brief-grid span,
  .detail-grid span,
  .flow-progress-stats span,
  .flow-results span,
  .flow-lead-grid span,
  .time-saved-source span,
  .team-time-saved-row span,
  .flow-intelligence-summary span,
  .flow-intelligence-summary li,
  .score-breakdown li small,
  .flow-score-breakdown li small,
  .flow-lead-hero span,
  .flow-talking-points li,
  .flow-action-status {
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .manager-actions {
    grid-template-columns: 1fr;
  }

  .manager-actions .primary-button {
    grid-column: auto;
  }

  .analytics-bars {
    min-height: 160px;
  }

  .analytics-bar-track {
    height: 108px;
  }

  .metrics strong,
  .contact-summary strong,
  .dial-summary strong,
  .dial-info-grid strong,
  .pipeline-health strong,
  .task-summary strong,
  .backup-summary strong,
  .plan-summary strong,
  .team-summary strong,
  .workspace-profile-summary strong,
  .contact-profile-stats strong,
  .goal-summary strong,
  .forecast-summary strong,
  .source-card-main strong,
  .insight-card strong,
  .follow-up-queue-summary strong,
  .follow-up-item-grid strong,
  .suggested-message p,
  .brief-grid strong,
  .detail-grid strong,
  .flow-progress-stats strong,
  .flow-results strong,
  .flow-lead-grid strong,
  .time-saved-source strong,
  .team-time-saved-row strong,
  .flow-intelligence-summary strong,
  .lead-intelligence-header h3,
  .flow-lead-hero strong {
    font-size: 0.86rem;
    line-height: 1.15;
  }

  .metrics strong,
  .source-card-main strong,
  .insight-card b {
    font-size: 0.98rem;
  }

  .time-saved-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .time-saved-total {
    min-width: 0;
  }

  .time-saved-breakdown {
    grid-template-columns: 1fr;
  }

  .dashboard-follow-up-card {
    align-items: stretch;
  }

  .dashboard-follow-up-card .primary-button {
    width: 100%;
  }

  .follow-up-item-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .follow-up-actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .follow-up-actions::-webkit-scrollbar {
    display: none;
  }

  .follow-up-actions button {
    flex: 0 0 auto;
    font-size: 0.62rem;
    min-height: 30px;
    padding: 4px 7px;
    white-space: nowrap;
    width: auto;
  }

  .insight-card {
    min-height: 0;
  }

  .subpage-nav button,
  .segmented-control button {
    min-height: 30px;
    padding: 0 9px;
    white-space: nowrap;
    width: auto;
  }

  .goal-form,
  .onboarding-actions,
  .billing-actions,
  .plan-options,
  .contact-profile-actions,
  .detail-actions,
  .brief-actions,
  .automation-builder-actions,
  .automation-template-actions {
    flex-direction: column;
  }

  .goal-form label,
  .goal-form input,
  .onboarding-actions > *,
  .billing-actions > *,
  .plan-options > *,
  .contact-profile-actions > *,
  .detail-actions > *,
  .brief-actions > *,
  .automation-builder-actions > *,
  .automation-template-actions > * {
    width: 100%;
  }

  .team-row,
  .extension-grid article,
  .launch-check,
  .audit-row,
  .automation-row,
  .activity-feed-item,
  .task-item,
  .contact-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .contact-select,
  .task-select {
    justify-content: flex-start;
  }

  .contact-actions,
  .task-actions {
    justify-content: stretch;
  }

  .contact-actions button,
  .task-actions button,
  .activity-feed-item button,
  .automation-row button {
    width: 100%;
  }

  .automation-row,
  .task-item,
  .activity-feed-item,
  .automation-run-row,
  .team-row,
  .launch-check,
  .audit-row,
  .extension-grid article,
  .calendar-appointment {
    align-items: center;
    gap: 6px;
    padding: 8px;
  }

  .automation-row,
  .activity-feed-item,
  .automation-run-row,
  .extension-grid article {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .task-item {
    grid-template-columns: 20px 20px minmax(0, 1fr) auto;
  }

  .contact-row {
    align-items: center;
    gap: 6px;
    grid-template-columns: 18px minmax(60px, 1.35fr) minmax(36px, 0.72fr) minmax(36px, 0.62fr) minmax(54px, 0.74fr) minmax(36px, 0.58fr);
    padding: 8px;
  }

  .contact-row > * {
    min-width: 0;
  }

  .contact-actions {
    grid-column: 1 / -1;
  }

  .calendar-appointment {
    grid-template-columns: minmax(72px, 0.52fr) minmax(0, 1fr);
  }

  .team-row,
  .launch-check,
  .audit-row,
  .appointment-row {
    align-items: center;
    flex-direction: row;
  }

  .appointment-row {
    gap: 8px;
    justify-content: space-between;
    padding: 8px;
  }

  .contact-row p,
  .task-item p,
  .automation-row p,
  .activity-feed-item strong,
  .team-row strong,
  .extension-grid strong,
  .launch-check strong,
  .audit-row strong,
  .calendar-appointment strong,
  .appointment-row strong {
    font-size: 0.72rem;
    line-height: 1.18;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .contact-row span,
  .task-item span,
  .automation-row span,
  .activity-feed-item span,
  .activity-feed-item time,
  .team-row span,
  .extension-grid span,
  .launch-check small,
  .audit-row span,
  .audit-row time,
  .calendar-appointment span,
  .calendar-appointment p,
  .appointment-row span,
  .appointment-row time {
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .contact-select input,
  .task-select input,
  .task-item > input {
    height: 14px;
    width: 14px;
  }

  .contact-score,
  .intelligence-badge,
  .score-pill,
  .count-pill,
  .status-pill {
    font-size: 0.58rem;
    min-width: 24px;
    padding: 3px 5px;
  }

  .contact-actions,
  .task-actions,
  .automation-template-actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    justify-content: flex-end;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .contact-actions::-webkit-scrollbar,
  .task-actions::-webkit-scrollbar,
  .automation-template-actions::-webkit-scrollbar {
    display: none;
  }

  .contact-actions button,
  .task-actions button,
  .activity-feed-item button,
  .automation-row button,
  .automation-template-actions button,
  .extension-grid a.primary-button {
    flex: 0 0 auto;
    font-size: 0.58rem;
    min-height: 26px;
    padding: 2px 5px;
    white-space: nowrap;
    width: auto;
  }

  .automation-template-card {
    gap: 6px;
    padding: 8px;
  }

  .automation-template-card > div:first-child {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .automation-template-card > div:first-child p {
    grid-column: 1 / -1;
  }

  .automation-template-card ol {
    gap: 4px;
    padding-left: 16px;
  }

  .automation-template-card li {
    font-size: 0.66rem;
    line-height: 1.25;
  }

  .contact-profile-hero,
  .detail-hero,
  .dial-lead-hero {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    padding: 10px;
  }

  .contact-profile-hero h3,
  .detail-hero h3,
  .dial-lead-hero h3 {
    font-size: 0.95rem;
  }

  .contact-profile-hero > strong,
  .detail-hero > strong,
  .dial-lead-hero > strong {
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .extension-grid a.primary-button,
  .assistant-card .secondary-button,
  .note-form button,
  .forecast-row .secondary-button {
    justify-self: stretch;
  }

  .calendar-appointment {
    align-items: start;
  }

  .schedule-grid {
    grid-template-columns: 76px repeat(16, minmax(58px, 1fr));
  }

  .schedule-corner,
  .schedule-day,
  .schedule-hour {
    padding: 0 6px;
  }

  .modal-actions {
    justify-content: stretch;
  }

  .modal-actions button {
    flex: 1;
  }

  .detail-hero,
  .detail-actions,
  .dial-lead-hero,
  .appointment-row {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-hero > strong {
    white-space: normal;
  }

  .pipeline-board {
    grid-template-columns: repeat(4, 82vw);
  }

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

  .calendar-appointment {
    align-items: center;
  }

  .contact-profile-hero,
  .detail-hero,
  .dial-lead-hero,
  .appointment-row {
    align-items: center;
    flex-direction: row;
  }

  .detail-hero > strong {
    white-space: nowrap;
  }

  .brief-actions,
  .detail-actions,
  .contact-profile-actions,
  .automation-builder-actions,
  .billing-actions,
  .plan-options {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .brief-actions::-webkit-scrollbar,
  .detail-actions::-webkit-scrollbar,
  .contact-profile-actions::-webkit-scrollbar,
  .automation-builder-actions::-webkit-scrollbar,
  .billing-actions::-webkit-scrollbar,
  .plan-options::-webkit-scrollbar {
    display: none;
  }

  .brief-actions > *,
  .detail-actions > *,
  .contact-profile-actions > *,
  .automation-builder-actions > *,
  .billing-actions > *,
  .plan-options > * {
    flex: 0 0 auto;
    font-size: 0.62rem;
    min-height: 28px;
    padding: 4px 7px;
    white-space: nowrap;
    width: auto;
  }

  h1 {
    font-size: 2.2rem;
  }
}
