:root {
  --bg: #f6f9fc;
  --bg-strong: #e9eff6;
  --surface: rgba(255, 255, 255, 0.97);
  --menu-surface: #16263d;
  --surface-soft: #f8fbfe;
  --surface-muted: #edf4fb;
  --ink: #1f2d3d;
  --muted: #6b7c93;
  --line: #dbe5f0;
  --line-strong: #bfcddd;
  --accent: #ff7a59;
  --accent-soft: rgba(255, 122, 89, 0.12);
  --accent-strong: #eb6b4d;
  --nav-ink: #eff4ff;
  --nav-muted: #90a3c5;
  --nav-line: rgba(148, 163, 184, 0.18);
  --nav-surface-soft: rgba(255, 255, 255, 0.06);
  --nav-surface-active: linear-gradient(135deg, rgba(255, 107, 53, 0.24), rgba(59, 130, 246, 0.18));
  --success: #198754;
  --warn: #c9850d;
  --danger: #c64550;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", "Inter", "Public Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 107, 53, 0.14), transparent 24%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 20%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-strong) 100%);
}

body.crm-theme-dark {
  --bg: #0b1220;
  --bg-strong: #0f172a;
  --surface: rgba(17, 24, 39, 0.96);
  --surface-soft: #111c30;
  --surface-muted: #152238;
  --ink: #edf3ff;
  --muted: #9eb0cb;
  --line: #263349;
  --line-strong: #33445f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.18);
}

body.crm-theme-dark .report-table th,
body.crm-theme-dark .contact-pool-row--header span {
  background: transparent;
  color: var(--muted);
}

body.crm-theme-dark input,
body.crm-theme-dark select,
body.crm-theme-dark textarea,
body.crm-theme-dark input[disabled],
body.crm-theme-dark textarea[disabled] {
  background: #0f1a2d;
  color: var(--ink);
  border-color: var(--line);
}

body.crm-theme-dark .ghost-button,
body.crm-theme-dark .ghost-link,
body.crm-theme-dark .secondary-button {
  background: linear-gradient(180deg, #2a3546 0%, #222c3b 100%);
  color: var(--ink);
  border-color: var(--line);
}

body.crm-theme-dark .global-topbar,
body.crm-theme-dark .sidebar,
body.crm-theme-dark .sidebar-nav-shell,
body.crm-theme-dark .sidebar-card,
body.crm-theme-dark .brand-block,
body.crm-theme-dark .workspace-panel,
body.crm-theme-dark .modal-card,
body.crm-theme-dark .modal-card__header,
body.crm-theme-dark .global-search-results,
body.crm-theme-dark .user-menu-dropdown,
body.crm-theme-dark .contacts-ops-choice-card,
body.crm-theme-dark .contacts-import-hero__card,
body.crm-theme-dark .contacts-import-map-card,
body.crm-theme-dark .panel-runtime-card,
body.crm-theme-dark .panel-runtime-shell,
body.crm-theme-dark .contact-columns-sidebar,
body.crm-theme-dark .contact-columns-lane,
body.crm-theme-dark .contact-columns-available,
body.crm-theme-dark .company-detail-tab,
body.crm-theme-dark .agent-insight-card,
body.crm-theme-dark .agent-contact-summary--hubspot,
body.crm-theme-dark .agent-record-workspace-header,
body.crm-theme-dark .agent-record-rail__header,
body.crm-theme-dark .agent-workspace-kpi,
body.crm-theme-dark .readonly-field-card,
body.crm-theme-dark .project-ui-block,
body.crm-theme-dark .project-builder-field,
body.crm-theme-dark .user-directory-grid .queue-row,
body.crm-theme-dark .response-list-row,
body.crm-theme-dark .email-log-card,
body.crm-theme-dark .query-builder-card,
body.crm-theme-dark .query-node,
body.crm-theme-dark .field-definition-card {
  background: linear-gradient(180deg, #1d2735 0%, #18212d 100%);
  color: var(--ink);
  border-color: var(--line);
}

body.crm-theme-dark .hero,
body.crm-theme-dark .global-topbar,
body.crm-theme-dark .sidebar {
  background: var(--shell-nav-surface);
}

body.crm-theme-dark .hero .eyebrow,
body.crm-theme-dark .topbar-context .eyebrow,
body.crm-theme-dark .sidebar .eyebrow,
body.crm-theme-dark .nav-submenu-label,
body.crm-theme-dark .brand-copy,
body.crm-theme-dark .queue-row__sub,
body.crm-theme-dark .workspace-copy,
body.crm-theme-dark .readonly-field-card__label,
body.crm-theme-dark .agent-workspace-kpi span {
  color: var(--shell-nav-muted);
}

body.crm-theme-dark .hero h2,
body.crm-theme-dark #topbarTitle,
body.crm-theme-dark .brand-title,
body.crm-theme-dark .nav-chip,
body.crm-theme-dark .nav-subchip,
body.crm-theme-dark .section-heading h3,
body.crm-theme-dark .workspace-section__header h4,
body.crm-theme-dark .detail-section-title,
body.crm-theme-dark .modal-card h4 {
  color: var(--shell-nav-text);
}

body.crm-theme-dark .nav-chip.is-active,
body.crm-theme-dark .nav-subchip.is-active {
  background: rgba(127, 180, 255, 0.12);
  border-color: rgba(127, 180, 255, 0.16);
}

body.crm-theme-dark .primary-button {
  background: linear-gradient(180deg, #76adff 0%, #5d97f7 100%);
  border-color: rgba(127, 180, 255, 0.26);
  color: #0f1824;
}

body.crm-theme-dark .danger-button {
  background: linear-gradient(180deg, #6b3138 0%, #55272d 100%);
  border-color: rgba(226, 120, 132, 0.22);
  color: #fde9ec;
}

body.crm-theme-dark .status-pill,
body.crm-theme-dark .badge,
body.crm-theme-dark .badge--soft {
  border-color: var(--line);
}

body.crm-theme-dark .contact-history-item,
body.crm-theme-dark .contact-history-change {
  background: linear-gradient(180deg, #1d2735 0%, #18212d 100%);
  color: var(--ink);
  border-color: var(--line);
}

body.crm-theme-dark .report-table td,
body.crm-theme-dark .report-table th,
body.crm-theme-dark .table-shell td,
body.crm-theme-dark .table-shell th {
  border-color: var(--line);
}

body.crm-theme-dark .global-search-result:hover,
body.crm-theme-dark .response-list-row:hover,
body.crm-theme-dark .queue-row:hover,
body.crm-theme-dark .list-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

body.crm-theme-light,
body:not(.crm-theme-dark) {
  --nav-ink: #16233a;
  --nav-muted: #60748f;
  --nav-line: rgba(151, 166, 189, 0.22);
  --nav-surface-soft: rgba(18, 32, 51, 0.05);
  --nav-surface-active: linear-gradient(135deg, rgba(255, 107, 53, 0.14), rgba(59, 130, 246, 0.08));
}

body.crm-theme-light .sidebar,
body:not(.crm-theme-dark) .sidebar {
  color: var(--nav-ink);
}

body.crm-theme-light .nav-chip,
body.crm-theme-light .nav-subchip,
body:not(.crm-theme-dark) .nav-chip,
body:not(.crm-theme-dark) .nav-subchip {
  color: var(--nav-ink);
}

body.crm-theme-light .nav-submenu-label,
body:not(.crm-theme-dark) .nav-submenu-label {
  color: var(--nav-muted);
}

body.crm-theme-light .nav-chip.is-active,
body:not(.crm-theme-dark) .nav-chip.is-active {
  color: #16233a;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.16), rgba(59, 130, 246, 0.1));
  border-color: rgba(18, 32, 51, 0.08);
}

body.crm-theme-light .nav-subchip.is-active,
body:not(.crm-theme-dark) .nav-subchip.is-active {
  color: #16233a;
  background: rgba(18, 32, 51, 0.06);
  border-color: rgba(18, 32, 51, 0.08);
}

body.crm-theme-light .sidebar-card,
body:not(.crm-theme-dark) .sidebar-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(18, 32, 51, 0.08);
}

body.crm-theme-light .sidebar-card .ghost-button,
body:not(.crm-theme-dark) .sidebar-card .ghost-button {
  color: var(--nav-ink);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(18, 32, 51, 0.08);
}

body.crm-theme-dark .section-heading h3,
body.crm-theme-dark .workspace-section__header h4,
body.crm-theme-dark .entry-form h4,
body.crm-theme-dark .admin-title,
body.crm-theme-dark .detail-title h4,
body.crm-theme-dark .detail-section-title,
body.crm-theme-dark .workspace-shell h4,
body.crm-theme-dark .workspace-section h4 {
  color: #ffffff;
}

body.crm-theme-dark .section-kicker,
body.crm-theme-dark .workspace-copy,
body.crm-theme-dark .project-config-box__copy,
body.crm-theme-dark .detail-caption,
body.crm-theme-dark .list-card__subtitle,
body.crm-theme-dark .list-card__meta {
  color: #b7c7df;
}

body.crm-theme-dark .agent-override-banner {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.96));
  border-color: var(--line);
}

body.crm-theme-dark .filter-summary-bar,
body.crm-theme-dark .filter-row-card,
body.crm-theme-dark .crm-list-toolbar,
body.crm-theme-dark .crm-table-shell {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.96));
  border-color: var(--line);
}

body.crm-theme-dark .agent-override-banner.is-active {
  background: linear-gradient(180deg, rgba(73, 51, 14, 0.42), rgba(40, 31, 11, 0.52));
  border-color: rgba(201, 133, 13, 0.38);
}

body.crm-theme-dark .badge--warn {
  background: rgba(201, 133, 13, 0.2);
  color: #ffd98a;
}

body.auth-locked {
  overflow: hidden;
}

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

button,
select {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  max-width: 100%;
  overflow-x: hidden;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 27, 45, 0.32);
  backdrop-filter: blur(12px);
}

.auth-overlay.is-hidden {
  display: none;
}

.nav-group.is-hidden {
  display: none;
}

.auth-card {
  width: min(460px, calc(100vw - 32px));
  border-radius: var(--radius-xl);
  padding: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.auth-card h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.login-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(200, 77, 87, 0.2);
  background: rgba(200, 77, 87, 0.08);
  color: var(--danger);
  font-weight: 600;
}

.login-error.is-hidden {
  display: none;
}

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

.auth-login-submit,
.auth-login-secondary {
  width: 100%;
  justify-content: center;
}

.auth-login-footer {
  display: flex;
  justify-content: flex-end;
}

.auth-login-link {
  padding: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
}

.auth-login-link:hover {
  background: transparent;
  color: var(--accent-strong);
  text-decoration: underline;
}

.user-security-card {
  margin-top: 4px;
}

.user-security-card .field-admin-actions {
  justify-content: flex-start;
}

.sidebar,
.hero {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(219, 230, 243, 0.9);
  box-shadow: var(--shadow);
}

.sidebar {
  background: var(--menu-surface);
  border-radius: var(--radius-xl);
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--nav-ink);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 200px;
  border-radius: inherit;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  pointer-events: none;
}

.sidebar-top,
.sidebar-bottom {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.sidebar-top {
  flex: 1 1 auto;
}

.sidebar-bottom {
  flex: 0 0 auto;
}

.eyebrow,
.section-kicker,
.card-label {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar .eyebrow,
.sidebar .card-label {
  color: var(--nav-muted);
}

.hero h2,
.section-heading h3,
.entry-form h4,
.workspace-section__header h4,
.admin-title {
  margin: 0;
  font-family: "Lexend", "Plus Jakarta Sans", sans-serif;
}

.hero h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero {
  padding: 10px 14px;
  min-height: 68px;
  background: linear-gradient(180deg, #243b53 0%, #21384f 100%);
  border-color: rgba(16, 32, 51, 0.22);
  color: #f4f8fc;
  box-shadow: 0 10px 28px rgba(24, 39, 75, 0.18);
}

.hero .eyebrow,
.hero h2,
.hero .ghost-button {
  color: #f4f8fc;
}

.hero .eyebrow {
  margin-bottom: 4px;
  color: #a9bdd2;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#globalSearch {
  min-width: min(520px, 48vw);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

#globalSearch::placeholder {
  color: #c1cfdd;
}

.brand-block {
  display: grid;
  gap: 10px;
  padding: 8px 8px 2px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: "Lexend", "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff7f2;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8f69 52%, #ffb493 100%);
  box-shadow: 0 14px 30px rgba(255, 107, 53, 0.28);
}

.brand-meta {
  display: grid;
  gap: 4px;
}

.brand-title {
  margin: 0;
  color: var(--nav-ink);
  font-family: "Lexend", "Plus Jakarta Sans", sans-serif;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.brand-copy {
  display: block;
  margin: 0;
  color: var(--nav-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.brand-copy,
.utility-copy,
.status-panel,
.list-card__subtitle,
.list-card__meta,
.workspace-copy,
.project-field-list,
.report-line span,
.queue-row__sub,
.snapshot-line span,
.detail-caption {
  color: var(--muted);
}

.sidebar-nav,
.filter-row,
.hero-actions,
.stack-list,
.entry-form,
.workspace-panel,
.assignment-fields-grid,
.report-grid,
.report-list,
.snapshot-list,
.field-admin-list,
.filter-builder {
  display: grid;
  gap: 12px;
}

.simple-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
}

.simple-list li + li {
  margin-top: 0.28rem;
}

.sidebar-nav-shell {
  border-radius: 20px;
  padding: 10px 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--nav-line);
}

.nav-chip {
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--nav-ink);
  text-align: left;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 700;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease, color 140ms ease;
}

.sidebar-nav {
  flex: 0 0 auto;
  gap: 8px;
}

.nav-chip.is-active {
  background: var(--nav-surface-active);
  color: #fff7f2;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-group {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.nav-chip--group {
  font-weight: 700;
  color: #ffffff;
}

.nav-chip:hover,
.nav-subchip:hover {
  transform: translateY(-1px);
}

.nav-chip:not(.is-active):hover {
  background: var(--nav-surface-soft);
  border-color: rgba(255, 255, 255, 0.04);
}

.nav-submenu {
  display: grid;
  gap: 6px;
  padding-left: 12px;
  padding-top: 6px;
  border-left: 1px solid var(--nav-line);
}

.nav-submenu-label {
  padding: 6px 10px 2px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nav-muted);
}

.nav-subchip {
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--nav-muted);
  text-align: left;
  padding: 8px 10px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-subchip--child {
  margin-left: 14px;
  padding-left: 14px;
  position: relative;
  font-size: 0.88rem;
}

.nav-subchip--child::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%);
}

.nav-subchip.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.06);
}

.filter-box.filter-box--collapsed {
  display: none;
}

.filter-row--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.sidebar-card,
.workspace-shell,
.workspace-section,
.list-card,
.stat-card,
.assignment-row,
.agent-panel,
.field-admin-row,
.filter-row-card {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.sidebar-card {
  padding: 14px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.sidebar-card .card-label,
.sidebar-card .snapshot-line span,
.sidebar-card .status-panel,
.sidebar-card .ghost-button {
  color: var(--nav-muted);
}

.sidebar-card .snapshot-line strong,
.sidebar-card .status-panel.is-good,
.sidebar-card .status-panel.is-error {
  color: var(--nav-ink);
}

.sidebar-card .snapshot-line {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.sidebar-card .ghost-button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.snapshot-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.snapshot-line:last-child {
  border-bottom: none;
}

.status-panel.is-error {
  color: var(--danger);
}

.status-panel.is-good {
  color: var(--success);
}

.main-panel {
  position: relative;
  display: grid;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(237, 243, 251, 0.72);
  backdrop-filter: blur(12px);
}

.app-loading-overlay.is-hidden {
  display: none;
}

.app-loading-overlay__card {
  min-width: min(420px, 100%);
  max-width: min(420px, calc(100vw - 32px));
  padding: 24px 26px;
  border-radius: 22px;
  border: 1px solid rgba(219, 230, 243, 0.95);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.app-loading-overlay__card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 3px solid rgba(18, 115, 234, 0.15);
  border-top-color: var(--accent);
  animation: pulse-spin 0.8s linear infinite;
}

body.crm-is-busy {
  overflow: hidden;
}

body.crm-is-busy .app-shell {
  pointer-events: none;
  user-select: none;
}

body.crm-is-busy .app-loading-overlay,
body.crm-is-busy .app-loading-overlay * {
  pointer-events: auto;
}

@keyframes pulse-spin {
  to {
    transform: rotate(360deg);
  }
}

.hero {
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 255, 0.96)),
    linear-gradient(180deg, rgba(255, 107, 53, 0.04), rgba(59, 130, 246, 0.03));
  border-color: rgba(214, 224, 238, 0.95);
}

.hero h2 {
  max-width: none;
  font-size: 1.46rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-actions {
  width: min(560px, 100%);
  grid-template-columns: 1fr auto auto;
  align-items: center;
}

body.agent-mode .hero {
  display: none;
}

.panel-section {
  display: none;
  gap: 14px;
}

.panel-section.is-visible {
  display: grid;
}

.panel-section--full {
  min-height: calc(100vh - 180px);
  align-content: start;
}

.stats-grid,
.panel-grid,
.agent-layout,
.report-split {
  display: grid;
  gap: 16px;
}

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

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

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

.panel-grid--reporting {
  grid-template-columns: 25% minmax(0, 75%);
  align-items: start;
}

.reporting-project-group {
  display: grid;
  gap: 10px;
}

.reporting-project-group + .reporting-project-group {
  margin-top: 12px;
}

.reporting-project-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.reporting-project-group {
  display: grid;
  gap: 12px;
}

.reporting-project-tile {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 10px;
  text-align: left;
  box-shadow: var(--card-shadow);
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.reporting-project-tile:hover,
.reporting-project-tile.is-selected {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--card-shadow);
}

.reporting-project-tile__top,
.reporting-project-tile__meta,
.reporting-project-tile__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reporting-project-tile__client {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.field-library-card {
  display: grid;
  gap: 1rem;
  overflow: hidden;
}

.field-library-list {
  display: grid;
  gap: 0;
}

.field-library-table {
  display: grid;
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.field-library-table__header,
.field-library-row {
  display: grid;
  grid-template-columns: minmax(260px, 2.2fr) minmax(110px, 0.85fr) minmax(110px, 0.9fr) minmax(130px, 1fr) minmax(90px, 0.8fr) 72px minmax(140px, 1fr);
  align-items: center;
  gap: 16px;
}

.field-library-table__header {
  padding: 14px 18px;
  background: #f5f8fb;
  border-bottom: 1px solid #d8e3ef;
}

.field-library-table__header span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #587086;
}

.field-library-table__body {
  display: grid;
}

.field-library-row {
  padding: 16px 18px;
  border-bottom: 1px solid #e3ebf3;
  background: #ffffff;
}

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

.field-library-row:hover {
  background: #f9fbfd;
}

.field-library-row--custom {
  cursor: grab;
}

.field-library-row--custom:active {
  cursor: grabbing;
}

.field-library-row.is-dragging {
  opacity: 0.58;
  background: #eefaff;
}

.field-library-row.is-drag-over {
  box-shadow: inset 0 3px 0 #00a4bd;
}

.field-library-row.is-drag-over--after {
  box-shadow: inset 0 -3px 0 #00a4bd;
}

.field-library-row__name,
.field-library-row__cell,
.field-library-row__actions {
  min-width: 0;
}

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

.field-library-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  border: 1px solid #c9d8e7;
  border-radius: 999px;
  background: #f4f8fc;
  color: #587086;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  user-select: none;
}

.field-library-row--custom .field-library-drag-handle {
  cursor: grab;
}

.field-library-row--system .field-library-drag-handle {
  border-style: dashed;
  color: #8ba0b4;
}

.field-admin-fixed-note {
  color: #7890a7;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field-library-row__name-button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.field-library-row__name-button strong {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f3b5f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-library-row__name-button span {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-library-value {
  font-size: 0.84rem;
  color: #2c4b66;
}

.field-library-status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.field-library-row__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
}

.panel-grid--agent-tracker {
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
}

.detail-shell--tracker {
  gap: 16px;
}

.agent-tracker-detail-stack {
  display: grid;
  gap: 16px;
}

.entry-form--agent-tracker {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

.agent-tracker-filters-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.agent-tracker-filters-row--secondary {
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
}

.agent-command-center {
  display: grid;
  gap: 14px;
}

.agent-command-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid #d6e5f3;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(0, 174, 199, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 18px 38px rgba(16, 52, 82, 0.08);
}

.agent-command-hero h3 {
  margin: 0;
  color: #0b314f;
  font-size: 1.45rem;
}

.agent-command-hero p {
  max-width: 760px;
  margin: 6px 0 0;
  color: #526f8b;
}

.agent-command-hero__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-command-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid #d6e5f3;
  border-radius: 16px;
  background: #fff;
}

.agent-command-strip label {
  display: grid;
  gap: 6px;
  color: #5d748c;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-command-strip input,
.agent-command-strip select {
  min-height: 38px;
  width: 100%;
  border: 1px solid #c9dced;
  border-radius: 10px;
  background: #fff;
  color: #16364f;
  font-size: 0.94rem;
  font-weight: 700;
  text-transform: none;
}

.agent-command-strip__search {
  grid-column: span 2;
}

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

.agent-command-kpi {
  display: grid;
  gap: 4px;
  min-height: 110px;
  padding: 14px;
  border: 1px solid #d8e7f4;
  border-radius: 16px;
  background: #fff;
}

.agent-command-kpi span,
.agent-section-title .section-kicker,
.agent-manager-card .section-kicker {
  color: #607a94;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-command-kpi strong {
  color: #062d4b;
  font-size: 1.75rem;
  line-height: 1;
}

.agent-command-kpi small {
  color: #5d748c;
  font-weight: 700;
}

.agent-command-main {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, 0.8fr);
  gap: 14px;
  align-items: stretch;
}

.agent-leaderboard,
.agent-intelligence-panel,
.agent-event-stream,
.agent-command-infographics > article,
.agent-manager-card {
  border: 1px solid #d6e5f3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(16, 52, 82, 0.06);
}

.agent-leaderboard,
.agent-intelligence-panel,
.agent-event-stream {
  padding: 16px;
}

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

.agent-section-title h4 {
  margin: 2px 0 0;
  color: #0b314f;
}

.agent-section-title--compact {
  margin: 16px 0 8px;
}

.agent-leaderboard__table {
  display: grid;
  overflow: hidden;
  border: 1px solid #dce9f4;
  border-radius: 14px;
}

.agent-leaderboard__header,
.agent-leaderboard__row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(100px, 0.7fr) minmax(180px, 1.2fr) repeat(5, minmax(82px, 0.55fr)) minmax(130px, 0.9fr);
  gap: 12px;
  align-items: center;
}

.agent-leaderboard__header {
  padding: 10px 12px;
  background: #f2f7fb;
  color: #385875;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.agent-leaderboard__row {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid #e1ecf5;
  background: #fff;
  color: #183a56;
  text-align: left;
  cursor: pointer;
}

.agent-leaderboard__row:hover,
.agent-leaderboard__row.is-selected {
  background: #e9f9fc;
}

.agent-leaderboard__agent {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
}

.agent-leaderboard__agent b {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #e2f3fb;
  color: #007da4;
}

.agent-leaderboard__agent strong,
.agent-leaderboard__agent small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-health-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 999px;
  background: #0fbe7c;
}

.agent-health-dot--warning {
  background: #f6a800;
}

.agent-health-dot--danger {
  background: #e35a5a;
}

.agent-health-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e8f8f1;
  color: #08764d;
  font-weight: 900;
}

.agent-health-pill--warning {
  background: #fff4d8;
  color: #9a6400;
}

.agent-health-pill--danger {
  background: #ffe8e8;
  color: #b33131;
}

.agent-intelligence-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.agent-intelligence-panel__header h4 {
  margin: 0;
  color: #0b314f;
}

.agent-intelligence-panel__header p {
  margin: 4px 0 0;
  color: #5d748c;
}

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

.agent-intel-grid article {
  padding: 12px;
  border: 1px solid #dce9f4;
  border-radius: 14px;
  background: #f8fbfe;
}

.agent-intel-grid span {
  display: block;
  color: #607a94;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-intel-grid strong {
  display: block;
  margin-top: 4px;
  color: #062d4b;
  font-size: 1.25rem;
}

.agent-mini-timeline {
  margin-top: 8px;
}

.agent-mini-event,
.agent-event-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 0;
}

.agent-mini-event + .agent-mini-event,
.agent-event-row + .agent-event-row {
  border-top: 1px solid #e2edf6;
}

.agent-event-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e6f3fb;
  color: #007da4;
  font-size: 0.78rem;
  font-weight: 900;
}

.agent-event-icon--error {
  background: #ffe7e7;
  color: #bf3030;
}

.agent-event-icon--email {
  background: #edf4ff;
  color: #2563eb;
}

.agent-event-icon--wrapup,
.agent-event-icon--save {
  background: #e8f8f1;
  color: #08764d;
}

.agent-mini-event strong,
.agent-event-row strong {
  color: #0b314f;
}

.agent-mini-event small,
.agent-event-row small,
.agent-event-row p {
  display: block;
  margin-top: 3px;
  color: #5d748c;
}

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

.agent-command-infographics > article {
  min-height: 220px;
  padding: 16px;
}

.agent-activity-heatmap,
.agent-funnel-card,
.agent-project-bars {
  grid-column: span 2;
}

.agent-pace-card,
.agent-time-card,
.agent-risk-card {
  grid-column: span 1;
}

.agent-heatmap-grid {
  display: grid;
  gap: 8px;
}

.agent-heatmap-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) repeat(12, minmax(8px, 1fr));
  gap: 4px;
  align-items: center;
}

.agent-heatmap-row span {
  overflow: hidden;
  color: #385875;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-heatmap-row i {
  height: 18px;
  border-radius: 5px;
  background: rgba(0, 174, 199, calc(0.1 + (var(--heat) * 0.8)));
}

.agent-funnel-row,
.agent-project-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0 14px;
  color: #385875;
  font-weight: 800;
}

.agent-funnel-row i,
.agent-project-bar i {
  position: absolute;
  left: 0;
  right: auto;
  bottom: 4px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00a6c8, #2f80ed);
}

.agent-pace-gauge {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: conic-gradient(#00a6c8 calc(var(--pace) * 1%), #e8f0f7 0);
  color: #062d4b;
}

.agent-pace-gauge::before {
  content: "";
  position: absolute;
}

.agent-pace-gauge strong {
  font-size: 2rem;
  line-height: 1;
}

.agent-pace-gauge span {
  color: #607a94;
  font-weight: 800;
}

.agent-time-donut {
  width: 140px;
  height: 140px;
  margin: 16px auto;
  border-radius: 999px;
  background: conic-gradient(#00a6c8 calc(var(--project) * 1%), #f6a800 0 calc((var(--project) + var(--idle)) * 1%), #e8f0f7 0);
}

.agent-time-legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: #5d748c;
  font-size: 0.82rem;
  font-weight: 800;
}

.agent-risk-card strong {
  display: block;
  margin-top: 22px;
  color: #bf3030;
  font-size: 3rem;
  line-height: 1;
}

.agent-risk-card p {
  color: #5d748c;
  font-weight: 800;
}

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

.agent-manager-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 16px;
}

.agent-manager-card div {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f4f8fc;
  color: #183a56;
  font-weight: 800;
}

.agent-event-group {
  display: grid;
  gap: 4px;
  padding: 10px 0;
}

.agent-event-group h5 {
  margin: 0 0 4px;
  color: #607a94;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.dark-mode .agent-command-hero,
body.dark-mode .agent-command-strip,
body.dark-mode .agent-command-kpi,
body.dark-mode .agent-leaderboard,
body.dark-mode .agent-intelligence-panel,
body.dark-mode .agent-event-stream,
body.dark-mode .agent-command-infographics > article,
body.dark-mode .agent-manager-card {
  border-color: rgba(148, 178, 208, 0.28);
  background: linear-gradient(145deg, rgba(14, 29, 49, 0.98), rgba(8, 20, 36, 0.96));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

body.dark-mode .agent-command-hero h3,
body.dark-mode .agent-section-title h4,
body.dark-mode .agent-intelligence-panel__header h4,
body.dark-mode .agent-command-kpi strong,
body.dark-mode .agent-intel-grid strong,
body.dark-mode .agent-mini-event strong,
body.dark-mode .agent-event-row strong {
  color: #f2f8ff;
}

body.dark-mode .agent-command-hero p,
body.dark-mode .agent-command-kpi small,
body.dark-mode .agent-intelligence-panel__header p,
body.dark-mode .agent-mini-event small,
body.dark-mode .agent-event-row small,
body.dark-mode .agent-event-row p,
body.dark-mode .agent-risk-card p,
body.dark-mode .agent-time-legend,
body.dark-mode .agent-heatmap-row span {
  color: #aac0d7;
}

body.dark-mode .agent-command-strip input,
body.dark-mode .agent-command-strip select {
  border-color: rgba(148, 178, 208, 0.34);
  background: #0d1b2f;
  color: #f2f8ff;
}

body.dark-mode .agent-leaderboard__table,
body.dark-mode .agent-intel-grid article {
  border-color: rgba(148, 178, 208, 0.24);
}

body.dark-mode .agent-leaderboard__header {
  background: rgba(148, 178, 208, 0.12);
  color: #c7d8ea;
}

body.dark-mode .agent-leaderboard__row {
  border-color: rgba(148, 178, 208, 0.18);
  background: transparent;
  color: #dcecff;
}

body.dark-mode .agent-leaderboard__row:hover,
body.dark-mode .agent-leaderboard__row.is-selected {
  background: rgba(0, 174, 199, 0.14);
}

body.dark-mode .agent-leaderboard__agent b,
body.dark-mode .agent-event-icon {
  background: rgba(0, 174, 199, 0.18);
  color: #71dff2;
}

body.dark-mode .agent-intel-grid article,
body.dark-mode .agent-manager-card div {
  background: rgba(148, 178, 208, 0.08);
}

body.dark-mode .agent-mini-event + .agent-mini-event,
body.dark-mode .agent-event-row + .agent-event-row {
  border-color: rgba(148, 178, 208, 0.18);
}

body.dark-mode .agent-event-icon--error {
  background: rgba(227, 90, 90, 0.18);
  color: #ff9b9b;
}

body.dark-mode .agent-event-icon--email {
  background: rgba(47, 128, 237, 0.18);
  color: #9cc6ff;
}

body.dark-mode .agent-event-icon--wrapup,
body.dark-mode .agent-event-icon--save {
  background: rgba(15, 190, 124, 0.18);
  color: #77e0b4;
}

@media (max-width: 1420px) {
  .agent-command-strip {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

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

  .agent-command-main {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .agent-command-infographics > article,
  .agent-activity-heatmap,
  .agent-funnel-card,
  .agent-project-bars,
  .agent-pace-card,
  .agent-time-card,
  .agent-risk-card {
    grid-column: span 1;
  }
}

@media (max-width: 980px) {
  .agent-command-hero,
  .agent-section-title,
  .agent-intelligence-panel__header {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-command-strip,
  .agent-command-kpis,
  .agent-command-infographics,
  .agent-manager-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .agent-command-strip__search {
    grid-column: auto;
  }

  .agent-leaderboard__table {
    overflow-x: auto;
  }

  .agent-leaderboard__header,
  .agent-leaderboard__row {
    min-width: 1100px;
  }
}

.panel-grid--template-builder {
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: start;
}

.panel-grid--database-settings {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.database-settings-form {
  display: grid;
  gap: 16px;
}

.database-settings-panel {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.database-settings-panel.is-hidden {
  display: none;
}

#databaseSettingsDailingPanel .panel-grid--database-api {
  grid-template-columns: minmax(520px, 0.95fr) minmax(360px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.dialing-settings-form {
  gap: 14px;
}

.dialing-config-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--hubspot-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.dialing-config-section__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dialing-config-section__header h4 {
  margin: 0 0 4px;
  color: var(--ink);
}

.dialing-config-section__header p,
.dialing-preset-strip span,
.dialing-config-section small {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.dialing-step-badge {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  color: #005f73;
  background: #dff8ff;
  font-weight: 900;
  border: 1px solid #a8e7f6;
}

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

.dialing-layout-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.dialing-choice-card {
  min-width: 0;
}

.dialing-enable-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #bfe7f3;
  border-radius: 16px;
  background: linear-gradient(135deg, #effcff 0%, #f7fbff 100%);
}

.dialing-enable-toggle input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.dialing-enable-toggle span {
  display: grid;
  gap: 2px;
}

.dialing-enable-toggle strong {
  color: var(--ink);
}

.dialing-enable-toggle small {
  color: var(--muted);
}

.dialing-preset-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: 14px;
  background: #eef7ff;
  border: 1px solid #d4e9fb;
}

.dialing-code-editor textarea {
  min-height: 170px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.45;
  resize: vertical;
}

.dialing-placement-preview {
  display: grid;
  gap: 8px;
}

.dialing-placement-preview > span {
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.dialing-placement-preview__stage {
  position: relative;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 0.9fr;
  gap: 8px;
  min-height: 118px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid #d6e6f5;
  background: #f6fbff;
  overflow: hidden;
}

.dialing-placement-preview__rail,
.dialing-placement-preview__main,
.dialing-placement-preview__right {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #ffffff;
  border: 1px dashed #c8dced;
  color: #55718b;
  font-weight: 800;
  font-size: 0.8rem;
}

.dialing-placement-preview__dialer {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 86px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00a9c7 0%, #54d7ef 100%);
  color: #062437;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(0, 128, 160, 0.18);
}

.dialing-placement-preview[data-position="left_panel"] .dialing-placement-preview__dialer {
  left: 18px;
  top: 48px;
}

.dialing-placement-preview[data-position="right_panel"] .dialing-placement-preview__dialer {
  right: 18px;
  top: 48px;
}

.dialing-placement-preview[data-position="inline_wrapup"] .dialing-placement-preview__dialer {
  right: 18px;
  top: 16px;
}

.dialing-placement-preview[data-position="floating_bottom_right"] .dialing-placement-preview__dialer {
  right: 18px;
  bottom: 16px;
}

.dialing-placement-preview[data-position="floating_bottom_left"] .dialing-placement-preview__dialer {
  left: 18px;
  bottom: 16px;
}

.dialing-placement-preview[data-position="floating_top_right"] .dialing-placement-preview__dialer {
  right: 18px;
  top: 16px;
}

.dialing-placement-preview[data-position="floating_top_left"] .dialing-placement-preview__dialer {
  left: 18px;
  top: 16px;
}

.dialing-placement-preview[data-position="floating_right_center"] .dialing-placement-preview__dialer {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.dialing-placement-preview[data-position="floating_left_center"] .dialing-placement-preview__dialer {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.dialing-placement-preview[data-behavior="disabled"] .dialing-placement-preview__dialer {
  opacity: 0.35;
  filter: grayscale(0.8);
}

.dialing-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dialing-preview-meta span,
.dialing-preview-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #eef7ff;
  border: 1px solid #d3e7f8;
  color: #23445f;
  font-size: 0.82rem;
}

.dialing-preview-meta b {
  color: #5e7791;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
}

.dialing-preview-status {
  display: grid;
  align-items: start;
  border-radius: 16px;
  padding: 14px;
}

.dialing-preview-status strong {
  color: var(--ink);
}

.dialing-preview-status span {
  color: var(--muted);
}

.dialing-embed-shell {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.dialing-embed-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--hubspot-border);
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9fe 100%);
}

.dialing-embed-card--detail {
  margin-top: 4px;
}

.dialing-embed-card--left_panel {
  margin: 0 0 12px;
}

.dialing-embed-card--inline_wrapup {
  order: -1;
}

.dialing-embed-card--floating_bottom_right {
  position: sticky;
  bottom: calc(var(--agent-rightpane-footer-height, 76px) + 12px);
  z-index: 8;
  box-shadow: 0 18px 42px rgba(15, 43, 72, 0.16);
}

.dialing-embed-card--collapsed {
  padding: 0;
  overflow: hidden;
}

.dialing-embed-card--collapsed summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.dialing-embed-card--collapsed summary::-webkit-details-marker {
  display: none;
}

.dialing-embed-card--collapsed summary span:first-child {
  display: grid;
  gap: 3px;
}

.dialing-embed-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialing-embed-mount {
  min-height: min(var(--dialer-height, 360px), 70vh);
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--hubspot-border));
  background: #ffffff;
  overflow: hidden;
  width: min(100%, var(--dialer-width, 100%));
  max-width: 100%;
  justify-self: stretch;
}

.dialing-embed-mount--preview {
  min-height: min(var(--dialer-height, 420px), 70vh);
  width: min(100%, var(--dialer-width, 100%));
}

.dialing-embed-mount--detail {
  min-height: min(var(--dialer-height, 320px), 62vh);
}

.dialing-embed-mount iframe {
  display: block;
  width: 100%;
  min-height: inherit;
  border: 0;
}

.isolated-embed-frame {
  display: block;
  width: min(100%, var(--dialer-width, 100%));
  min-height: min(var(--dialer-height, 360px), 70vh);
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.isolated-embed-frame--preview {
  min-height: min(var(--dialer-height, 420px), 70vh);
}

.isolated-embed-frame--detail {
  min-height: min(var(--dialer-height, 320px), 62vh);
}

.isolated-embed-frame--global {
  width: min(var(--dialer-width, 300px), calc(100vw - 32px));
  height: min(var(--dialer-height, 500px), calc(100vh - 120px));
  min-height: min(var(--dialer-height, 500px), calc(100vh - 120px));
  border-radius: 0 0 14px 14px;
}

.global-dialer-embed {
  position: fixed;
  z-index: 2147483000;
  width: min(var(--dialer-width, 300px), calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  border: 1px solid rgba(111, 149, 185, 0.38);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 43, 72, 0.22);
  overflow: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.global-dialer-embed.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.global-dialer-embed--floating_bottom_right,
.global-dialer-embed--right_panel,
.global-dialer-embed--inline_wrapup {
  right: var(--dialer-offset-x, 24px);
  bottom: var(--dialer-offset-y, 24px);
}

.global-dialer-embed--floating_bottom_left,
.global-dialer-embed--left_panel {
  left: var(--dialer-offset-x, 24px);
  bottom: var(--dialer-offset-y, 24px);
}

.global-dialer-embed--floating_top_right {
  right: var(--dialer-offset-x, 24px);
  top: calc(var(--shell-topbar-height, 48px) + var(--dialer-offset-y, 24px));
}

.global-dialer-embed--floating_top_left {
  left: var(--dialer-offset-x, 24px);
  top: calc(var(--shell-topbar-height, 48px) + var(--dialer-offset-y, 24px));
}

.global-dialer-embed--floating_right_center {
  right: var(--dialer-offset-x, 24px);
  top: 50%;
  transform: translateY(-50%);
}

.global-dialer-embed--floating_left_center {
  left: var(--dialer-offset-x, 24px);
  top: 50%;
  transform: translateY(-50%);
}

.global-dialer-embed.is-hidden.global-dialer-embed--floating_right_center,
.global-dialer-embed.is-hidden.global-dialer-embed--floating_left_center {
  transform: translateY(-50%) scale(0.98);
}

.global-dialer-embed--dialer_tab {
  position: static;
  z-index: auto;
  width: 100%;
  max-width: 100%;
  box-shadow: none;
  border-radius: 14px;
  transform: none;
}

.global-dialer-embed.is-hidden.global-dialer-embed--dialer_tab {
  display: none;
}

.global-dialer-embed__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #d9e6f2;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.global-dialer-embed__bar > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.global-dialer-embed__bar strong {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-dialer-embed__toggle {
  border: 1px solid #c8dced;
  border-radius: 999px;
  background: #ffffff;
  color: #113b5f;
  font-weight: 800;
  padding: 7px 10px;
  cursor: pointer;
}

.global-dialer-embed__body {
  display: block;
}

.global-dialer-embed.is-collapsed .global-dialer-embed__body {
  display: none;
}

.global-dialer-embed.is-collapsed {
  width: min(260px, calc(100vw - 32px));
}

.global-dialer-embed.is-blocked .global-dialer-embed__body {
  padding: 12px;
}

.isolated-embed-frame--panel {
  min-height: 260px;
  border: 1px solid var(--hubspot-border);
  background: #ffffff;
}

.status-pill--success {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.status-pill--warning {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.workspace-empty--embed {
  min-height: 220px;
  place-items: center;
  text-align: center;
}

.panel-grid--database-api {
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
}

.panel-grid--database-api .panel-card--full {
  grid-column: 1 / -1;
}

@media (max-width: 1280px) {
  #databaseSettingsDailingPanel .panel-grid--database-api {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 720px) {
  .dialing-option-grid,
  .dialing-layout-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dialing-preset-strip {
    align-items: stretch;
  }

  .dialing-preset-strip .secondary-button {
    width: 100%;
  }
}

body.crm-theme-dark .dialing-config-section,
body.dark-mode .dialing-config-section,
body.crm-theme-dark .dialing-embed-card,
body.dark-mode .dialing-embed-card {
  background: linear-gradient(180deg, rgba(15, 28, 46, 0.96) 0%, rgba(10, 22, 38, 0.96) 100%);
  border-color: rgba(133, 171, 207, 0.24);
}

body.crm-theme-dark .dialing-enable-toggle,
body.dark-mode .dialing-enable-toggle {
  background: linear-gradient(135deg, rgba(13, 38, 58, 0.95) 0%, rgba(10, 24, 42, 0.95) 100%);
  border-color: rgba(83, 207, 232, 0.28);
}

body.crm-theme-dark .dialing-preset-strip,
body.dark-mode .dialing-preset-strip,
body.crm-theme-dark .dialing-preview-meta span,
body.dark-mode .dialing-preview-meta span,
body.crm-theme-dark .dialing-preview-status,
body.dark-mode .dialing-preview-status {
  background: rgba(24, 43, 68, 0.78);
  border-color: rgba(133, 171, 207, 0.24);
  color: #d9e8f7;
}

body.crm-theme-dark .dialing-placement-preview__stage,
body.dark-mode .dialing-placement-preview__stage {
  background: rgba(8, 18, 32, 0.82);
  border-color: rgba(133, 171, 207, 0.22);
}

body.crm-theme-dark .dialing-placement-preview__rail,
body.crm-theme-dark .dialing-placement-preview__main,
body.crm-theme-dark .dialing-placement-preview__right,
body.dark-mode .dialing-placement-preview__rail,
body.dark-mode .dialing-placement-preview__main,
body.dark-mode .dialing-placement-preview__right {
  background: rgba(15, 30, 50, 0.9);
  border-color: rgba(133, 171, 207, 0.24);
  color: #afc5dc;
}

body.crm-theme-dark .dialing-embed-mount,
body.dark-mode .dialing-embed-mount,
body.crm-theme-dark .isolated-embed-frame,
body.dark-mode .isolated-embed-frame {
  background: #ffffff;
}

body.crm-theme-dark .global-dialer-embed,
body.dark-mode .global-dialer-embed {
  background: #0d1b2f;
  border-color: rgba(133, 171, 207, 0.26);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
}

body.crm-theme-dark .global-dialer-embed__bar,
body.dark-mode .global-dialer-embed__bar {
  background: linear-gradient(180deg, rgba(16, 34, 55, 0.98) 0%, rgba(10, 24, 42, 0.98) 100%);
  border-color: rgba(133, 171, 207, 0.24);
}

body.crm-theme-dark .global-dialer-embed__bar strong,
body.dark-mode .global-dialer-embed__bar strong {
  color: #eaf4ff;
}

body.crm-theme-dark .global-dialer-embed__toggle,
body.dark-mode .global-dialer-embed__toggle {
  background: rgba(14, 29, 49, 0.96);
  border-color: rgba(133, 171, 207, 0.34);
  color: #8fd8ff;
}

.ai-field-synonyms-editor {
  display: grid;
  gap: 12px;
}

.ai-field-synonyms-card {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid var(--hubspot-border);
  border-radius: 16px;
  background: #fbfdff;
}

.ai-field-synonyms-editor__table {
  border: 1px solid var(--hubspot-border);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.ai-field-synonyms-editor__head,
.ai-field-synonyms-editor__row {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1.15fr) auto;
  gap: 12px;
  align-items: center;
}

.ai-field-synonyms-editor__head {
  padding: 12px 14px;
  background: #f4f8fc;
  border-bottom: 1px solid var(--hubspot-border);
  color: var(--hubspot-ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ai-field-synonyms-editor__rows {
  display: grid;
}

.ai-field-synonyms-editor__row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hubspot-border);
}

.ai-field-synonyms-editor__row:last-child {
  border-bottom: 0;
}

.ai-field-synonyms-editor__row input,
.ai-field-synonyms-editor__row select {
  width: 100%;
}

.ai-field-synonyms-editor__remove {
  padding: 8px 10px;
  min-height: 38px;
  white-space: nowrap;
}

.panel-grid--database-backups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

#databaseSettingsResetPanel .panel-grid--database-api {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 14px;
}

.project-create-layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.project-create-form,
.project-config-grid {
  display: grid;
  gap: 14px;
}

.project-config-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.project-config-grid--stacked {
  grid-template-columns: minmax(0, 1fr);
}

#adminWorkspace .workspace-panel {
  gap: 16px;
}

#adminWorkspace > .assignment-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--surface) 34%);
}

.project-config-box {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.92));
}

.project-config-box--full {
  width: 100%;
}

.project-config-box--controls {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, white), rgba(245, 248, 255, 0.94));
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
}

.project-config-box__copy {
  margin: -6px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.panel-card--feature {
  min-height: 100%;
}

.stat-card,
.list-card,
.assignment-row,
.workspace-shell,
.workspace-section,
.agent-panel {
  padding: 14px;
}

.stat-card p,
.stat-card h3,
.list-card p,
.list-card h4,
.assignment-row p,
.assignment-row h4,
.workspace-shell p,
.workspace-shell h4,
.workspace-section h4,
.agent-panel h4 {
  margin: 0;
}

.stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.96) 100%);
  min-height: 112px;
  border: 1px solid rgba(216, 226, 239, 0.95);
  box-shadow: var(--shadow-soft);
}

.stat-card--target {
  background: linear-gradient(180deg, rgba(245, 248, 255, 0.98) 0%, rgba(234, 241, 255, 0.96) 100%);
}

.stat-card--positive,
.stat-card--success {
  background: linear-gradient(180deg, rgba(240, 252, 247, 0.98) 0%, rgba(224, 246, 235, 0.96) 100%);
  border-color: rgba(127, 188, 152, 0.42);
}

.stat-card--remaining {
  background: linear-gradient(180deg, rgba(255, 250, 238, 0.98) 0%, rgba(255, 243, 214, 0.96) 100%);
  border-color: rgba(214, 184, 118, 0.45);
}

.stat-card--warn {
  background: linear-gradient(180deg, rgba(255, 244, 241, 0.98) 0%, rgba(255, 231, 224, 0.96) 100%);
  border-color: rgba(219, 142, 118, 0.45);
}

.stat-card--value,
.stat-card--rate,
.stat-card--neutral {
  background: linear-gradient(180deg, rgba(248, 250, 253, 0.98) 0%, rgba(239, 244, 250, 0.96) 100%);
}

.stat-card h3 {
  margin-top: 10px;
  font-size: 1.72rem;
  letter-spacing: -0.04em;
  font-family: "Lexend", "Plus Jakarta Sans", sans-serif;
}

.stat-card__accent {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
}

.stat-card__accent--danger {
  color: #c84d57;
}

.section-heading,
.list-card__top,
.assign-toolbar,
.workspace-header,
.workspace-section__header,
.report-split,
.agent-toolbar,
.detail-header,
.detail-navigation,
.assignment-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.assign-toolbar,
.assignment-actions,
.detail-navigation {
  align-items: center;
}

.assignment-actions--filter-stack {
  display: grid;
  gap: 10px;
  width: 100%;
}

.assignment-actions--filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  width: 100%;
}

.assignment-actions__full,
.assignment-actions__half,
.assignment-actions__quarter {
  width: 100%;
}

.section-heading {
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(216, 226, 239, 0.72);
}

.inline-filter {
  display: grid;
  gap: 8px;
  color: var(--muted);
  min-width: 190px;
}

.company-filters-row {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 10px;
  margin-bottom: 10px;
}

.company-filters-row .inline-filter {
  min-width: 0;
}

.company-directory-shell {
  display: grid;
  gap: 14px;
  overflow: hidden;
}

.company-directory-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.company-directory-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
}

.company-directory-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #d8e3ef;
  background: #f8fbfe;
  color: #143a5b;
  font-weight: 800;
}

.company-directory-tab.is-active {
  background: #ffffff;
  box-shadow: inset 0 -2px 0 #3f82c3;
}

.company-directory-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7eff8;
  color: #315678;
  font-size: 0.78rem;
  font-weight: 800;
}

.smart-workspace-tabbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}

.smart-workspace-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  max-width: 320px;
  padding: 0 16px;
  border: 1px solid #d8e3ef;
  border-radius: 12px 12px 0 0;
  background: #f8fbfe;
  color: #143a5b;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.smart-workspace-tab:hover {
  background: #ffffff;
  border-color: #c7d7e7;
}

.smart-workspace-tab.is-active {
  background: #ffffff;
  box-shadow: inset 0 -3px 0 #00a4bd;
}

.smart-workspace-tab__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smart-workspace-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #dff7fb;
  color: #12566b;
  font-size: 0.78rem;
  font-weight: 800;
}

.smart-workspace-tab__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #516f90;
  font-size: 0.8rem;
  line-height: 1;
}

.smart-workspace-tab__close:hover {
  background: #eaf2f8;
  color: #143a5b;
}

.company-directory-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.company-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) auto minmax(360px, 1fr);
  gap: 12px;
  align-items: end;
}

.company-directory-search {
  display: flex;
}

.company-directory-search input {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #d8e3ef;
  background: #ffffff;
}

.company-directory-toolbar__controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.company-directory-list {
  display: grid;
  gap: 12px;
}

.company-directory-table {
  display: grid;
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.company-directory-table__header,
.company-directory-row {
  display: grid;
  grid-template-columns: var(--company-directory-template, minmax(260px, 2fr) minmax(220px, 1.4fr) 110px 130px 140px 160px);
  gap: 18px;
  align-items: center;
}

.company-directory-table__header {
  padding: 14px 18px;
  background: #f5f8fb;
  border-bottom: 1px solid #d8e3ef;
}

.company-directory-table__header span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #587086;
}

.company-directory-table__body {
  display: grid;
}

.company-directory-row {
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid #e3ebf3;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

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

.company-directory-row:hover {
  background: #f9fbfd;
}

.company-directory-row.is-selected {
  background: #eef5fc;
}

.company-directory-row__name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.company-directory-row__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e8f1fb 0%, #dceafb 100%);
  color: #336084;
  font-size: 0.78rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.company-directory-row__identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.company-directory-row__identity strong {
  font-size: 1rem;
  font-weight: 800;
  color: #0f3b5f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-directory-row__identity small {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-directory-row__cell {
  min-width: 0;
  color: #35526d;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-directory-row__cell--link {
  color: #1081b6;
}

@media (max-width: 1280px) {
  .company-directory-table__header,
  .company-directory-row {
    gap: 14px;
  }
}

@media (max-width: 1080px) {
  .company-directory-toolbar {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  .company-directory-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .company-directory-actions {
    justify-content: flex-start;
  }

  .company-directory-toolbar__controls {
    grid-template-columns: 1fr;
  }

  .company-directory-table__header {
    display: none;
  }

  .company-directory-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

#companyCreateModal .modal-card {
  width: min(760px, calc(100vw - 32px));
}

#companyCreateModal .report-builder-modal-shell {
  gap: 1rem;
}

#companyCreateModal .report-builder-modal-body {
  display: grid;
  gap: 1rem;
  padding-top: 0.25rem;
}

#companyCreateModal .response-modal-panel__grid {
  gap: 14px;
}

#companyCreateModal .assignment-actions {
  padding-top: 0.35rem;
  border-top: 1px solid var(--hubspot-line);
}

.agent-project-picker {
  display: none;
}

.entry-form label,
.assignment-field,
.assignment-row > label,
.contact-detail-grid label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 11px 13px;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
  background: #ffffff;
}

textarea[disabled],
input[disabled] {
  color: var(--ink);
  background: var(--surface-soft);
}

.multi-select {
  min-height: 132px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.multi-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.multi-select-picker {
  position: relative;
  display: grid;
  gap: 8px;
}

.inline-help-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-help-button {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

.inline-help-button:hover,
.inline-help-button:focus-visible {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
  outline: none;
}

.exclusion-mode-help-list {
  display: grid;
  gap: 12px;
}

.exclusion-mode-help-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 16px 18px;
  display: grid;
  gap: 8px;
}

.exclusion-mode-help-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.exclusion-mode-help-card__header h5 {
  margin: 0;
  font-size: 1rem;
}

.exclusion-mode-help-card p {
  margin: 0;
  color: var(--ink-soft);
}

.workspace-copy-stack {
  display: grid;
  gap: 10px;
}

.workspace-copy-stack p {
  margin: 0;
}

.multi-select-picker__trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 10px 12px;
  color: var(--ink);
}

.multi-select-picker__trigger:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.multi-select-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.multi-select-picker__placeholder {
  color: var(--muted);
  padding-top: 3px;
}

.multi-select-picker__caret {
  color: var(--muted);
  font-size: 0.88rem;
  padding-top: 4px;
}

.multi-select-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.multi-select-chip__remove {
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

.multi-select-picker__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 18;
  display: none;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow);
}

.multi-select-picker__search {
  display: block;
}

.multi-select-picker__search-input {
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.multi-select-picker__search-input:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.multi-select-picker.is-open .multi-select-picker__dropdown {
  display: grid;
}

.multi-select-picker__actions {
  display: flex;
  gap: 8px;
}

.multi-select-picker__actions .secondary-button {
  padding: 8px 10px;
  font-size: 0.82rem;
}

.multi-select-picker__options {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 6px;
}

.multi-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 9px 10px;
}

.multi-select-option:hover,
.multi-select-option.is-selected {
  background: color-mix(in srgb, var(--accent) 10%, white);
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
}

.multi-select-option__check {
  width: 18px;
  color: var(--accent-strong);
  font-weight: 800;
}

body.crm-theme-dark .multi-select-picker__trigger,
body.crm-theme-dark .multi-select-picker__dropdown,
body.crm-theme-dark .multi-select-picker__search-input {
  background: #0f1a2d;
  border-color: var(--line);
}

.multi-select-picker[data-variant="quiet"] .multi-select-chip {
  background: #eaf1f7;
  color: #294764;
}

.multi-select-picker[data-variant="quiet"] .multi-select-picker__trigger {
  background: #f7fafc;
}

body.crm-theme-dark .multi-select-option {
  color: var(--ink);
}

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

.editor-textarea {
  min-height: 180px;
  font-family: "Consolas", "SFMono-Regular", monospace;
}

.editor-textarea--compact {
  min-height: 120px;
}

.template-builder {
  display: grid;
  gap: 12px;
}

.workspace-header--template {
  align-items: flex-start;
}

.template-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(220px, 0.9fr);
  gap: 12px;
  align-items: end;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f9fbfe 0%, #eef4fb 100%);
}

.template-toolbar .secondary-button,
.template-preview-card__header .ghost-button {
  padding: 9px 12px;
}

.template-builder__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.template-editor-field {
  display: grid;
  gap: 8px;
}

.template-editor-shell {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #fcfdff 0%, #f4f8fc 100%);
}

.template-editor-shell__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.template-editor-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.template-editor-tabs .secondary-button {
  min-width: 76px;
}

.template-editor-tabs .secondary-button.is-active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 10px 22px rgba(255, 107, 53, 0.18);
}

.template-editor-shell__body {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.2fr) minmax(320px, 0.9fr);
  gap: 14px;
  min-height: 520px;
}

.template-editor-field--source,
.template-editor-builder-panel,
.template-editor-preview-panel {
  min-width: 0;
}

.template-grapes-host {
  min-height: 560px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
}

.template-grapes-host .gjs-one-bg,
.template-grapes-host .gjs-two-color {
  color: #d9e6f5;
}

.template-grapes-host .gjs-one-bg {
  background: #102034;
}

.template-grapes-host .gjs-two-bg {
  background: #16283d;
}

.template-grapes-host .gjs-three-bg {
  background: #edf3f9;
  color: #203246;
}

.template-grapes-host .gjs-four-color,
.template-grapes-host .gjs-pn-btn.gjs-pn-active,
.template-grapes-host .gjs-block-label {
  color: var(--accent);
}

.template-source-editor {
  min-height: 100%;
  height: 100%;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #c9d8ea);
  background: #0f1728;
  color: #d9e6f5;
  line-height: 1.65;
  font-size: 0.93rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.template-source-editor::placeholder {
  color: rgba(217, 230, 245, 0.46);
}

.template-preview--interactive {
  min-height: 430px;
}

.template-editor-shell[data-template-editor-mode="source"] .template-editor-builder-panel,
.template-editor-shell[data-template-editor-mode="source"] .template-editor-preview-panel {
  display: none;
}

.template-editor-shell[data-template-editor-mode="builder"] .template-editor-field--source,
.template-editor-shell[data-template-editor-mode="builder"] .template-editor-preview-panel {
  display: none;
}

.template-editor-shell[data-template-editor-mode="preview"] .template-editor-field--source,
.template-editor-shell[data-template-editor-mode="preview"] .template-editor-builder-panel {
  display: none;
}

.template-editor-shell[data-template-editor-mode="source"] .template-editor-shell__body,
.template-editor-shell[data-template-editor-mode="builder"] .template-editor-shell__body,
.template-editor-shell[data-template-editor-mode="preview"] .template-editor-shell__body {
  grid-template-columns: minmax(0, 1fr);
}

.template-preview-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.template-preview-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.template-preview-card__header .section-kicker {
  margin-bottom: 0;
}

.template-preview-card--full {
  min-height: 100%;
}

.template-preview {
  min-height: 260px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  overflow: auto;
}

.template-preview > *:first-child {
  margin-top: 0;
}

.template-preview > *:last-child {
  margin-bottom: 0;
}

.template-preview iframe {
  max-width: 100%;
}

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

.inline-copy-field input[readonly] {
  background: var(--surface-soft);
}

.ghost-button,
.ghost-link,
.primary-button,
.secondary-button,
.danger-button,
.entry-form button,
.assign-toolbar button {
  border: none;
  border-radius: 12px;
  padding: 10px 13px;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.primary-button,
.entry-form button,
.assign-toolbar button {
  border: 1px solid #cbd6e2;
  background: #ffffff;
  color: #33475b;
  box-shadow: none;
}

.ghost-button,
.ghost-link,
.secondary-button {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  color: var(--ink);
  border: 1px solid var(--line);
}

.danger-button {
  background: rgba(200, 77, 87, 0.1);
  color: var(--danger);
}

.ghost-button:hover,
.ghost-link:hover,
.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.entry-form button:hover,
.assign-toolbar button:hover,
.pagination-page:hover {
  transform: translateY(-1px);
}

.inline-create {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.badge {
  align-self: start;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: color-mix(in srgb, var(--accent) 14%, white);
  color: var(--accent-strong);
}

.badge--warn {
  background: color-mix(in srgb, #c9850d 18%, white);
  color: #8a5c00;
}

.filter-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.filter-summary-bar__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-summary-bar__label {
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.filter-control {
  display: grid;
  gap: 6px;
}

.filter-control > span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.agent-override-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
}

.agent-override-banner.is-active {
  border-color: color-mix(in srgb, #c9850d 26%, var(--line));
  background: linear-gradient(180deg, rgba(255, 248, 232, 0.98), rgba(255, 252, 244, 0.96));
}

.agent-override-toggle {
  white-space: nowrap;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  background: var(--surface-muted);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-pool-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.crm-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.crm-list-toolbar__title,
.crm-list-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-table-shell {
  padding: 4px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.render-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--muted);
}

.render-summary strong {
  color: var(--ink);
}

.render-summary__hint {
  font-size: 0.9rem;
}

.contact-pool-table {
  display: grid;
  gap: 4px;
  width: max-content;
  min-width: 100%;
}

.contact-pool-row {
  display: grid;
  grid-template-columns: var(--contact-grid-template, repeat(6, minmax(170px, 1fr)) minmax(190px, max-content));
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(216, 226, 239, 0.92);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.contact-pool-row--status {
  border-color: color-mix(in srgb, var(--contact-status-color) 26%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--contact-status-color) 12%, white) 0%, color-mix(in srgb, var(--contact-status-color) 7%, #f9fbfe) 100%);
}

.contact-pool-row--header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 0;
  padding-bottom: 4px;
  border: none;
  background: rgba(246, 249, 252, 0.96);
  box-shadow: none;
  border-radius: 0;
}

.contact-pool-row--header span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-pool-header-cell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  padding-right: 8px;
}

.contact-pool-header-cell__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-pool-header-cell--actions {
  justify-content: flex-end;
}

.contact-column-resizer {
  position: absolute;
  top: -6px;
  right: -8px;
  width: 16px;
  height: calc(100% + 12px);
  padding: 0;
  border: none;
  background: transparent;
  cursor: col-resize;
  opacity: 0.65;
}

.contact-column-resizer::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 72%, white), color-mix(in srgb, var(--accent) 42%, var(--line)));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.contact-pool-header-cell:hover .contact-column-resizer,
.contact-column-resizer:focus-visible {
  opacity: 1;
}

.contact-pool-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  line-height: 1.15;
}

.contact-pool-cell--primary {
  font-weight: 700;
  color: var(--ink);
}

.contact-pool-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.contact-pool-avatar {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent-strong);
  font-size: 0.66rem;
  font-weight: 800;
}

.contact-pool-identity__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-pool-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.bulk-selection-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(180px, max-content);
  gap: 12px;
  align-items: end;
}

.bulk-selection-grid__full {
  grid-column: 1 / -1;
}

.bulk-selection-grid__inline {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.bulk-selection-grid .checkbox-line--inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  min-height: 44px;
  white-space: nowrap;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.bulk-selected-accounts-toggle {
  width: 100%;
  align-items: flex-start;
  white-space: normal;
}

.bulk-selected-accounts-toggle span {
  display: grid;
  gap: 2px;
}

.bulk-selected-accounts-toggle strong {
  color: #1f4a74;
}

.bulk-selected-accounts-toggle small,
.bulk-action-count-card small {
  color: #6b85a0;
  font-size: 0.82rem;
  font-weight: 600;
}

.contact-pool-header-cell--select,
.contact-pool-cell--select {
  justify-content: center;
  text-align: center;
}

.bulk-account-checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #00a4bd;
  cursor: pointer;
}

.bulk-field-picker .filter-combobox__menu,
.bulk-project-picker .filter-combobox__menu {
  gap: 4px;
}

.bulk-field-picker .filter-combobox__option,
.bulk-project-picker .filter-combobox__option {
  padding: 10px 12px;
}

.bulk-field-picker .filter-combobox__option strong,
.bulk-project-picker .filter-combobox__option strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: inherit;
}

#bulkActionModal .workspace-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

#bulkActionModal .workspace-section {
  margin: 0;
}

#bulkActionModal .workspace-shell {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

#bulkActionModal label > .filter-combobox,
#bulkActionModal label > input,
#bulkActionModal label > select {
  margin-top: 6px;
}

.agent-bulk-action-drawer .agent-filter-drawer__body {
  background: #ffffff;
}

.agent-bulk-action-form {
  display: grid;
  gap: 16px;
}

.bulk-action-count-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #d8e3ef;
  border-radius: 16px;
  background: #f6fafd;
  color: #52718d;
}

.bulk-action-count-card span {
  color: #6b85a0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bulk-action-count-card strong {
  color: #1f4a74;
  font-size: 1.05rem;
}

.agent-bulk-action-form__action {
  display: grid;
  gap: 8px;
  color: #244c73;
  font-weight: 700;
}

.agent-bulk-action-form__action select,
.agent-bulk-action-fields label > input,
.agent-bulk-action-fields label > select,
.agent-bulk-action-fields label > .filter-combobox {
  margin-top: 6px;
}

.agent-bulk-action-fields {
  display: grid;
  gap: 14px;
  padding: 0;
  background: transparent;
}

.agent-bulk-action-fields .workspace-section {
  margin: 0;
}

.agent-bulk-action-fields .workspace-shell {
  padding: 14px 16px;
  border: 1px solid #d8e3ef;
  border-radius: 16px;
  background: #f7fafc;
}

.agent-bulk-action-drawer__footer {
  position: sticky;
  bottom: 0;
  margin: 4px -22px -22px;
  padding: 16px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, #ffffff 24%);
  border-top: 1px solid #d8e3ef;
}

.agent-bulk-action-drawer__footer .primary-button {
  min-width: 180px;
}

#noticeModal .modal-card {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
}

#noticeModal .workspace-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

#noticeModal .workspace-panel {
  display: grid;
  gap: 16px;
  padding: 20px 22px 22px;
}

#noticeModal #noticeMessage {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink);
}

#noticeModal .assignment-actions {
  justify-content: flex-end;
}

#noticeModal #noticeConfirmButton {
  background: linear-gradient(180deg, #0d6efd 0%, #0a5ad4 100%);
  border-color: #0a5ad4;
}

#noticeModal #noticeCancelButton {
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
}

.modal-card--contact-lock {
  width: min(620px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 22px;
  background: linear-gradient(180deg, #fff7f7 0%, #ffffff 38%, #f8fbff 100%);
  box-shadow: 0 34px 80px rgba(127, 29, 29, 0.24);
}

.modal-card--contact-lock .workspace-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(239, 68, 68, 0.18);
  background: linear-gradient(180deg, #fff1f2 0%, #fff7f7 100%);
}

.contact-edit-lock-panel {
  display: grid;
  gap: 16px;
  padding: 20px 22px 22px;
}

.contact-edit-lock-editors {
  display: grid;
  gap: 10px;
}

.contact-edit-lock-editor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #ffd0d0;
  border-radius: 16px;
  background: #fff;
}

.contact-edit-lock-editor strong,
.contact-edit-lock-editor span {
  display: block;
}

.contact-edit-lock-editor span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.88rem;
}

.contact-edit-lock-warning {
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 16px;
  color: #7f1d1d;
  background: #fff1f2;
  font-weight: 700;
  line-height: 1.45;
}

.contact-edit-lock-actions {
  justify-content: flex-end;
}

.contact-edit-lock-actions .danger-button {
  border-color: #dc2626;
  color: #fff;
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
}

body.crm-theme-dark .modal-card--contact-lock {
  border-color: rgba(248, 113, 113, 0.35);
  background: linear-gradient(180deg, #21101a 0%, #111827 52%, #0b1220 100%);
}

body.crm-theme-dark .modal-card--contact-lock .workspace-header {
  border-bottom-color: rgba(248, 113, 113, 0.25);
  background: linear-gradient(180deg, #2b1220 0%, #141d2b 100%);
}

body.crm-theme-dark .contact-edit-lock-editor {
  border-color: rgba(248, 113, 113, 0.28);
  background: #0f172a;
}

body.crm-theme-dark .contact-edit-lock-warning {
  border-color: rgba(248, 113, 113, 0.32);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.26);
}

.contact-pool-actions select {
  min-width: 120px;
  max-width: 148px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.contact-columns-panel {
  display: grid;
  gap: 18px;
}

.contact-columns-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-columns-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  color: var(--muted);
  font-weight: 700;
}

.contact-columns-tab.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  color: var(--accent);
}

.contact-columns-group {
  display: grid;
  gap: 12px;
}

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

.contact-columns-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  font-size: 0.94rem;
}

.contact-columns-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  background: #fff;
  display: inline-block;
  flex: 0 0 auto;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.contact-columns-option input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 140ms ease;
}

.contact-columns-option input[type="checkbox"]:checked {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 22%, transparent);
}

.contact-columns-option input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

.contact-columns-option input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.contact-pool-footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.pagination-bar,
.pagination-pages {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-grid--overview-top {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  align-items: start;
}

.panel-grid--overview-main {
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  align-items: start;
}

.overview-stat-card {
  gap: 6px;
  min-height: 132px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 10%, white) 0%, transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.overview-stat-card p {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.overview-stat-card h3 {
  font-size: 1.9rem;
  letter-spacing: -0.05em;
}

.overview-stat-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.overview-brief-card,
.overview-insight-card,
.overview-project-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 8%, white) 0%, transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-soft);
}

.overview-brief-card,
.overview-insight-card {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.overview-brief-card__top,
.overview-insight-card__top,
.overview-project-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.overview-brief-card__top h4,
.overview-insight-card__top h4,
.overview-project-card h4 {
  margin: 0;
  letter-spacing: -0.04em;
  font-size: 1.15rem;
}

.overview-brief-grid,
.overview-bullet-list {
  display: grid;
  gap: 10px;
}

.overview-bullet {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.overview-bullet strong {
  font-size: 0.96rem;
}

.overview-bullet span {
  color: var(--muted);
  white-space: nowrap;
}

.overview-bullet--stacked {
  align-items: start;
}

.overview-bullet--stacked > div {
  display: grid;
  gap: 4px;
}

.overview-bullet--stacked span {
  white-space: normal;
}

.overview-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-project-card {
  width: 100%;
  padding: 18px;
  display: grid;
  gap: 14px;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.overview-project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.overview-project-card__progress {
  display: grid;
  gap: 8px;
}

.overview-project-card__progress strong {
  font-size: 0.9rem;
}

.overview-project-card__progress-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-strong);
}

.overview-project-card__progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #63b2ff);
}

.overview-project-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-project-card__stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  color: var(--muted);
}

.overview-project-card__stats strong {
  color: var(--text);
}

.pagination-bar {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.pagination-pages {
  flex-wrap: wrap;
}

.pagination-page {
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--ink);
  font-weight: 700;
}

.pagination-page.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.pagination-ellipsis {
  padding: 0 4px;
  color: var(--muted);
  font-weight: 700;
}

.utility-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.utility-block--flush {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.filter-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8fd 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.workspace-panel {
  gap: 18px;
}

.workspace-section {
  display: grid;
  gap: 10px;
}

.workspace-shell--compact {
  padding: 14px 16px;
}

.workspace-header--topline {
  align-items: flex-start;
}

.workspace-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.workspace-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  color: var(--muted);
  font-weight: 700;
}

.workspace-tab.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  color: var(--accent);
}

.assignment-row--dense {
  gap: 12px;
}

.stack-list--dense {
  gap: 8px;
}

.project-product-empty-state strong {
  color: var(--ink);
}

.project-create-product-card {
  padding: 16px;
}

.project-product-editor {
  gap: 0;
  overflow: hidden;
}

.project-product-editor__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  color: inherit;
}

.project-product-editor__toggle:hover {
  transform: none;
}

.project-product-editor__body {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.project-product-editor__body.is-hidden {
  display: none;
}

.list-card--dense {
  padding: 12px;
}

.workspace-empty {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-strong);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

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

.feature-line,
.report-item {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 16px;
}

.feature-line strong,
.report-item strong {
  display: block;
  margin-bottom: 6px;
}

.feature-line span,
.report-item p,
.report-item__meta {
  color: var(--muted);
}

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

.feature-line__step-index {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: #eef5fb;
  color: var(--hubspot-navy);
  font-weight: 800;
}

.feature-line__copy {
  min-width: 0;
}

.company-matching-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: end;
}

.company-matching-toolbar__field {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.company-matching-toolbar__field span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.company-match-row {
  display: grid;
  gap: 14px;
}

.company-match-row__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.company-match-row__select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--hubspot-navy);
}

.company-match-row__select input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.company-match-row__score {
  text-align: right;
}

.company-match-row__score strong {
  display: block;
  font-size: 1.05rem;
}

.company-match-row__score span {
  color: var(--muted);
  font-size: 0.85rem;
}

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

.company-match-row__company {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fcff;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.company-match-row__company--target {
  border-color: rgba(30, 102, 214, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
}

.company-match-row__company--source {
  border-color: rgba(255, 120, 90, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #fff8f5 100%);
}

.company-match-row__company h4 {
  margin: 0;
  font-size: 1.05rem;
}

.company-match-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.company-match-row__reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-match-row__warning {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(240, 146, 53, 0.24);
  background: linear-gradient(180deg, #fffaf2 0%, #fff6ea 100%);
  color: #8a4b12;
  font-size: 0.92rem;
}

.company-match-row__compare {
  display: none;
}

.company-match-row__compare.is-open {
  display: block;
}

.company-match-row__compare-table {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.company-match-row__compare-head,
.company-match-row__compare-label,
.company-match-row__compare-value {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.company-match-row__compare-head {
  background: #f4f8fc;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hubspot-navy);
}

.company-match-row__compare-label {
  font-weight: 700;
  color: var(--hubspot-navy);
  background: #fbfdff;
}

.company-match-row__compare-value {
  color: var(--text);
}

.company-match-row__compare-label.is-different,
.company-match-row__compare-value.is-different {
  background: #fff8f4;
}

.company-match-row__compare-table > :nth-last-child(-n + 3) {
  border-bottom: none;
}

.company-match-row__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

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

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

.email-log-summary-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.email-log-summary-row .stat-card {
  min-width: 0;
}

.email-log-summary-row .stat-card p,
.email-log-summary-row .stat-card h3 {
  white-space: nowrap;
}

.email-log-hubspot-shell {
  border: 1px solid #d7e3f0;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
}

.email-log-hubspot-table__header,
.email-log-hubspot-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(230px, 1.15fr) minmax(130px, 0.75fr) minmax(120px, 0.55fr) minmax(120px, 0.55fr) minmax(210px, 0.85fr) minmax(240px, 0.95fr) minmax(180px, 0.75fr);
  gap: 14px;
  align-items: start;
  padding: 0 18px;
}

.email-log-hubspot-table__header {
  min-height: 52px;
  align-items: center;
  background: #f5f9fd;
  border-bottom: 1px solid #dbe6f1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #496681;
}

.email-log-hubspot-row {
  min-height: 86px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8eef5;
}

.email-log-hubspot-row:last-child {
  border-bottom: 0;
}

.email-log-hubspot-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.email-log-hubspot-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-log-hubspot-row__created,
.email-log-hubspot-row__failure {
  overflow: hidden;
}

.email-log-hubspot-row__created strong,
.email-log-hubspot-row__created .detail-caption,
.email-log-hubspot-row__failure strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-log-hubspot-row__actions {
  display: flex !important;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.email-log-hubspot-row.is-email-error {
  background: rgba(200, 77, 87, 0.04);
}

.email-log-hubspot-row.is-email-warning {
  background: rgba(201, 133, 13, 0.04);
}

.email-log-hubspot-row.is-email-success {
  background: rgba(25, 135, 84, 0.03);
}

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

.report-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.report-line:last-child {
  border-bottom: none;
}

.report-item {
  display: grid;
  gap: 14px;
}

.report-item__top,
.report-progress,
.report-item__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.report-item__top p {
  margin: 6px 0 0;
}

.report-progress__bar {
  height: 10px;
  flex: 1;
  border-radius: 999px;
  background: var(--bg-strong);
  overflow: hidden;
}

.report-progress__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #4aa2ff);
}

.report-progress__bar--early span {
  background: linear-gradient(90deg, #93a9c4, #b8c7da);
}

.report-progress__bar--active span {
  background: linear-gradient(90deg, #f4b43c, #ffd36c);
}

.report-progress__bar--healthy span {
  background: linear-gradient(90deg, #46a6ff, #7bc3ff);
}

.report-progress__bar--complete span {
  background: linear-gradient(90deg, #1dbe72, #74d79d);
}

.report-item__meta {
  flex-wrap: wrap;
}

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

.modal-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
}

#noticeModal {
  z-index: 60;
}

.modal-shell--stacked-left,
.modal-shell--stacked-right {
  place-items: stretch;
  padding: 24px;
}

.modal-shell--stacked-left .modal-card,
.modal-shell--stacked-right .modal-card {
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.modal-shell--stacked-left .modal-card {
  margin-right: auto;
  width: min(720px, calc(100vw - 420px));
}

.modal-shell--stacked-right {
  z-index: 30;
  pointer-events: none;
}

.modal-shell--stacked-right .modal-backdrop {
  display: none;
}

.modal-shell--stacked-right .modal-card {
  margin-left: auto;
  width: min(760px, calc(100vw - 420px));
  pointer-events: auto;
}

.modal-shell.is-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 27, 45, 0.38);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  border-radius: var(--radius-xl);
  padding: 22px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.modal-card--wide {
  width: min(1040px, calc(100vw - 32px));
}

.agent-layout {
  grid-template-columns: 360px 1fr;
}

.agent-layout--detail {
  grid-template-columns: 1fr;
}

.agent-layout--list-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 136px);
  overflow: hidden;
  min-height: 0;
}

.agent-launcher {
  display: grid;
  gap: 18px;
}

.agent-launcher__hero,
.agent-workspace-overview {
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 10%, white) 0%, transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 22px 24px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.agent-launcher__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.agent-launcher__hero-copy,
.agent-launcher__library,
.agent-workspace-overview__hero {
  display: grid;
  gap: 10px;
}

.agent-launcher__hero-copy h3,
.agent-workspace-overview__hero h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
  letter-spacing: -0.05em;
}

.agent-launcher__hero-stats,
.agent-workspace-overview__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.agent-launcher-stat {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--line));
  background: rgba(255, 255, 255, 0.84);
}

.agent-launcher-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.agent-launcher-stat strong {
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.agent-launcher__library {
  display: grid;
  gap: 14px;
}

.agent-panel {
  display: grid;
  gap: 16px;
}

.panel-card--agent-detail {
  width: 100%;
}

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

.queue-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.queue-row.is-selected {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, white), rgba(248, 251, 255, 1));
}

.queue-row strong,
.queue-row span {
  display: block;
}

.queue-row__meta {
  display: grid;
  gap: 2px;
}

.detail-shell {
  display: grid;
  gap: 12px;
  height: 100%;
}

.modal-card--fullscreen {
  width: min(1600px, 96vw);
  max-width: 96vw;
  max-height: 94vh;
}

.company-detail-shell {
  display: grid;
  gap: 1rem;
}

.company-detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow-soft);
}

.company-detail-hero h3 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}

.company-detail-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.company-detail-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.4fr);
  gap: 1rem;
  align-items: start;
}

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

.company-detail-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.company-detail-grid__span-2 {
  grid-column: 1 / -1;
}

.company-merge-combobox .filter-combobox__menu {
  max-height: 220px;
}

.company-alias-form-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.45fr) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.company-alias-form-row .secondary-button {
  white-space: nowrap;
}

.company-merge-preview {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
  display: grid;
  gap: 0.75rem;
}

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

.company-alias-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.4fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.company-alias-card__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.company-merge-actions {
  margin-top: 10px;
}

.company-location-create {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 96%, var(--accent) 4%);
}

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

.company-location-card {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  overflow: hidden;
}

.company-location-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.company-location-card__title {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.company-location-card__title input {
  font-weight: 700;
}

.company-location-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-location-card__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.company-location-card__header-button {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.company-location-card__header-button:hover {
  background: color-mix(in srgb, var(--accent) 4%, white);
}

.company-location-card__summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.company-location-card__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
}

.company-location-card__body {
  display: none;
  gap: 12px;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.company-location-card.is-expanded .company-location-card__body {
  display: grid;
}

.company-location-create .contact-detail-grid--dense,
.company-location-card .contact-detail-grid--dense {
  row-gap: 10px;
}

.company-location-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.company-location-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  min-height: 22px;
  font-weight: 600;
  white-space: nowrap;
}

.company-location-flag input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}

.company-location-flag span {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.company-linked-contact-row {
  cursor: pointer;
}

.company-linked-contact-row:hover {
  background: color-mix(in srgb, var(--accent) 5%, white);
}

@media (max-width: 1080px) {
  .company-detail-grid,
  .company-detail-grid--matching {
    grid-template-columns: minmax(0, 1fr);
  }

  .company-alias-form-row {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .company-location-card__header {
    flex-direction: column;
  }

  .company-location-card__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .company-detail-hero {
    flex-direction: column;
  }

  .company-detail-hero__stats {
    justify-content: flex-start;
  }
}

.detail-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  padding: 14px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

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

.detail-title h4 {
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  font-family: "Lexend", "Plus Jakarta Sans", sans-serif;
}

.detail-navigation {
  justify-content: flex-start;
}

.agent-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow-soft);
}

.agent-topbar__group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.agent-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.agent-project-card {
  border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--line));
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(13, 110, 253, 0.06) 0%, transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  padding: 18px;
  display: grid;
  gap: 14px;
  text-align: left;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.agent-project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.09);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.agent-project-card__top,
.agent-project-card__stats,
.agent-project-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.agent-project-card__stats,
.agent-project-card__meta {
  flex-wrap: wrap;
}

.agent-project-card h4 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  font-family: "Lexend", "Plus Jakarta Sans", sans-serif;
}

.agent-project-card__subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.agent-project-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.agent-project-card__progress {
  display: grid;
  gap: 7px;
}

.agent-project-card__progress strong {
  font-size: 0.9rem;
}

.agent-project-card__progress-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-strong);
  overflow: hidden;
}

.agent-project-card__progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #65b3ff);
}

.agent-project-card__stats span,
.agent-project-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid color-mix(in srgb, var(--accent) 8%, var(--line));
  color: var(--muted);
}

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

.agent-project-card__stats span {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border-radius: 16px;
  align-items: start;
}

.agent-project-card__stats strong {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.1;
}

.agent-project-card__stats small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.agent-project-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 10%, var(--line));
  color: var(--accent);
  font-weight: 700;
}

.agent-project-card__cta::after {
  content: "→";
  font-size: 1rem;
}

.agent-workspace-overview {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
}

.agent-workspace-overview__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.agent-workspace-overview__meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.agent-workspace-overview__stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}

.agent-workspace-overview__stats .agent-launcher-stat {
  min-width: 132px;
  padding: 12px 14px;
}

.company-summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.company-summary-stat {
  display: inline-grid;
  gap: 2px;
  min-width: 92px;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
  border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--line));
  text-align: right;
}

.company-summary-stat strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.1;
}

.company-summary-stat small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.agent-launcher-stat--interactive {
  cursor: pointer;
  text-align: left;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.agent-launcher-stat--interactive:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(16, 50, 92, 0.12);
}

.agent-workspace-overview__stats .agent-launcher-stat strong {
  font-size: 1.1rem;
}

.agent-list-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  height: calc(100vh - var(--shell-topbar-height) - 166px);
  overflow: hidden;
}

.agent-list-shell.is-filter-open {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 25%);
}

.agent-list-shell__main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.agent-product-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 2px;
  margin: -4px -2px;
  max-width: min(52vw, 760px);
}

.agent-workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.agent-workspace-toolbar__project-code {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #d8e3ef;
  background: #ffffff;
  color: #163a59;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.agent-workspace-toolbar .agent-product-strip {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.agent-workspace-toolbar .secondary-button,
.agent-workspace-toolbar .badge {
  flex: 0 0 auto;
}

.agent-product-chip {
  display: grid;
  gap: 4px;
  min-width: 132px;
  padding: 10px 12px 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--agent-chip-border, rgba(27, 74, 122, 0.12));
  background: var(--agent-chip-bg, linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 255, 0.98) 100%));
  box-shadow: 0 2px 10px rgba(16, 50, 92, 0.05);
  text-align: left;
  overflow: hidden;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease, opacity 120ms ease;
  position: relative;
  opacity: 0.82;
}

.agent-product-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(16, 50, 92, 0.1);
  border-color: var(--agent-chip-active-border, rgba(25, 109, 255, 0.35));
  opacity: 1;
}

.agent-product-chip.is-active {
  border-color: var(--agent-chip-active-border, rgba(25, 109, 255, 0.35));
  background: var(--agent-chip-active-bg, linear-gradient(180deg, rgba(231, 241, 255, 0.98) 0%, rgba(218, 235, 255, 0.98) 100%));
  box-shadow: 0 14px 28px rgba(16, 50, 92, 0.16);
  opacity: 1;
}

.agent-product-chip__title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--agent-chip-accent, var(--text));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-product-chip__meta {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.agent-product-chip.is-active .agent-product-chip__title {
  color: color-mix(in srgb, var(--agent-chip-accent, var(--text)) 82%, #0b2f4d);
}

.agent-product-chip.is-active .agent-product-chip__meta {
  color: #315678;
  font-weight: 700;
}

.agent-product-chip::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--agent-chip-accent, #315678);
}

.agent-product-chip.is-active::before {
  width: 6px;
}

.agent-product-chip.is-active::after {
  content: "Selected";
  position: absolute;
  top: 8px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid color-mix(in srgb, var(--agent-chip-accent, #315678) 24%, white);
  color: var(--agent-chip-accent, #315678);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.exclusion-monitor-shell {
  gap: 14px;
}

.exclusion-monitor-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.exclusion-monitor-toolbar__filter {
  display: inline-grid;
  gap: 4px;
  min-width: 220px;
}

.exclusion-monitor-table-wrap {
  max-height: min(68vh, 620px);
  overflow: auto;
  border: 1px solid rgba(27, 74, 122, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.exclusion-monitor-table td {
  vertical-align: top;
}

.exclusion-reason-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-width: 220px;
}

.exclusion-reason-cell__detail {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.agent-filter-drawer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  max-height: 100%;
}

.filter-box--agent-drawer {
  min-height: 0;
  overflow-y: auto;
  overflow-x: visible;
  padding: 16px;
  padding-bottom: 28px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8fd 100%);
}

.contact-pool-list--agent {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding-bottom: 8px;
  padding-right: 4px;
  gap: 10px;
}

.agent-list-table-shell {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: auto;
  padding: 0 0 4px;
}

.contact-pool-list--agent .pagination-bar {
  flex: 0 0 auto;
}

.contact-pool-footer--agent {
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  justify-content: center;
}

.contact-pool-footer--agent .pagination-bar {
  margin-inline: auto;
}
.filter-summary-bar--inline {
  align-items: center;
  padding: 8px 12px;
}

.filter-summary-bar--inline .pill-row {
  margin-top: 0;
}

.agent-override-toggle--inline {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.floating-filter-button--compact {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.84rem;
}

.agent-filter-drawer .filter-builder {
  display: grid;
  gap: 10px;
}

.agent-filter-drawer .filter-row-card {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr) minmax(0, 1.1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
}

.agent-filter-drawer .filter-control {
  gap: 6px;
}

.agent-filter-drawer .filter-control select,
.agent-filter-drawer .filter-control input {
  width: 100%;
  min-height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.agent-filter-drawer .filter-combobox {
  z-index: 3;
}

.agent-filter-drawer .filter-combobox__menu {
  min-width: 100%;
  width: max(100%, 360px);
  max-width: min(680px, calc(100vw - 140px));
}

.agent-filter-drawer [data-filter-remove] {
  justify-self: stretch;
  min-width: 96px;
  min-height: 38px;
}

.agent-filter-drawer .filter-control > span {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-record-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.agent-record-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.agent-record-shell {
  display: grid;
  gap: 12px;
}

.detail-card--hero-compact {
  padding-block: 18px;
}

.agent-record-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
  min-height: calc(100vh - 240px);
}

.agent-record-column {
  min-height: 0;
}

.agent-record-column__header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.agent-record-column__scroll {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  padding-right: 4px;
}

.agent-record-column__scroll--center {
  gap: 14px;
}

.agent-record-column--center {
  display: grid;
  gap: 12px;
}

.agent-contact-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.agent-contact-summary__identity {
  display: flex;
  gap: 12px;
  align-items: center;
}

.agent-contact-summary__identity strong,
.agent-contact-summary__identity span {
  display: block;
}

.agent-contact-summary__identity span {
  color: var(--muted);
}

.agent-contact-summary__avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent) 18%, white));
  color: var(--accent);
  font-weight: 800;
}

.agent-contact-summary__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-detail-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}

.agent-detail-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  color: var(--muted);
  font-weight: 700;
}

.agent-detail-tab.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  color: var(--accent);
}

.agent-detail-stack {
  display: grid;
  gap: 14px;
}

.agent-insight-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

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

.agent-history-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.agent-history-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.agent-record-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.agent-record-main__content,
.agent-record-main__sidebar {
  display: grid;
  gap: 12px;
}

.agent-record-main__sidebar {
  align-self: start;
}

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

.agent-record-grid--lower {
  align-items: start;
}

.detail-card--hero,
.detail-card--wrapup {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.detail-card--wrapup-sticky {
  position: sticky;
  top: 92px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, white) 0%, #ffffff 20%, #f7fbff 100%);
  box-shadow:
    0 22px 48px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.agent-wrapup-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.agent-wrapup-highlight {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, white), #ffffff);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
}

.agent-wrapup-highlight span {
  color: var(--muted);
}

.agent-wrapup-summary {
  display: grid;
  gap: 6px;
  padding: 12px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
}

.contact-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-detail-grid,
.assignment-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-form-grid {
  margin-bottom: 12px;
}

.contact-detail-grid--dense,
.assignment-fields-grid--dense {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contact-detail-grid--single {
  grid-template-columns: 1fr;
}

.detail-card--wrapup .assignment-fields-grid--dense {
  grid-template-columns: 1fr;
}

.detail-card--wrapup textarea {
  min-height: 132px;
}

.detail-card--wrapup .assignment-actions {
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
}

.company-link-manager {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, white), #ffffff);
}

.company-link-manager__header {
  display: grid;
  gap: 4px;
}

.company-link-manager__controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.company-link-manager__controls--stacked {
  grid-template-columns: 1fr;
}

.company-link-manager__search {
  display: grid;
  gap: 6px;
}

.company-link-manager__search span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.company-link-manager__controls--stacked select {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: #ffffff;
}

.readonly-field-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-muted) 72%, white);
}

.readonly-field-card__label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.readonly-field-card__value {
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--ink);
}

.detail-section-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.field-admin-row,
.filter-row-card {
  padding: 14px;
}

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

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

.field-admin-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.field-admin-actions--compact {
  margin-top: 4px;
}

.field-admin-actions--inline {
  margin-top: 0;
  justify-content: flex-end;
}

.field-admin-card__actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.field-admin-card__actions .inline-filter {
  min-width: min(360px, 100%);
}

.field-admin-grid--team-inline {
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
  align-items: end;
}

.field-admin-actions--team {
  align-self: end;
  white-space: nowrap;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.2;
}

.checkbox-line input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  display: inline-block;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.checkbox-line input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 140ms ease;
}

.checkbox-line input[type="checkbox"]:checked {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 20%, transparent);
}

.checkbox-line input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

.checkbox-line input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-color) 14%, white);
  color: var(--ink);
  font-weight: 700;
}

.filter-row-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.is-clickable {
  cursor: pointer;
}

@media (max-width: 1200px) {
  .app-shell,
  .stats-grid,
  .panel-grid,
  .panel-grid--overview-top,
  .panel-grid--overview-main,
  .panel-grid--wide,
  .panel-grid--template-builder,
  .agent-layout,
  .agent-record-layout,
  .agent-record-main,
  .report-grid,
  .report-split,
  .agent-record-grid,
  .agent-project-grid,
  .contact-detail-grid,
  .assignment-fields-grid,
  .field-admin-grid,
  .field-admin-grid--template,
  .contact-columns-grid,
  .filter-row-card,
  .project-create-layout,
  .project-config-grid,
  .inline-create,
  .template-builder__grid {
    grid-template-columns: 1fr;
  }

  .agent-launcher__hero,
  .agent-launcher__hero-stats,
  .agent-workspace-overview__row {
    grid-template-columns: 1fr;
  }

  .agent-record-fact-strip,
  .agent-wrapup-kpis {
    grid-template-columns: 1fr;
  }

  .agent-record-layout--hubspot,
  .report-grid--contact-overview,
  .agent-overview-panels,
  .agent-pipeline-grid,
  .agent-record-contact-strip,
  .agent-record-workspace-kpis {
    grid-template-columns: 1fr;
  }

  .template-editor-shell__header,
  .workspace-header--template {
    flex-direction: column;
    align-items: stretch;
  }

  .template-editor-shell__body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .query-builder-layout,
  .filter-row-card--query {
    grid-template-columns: 1fr;
  }

  .agent-record-column__scroll {
    max-height: none;
    overflow: visible;
  }

  .agent-record-layout--hubspot {
    height: auto;
    min-height: 0;
  }

  .agent-list-shell,
  .agent-list-shell.is-filter-open {
    grid-template-columns: 1fr;
  }

  .agent-workspace-overview__meta,
  .agent-workspace-overview__stats {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .agent-workspace-overview__meta {
    justify-content: flex-start;
  }

  .company-link-manager__controls {
    grid-template-columns: 1fr;
  }

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

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

  .contact-pool-row--header {
    display: none;
  }

  .contact-pool-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 14px;
  }

  .hero,
  .section-heading,
  .workspace-section__header,
  .agent-toolbar,
  .agent-topbar,
  .detail-header,
  .detail-title,
  .assign-toolbar {
    flex-direction: column;
    align-items: start;
  }
}
.field-admin-row--log {
  padding: 14px;
  gap: 14px;
  border-left: 4px solid transparent;
}

.field-admin-row--log.is-email-error {
  border-left-color: #c84d57;
  background: linear-gradient(180deg, rgba(200, 77, 87, 0.06), rgba(255, 255, 255, 0.98));
}

.field-admin-row--log.is-email-warning {
  border-left-color: #c9850d;
  background: linear-gradient(180deg, rgba(201, 133, 13, 0.06), rgba(255, 255, 255, 0.98));
}

.field-admin-row--log.is-email-success {
  border-left-color: #198754;
  background: linear-gradient(180deg, rgba(25, 135, 84, 0.05), rgba(255, 255, 255, 0.98));
}

body.crm-theme-dark .field-admin-row--log.is-email-error {
  background: linear-gradient(180deg, rgba(200, 77, 87, 0.18), rgba(17, 24, 39, 0.95));
}

body.crm-theme-dark .field-admin-row--log.is-email-warning {
  background: linear-gradient(180deg, rgba(201, 133, 13, 0.16), rgba(17, 24, 39, 0.95));
}

body.crm-theme-dark .field-admin-row--log.is-email-success {
  background: linear-gradient(180deg, rgba(25, 135, 84, 0.16), rgba(17, 24, 39, 0.95));
}

.field-admin-actions--log {
  align-items: flex-start;
}

.log-card__identity {
  display: grid;
  gap: 6px;
}

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

.log-card__title-row strong {
  min-width: 0;
  flex: 1 1 auto;
}

.log-card__title-row .ghost-button {
  flex: 0 0 auto;
}

.field-admin-grid__full {
  grid-column: 1 / -1;
}

.field-admin-grid__full--actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.field-admin-grid__full--actions .ghost-button {
  min-width: 160px;
}

@media (max-width: 820px) {
  .log-card__title-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

#email-logs .filter-row {
  grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(140px, 1fr));
}

.saved-search-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.saved-search-library-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.saved-search-library-header label {
  flex: 1;
}

.saved-search-library {
  display: grid;
  gap: 10px;
}

.saved-search-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

body.crm-theme-dark .saved-search-card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.98));
}

.saved-search-card__main {
  display: grid;
  gap: 8px;
}

.saved-search-card__name {
  display: grid;
  gap: 6px;
}

.saved-search-card__title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.saved-search-card__name input {
  min-height: 40px;
}

.saved-search-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.saved-search-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.scriptlet-builder-shell {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.scriptlet-builder {
  display: grid;
  gap: 12px;
}

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

.scriptlet-builder__steps {
  display: grid;
  gap: 12px;
}

.scriptlet-step {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.scriptlet-step__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.scriptlet-step__title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.scriptlet-step__label-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.scriptlet-help-button {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  font-weight: 700;
}

.scriptlet-step__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.scriptlet-step.is-disabled {
  opacity: 0.7;
}

.scriptlet-step__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.scriptlet-step__hint {
  display: grid;
  align-items: center;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.92rem;
}

body.crm-theme-dark .scriptlet-builder-shell,
body.crm-theme-dark .scriptlet-step {
  background: #0f1a2d;
  border-color: var(--line);
}

@media (max-width: 1024px) {
  .scriptlet-step__grid,
  .scriptlet-builder__header {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

/* HubSpot-inspired system refresh */

:root {
  --bg: #f3f7fb;
  --bg-strong: #e8eff6;
  --surface: #ffffff;
  --surface-soft: #f8fbfe;
  --surface-muted: #eef4f9;
  --ink: #213343;
  --muted: #6a7a8c;
  --line: #d7e3f0;
  --line-strong: #bfd1e3;
  --accent: #ff7a59;
  --accent-soft: rgba(255, 122, 89, 0.1);
  --accent-strong: #e66a4a;
  --shadow: 0 14px 36px rgba(33, 51, 67, 0.08);
  --shadow-soft: 0 4px 14px rgba(33, 51, 67, 0.05);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
}

body {
  background:
    linear-gradient(180deg, #f6f9fc 0%, #edf3f8 100%);
  color: var(--ink);
}

body.crm-theme-dark {
  --bg: #0e1726;
  --bg-strong: #101c2d;
  --surface: #132033;
  --surface-soft: #172538;
  --surface-muted: #1a2b41;
  --ink: #eef4fb;
  --muted: #9fb2c8;
  --line: #2a3c55;
  --line-strong: #39506d;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.app-shell {
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  min-height: 100vh;
}

.main-panel {
  gap: 14px;
}

.sidebar {
  padding: 14px 12px 12px;
  gap: 12px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, #20334a 0%, #18293d 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.26);
}

body.crm-theme-light .sidebar,
body:not(.crm-theme-dark) .sidebar {
  background:
    linear-gradient(180deg, #21364e 0%, #1c2f45 100%);
  color: #eff4fb;
}

body.crm-theme-light .nav-chip,
body.crm-theme-light .nav-subchip,
body:not(.crm-theme-dark) .nav-chip,
body:not(.crm-theme-dark) .nav-subchip {
  color: #dce8f6;
}

body.crm-theme-light .nav-submenu-label,
body:not(.crm-theme-dark) .nav-submenu-label,
body.crm-theme-light .sidebar .eyebrow,
body.crm-theme-light .sidebar .card-label,
body:not(.crm-theme-dark) .sidebar .eyebrow,
body:not(.crm-theme-dark) .sidebar .card-label,
body.crm-theme-light .brand-copy,
body:not(.crm-theme-dark) .brand-copy {
  color: #9fb2c7;
}

body.crm-theme-light .brand-title,
body:not(.crm-theme-dark) .brand-title {
  color: #ffffff;
}

body.crm-theme-light .nav-chip.is-active,
body:not(.crm-theme-dark) .nav-chip.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 122, 89, 0.28), rgba(255, 255, 255, 0.08));
  border-color: rgba(255, 255, 255, 0.12);
}

body.crm-theme-light .nav-subchip.is-active,
body:not(.crm-theme-dark) .nav-subchip.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.08);
}

body.crm-theme-light .sidebar-card,
body:not(.crm-theme-dark) .sidebar-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

body.crm-theme-light .sidebar-card .ghost-button,
body:not(.crm-theme-dark) .sidebar-card .ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: #eef4fb;
  border-color: rgba(255, 255, 255, 0.08);
}

.brand-block {
  gap: 8px;
  padding: 6px 8px 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(255, 122, 89, 0.28);
}

.brand-title {
  font-size: 1.08rem;
}

.brand-copy {
  font-size: 0.84rem;
  line-height: 1.45;
}

.sidebar-nav-shell {
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav {
  gap: 4px;
}

.nav-group {
  gap: 4px;
  padding-top: 2px;
}

.nav-chip,
.nav-subchip {
  border-radius: 10px;
}

.nav-chip {
  padding: 8px 10px;
  font-size: 0.88rem;
}

.nav-subchip {
  padding: 7px 10px;
  font-size: 0.85rem;
}

.nav-submenu {
  gap: 4px;
  padding-left: 10px;
}

.nav-submenu-label {
  padding: 8px 10px 2px;
}

.sidebar-bottom {
  gap: 10px;
}

.sidebar-card {
  padding: 12px;
  border-radius: 14px;
}

.snapshot-line {
  padding: 8px 0;
}

.hero {
  min-height: auto;
  padding: 10px 14px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg, #2b4057 0%, #23384e 100%);
  border: 1px solid rgba(20, 35, 53, 0.18);
  box-shadow: 0 8px 18px rgba(33, 51, 67, 0.12);
}

.hero .eyebrow {
  margin-bottom: 2px;
  font-size: 0.68rem;
}

.hero h2 {
  font-size: 1.02rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-actions {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

#globalSearch {
  min-width: 0;
  height: 40px;
  border-radius: 10px;
}

.panel-section {
  gap: 12px;
}

.panel-section--full {
  min-height: calc(100vh - 146px);
}

.stats-grid,
.panel-grid,
.agent-layout,
.report-split {
  gap: 12px;
}

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

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

.panel-grid.panel-grid--database-backups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.panel-grid--wide,
.panel-grid--database-settings {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-grid--reporting {
  grid-template-columns: minmax(290px, 0.8fr) minmax(0, 1.2fr);
}

.workspace-shell,
.workspace-section,
.detail-card,
.project-config-box,
.template-preview-card {
  padding: 16px;
}

.stat-card,
.list-card,
.assignment-row,
.agent-panel,
.field-admin-row {
  padding: 12px;
}

.stat-card {
  min-height: 92px;
}

.stat-card p {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.stat-card h3 {
  margin-top: 8px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.section-heading,
.workspace-section__header,
.workspace-header,
.detail-header,
.detail-title,
.agent-topbar,
.agent-record-toolbar {
  gap: 8px;
}

.section-heading {
  padding-bottom: 10px;
  margin-bottom: 2px;
}

.section-kicker,
.eyebrow,
.card-label {
  font-size: 0.67rem;
  letter-spacing: 0.11em;
}

.section-heading h3,
.workspace-section__header h4,
.entry-form h4,
.admin-title,
.detail-title h4,
.workspace-shell h4,
.workspace-section h4 {
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.workspace-copy,
.project-config-box__copy,
.list-card__subtitle,
.list-card__meta,
.detail-caption,
.report-item__meta,
.feature-line span,
.report-item p {
  font-size: 0.86rem;
}

input,
select,
textarea {
  min-height: 38px;
  border-radius: 10px;
  padding: 9px 12px;
  background: #ffffff;
}

textarea {
  min-height: 92px;
}

.ghost-button,
.ghost-link,
.primary-button,
.secondary-button,
.danger-button,
.entry-form button,
.assign-toolbar button {
  min-height: 36px;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

.ghost-button,
.ghost-link,
.secondary-button {
  background: #ffffff;
  border: 1px solid var(--line);
}

.primary-button,
.entry-form button,
.assign-toolbar button {
  box-shadow: none;
}

.danger-button {
  border: 1px solid rgba(198, 69, 80, 0.16);
}

.badge,
.status-pill,
.workspace-header__meta .badge {
  padding: 0;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.workspace-tabs {
  gap: 6px;
  padding-top: 2px;
}

.workspace-tab {
  border-radius: 10px;
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.84rem;
  background: #ffffff;
}

.workspace-tab.is-active {
  background: #eaf2fb;
  color: #204d74;
  border-color: #c9d8e8;
}

.filter-box {
  padding: 12px;
  gap: 10px;
  background: #f8fbfe;
}

.filter-builder,
.filter-row {
  gap: 10px;
}

.filter-row-card {
  padding: 10px;
  grid-template-columns: 1.25fr 0.95fr 0.95fr auto;
}

.filter-control > span {
  font-size: 0.68rem;
}

.filter-summary-bar {
  padding: 9px 12px;
}

.crm-list-toolbar {
  padding: 10px 12px;
  border-radius: 12px 12px 0 0;
  background: #f7fafc;
  border-bottom: none;
}

.crm-list-toolbar__title h4 {
  font-size: 0.95rem;
}

.crm-table-shell {
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.contact-pool-list {
  gap: 10px;
}

.contact-pool-table {
  gap: 0;
}

.contact-pool-row {
  min-height: 36px;
  padding: 4px 10px;
  gap: 10px;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  box-shadow: none;
}

.contact-pool-row:first-child {
  border-top: 1px solid var(--line);
}

.contact-pool-row:hover {
  background: #f8fbfe;
}

.contact-pool-row--header {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 38px;
  padding: 0 10px;
  background: #f5f8fb;
}

.contact-pool-row--header span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #587086;
}

.contact-pool-row > span {
  font-size: 0.8rem;
}

.contact-pool-cell,
.contact-pool-cell--primary {
  min-width: 0;
}

.contact-pool-cell--primary {
  font-weight: 700;
  color: #1f4e79;
}

.contact-pool-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 0.68rem;
}

.contact-pool-identity {
  gap: 8px;
}

.contact-pool-identity__text {
  gap: 2px;
}

.contact-pool-actions {
  gap: 6px;
}

.contact-pool-actions select,
.contact-pool-actions button {
  min-height: 30px;
  font-size: 0.78rem;
}

.assign-toolbar {
  gap: 8px;
}

.pagination-page {
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 0.82rem;
}

.report-grid,
.report-grid--dense {
  gap: 12px;
}

.report-item,
.feature-line {
  padding: 14px;
}

.workspace-empty {
  padding: 16px;
  border-style: solid;
  border-color: var(--line);
  background: #f8fbfe;
}

.agent-layout {
  grid-template-columns: 1fr;
}

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

.agent-project-card {
  padding: 14px;
  gap: 10px;
}

.agent-project-card h4 {
  font-size: 1rem;
}

.agent-topbar,
.agent-record-toolbar {
  padding: 10px 12px;
}

.detail-shell,
.agent-record-shell,
.workspace-panel {
  gap: 10px;
}

.detail-card {
  gap: 10px;
}

.detail-card--hero,
.detail-card--wrapup {
  background: #ffffff;
}

.detail-card--wrapup-sticky {
  position: static;
  top: auto;
}

.detail-title h4 {
  font-size: 1.12rem;
}

.agent-override-banner {
  padding: 12px 14px;
  border-radius: 12px;
}

.field-admin-row,
.field-admin-row--log {
  padding: 12px;
}

.contact-columns-grid {
  gap: 10px;
}

.contact-columns-option {
  padding: 10px 12px;
}

.modal-card {
  border-radius: 16px;
}

.modal-card--response {
  width: min(1180px, calc(100vw - 40px));
  max-height: min(90vh, 1080px);
  overflow: auto;
}

.entry-form--response {
  display: grid;
  gap: 18px;
}

.response-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 18px;
}

.response-modal-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.response-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.response-toggle-grid .checkbox-line {
  min-height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.response-scriptlet-shell {
  padding: 18px;
}

.response-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.response-editor-shell {
  display: grid;
  gap: 14px;
}

.response-editor-basics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.response-editor-basics-main {
  display: grid;
  gap: 14px;
}

.response-editor-step {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.response-editor-step__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

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

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

.response-editor-grid--identity > label:nth-child(1),
.response-editor-grid--identity > label:nth-child(2) {
  grid-column: span 2;
}

.response-editor-grid__full {
  grid-column: 1 / -1;
}

.response-editor-help {
  margin-top: -4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.response-editor-side-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.response-editor-side-card__header {
  display: grid;
  gap: 4px;
}

.response-editor-side-card__header h5 {
  margin: 0;
}

.response-editor-side-card__body {
  display: grid;
  gap: 12px;
}

.response-editor-side-card__split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.response-project-codes-field .multi-select-picker[data-variant="import-mapping"] .multi-select-picker__trigger {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0.72rem 0.9rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.response-project-codes-field .multi-select-picker[data-variant="import-mapping"] .multi-select-picker__dropdown {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.response-project-codes-field .multi-select-picker[data-variant="import-mapping"] .multi-select-picker__search-input {
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 42px;
  padding: 0.7rem 0.85rem;
}

.response-project-codes-field .multi-select-picker[data-variant="import-mapping"] .multi-select-option {
  min-height: 42px;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #fff;
  color: #1f2937;
  border: 1px solid transparent;
}

.response-project-codes-field .multi-select-picker[data-variant="import-mapping"] .multi-select-option:hover,
.response-project-codes-field .multi-select-picker[data-variant="import-mapping"] .multi-select-option.is-selected {
  background: #f8fbff;
  color: #1f2937;
  border-color: color-mix(in srgb, var(--accent) 16%, var(--line));
}

.response-project-codes-field .multi-select-picker[data-variant="import-mapping"] .multi-select-option__check {
  color: var(--accent);
}

.response-project-codes-field .multi-select-picker[data-variant="import-mapping"] .multi-select-picker__actions .secondary-button {
  background: #fff;
  color: #1f2937;
  border: 1px solid var(--line);
  box-shadow: none;
}

.response-project-codes-field .multi-select-picker[data-variant="import-mapping"] .multi-select-picker__actions .secondary-button:hover {
  background: #f8fbff;
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
}

.response-sequence-builder {
  display: grid;
  gap: 12px;
}

.response-sequence-step {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.response-sequence-step__header,
.response-sequence-step__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

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

.response-sequence-combobox .filter-combobox__menu {
  max-height: 260px;
  overflow-y: auto;
}

.response-sequence-inline {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 8px;
}

.response-review-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  padding: 14px;
}

.response-review-controls {
  display: grid;
  grid-template-columns: minmax(160px, 220px) repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.response-review-controls .checkbox-line {
  min-height: 44px;
}

.response-sequence-add-action {
  margin-top: 8px;
}

.response-action-button {
  min-height: 44px;
  flex: 0 0 auto;
}

.response-action-button--test {
  background: linear-gradient(180deg, #eef6ff 0%, #dfeefe 100%) !important;
  border-color: #bfd6f3 !important;
  color: #18466f !important;
}

.response-action-button--test:hover {
  background: linear-gradient(180deg, #dcecff 0%, #cfe3fb 100%) !important;
}

.response-action-button--delete {
  min-width: 150px;
}

.response-action-button--save {
  min-width: 160px;
}

.response-modal-actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin: 12px -16px -16px;
  padding: 14px 16px;
  background: #f8fbff;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.response-modal-actions {
  justify-content: space-between;
  align-items: center;
}

.response-modal-actions__left,
.response-modal-actions__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.crm-theme-dark .response-modal-actions--sticky {
  background: #132033;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.report-builder-actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin: 12px -16px -16px;
  padding: 14px 16px;
  background: #f8fbff;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  justify-content: flex-end;
}

.report-builder-actions--sticky #reportBuilderBackButton {
  background: linear-gradient(180deg, #eef3f8 0%, #dde6ef 100%);
  border-color: rgba(107, 129, 154, 0.28);
  color: #27415c;
}

.report-builder-actions--sticky #reportBuilderNextButton,
.report-builder-actions--sticky .primary-button[type="submit"] {
  background: linear-gradient(180deg, #1fa766 0%, #118553 100%);
  border-color: rgba(14, 122, 76, 0.56);
  color: #ffffff;
}

.report-builder-actions--sticky #reportBuilderBackButton:hover {
  background: linear-gradient(180deg, #e4ebf3 0%, #d4dfea 100%);
  border-color: rgba(107, 129, 154, 0.38);
}

.report-builder-actions--sticky #reportBuilderNextButton:hover,
.report-builder-actions--sticky .primary-button[type="submit"]:hover {
  background: linear-gradient(180deg, #19975c 0%, #0e7346 100%);
  border-color: rgba(14, 122, 76, 0.72);
}

body.crm-theme-dark .report-builder-actions--sticky {
  background: #132033;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.response-search {
  min-width: 260px;
}

.response-list-row {
  width: 100%;
  display: grid;
  gap: 10px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

.response-list-row:hover {
  background: #f8fbfe;
  border-color: var(--line-strong);
}

.response-list-row.is-selected {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, white);
}

#agentReviewExcludedButton.is-active {
  background: color-mix(in srgb, var(--accent) 18%, white);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: color-mix(in srgb, var(--accent) 92%, #12304f);
  box-shadow: 0 10px 24px rgba(13, 110, 253, 0.14);
}

#agentReviewExcludedButton.is-active:hover {
  background: color-mix(in srgb, var(--accent) 24%, white);
}

.response-list-row__main,
.response-list-row__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.response-list-row__main {
  align-items: start;
}

.response-list-row__main--inline {
  align-items: center;
}

#adminProjectList .response-list-row {
  width: 100%;
  text-align: left;
}

.response-list-row__content {
  flex: 1;
  border: none;
  background: transparent;
  text-align: left;
  color: inherit;
  padding: 0;
}

.response-list-row__main strong {
  display: block;
  font-size: 0.94rem;
}

.response-list-row__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.response-list-row__main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.response-list-row__meta {
  flex-wrap: wrap;
}

.response-list-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.response-list-row__actions--inline {
  justify-content: flex-end;
}

.response-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

body.crm-theme-dark .contact-pool-row--header,
body.crm-theme-dark .crm-list-toolbar,
body.crm-theme-dark .pagination-bar,
body.crm-theme-dark .filter-box,
body.crm-theme-dark .workspace-empty,
body.crm-theme-dark .report-table th {
  background: #222c3b;
}

body.crm-theme-dark .workspace-tab {
  background: #222c3b;
}

body.crm-theme-dark .workspace-tab.is-active {
  background: rgba(127, 180, 255, 0.14);
  color: #eaf2fd;
  border-color: rgba(127, 180, 255, 0.18);
}

body.crm-theme-dark .ghost-button,
body.crm-theme-dark .secondary-button,
body.crm-theme-dark .ghost-link {
  background: #222c3b;
}

body.crm-theme-dark .hero {
  background: var(--shell-nav-surface);
}

body.crm-theme-dark .report-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

body.crm-theme-dark .response-list-row {
  background: #1d2735;
}

body.crm-theme-dark .response-list-row:hover {
  background: #243041;
}

body.crm-theme-dark .response-list-row.is-selected {
  background: rgba(127, 180, 255, 0.12);
}

body.crm-theme-dark .response-modal-panel,
body.crm-theme-dark .response-scriptlet-shell,
body.crm-theme-dark .response-editor-side-card {
  background: #1d2735;
  border-color: var(--line);
}

body.crm-theme-dark .response-toggle-grid .checkbox-line {
  background: #243041;
  border-color: var(--line);
}

body.crm-theme-dark .response-list-row__content {
  color: var(--ink);
}

body.crm-theme-dark .response-tag {
  background: #243041;
}

body.crm-theme-dark #agentReviewExcludedButton.is-active {
  background: color-mix(in srgb, var(--accent) 26%, rgba(255, 255, 255, 0.05));
  color: #dbeafe;
}

@media (max-width: 1100px) {
  .response-modal-grid,
  .response-modal-panel__grid,
  .response-toggle-grid,
  .response-editor-basics-layout,
  .response-editor-grid,
  .response-sequence-step__grid,
  .response-review-controls,
  .saved-search-card {
    grid-template-columns: 1fr;
  }

  .saved-search-create-row,
  .saved-search-library-header {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .response-editor-side-card__split {
    grid-template-columns: 1fr;
  }

  .response-modal-actions {
    justify-content: stretch;
  }

  .response-action-button {
    flex: 1 1 calc(50% - 10px);
  }
}

@media (max-width: 640px) {
  .response-action-button {
    flex: 1 1 100%;
  }
}

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

html {
  scroll-behavior: smooth;
}

body,
.sidebar,
.nav-chip,
.nav-subchip,
.ghost-button,
.secondary-button,
.primary-button,
.modal-card,
.contact-pool-row,
.queue-row,
.workspace-shell,
.detail-card {
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 220ms ease,
    transform 220ms ease,
    opacity 180ms ease,
    width 220ms ease,
    padding 220ms ease;
}

body {
  font-family: "Inter", "Plus Jakarta Sans", sans-serif;
}

.hero h2,
.section-heading h3,
.entry-form h4,
.workspace-section__header h4,
.admin-title,
.brand-title,
.global-topbar h2 {
  font-family: "Manrope", "Lexend", sans-serif;
}

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

.sidebar {
  padding: 12px;
  gap: 12px;
  border-radius: 0;
  height: 100vh;
  top: 0;
  background: linear-gradient(180deg, rgba(18, 35, 58, 0.985) 0%, rgba(19, 37, 61, 0.985) 100%);
}

.sidebar-nav-shell {
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--nav-line);
}

.sidebar-nav {
  gap: 8px;
}

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

.nav-submenu {
  display: grid;
  gap: 4px;
  padding: 8px 0 0 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: max-height 220ms ease, opacity 180ms ease, transform 220ms ease, padding 220ms ease;
}

.nav-group.is-expanded .nav-submenu {
  max-height: 520px;
  opacity: 1;
  overflow: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-submenu-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  padding: 2px 10px 0;
}

.nav-chip,
.nav-subchip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-chip {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  justify-content: space-between;
}

.nav-subchip {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
}

.nav-chip__icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  flex: 0 0 22px;
}

.nav-chip__label {
  min-width: 0;
  flex: 1 1 auto;
}

.nav-chip--group::after {
  content: "›";
  font-size: 1rem;
  color: var(--nav-muted);
  transform: rotate(0deg);
  transition: transform 180ms ease, color 180ms ease;
}

.nav-group.is-expanded .nav-chip--group::after {
  transform: rotate(90deg);
  color: currentColor;
}

.nav-subchip--child {
  padding-left: 26px;
}

.nav-subchip.is-active,
.nav-chip.is-active {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 22px rgba(15, 23, 42, 0.12);
}

.main-panel {
  min-width: 0;
  padding: 0;
}

.hero {
  display: none;
}

.global-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 8px 16px;
  max-height: 75px;
  margin-bottom: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(219, 230, 243, 0.9);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.global-topbar__left,
.global-topbar__middle,
.global-topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: nowrap;
}

.global-topbar__middle {
  justify-content: flex-start;
  gap: 8px;
}

.topbar-context {
  min-width: 0;
}

.topbar-context .eyebrow {
  margin-bottom: 2px;
}

.global-topbar h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.topbar-icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
}

.topbar-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.topbar-context-actions,
.topbar-context-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.topbar-context-actions {
  width: 100%;
  justify-content: flex-end;
}

.topbar-context-chip {
  display: inline-grid;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
}

.topbar-context-chip__label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar-context-chip__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.topbar-context-chip strong {
  font-size: 0.86rem;
  line-height: 1.1;
  white-space: nowrap;
}

.topbar-context-cluster {
  justify-content: flex-end;
  flex-shrink: 0;
}

.topbar-context-cluster .secondary-button--compact {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.secondary-button--compact {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
}

.user-menu {
  position: relative;
}

.notification-center {
  position: relative;
}

.notification-bell {
  position: relative;
  min-width: 44px;
  min-height: 42px;
  padding: 8px 12px;
}

.notification-bell.is-unread {
  border-color: rgba(200, 77, 87, 0.34);
  background: rgba(200, 77, 87, 0.08);
  color: #c84d57;
}

.notification-bell__icon {
  font-size: 1rem;
  line-height: 1;
}

.notification-bell__count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: #c84d57;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 82vw);
  padding: 10px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
  z-index: 40;
}

.notification-dropdown.is-hidden {
  display: none;
}

.notification-dropdown__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 2px 4px 0;
}

.notification-dropdown__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-dropdown__body {
  display: grid;
  gap: 8px;
  max-height: min(420px, 65vh);
  overflow: auto;
}

.notification-entry {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.notification-entry.is-unread {
  border-color: #d7e4f4;
  background: #f8fbff;
}

.notification-entry--danger {
  box-shadow: inset 3px 0 0 #c84d57;
}

.notification-entry--warning {
  box-shadow: inset 3px 0 0 #c9850d;
}

.notification-entry__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.notification-entry__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-dropdown__clear,
.notification-entry__clear {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0;
}

.notification-dropdown__actions .notification-dropdown__clear {
  color: var(--ink);
}

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

.user-menu-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
}

.user-menu-button__avatar {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, white);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 4px;
}

.user-menu-dropdown.is-hidden {
  display: none;
}

.user-menu-dropdown__item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
}

.user-menu-dropdown__item:hover {
  background: var(--surface-soft);
  border-color: var(--line);
}

.user-menu-dropdown__item--danger {
  color: var(--danger);
}

#globalSearch {
  min-width: min(144px, 14vw);
  width: min(144px, 14vw);
  max-width: 144px;
  padding-top: 7px;
  padding-bottom: 7px;
  background: var(--surface-soft);
  color: var(--ink);
  border-color: var(--line);
}

#globalSearch::placeholder {
  color: var(--muted);
}

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

.panel-section {
  padding: 16px;
}

.sidebar-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.sidebar-toggle-button {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.global-topbar #sidebarToggleButton {
  display: none !important;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 88px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
  padding-inline: 10px;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .brand-meta,
body.sidebar-collapsed .nav-chip__label,
body.sidebar-collapsed .nav-submenu,
body.sidebar-collapsed .nav-submenu-label,
body.sidebar-collapsed .nav-chip--group::after {
  display: none !important;
}

body.sidebar-collapsed .brand-mark-row {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-nav-shell {
  padding: 8px 6px;
}

body.sidebar-collapsed .nav-chip {
  justify-content: center;
  padding-inline: 0;
}

body.sidebar-collapsed .nav-chip__icon {
  width: 28px;
  height: 28px;
  font-size: 0.82rem;
}

body.sidebar-collapsed .nav-group {
  justify-items: center;
}

body.sidebar-collapsed .nav-chip--group {
  background: rgba(255, 255, 255, 0.05);
}

body.sidebar-collapsed .brand-block {
  padding-inline: 0;
}

body.sidebar-collapsed .sidebar-toggle-button {
  min-width: 0;
  padding-inline: 0;
}

.modal-shell--stacked-left,
.modal-shell--stacked-right {
  place-items: stretch;
  padding: 0;
}

.modal-shell--stacked-left .modal-backdrop {
  background: rgba(14, 27, 45, 0.24);
}

.modal-shell--stacked-left .modal-card,
.modal-shell--stacked-right .modal-card {
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  overflow: auto;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 24px 50px rgba(15, 23, 42, 0.18);
}

.modal-shell--stacked-left .modal-card {
  margin-right: auto;
  width: min(58vw, 880px);
  border-right: 1px solid var(--line);
}

.modal-shell--stacked-right {
  z-index: 30;
  pointer-events: none;
}

.modal-shell--stacked-right .modal-backdrop {
  display: none;
}

.modal-shell--stacked-right .modal-card {
  margin-left: auto;
  width: min(42vw, 700px);
  border-left: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 3%, white), rgba(255, 255, 255, 0.98));
  pointer-events: auto;
}

.contact-pool-row {
  min-height: 46px;
  padding-block: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 0;
  box-shadow: none;
}

.contact-pool-row:hover {
  background: color-mix(in srgb, var(--accent) 4%, white);
}

.contact-pool-row--status {
  border-color: color-mix(in srgb, var(--contact-status-color) 34%, var(--line));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--contact-status-color) 24%, white) 0%,
    color-mix(in srgb, var(--contact-status-color) 18%, #f7fbff) 100%
  );
}

.contact-pool-row--status:hover {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--contact-status-color) 30%, white) 0%,
    color-mix(in srgb, var(--contact-status-color) 22%, #f4f9ff) 100%
  );
}

.contact-pool-cell {
  font-size: 0.88rem;
  line-height: 1.25;
}

.contact-pool-cell--primary strong {
  font-size: 0.9rem;
}

.contact-pool-row > span,
.contact-pool-cell,
.contact-pool-cell--primary,
.contact-pool-actions,
.contact-pool-actions > * {
  white-space: nowrap;
}

.contact-pool-cell,
.contact-pool-cell--primary,
.contact-pool-actions {
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-pool-identity {
  min-width: 0;
  flex-wrap: nowrap;
}

.contact-pool-identity__text {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-pool-actions {
  flex-wrap: nowrap;
}

.floating-filter-actions {
  position: fixed;
  right: 16px;
  bottom: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
}

.floating-filter-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, white), #ffffff);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  color: var(--ink);
  font-weight: 700;
}

.floating-filter-button--secondary {
  background: linear-gradient(180deg, #ffffff, #f7faff);
}

.floating-filter-link {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

body.crm-theme-dark .global-topbar {
  background: var(--shell-nav-surface);
  color: var(--ink);
  border-color: var(--line);
}

body.crm-theme-dark .user-menu-dropdown {
  background: #202a38;
  border-color: var(--line);
}

body.crm-theme-dark #globalSearch {
  background: #273244;
  color: var(--ink);
  border-color: var(--line);
}

body.crm-theme-dark .global-search-results {
  background: rgba(28, 38, 52, 0.98);
  border-color: rgba(90, 109, 132, 0.72);
}

body.crm-theme-dark .global-search-result {
  background: linear-gradient(180deg, #212b3a 0%, #1b2431 100%);
  color: var(--ink);
}

body.crm-theme-dark .global-search-result:hover,
body.crm-theme-dark .global-search-result:focus {
  background: rgba(127, 180, 255, 0.14);
}

@media (max-width: 1180px) {
  .global-topbar {
    grid-template-columns: 1fr;
  }

  .global-topbar__middle {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

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

  .modal-shell--stacked-left .modal-card,
  .modal-shell--stacked-right .modal-card {
    width: 100vw;
  }

  #globalSearch {
    width: 180px;
    max-width: 180px;
    min-width: 180px;
  }
}

/* HubSpot-inspired shell overhaul */
:root {
  --shell-sidebar-width: 244px;
  --shell-sidebar-collapsed-width: 72px;
  --shell-topbar-height: 48px;
  --shell-nav-surface: linear-gradient(180deg, #213a5a 0%, #1f3654 100%);
  --shell-nav-border: rgba(255, 255, 255, 0.08);
  --shell-nav-text: #eef5ff;
  --shell-nav-muted: rgba(231, 239, 248, 0.68);
  --hubspot-bg: #f5f8fa;
  --hubspot-surface: #ffffff;
  --hubspot-surface-alt: #f7fafc;
  --hubspot-border: #dfe7ef;
  --hubspot-border-strong: #c7d3e0;
  --hubspot-text: #213343;
  --hubspot-muted: #587387;
  --hubspot-blue: #2d8cff;
  --hubspot-blue-strong: #1273ea;
  --hubspot-navy: #243b53;
  --hubspot-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.06);
}

body {
  background: var(--hubspot-bg);
  color: var(--hubspot-text);
  overflow: hidden;
  font-family: "Inter", "Plus Jakarta Sans", sans-serif;
}

body.crm-theme-dark {
  --hubspot-bg: #11161f;
  --hubspot-surface: #1a2230;
  --hubspot-surface-alt: #202b3b;
  --hubspot-border: #2f3c51;
  --hubspot-border-strong: #42526a;
  --hubspot-text: #e6edf7;
  --hubspot-muted: #9aa9bd;
  --hubspot-blue: #7fb4ff;
  --hubspot-blue-strong: #5a9bff;
  --hubspot-navy: #171f2b;
  --hubspot-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  --surface-muted: #253244;
  --shell-nav-surface: linear-gradient(180deg, #18212e 0%, #141c28 100%);
  --shell-nav-border: rgba(148, 163, 184, 0.1);
  --shell-nav-text: #e8eef8;
  --shell-nav-muted: rgba(168, 182, 202, 0.78);
}

body,
body.crm-theme-light,
body:not(.crm-theme-dark) {
  --surface: var(--hubspot-surface);
  --surface-soft: var(--hubspot-surface-alt);
  --surface-muted: #eef3f8;
  --line: var(--hubspot-border);
  --line-strong: var(--hubspot-border-strong);
  --ink: var(--hubspot-text);
  --muted: var(--hubspot-muted);
  --accent: #ff7a59;
  --accent-strong: #ea5c3d;
  --shadow: var(--hubspot-shadow);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
}

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

.sidebar {
  position: sticky;
  top: 0;
  align-self: stretch;
  height: 100vh;
  max-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  border-right: 1px solid var(--shell-nav-border);
  border-radius: 0;
  overflow: hidden;
  background: var(--shell-nav-surface);
  box-shadow: none;
}

.sidebar-top {
  min-height: 0;
  padding: 12px 12px 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.brand-block {
  padding: 10px 12px 12px;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.brand-mark-row {
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff7a59 0%, #ff5c35 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: none;
}

.brand-meta .eyebrow,
.sidebar .eyebrow,
.sidebar .card-label {
  color: var(--shell-nav-muted);
}

.brand-title {
  margin: 2px 0 0;
  color: #ffffff;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-copy {
  margin: 8px 0 0;
  color: rgba(230, 239, 250, 0.72);
  font-size: 0.86rem;
  line-height: 1.5;
}

.sidebar-nav-shell {
  min-height: 0;
  overflow: auto;
  padding: 8px 6px 12px;
  border-radius: 0;
  border: 0;
  background: transparent;
  scrollbar-width: thin;
}

.sidebar-nav-shell::-webkit-scrollbar {
  width: 8px;
}

.sidebar-nav-shell::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.sidebar-nav {
  gap: 5px;
}

.nav-group {
  gap: 4px;
}

.nav-chip,
.nav-subchip {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: rgba(241, 245, 249, 0.84);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.nav-chip {
  padding: 8px 10px;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-subchip {
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(214, 226, 241, 0.78);
}

.nav-chip:hover,
.nav-subchip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-chip.is-active,
.nav-subchip.is-active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: none;
}

.nav-chip__icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.68rem;
}

.nav-submenu {
  gap: 3px;
  padding: 6px 0 2px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-submenu-label {
  padding: 4px 10px 2px;
  color: rgba(214, 226, 241, 0.54);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.sidebar-bottom {
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-toggle-button {
  width: 100%;
  min-height: 36px;
  border-radius: 9px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-toggle-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.main-panel {
  min-width: 0;
  min-height: 100vh;
  max-height: 100vh;
  display: grid;
  grid-template-rows: var(--shell-topbar-height) minmax(0, 1fr);
  overflow: hidden;
  background: var(--hubspot-bg);
}

.global-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: var(--shell-topbar-height);
  height: var(--shell-topbar-height);
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 4px 15px;
  border: 0;
  border-bottom: 1px solid var(--shell-nav-border);
  border-radius: 0;
  margin: 0;
  background: var(--shell-nav-surface);
  box-shadow: none;
  backdrop-filter: none;
}

.global-topbar__left,
.global-topbar__middle,
.global-topbar__right {
  min-width: 0;
  gap: 10px;
}

.global-topbar__left {
  justify-content: flex-start;
}

.global-topbar__middle {
  justify-content: flex-start;
}

.global-topbar__right {
  justify-content: flex-end;
}

.topbar-context .eyebrow {
  margin: 0 0 2px;
  color: var(--shell-nav-muted);
}

.global-topbar h2 {
  color: var(--shell-nav-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.05;
}

#topbarTitle {
  color: var(--shell-nav-text) !important;
}

#globalSearch {
  width: min(420px, 100%);
  min-width: 240px;
  max-width: 420px;
  height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

#globalSearch::placeholder {
  color: rgba(233, 241, 251, 0.72);
}

#globalSearch:focus {
  outline: none;
  border-color: rgba(147, 197, 253, 0.6);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

.global-search-shell {
  position: relative;
  width: min(420px, 100%);
  min-width: 240px;
  max-width: 420px;
}

.global-search-shell #globalSearch {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 2500;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(203, 215, 229, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(12px);
}

.global-search-results.is-hidden {
  display: none;
}

.global-search-results__section {
  display: grid;
  gap: 6px;
}

.global-search-result {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--ink);
}

.global-search-result strong {
  font-size: 0.92rem;
}

.global-search-result span,
.global-search-empty {
  font-size: 0.82rem;
  color: var(--muted);
}

.global-search-result:hover,
.global-search-result:focus {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, white);
}

.topbar-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.topbar-context-actions,
.topbar-context-cluster {
  gap: 8px;
}

.topbar-context-chip {
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.topbar-context-chip__label {
  color: rgba(231, 239, 248, 0.62);
}

.topbar-context-chip strong {
  color: #ffffff;
}

.user-menu-button,
.global-topbar .ghost-button,
.topbar-context-cluster .secondary-button--compact {
  min-height: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
}

.user-menu-button:hover,
.global-topbar .ghost-button:hover,
.topbar-context-cluster .secondary-button--compact:hover {
  background: rgba(255, 255, 255, 0.12);
}

.user-menu-button__avatar {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.user-menu-dropdown {
  border-radius: 12px;
  border-color: var(--hubspot-border);
  background: var(--hubspot-surface);
}

.panel-section {
  display: none;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 18px 22px 22px;
  background: var(--hubspot-bg);
}

.panel-section.is-visible {
  display: block;
}

.stats-grid,
.panel-grid,
.workspace-panel,
.report-grid,
.report-split,
.template-builder__grid,
.agent-project-grid,
.panel-grid--overview-top,
.panel-grid--overview-main {
  width: 100%;
}

#agent.panel-section.is-visible {
  display: grid;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#agentWorkspace {
  min-height: 0;
  height: 100%;
}

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

.section-kicker {
  margin: 0 0 6px;
  color: var(--hubspot-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h3,
.entry-form h4,
.workspace-section__header h4,
.admin-title,
.detail-section-title,
.detail-title h4,
.overview-project-card h4,
.overview-insight-card h4,
.global-topbar h2,
.brand-title {
  margin: 0;
  color: var(--hubspot-text);
  font-family: "Manrope", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.workspace-copy,
.detail-caption,
.render-summary,
.section-heading p:not(.section-kicker) {
  color: var(--hubspot-muted);
}

input,
select,
textarea {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--hubspot-border);
  background: #ffffff;
  color: var(--hubspot-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

textarea {
  min-height: 92px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(45, 140, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.14);
}

.primary-button,
.secondary-button,
.ghost-button,
.assign-toolbar button,
.assignment-actions button,
.contact-pool-footer .secondary-button,
.workspace-header__meta button {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.primary-button {
  border: 1px solid var(--hubspot-blue-strong);
  background: linear-gradient(180deg, var(--hubspot-blue) 0%, var(--hubspot-blue-strong) 100%);
  color: #ffffff;
}

.primary-button:hover {
  background: linear-gradient(180deg, #1e84ff 0%, #0e6be0 100%);
}

.secondary-button,
.ghost-button,
.assign-toolbar button,
.workspace-header__meta button {
  border: 1px solid var(--hubspot-border);
  background: #ffffff;
  color: var(--hubspot-text);
}

.secondary-button:hover,
.ghost-button:hover,
.assign-toolbar button:hover,
.workspace-header__meta button:hover {
  background: #e7eff8;
  border-color: var(--hubspot-border-strong);
}

.badge,
.status-pill {
  border-radius: 999px;
  min-height: 24px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge {
  border: 1px solid var(--hubspot-border);
  background: #f7fafc;
  color: var(--hubspot-muted);
}

.status-pill {
  border: 1px solid color-mix(in srgb, var(--status-color, #2d8cff) 18%, var(--hubspot-border));
  background: color-mix(in srgb, var(--status-color, #2d8cff) 12%, #ffffff);
}

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

.stat-card,
.overview-stat-card,
.agent-launcher-stat {
  border-radius: 12px;
}

.stat-card,
.overview-stat-card {
  padding: 14px 16px;
}

.stat-card p,
.overview-stat-card p {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hubspot-muted);
}

.stat-card h3,
.overview-stat-card h3 {
  margin: 6px 0 2px;
  font-size: 1.5rem;
  line-height: 1;
}

.contact-pool-list,
.contact-pool-list--agent {
  min-height: 0;
}

.crm-table-shell {
  border-radius: 10px;
  overflow: auto;
}

.contact-pool-row {
  min-height: 42px;
  border-bottom: 1px solid rgba(223, 231, 239, 0.9);
  background: transparent;
}

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

.contact-pool-row--header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 38px;
  padding-top: 0;
  background: #f8fbfd;
}

.contact-pool-cell,
.contact-pool-header-cell {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 0.84rem;
}

.contact-pool-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-pool-header-cell {
  color: var(--hubspot-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.contact-pool-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8f1fb;
  color: #214b76;
  font-size: 0.68rem;
  font-weight: 700;
}

.contact-pool-identity__text {
  font-weight: 600;
}

.contact-column-resizer {
  width: 10px;
  min-width: 10px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(223, 231, 239, 0) 0%, rgba(111, 149, 188, 0.28) 40%, rgba(111, 149, 188, 0.28) 60%, rgba(223, 231, 239, 0) 100%);
  opacity: 0.6;
}

.contact-column-resizer:hover {
  opacity: 1;
}

.contact-columns-option {
  gap: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
}

.checkbox-line,
.contact-columns-option {
  color: var(--hubspot-text);
}

.checkbox-line {
  gap: 8px;
  font-size: 0.86rem;
  line-height: 1.25;
}

.checkbox-line input[type="checkbox"],
.contact-columns-option input[type="checkbox"],
input[type="checkbox"].substituted {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin: 0;
  border-radius: 3px;
  border: 1px solid #90a4b7;
  background-color: #ffffff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0;
  box-shadow: 0 0 0 0.03em rgba(0, 0, 0, 0.08), 0 0.04em 0.12em -0.03em rgba(0, 0, 0, 0.14) inset;
  transition: border-color 120ms ease, background-color 120ms ease, background-size 120ms ease, box-shadow 120ms ease;
}

.checkbox-line input[type="checkbox"]:checked,
.contact-columns-option input[type="checkbox"]:checked,
input[type="checkbox"].substituted:checked {
  border-color: var(--hubspot-blue-strong);
  background-color: var(--hubspot-blue-strong);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0 0 9 9'%3E%3Crect fill='white' x='0' y='4.3' transform='matrix(-0.707 -0.7072 0.7072 -0.707 0.5891 10.4702)' width='4.3' height='1.6' /%3E%3Crect fill='white' x='2.2' y='2.9' transform='matrix(-0.7071 0.7071 -0.7071 -0.7071 12.1877 2.9833)' width='6.1' height='1.7' /%3E%3C/svg%3E");
  background-size: 8px;
  box-shadow: 0 0 0 0.03em rgba(18, 115, 234, 0.16), 0 0.04em 0.12em -0.03em rgba(18, 115, 234, 0.18) inset;
}

.checkbox-line input[type="checkbox"]:focus-visible,
.contact-columns-option input[type="checkbox"]:focus-visible,
input[type="checkbox"].substituted:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.22);
}

.checkbox-line input[type="checkbox"]:disabled,
.contact-columns-option input[type="checkbox"]:disabled,
input[type="checkbox"].substituted:disabled {
  opacity: 0.52;
}

.workspace-tabs {
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #edf3f8;
}

.workspace-tabs button,
.agent-detail-tab {
  min-height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--hubspot-muted);
  font-weight: 600;
}

.workspace-tabs button.is-active,
.agent-detail-tab.is-active {
  background: #ffffff;
  border-color: var(--hubspot-border);
  color: var(--hubspot-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.panel-card--agent-detail {
  height: 100%;
  padding: 14px;
}

.agent-record-shell {
  min-height: calc(100vh - var(--shell-topbar-height) - 58px);
  display: grid;
  gap: 14px;
}

.detail-card--hero-compact {
  padding: 14px 16px;
}

.agent-record-layout {
  display: grid;
  grid-template-columns: minmax(290px, 1fr) minmax(500px, 1.45fr) minmax(310px, 0.92fr);
  gap: 14px;
  min-height: 0;
  align-items: stretch;
}

.agent-record-column {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.agent-record-column__header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--hubspot-border);
  background: #fbfdff;
}

.agent-record-column__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.agent-record-column__scroll--center {
  padding-top: 14px;
}

.agent-contact-summary {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--hubspot-border);
  background: #f8fbfd;
}

.agent-detail-stack {
  gap: 14px;
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  min-height: max-content;
}

.agent-detail-stack > * {
  width: 100%;
  align-self: start;
}

.agent-insight-card {
  border-radius: 12px;
  border: 1px solid var(--hubspot-border);
  background: #ffffff;
}

.detail-card--wrapup {
  border-color: rgba(45, 140, 255, 0.24);
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9fe 100%);
}

.detail-card--wrapup-sticky {
  position: sticky;
  top: 0;
  align-self: start;
}

.agent-wrapup-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(45, 140, 255, 0.14);
  background: linear-gradient(180deg, rgba(45, 140, 255, 0.06), rgba(45, 140, 255, 0));
}

.agent-wrapup-highlight {
  margin: 14px 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(45, 140, 255, 0.18);
  background: rgba(45, 140, 255, 0.05);
}

.detail-card--wrapup .assignment-fields-grid,
.detail-card--wrapup .assignment-actions,
.detail-card--wrapup .agent-wrapup-summary {
  padding-inline: 16px;
}

.detail-card--wrapup .dialing-embed-card {
  margin: 0 16px 16px;
}

.detail-card--wrapup .assignment-actions {
  padding-bottom: 16px;
}

.agent-list-shell {
  height: calc(100vh - var(--shell-topbar-height) - 166px);
  min-height: 0;
}

.agent-list-shell__main {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

.agent-record-shell--dense {
  gap: 12px;
}

.agent-record-hero {
  display: grid;
  gap: 12px;
}

.agent-record-hero__identity {
  display: grid;
  gap: 4px;
}

.agent-record-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-record-toolbar__group--hero {
  align-self: flex-start;
}

.agent-record-layout--dense {
  grid-template-columns: minmax(300px, 0.92fr) minmax(560px, 1.45fr) minmax(340px, 1fr);
  gap: 12px;
}

.agent-record-center-header {
  display: grid;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--hubspot-border);
  background: linear-gradient(180deg, #fcfdff 0%, #f8fbfe 100%);
}

.agent-record-fact-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.agent-record-fact {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--hubspot-border);
  background: #f8fbfd;
}

.agent-record-fact span {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.agent-record-fact strong {
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--ink);
}

.agent-wrapup-highlight--priority {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, white), #ffffff 72%);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--hubspot-border));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.agent-wrapup-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 2px;
}

.agent-wrapup-kpi {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(45, 140, 255, 0.05);
  border: 1px solid rgba(45, 140, 255, 0.16);
}

.agent-wrapup-kpi span {
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.agent-wrapup-kpi strong {
  font-size: 0.86rem;
  line-height: 1.3;
}

.assignment-actions--wrapup {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(247, 250, 255, 0.92) 24%);
}

.agent-record-shell--hubspot {
  gap: 0;
  height: 100%;
  overflow: hidden;
}

.agent-record-layout--hubspot {
  grid-template-columns: minmax(320px, 0.9fr) minmax(620px, 1.55fr) minmax(360px, 1fr);
  min-height: calc(100vh - var(--shell-topbar-height) - 92px);
  height: calc(100vh - var(--shell-topbar-height) - 92px);
  align-items: stretch;
}

.agent-record-shell--hubspot .agent-record-column,
.agent-record-shell--hubspot .agent-record-rail,
.agent-record-shell--hubspot .agent-record-center-pane {
  min-height: 0;
  height: 100%;
}

.agent-record-shell--hubspot .agent-record-rail--right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.agent-record-column--left,
.agent-record-rail--left {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.agent-record-shell--hubspot .agent-record-rail--left {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.agent-record-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.agent-record-rail__header {
  display: grid;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--hubspot-border);
  background: linear-gradient(180deg, #fcfdff 0%, #f7fbfe 100%);
}

.agent-record-breadcrumbbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-record-breadcrumbbar__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-record-breadcrumbbar__nav--split {
  width: 100%;
  justify-content: space-between;
}

.agent-record-breadcrumbbar__back,
.agent-record-breadcrumbbar__actions {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}

.agent-record-breadcrumbbar__back::before {
  content: "‹";
  margin-right: 8px;
  font-size: 1.2em;
}

.agent-record-rail__scroll {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding: 10px 14px 26px;
}

.agent-record-shell--hubspot .agent-record-rail--left .agent-record-rail__scroll {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  padding-bottom: 140px;
}

.agent-contact-summary--hubspot {
  border-radius: 18px;
  border-color: color-mix(in srgb, var(--accent) 18%, var(--hubspot-border));
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.agent-contact-summary--hubspot .agent-contact-summary__avatar {
  width: 56px;
  height: 56px;
  font-size: 1rem;
}

.agent-contact-summary--hubspot .agent-contact-summary__identity strong {
  font-size: 1.05rem;
}

.agent-contact-summary--hubspot .agent-contact-summary__identity span {
  font-size: 0.9rem;
}

.agent-contact-company-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.agent-contact-company-link:hover,
.agent-contact-company-link:focus-visible {
  color: #007a94;
  text-decoration: underline;
}

.agent-contact-summary__email {
  display: inline-flex;
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.agent-contact-quick-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding-top: 4px;
}

.agent-contact-quick-action {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--hubspot-muted);
  border: 0;
  background: transparent;
  padding: 0;
}

.agent-contact-quick-action span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--hubspot-border);
  background: linear-gradient(180deg, #eff6fc 0%, #e7f1fb 100%);
  color: #587a9d;
  font-size: 0.88rem;
  font-weight: 700;
}

.agent-contact-quick-action small {
  font-size: 0.76rem;
  font-weight: 600;
  color: inherit;
}

.agent-rail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
}

.agent-rail-section-header h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--hubspot-ink);
}

.agent-record-fact-strip--stacked {
  grid-template-columns: 1fr;
}

.agent-record-workspace-tabshell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--hubspot-border);
  background: transparent;
}

.agent-record-workspace-tabshell__links,
.agent-record-workspace-tabshell__nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-record-workspace-tabshell__links {
  justify-content: flex-start;
}

.agent-record-workspace-tabshell__nav {
  justify-content: flex-end;
}

.agent-record-column__scroll--center {
  padding: 18px 20px 20px;
  background: #f7fafc;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.agent-record-customize-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.agent-detail-tabs--hubspot {
  gap: 0;
  border: 1px solid var(--hubspot-border);
  border-radius: 0;
  overflow: hidden;
  background: #f8fbfd;
  flex: 1 1 auto;
}

.agent-detail-tabs--hubspot .agent-detail-tab {
  flex: 1 1 0;
  border: 0;
  border-right: 1px solid var(--hubspot-border);
  border-radius: 0;
  padding: 13px 16px;
  background: transparent;
  color: var(--hubspot-muted);
}

.agent-detail-tabs--hubspot .agent-detail-tab:last-child {
  border-right: 0;
}

.agent-detail-tabs--hubspot .agent-detail-tab.is-active {
  background: #ffffff;
  color: var(--hubspot-ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.agent-record-center-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.agent-record-layout-linkbar {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  align-items: center;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  position: fixed;
  right: 34px;
  bottom: 108px;
  z-index: 18;
  white-space: nowrap;
}

.agent-record-column__footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--hubspot-border);
  background: #ffffff;
  flex: none;
  position: relative;
  z-index: 2;
}

.agent-record-column__footer .floating-filter-link,
.agent-record-column__footer .agent-layout-link {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  margin: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.agent-workspace-project-content .agent-record-column__footer .floating-filter-link,
.agent-workspace-project-content .agent-record-column__footer .agent-layout-link {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  margin-left: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.contact-detail-grid__footerline {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 8px;
}

.contact-detail-grid--compact .contact-detail-grid__footerline {
  grid-column: 1 / -1;
}

.contact-detail-grid__footerline .floating-filter-link,
.contact-detail-grid__footerline .agent-layout-link,
.agent-workspace-project-content .contact-detail-grid__footerline .floating-filter-link,
.agent-workspace-project-content .contact-detail-grid__footerline .agent-layout-link {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
}

.agent-layout-link {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0;
  text-decoration: none;
}

.agent-record-layout-linkbar .floating-filter-link,
.agent-record-layout-linkbar .agent-layout-link {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  padding: 0;
  min-height: 0;
  text-decoration: none;
}

.contact-history-list {
  display: grid;
  gap: 14px;
}

.agent-hubspot-card {
  display: grid;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--hubspot-border);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(13, 36, 66, 0.02);
}

.agent-hubspot-card--top-aligned {
  align-content: start;
}

.agent-hubspot-card--highlights {
  max-height: 80px;
  overflow: hidden;
  align-content: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

.agent-hubspot-activity-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--hubspot-border);
  background: #f9fbfd;
}

.agent-hubspot-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-hubspot-card__header h4 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--hubspot-ink);
}

.agent-hubspot-card__header--spread {
  justify-content: space-between;
}

.agent-hubspot-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.agent-hubspot-highlight {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.agent-hubspot-highlight span {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hubspot-muted);
}

.agent-hubspot-highlight strong {
  font-size: 1rem;
  font-weight: 500;
  color: var(--hubspot-ink);
}

.agent-hubspot-activity-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.agent-hubspot-search {
  flex: 1 1 260px;
  min-width: 220px;
}

.agent-hubspot-search input {
  width: 100%;
}

.agent-hubspot-filterchips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.agent-hubspot-filterchip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: #dff2fb;
  color: #0f7ca6;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.agent-history-list--previous-leads {
  align-content: start;
}

.agent-history-item--previous-lead {
  align-items: stretch;
}

.agent-history-item__main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.agent-history-item__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-history-item__note {
  border-left: 3px solid #d7e5f2;
  color: #33475b;
  font-size: 0.92rem;
  line-height: 1.45;
  padding-left: 10px;
}

.agent-history-item__side {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
}

.agent-new-contact-form {
  display: grid;
  gap: 14px;
  align-content: start;
}

.agent-hubspot-timeline {
  display: grid;
  gap: 12px;
}

.agent-hubspot-event {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.agent-hubspot-event__marker {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #9fb4c9;
  margin-top: 16px;
  position: relative;
}

.agent-hubspot-event__marker::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 1px;
  height: calc(100% + 16px);
  background: #d8e3ef;
  transform: translateX(-50%);
}

.agent-hubspot-event:last-child .agent-hubspot-event__marker::after {
  display: none;
}

.agent-hubspot-event--email .agent-hubspot-event__marker {
  background: #3bbfa6;
}

.agent-hubspot-event--response .agent-hubspot-event__marker {
  background: #0091ae;
}

.agent-hubspot-event--note .agent-hubspot-event__marker {
  background: #ff7a59;
}

.agent-hubspot-event--status .agent-hubspot-event__marker {
  background: #516f90;
}

.agent-hubspot-event__card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--hubspot-border);
  background: #ffffff;
}

.agent-hubspot-event__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.agent-hubspot-event__header strong {
  color: var(--hubspot-ink);
}

.agent-hubspot-event__header span,
.agent-hubspot-event__card p {
  color: var(--hubspot-muted);
}

.agent-hubspot-event__body {
  color: var(--hubspot-ink);
  line-height: 1.6;
}

.contact-sequence-history {
  display: grid;
  gap: 16px;
}

.contact-sequence-card {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 255, 0.96));
  box-shadow: var(--shadow-soft);
}

.contact-sequence-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.contact-sequence-card__header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-sequence-card__status--success {
  background: rgba(20, 145, 94, 0.12);
  color: #106f4f;
}

.contact-sequence-card__status--warning {
  background: rgba(198, 123, 0, 0.14);
  color: #9b6100;
}

.contact-sequence-card__status--danger {
  background: rgba(210, 63, 63, 0.12);
  color: #9f2a2a;
}

.contact-sequence-card__status--neutral {
  background: rgba(18, 115, 234, 0.1);
  color: #0f62d6;
}

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

.contact-sequence-card__stats div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.contact-sequence-card__stats span {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.contact-sequence-card__stats strong {
  font-size: 0.95rem;
  line-height: 1.35;
}

.contact-sequence-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.contact-sequence-step {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.contact-sequence-step.is-current {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, white);
}

.contact-sequence-step span,
.contact-sequence-step small {
  color: var(--muted);
}

.contact-sequence-list {
  display: grid;
  gap: 12px;
}

.contact-sequence-entry {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.contact-sequence-entry--success {
  border-color: rgba(20, 145, 94, 0.24);
  background: rgba(20, 145, 94, 0.05);
}

.contact-sequence-entry--warning {
  border-color: rgba(198, 123, 0, 0.28);
  background: rgba(198, 123, 0, 0.06);
}

.contact-sequence-entry--danger {
  border-color: rgba(210, 63, 63, 0.26);
  background: rgba(210, 63, 63, 0.05);
}

.contact-sequence-entry__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.contact-sequence-entry__header p,
.contact-sequence-entry__subject,
.contact-sequence-entry__error {
  margin: 4px 0 0;
  font-size: 0.9rem;
}

.contact-sequence-entry__subject {
  color: var(--muted);
}

.contact-sequence-entry__error {
  color: #9f2a2a;
}

.contact-sequence-entry__status {
  white-space: nowrap;
}

.contact-history-item {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
  box-shadow: var(--shadow-soft);
}

.contact-history-item__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.contact-history-item__header p,
.contact-history-item__copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.contact-history-change {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.contact-history-change span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-history-change strong {
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
}

@media (max-width: 900px) {
  .contact-history-change-grid {
    grid-template-columns: 1fr;
  }

  .contact-sequence-card__stats {
    grid-template-columns: 1fr 1fr;
  }

  .agent-record-layout-linkbar {
    gap: 10px;
    padding-bottom: 14px;
  }
}

.agent-side-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--hubspot-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
}

.agent-side-card--project-questions {
  gap: 14px;
  padding: 16px;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.agent-side-card--context-nav {
  gap: 10px;
  padding: 12px;
  border: 0;
  background: linear-gradient(180deg, #192533 0%, #121c28 100%);
  box-shadow: 0 12px 28px rgba(8, 15, 26, 0.22);
}

.topbar-context-actions--agent-detail {
  justify-content: flex-start;
}

.topbar-context-chip--agent-detail {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.topbar-context-cluster--agent-detail {
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.agent-context-button {
  min-height: 38px;
  border: 1px solid #d8e3ef;
  color: #35526d !important;
  background: #ffffff;
  box-shadow: none;
}

.agent-context-button:hover,
.agent-context-button:focus-visible {
  color: #163a59 !important;
  background: #f7fafc;
}

.agent-context-button--project {
  background: #ff7a59;
  border-color: #ff7a59;
  color: #ffffff !important;
  margin-right: 2px;
}

.agent-context-button--project:hover,
.agent-context-button--project:focus-visible {
  background: #f36d4c;
  border-color: #f36d4c;
  color: #ffffff !important;
}

.agent-context-button--list {
  background: #eef5fc;
  border-color: #cfe0ef;
  color: #1a5277 !important;
  margin-right: auto;
}

.agent-context-button--list:hover,
.agent-context-button--list:focus-visible {
  background: #e1edf8;
  color: #163a59 !important;
}

.agent-context-button--nav {
  background: #ffffff;
}

.agent-context-button--nav:hover,
.agent-context-button--nav:focus-visible {
  background: #f7fafc;
}

.agent-record-rightpane {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid var(--hubspot-border);
  background: #ffffff;
}

.agent-record-rightpane__scroll {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px 14px 18px;
  border-bottom: 1px solid #dce8f3;
}

.agent-record-rightpane__footer {
  position: relative;
  z-index: 2;
  padding: 12px 14px 14px;
  border-top: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, #f6f9fc 100%);
  box-shadow: 0 -8px 22px rgba(33, 51, 67, 0.08);
}

.agent-record-rail--right {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.agent-association-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--hubspot-border);
  border-radius: 0;
  background: #ffffff;
}

.agent-association-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-association-card__header h4 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--hubspot-ink);
}

.agent-association-card__add {
  color: var(--accent);
  font-weight: 700;
}

.agent-association-company {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--hubspot-border);
  background: #ffffff;
}

.agent-association-company__identity {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.agent-association-company__avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #edf4fb;
  color: #7f97ae;
  font-weight: 700;
}

.agent-association-company__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.agent-association-company__meta {
  display: grid;
  gap: 8px;
  color: var(--hubspot-muted);
  font-size: 0.9rem;
}

.agent-association-summary {
  display: grid;
  gap: 12px;
}

.agent-association-summary div {
  display: grid;
  gap: 4px;
}

.agent-association-summary span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hubspot-muted);
}

.agent-association-card__actions {
  display: flex;
  justify-content: flex-start;
}

.workspace-empty--compact {
  min-height: 0;
  padding: 24px 12px;
  border-radius: 10px;
}

.agent-wrapup-pane--hubspot {
  align-self: stretch;
}

.agent-record-rail--right .project-builder-field--half,
.agent-record-rail--right .project-ui-block--half {
  grid-column: span 12;
}

.agent-wrapup-pane {
  position: static;
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  align-self: start;
}

.agent-wrapup-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: -2px 0 4px;
}

.agent-wrapup-tab {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--hubspot-muted);
  font-weight: 700;
}

.agent-wrapup-tab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e7f1fb;
  color: #315678;
  font-size: 0.72rem;
  font-weight: 700;
}

.agent-wrapup-tab.is-active {
  color: var(--ink);
  border-bottom-color: #0fbfb6;
}

.agent-wrapup-panel {
  display: grid;
  gap: 14px;
}

.agent-wrapup-panel--dialer {
  min-height: 0;
}

.agent-wrapup-panel__block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.agent-wrapup-panel__block--questions {
  background: linear-gradient(180deg, #f9fcff 0%, #ffffff 100%);
}

.agent-wrapup-panel__block--dialer {
  min-height: 0;
}

.agent-dialer-tab-mount {
  display: grid;
  min-height: min(var(--dialer-height, 500px), 58vh);
  width: 100%;
}

.agent-dialer-tab-mount .global-dialer-embed {
  align-self: start;
}

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

.agent-wrapup-shortcut {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 56px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--hubspot-border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.agent-wrapup-shortcut:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--hubspot-border));
  background: linear-gradient(180deg, #ffffff 0%, #eef8ff 100%);
}

.assignment-actions--wrapup-fixed {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.assignment-actions--wrapup-fixed .primary-button,
.assignment-actions--wrapup-fixed .secondary-button,
.assignment-actions--wrapup-fixed .ghost-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  border-radius: 10px;
  font-weight: 800;
}

.assignment-actions--wrapup-fixed .primary-button {
  border-color: #00a4bd;
  background: #00a4bd;
  color: #ffffff;
}

.assignment-actions--wrapup-fixed .primary-button:hover,
.assignment-actions--wrapup-fixed .primary-button:focus-visible {
  border-color: #008aa1;
  background: #008aa1;
}

.assignment-actions--wrapup-fixed .secondary-button {
  border-color: #b7d8ee;
  background: #eaf6ff;
  color: #164e75;
}

.assignment-actions--wrapup-fixed .secondary-button:hover,
.assignment-actions--wrapup-fixed .secondary-button:focus-visible {
  border-color: #8fbfdf;
  background: #dff0fb;
}

.assignment-actions--wrapup-fixed .ghost-button {
  border: 1px solid #f5c0b3;
  background: #fff3ef;
  color: #a33a23;
}

.assignment-actions--wrapup-fixed .ghost-button:hover,
.assignment-actions--wrapup-fixed .ghost-button:focus-visible {
  background: #ffe8df;
  color: #7f2716;
}

.agent-company-location-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--hubspot-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.agent-company-location-card__picker {
  display: grid;
  gap: 6px;
}

.agent-company-location-card__picker span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hubspot-muted);
}

.agent-company-location-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--hubspot-border);
  border-radius: 12px;
  background: #ffffff;
}

.agent-company-location-preview__header,
.agent-company-location-preview__badges,
.agent-company-location-preview__meta,
.agent-company-location-preview__address {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-company-location-preview__meta,
.agent-company-location-preview__address {
  color: var(--hubspot-muted);
  font-size: 0.84rem;
}

.agent-company-tab-shell {
  display: grid;
  gap: 16px;
}

.agent-company-subtabs {
  display: inline-flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--hubspot-border);
  border-radius: 999px;
  background: #f4f8fc;
}

.agent-company-subtab {
  min-height: 34px;
  padding: 8px 14px;
  border: 0;
  border-right: 1px solid var(--hubspot-border);
  background: transparent;
  color: var(--hubspot-muted);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.agent-company-subtab:last-child {
  border-right: 0;
}

.agent-company-subtab.is-active {
  background: #ffffff;
  color: var(--hubspot-ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.agent-company-overview-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--hubspot-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(0, 164, 189, 0.13), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.agent-company-overview-hero--master {
  background:
    radial-gradient(circle at top right, rgba(255, 122, 89, 0.12), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.agent-company-overview-hero h4 {
  margin: 0 0 6px;
  color: var(--hubspot-ink);
  font-size: 1.25rem;
}

.agent-company-hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 180px;
  color: var(--hubspot-muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: right;
}

.agent-company-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.agent-company-kpi-card {
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--hubspot-border);
  border-radius: 16px;
  background: #ffffff;
}

.agent-company-kpi-card span,
.agent-company-source-row span {
  color: var(--hubspot-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-company-kpi-card strong {
  color: var(--hubspot-ink);
  font-size: 1.15rem;
  line-height: 1.15;
}

.agent-company-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.agent-company-source-row {
  display: grid;
  gap: 6px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--hubspot-border);
  border-radius: 14px;
  background: #ffffff;
}

.agent-company-source-row strong {
  color: var(--hubspot-ink);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.agent-company-source-row.is-empty {
  background: #f8fafc;
}

.agent-company-source-row.is-empty strong {
  color: var(--hubspot-muted);
}

.agent-company-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-company-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #c7ebf3;
  border-radius: 999px;
  background: #e8f8fb;
  color: var(--hubspot-ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.agent-company-chip small {
  color: var(--hubspot-muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.agent-company-chip--muted {
  border-color: var(--hubspot-border);
  background: #f4f8fc;
  color: var(--hubspot-muted);
}

.agent-company-location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.agent-company-location-tile {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--hubspot-border);
  border-radius: 14px;
  background: #ffffff;
}

.agent-company-location-tile strong {
  color: var(--hubspot-ink);
}

.agent-company-location-tile span,
.agent-company-location-tile small {
  color: var(--hubspot-muted);
  font-size: 0.82rem;
}

.agent-company-location-tile--muted {
  background: #f8fafc;
}

.agent-wrapup-panel__title {
  display: grid;
  gap: 4px;
}

.agent-wrapup-panel__title strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.agent-wrapup-panel__title span {
  color: var(--muted);
  font-size: 0.8rem;
}

.assignment-fields-grid--wrapup {
  gap: 12px;
}

.assignment-field--response {
  display: grid;
  gap: 6px;
}

.assignment-field--response > span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.agent-response-picker .filter-combobox__option {
  display: grid;
  gap: 3px;
  text-align: left;
}

.agent-response-picker .filter-combobox__option strong {
  font-size: 0.9rem;
  color: var(--ink);
}

.agent-response-picker .filter-combobox__option span {
  font-size: 0.75rem;
  color: var(--muted);
}

.agent-response-picker__rowhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.agent-response-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.agent-response-badge--neutral {
  background: #edf3f9;
  color: #46627e;
  border: 1px solid #d7e4f0;
}

.agent-response-badge--user {
  background: #eef7ff;
  color: #1760a6;
  border: 1px solid #cfe4fa;
}

.agent-response-badge--system {
  background: #f2f0ff;
  color: #5c46b3;
  border: 1px solid #ddd6ff;
}

.agent-response-badge--positive {
  background: #eaf8ef;
  color: #167244;
  border: 1px solid #ccebd8;
}

.agent-response-badge--danger {
  background: #fff1f2;
  color: #b44757;
  border: 1px solid #f2d1d7;
}

.agent-wrapup-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.agent-wrapup-preview--empty {
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.agent-wrapup-preview__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.agent-wrapup-preview__header strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.agent-wrapup-effects {
  display: grid;
  gap: 8px;
}

.agent-wrapup-effect {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.agent-wrapup-effect > span {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 78%, white);
}

.agent-wrapup-effect p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.assignment-field--notes {
  grid-column: 1 / -1;
}

.assignment-field--notes textarea {
  min-height: 140px;
}

.assignment-field--notes textarea,
.agent-wrapup-pane textarea[name="notes"] {
  min-height: 48px;
  max-height: 96px;
  overflow-y: auto;
  resize: vertical;
}

.project-additional-creator {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fd 100%);
  margin-bottom: 14px;
}

.project-additional-editor-list {
  display: grid;
  gap: 12px;
}

.project-additional-editor-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.project-additional-editor-card__summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fafd 100%);
}

.project-additional-editor-card__summary::-webkit-details-marker {
  display: none;
}

.project-additional-editor-card__summary strong {
  display: block;
  color: var(--ink);
}

.project-additional-editor-card__summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.project-additional-editor-card[open] .project-additional-editor-card__summary {
  border-bottom: 1px solid var(--line);
}

.field-admin-row--stacked {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.field-required-indicator {
  display: inline-flex;
  margin-left: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

[data-project-additional-field].is-invalid {
  border-color: #c84d57;
  box-shadow: 0 0 0 1px rgba(200, 77, 87, 0.18);
  background: rgba(200, 77, 87, 0.05);
}

[data-project-additional-field].is-invalid input,
[data-project-additional-field].is-invalid select,
[data-project-additional-field].is-invalid textarea {
  border-color: #c84d57;
  box-shadow: 0 0 0 3px rgba(200, 77, 87, 0.12);
}

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

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

.contact-detail-grid--compact {
  gap: 8px;
}

.agent-record-rail--left .contact-detail-grid--compact {
  padding-top: 2px;
  padding-bottom: 50px;
}

.agent-hubspot-timeline {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.agent-field-input--readonly .agent-field-input__readonly {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #d8e4ef;
  border-radius: 10px;
  background: #f8fbfd;
  color: var(--ink);
  font-size: 0.86rem;
}

.agent-record-contact-id-fixed {
  position: fixed;
  left: 24px;
  bottom: 18px;
  z-index: 18;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--hubspot-muted);
  background: rgba(255, 255, 255, 0.94);
  padding: 6px 10px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.contact-detail-grid--compact label {
  gap: 4px;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hubspot-muted);
}

.contact-detail-grid--compact input,
.contact-detail-grid--compact select,
.contact-detail-grid--compact textarea {
  padding: 8px 10px;
  font-size: 0.86rem;
}

.contact-detail-grid--compact textarea {
  min-height: 88px;
}

.agent-field-input {
  position: relative;
  display: grid;
  gap: 6px;
}

.agent-field-input__action {
  margin-left: auto;
}

.agent-field-input__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.agent-field-input__row .ghost-button--tight {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.agent-field-call-button {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--hubspot-border));
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fdff 0%, #e8f8ff 100%);
  color: #006b8f;
  font-size: 1.02rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.agent-field-call-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(0, 143, 179, 0.14);
}

.agent-field-input > span:first-child,
.agent-field-input__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ghost-button--tight {
  padding: 2px 8px;
  min-height: 0;
  font-size: 0.76rem;
}

.template-merge-picker,
.template-preview-contact {
  display: inline-grid;
  gap: 0.3rem;
  min-width: 220px;
  font-size: 0.78rem;
  color: var(--muted);
}

.template-merge-picker span,
.template-merge-token-preview span,
.template-preview-contact span {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.template-merge-picker input,
.template-preview-contact select {
  min-height: 36px;
}

.template-merge-token-preview {
  display: inline-grid;
  gap: 0.3rem;
  min-width: 240px;
  font-size: 0.78rem;
  color: var(--muted);
}

.template-merge-token-preview code {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-toolbar {
  align-items: end;
}

.email-verify-embed {
  min-height: 68vh;
  height: 68vh;
  border: 1px solid var(--hubspot-border);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.agent-record-rail--left .agent-side-card,
.agent-record-rail--right .agent-side-card {
  gap: 12px;
  padding: 14px;
}

.agent-list-table-shell {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.contact-pool-list--agent {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  flex: 1 1 auto;
  overflow: hidden;
  gap: 10px;
  padding-bottom: 0;
}

.contact-list-shell .agent-list-table-shell {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.contact-list-shell .contact-pool-table-wrap {
  min-height: 0;
  overflow: auto;
  height: 100%;
  max-height: 100%;
  overscroll-behavior: contain;
}

.contact-list-shell .contact-pool-table {
  min-height: 0;
  width: max-content;
  min-width: 100%;
}

.contact-list-shell .agent-list-shell__main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  max-height: 100%;
}

.contact-list-shell .contact-pool-list--agent {
  display: block;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.company-directory-footer-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

#companies.panel-section.is-visible {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  overflow-x: hidden;
}

#companies .company-directory-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) minmax(0, auto);
  min-height: 0;
  overflow: hidden;
}

#companies .company-directory-list {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#companies #companyWorkspace:not(.is-hidden) {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 24px;
}

#companies .company-directory-table-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  background: #ffffff;
}

#companies .company-directory-table {
  width: max-content;
  min-width: 100%;
  border: 0;
  border-radius: 0;
}

#companies .company-directory-pagination,
.agent-company-directory-pagination {
  position: static;
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 100%;
  margin-top: 0;
  padding: 8px 12px 0;
  border-top: 1px solid #dbe5ee;
  background: #ffffff;
  box-shadow: 0 -8px 18px rgba(33, 51, 67, 0.06);
}

#companies .company-directory-pagination .pagination-bar,
.agent-company-directory-pagination .pagination-bar {
  margin-inline: auto;
}

#companies .company-directory-pagination.contact-pool-footer--agent,
.agent-company-directory-pagination.contact-pool-footer--agent {
  position: static !important;
  left: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  z-index: 4 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 100% !important;
  min-height: 48px !important;
  padding: 6px 14px !important;
  border: 0 !important;
  border-top: 1px solid #dbe5ee !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: 0 -8px 18px rgba(33, 51, 67, 0.08) !important;
}

#companies .company-directory-pagination > .pagination-bar,
.agent-company-directory-pagination > .pagination-bar {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 13px !important;
  min-height: 34px !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #0091ae !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
}

#companies .company-directory-pagination .pagination-pages,
.agent-company-directory-pagination .pagination-pages {
  display: inline-flex !important;
  align-items: center !important;
  gap: 13px !important;
}

#companies .company-directory-pagination .pagination-nav,
#companies .company-directory-pagination .pagination-page,
.agent-company-directory-pagination .pagination-nav,
.agent-company-directory-pagination .pagination-page {
  min-width: 24px !important;
  height: 28px !important;
  min-height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #0091ae !important;
  padding: 0 2px !important;
  box-shadow: none !important;
  font: inherit !important;
  line-height: 1 !important;
}

#companies .company-directory-pagination .pagination-nav:not(:disabled):hover,
#companies .company-directory-pagination .pagination-page:not(.is-active):hover,
.agent-company-directory-pagination .pagination-nav:not(:disabled):hover,
.agent-company-directory-pagination .pagination-page:not(.is-active):hover {
  background: #e5f8fb !important;
  color: #006f80 !important;
}

#companies .company-directory-pagination .pagination-nav:disabled,
.agent-company-directory-pagination .pagination-nav:disabled {
  color: #99acc2 !important;
  cursor: not-allowed !important;
}

#companies .company-directory-pagination .pagination-nav__arrow,
.agent-company-directory-pagination .pagination-nav__arrow {
  font-size: 1.5rem !important;
  font-weight: 400 !important;
  line-height: 0.8 !important;
}

#companies .company-directory-pagination .pagination-page.is-active,
.agent-company-directory-pagination .pagination-page.is-active {
  border: 1px solid #00a4bd !important;
  background: #dff7fb !important;
  color: #006f80 !important;
}

#companies .company-directory-pagination .pagination-ellipsis,
.agent-company-directory-pagination .pagination-ellipsis {
  color: #516f90 !important;
  font-weight: 800 !important;
}

#companies .company-directory-pagination .pagination-page-size,
.agent-company-directory-pagination .pagination-page-size {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-left: 8px !important;
}

#companies .company-directory-pagination .pagination-page-size select,
.agent-company-directory-pagination .pagination-page-size select {
  height: 30px !important;
  min-height: 30px !important;
  width: auto !important;
  min-width: 112px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #0091ae !important;
  padding: 0 20px 0 0 !important;
  box-shadow: none !important;
  font: inherit !important;
  font-weight: 800 !important;
}

#companies .company-directory-pagination .pagination-page-size select:hover,
.agent-company-directory-pagination .pagination-page-size select:hover {
  background: #e5f8fb !important;
}

.agent-filter-drawer {
  padding: 16px;
  border-left: 1px solid var(--hubspot-border);
}

.filter-box--agent-drawer {
  gap: 14px;
}

.filter-row-card {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  padding: 14px;
}

.floating-filter-actions {
  right: 22px;
  bottom: 12px;
}

.floating-filter-link {
  font-size: 0.82rem;
  color: var(--hubspot-muted);
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: var(--shell-sidebar-collapsed-width) minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
  width: var(--shell-sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-top {
  padding-inline: 8px;
}

body.sidebar-collapsed .sidebar-bottom {
  padding-inline: 8px;
}

body.sidebar-collapsed .sidebar,
body.sidebar-collapsed .sidebar-nav-shell {
  overflow-x: visible;
}

body.sidebar-collapsed .nav-chip {
  min-height: 38px;
}

.sidebar-hover-tooltip {
  position: fixed;
  transform: translateY(-50%);
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(18, 27, 40, 0.96);
  color: #f8fbff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 28px rgba(10, 16, 26, 0.34);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  z-index: 4000;
  pointer-events: none;
}

.sidebar-hover-tooltip.is-hidden {
  display: none;
}

body.sidebar-collapsed .nav-chip,
body.sidebar-collapsed .nav-subchip {
  position: relative;
  overflow: visible;
}

body.sidebar-collapsed .nav-chip[data-hover-label]:hover::after,
body.sidebar-collapsed .nav-subchip[data-hover-label]:hover::after,
body.sidebar-collapsed .nav-chip[data-hover-label]:hover::before,
body.sidebar-collapsed .nav-subchip[data-hover-label]:hover::before {
  content: none;
}

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

  .agent-record-layout {
    grid-template-columns: minmax(260px, 0.95fr) minmax(420px, 1.25fr) minmax(280px, 0.86fr);
  }

  .agent-record-layout--hubspot {
    grid-template-columns: minmax(280px, 0.92fr) minmax(440px, 1.35fr) minmax(300px, 0.95fr);
  }
}

@media (max-width: 1120px) {
  body {
    overflow: auto;
  }

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

  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
  }

  .main-panel {
    min-height: auto;
    max-height: none;
    height: auto;
    grid-template-rows: auto auto;
    overflow: visible;
  }

  .panel-section {
    height: auto;
    overflow: visible;
  }

  .agent-record-layout,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* UI cleanup follow-up */
.global-topbar,
body.crm-theme-dark .global-topbar {
  background: linear-gradient(180deg, #213a5a 0%, #1f3654 100%) !important;
}

.sidebar-toggle-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.panel-grid--overview-top,
.panel-grid--overview-main {
  grid-template-columns: minmax(0, 1fr);
}

#sidebarSnapshot,
#serverInfoList {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

#serverInfoList {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hubspot-border);
}

.checkbox-line input[type="checkbox"],
.contact-columns-option input[type="checkbox"],
input[type="checkbox"].substituted {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px;
  min-height: 15px;
  border-radius: 4px !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 0 !important;
  box-shadow: 0 0 0 0.03em rgba(0, 0, 0, 0.06), 0 0.04em 0.12em -0.03em rgba(0, 0, 0, 0.12) inset !important;
}

.checkbox-line input[type="checkbox"]::after,
.contact-columns-option input[type="checkbox"]::after,
input[type="checkbox"].substituted::after {
  content: none !important;
  display: none !important;
}

.checkbox-line input[type="checkbox"]:checked,
.contact-columns-option input[type="checkbox"]:checked,
input[type="checkbox"].substituted:checked {
  border-color: var(--hubspot-blue-strong) !important;
  background-color: var(--hubspot-blue-strong) !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0 0 9 9'%3E%3Crect fill='white' x='0' y='4.3' transform='matrix(-0.707 -0.7072 0.7072 -0.707 0.5891 10.4702)' width='4.3' height='1.6' /%3E%3Crect fill='white' x='2.2' y='2.9' transform='matrix(-0.7071 0.7071 -0.7071 -0.7071 12.1877 2.9833)' width='6.1' height='1.7' /%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 9px 9px !important;
}

.contact-columns-option {
  gap: 10px;
  align-items: center;
}

.contact-columns-option span,
.checkbox-line span,
.checkbox-line label {
  line-height: 1.3;
}

.checkbox-line--stacked {
  align-items: flex-start;
  line-height: 1.35;
}

.checkbox-line--tile {
  align-items: flex-start;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: auto 1fr;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(111, 145, 191, 0.22);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 35, 61, 0.04);
}

.checkbox-line--tile span {
  display: grid;
  gap: 0.22rem;
}

.checkbox-line--tile small {
  color: var(--hubspot-muted);
  line-height: 1.35;
}

.permission-picker {
  display: grid;
  gap: 1rem;
}

.permission-picker--inline {
  margin-top: 0.9rem;
}

.permission-group {
  display: grid;
  gap: 0.7rem;
}

.permission-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.danger-text-button {
  color: #cb3f4f;
}

.field-admin-actions--sticky {
  margin-top: 1rem;
  justify-content: flex-end;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(111, 145, 191, 0.16);
}

.field-admin-row--field {
  display: grid;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
}

.field-admin-row__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.field-admin-row__header-main {
  flex: 1 1 auto;
  min-width: 0;
}

.field-admin-row__header-button {
  flex: 1 1 auto;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.field-admin-row__toggle {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.field-admin-row__header h4 {
  margin: 0.18rem 0 0.1rem;
  font-size: 1.05rem;
}

.field-admin-row__subtitle {
  margin: 0;
  color: var(--hubspot-muted);
  font-size: 0.84rem;
}

.field-admin-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.3rem;
}

.field-admin-actions--header {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.field-admin-inline-edit {
  white-space: nowrap;
}

.field-admin-order-controls {
  display: inline-flex;
  gap: 6px;
}

.field-admin-position-label {
  margin-right: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.field-admin-grid__full {
  grid-column: 1 / -1;
}

.panel-card--full-span {
  grid-column: 1 / -1;
}

.field-admin-row__body {
  display: none;
  gap: 1rem;
}

.field-admin-row--field.is-expanded .field-admin-row__body {
  display: grid;
}

#userManagementList .queue-row {
  width: 100%;
}

.user-access-stats {
  margin-bottom: 1.25rem;
}

.user-directory-card {
  display: grid;
  gap: 1rem;
}

.user-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 2.2fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 0.9rem;
  align-items: end;
}

.user-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.queue-row--user {
  padding: 1.1rem 1.1rem;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(18, 35, 61, 0.05);
  min-height: 136px;
  justify-content: space-between;
  align-items: stretch;
  text-align: left;
}

.queue-row--user strong {
  font-size: 1.02rem;
}

.queue-row__meta--user {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.queue-row__meta--summary {
  align-items: flex-start;
  gap: 0.7rem;
}

.queue-row__avatar,
.user-editor-avatar {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(41, 121, 255, 0.16), rgba(12, 187, 223, 0.18));
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(111, 145, 191, 0.16);
}

.queue-row__avatar img,
.user-editor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-row__user-copy {
  display: grid;
  gap: 0.42rem;
}

.queue-row__facts,
.queue-row__feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.badge--soft {
  background: rgba(17, 102, 255, 0.08);
  color: var(--accent);
}

.badge--system-field {
  background: rgba(16, 120, 92, 0.12);
  border: 1px solid rgba(16, 120, 92, 0.2);
  color: #136f57;
}

.badge--custom-field {
  background: rgba(17, 102, 255, 0.08);
  border: 1px solid rgba(17, 102, 255, 0.16);
  color: var(--accent);
}

.badge--inactive {
  background: rgba(203, 63, 79, 0.12);
  color: #b83949;
}

.user-editor-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(111, 145, 191, 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 248, 252, 0.9));
}

.user-editor-hero__identity,
.user-editor-hero__upload {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.user-editor-avatar {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 22px;
  font-size: 1.1rem;
}

.user-editor-hero__identity {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.user-editor-hero__status {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--hubspot-text);
}

.user-editor-modal__header {
  align-items: flex-start;
}

.user-editor-close-button {
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  background: color-mix(in srgb, var(--panel) 90%, white);
  border: 1px solid color-mix(in srgb, var(--hubspot-border-strong) 70%, var(--line));
}

.user-editor-close-button:hover {
  background: color-mix(in srgb, var(--accent) 12%, white);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  color: var(--accent);
}

.user-editor-flags-card {
  display: grid;
  gap: 0.85rem;
}

.user-editor-flags {
  margin-top: 0;
}

.user-editor-actions {
  justify-content: flex-end;
  align-items: center;
}

.user-editor-action {
  min-width: 132px;
  justify-content: center;
}

.user-editor-action--invite {
  background: linear-gradient(180deg, #eff5ff 0%, #dce9ff 100%);
  border-color: rgba(69, 116, 217, 0.3);
  color: #214f9b;
}

.user-editor-action--save {
  background: linear-gradient(180deg, #1fa766 0%, #118553 100%);
  border-color: rgba(14, 122, 76, 0.56);
  color: #ffffff;
}

.user-editor-action--delete {
  background: linear-gradient(180deg, #fff0f1 0%, #ffd9de 100%);
  border-color: rgba(200, 77, 87, 0.28);
  color: #b63f52;
}

.access-manager-toolbar {
  display: flex;
  justify-content: flex-end;
}

.role-manager-list {
  display: grid;
  gap: 0.8rem;
}

.role-manager-row {
  width: 100%;
  text-align: left;
  background: var(--panel);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.role-manager-row.is-active {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--hubspot-line));
  box-shadow: 0 16px 34px rgba(18, 35, 61, 0.08);
  transform: translateY(-1px);
}

.role-manager-row__summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.role-manager-row__summary p {
  margin: 0.25rem 0 0;
  color: var(--hubspot-muted);
}

.role-manager-row__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.role-manager-editor {
  display: grid;
  gap: 1rem;
}

.field-help-text {
  display: block;
  margin-top: 4px;
  color: var(--hubspot-muted);
  font-size: 0.76rem;
}

.project-builder-sections {
  display: grid;
  gap: 1rem;
}

.project-builder-section {
  border: 1px solid var(--hubspot-line);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.project-builder-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.85rem;
}

.project-builder-field {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  grid-column: span 12;
}

.project-builder-field--half,
.project-ui-block--half {
  grid-column: span 6;
}

.project-builder-field--full,
.project-ui-block--full {
  grid-column: span 12;
}

.project-ui-block {
  grid-column: span 12;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  border: 1px solid var(--hubspot-line);
  background: rgba(17, 102, 255, 0.05);
}

.project-ui-block h5 {
  margin: 0.15rem 0 0.45rem;
  font-size: 0.98rem;
}

.project-ui-block p:last-child {
  margin: 0;
  color: var(--hubspot-muted);
  line-height: 1.5;
}

.project-ui-block--warning {
  border-color: rgba(241, 118, 56, 0.28);
  background: rgba(241, 118, 56, 0.08);
}

.project-ui-block--info {
  border-color: rgba(41, 121, 255, 0.22);
}

.panel-card--subtle {
  background: color-mix(in srgb, var(--panel) 82%, var(--page));
  box-shadow: none;
}

.report-column-group {
  border-top: 1px solid var(--hubspot-line);
  padding-top: 0.9rem;
}

.report-column-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.field-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
  max-height: min(44vh, 420px);
  overflow: auto;
  padding-right: 0.35rem;
}

.field-pill-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--hubspot-line);
  border-radius: 14px;
  background: var(--panel);
  min-height: 44px;
}

.field-pill-option input[type="checkbox"] {
  margin: 0;
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--hubspot-line));
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 0 0 0.03em rgba(0, 0, 0, 0.06), 0 0.04em 0.12em -0.03em rgba(0, 0, 0, 0.12) inset;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0;
  transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease, background-size 0.14s ease;
}

.field-pill-option input[type="checkbox"]:checked {
  border-color: var(--hubspot-blue-strong);
  background-color: var(--hubspot-blue-strong);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0 0 9 9'%3E%3Crect fill='white' x='0' y='4.3' transform='matrix(-0.707 -0.7072 0.7072 -0.707 0.5891 10.4702)' width='4.3' height='1.6' /%3E%3Crect fill='white' x='2.2' y='2.9' transform='matrix(-0.7071 0.7071 -0.7071 -0.7071 12.1877 2.9833)' width='6.1' height='1.7' /%3E%3C/svg%3E");
  background-size: 9px 9px;
}

.field-pill-option input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(65, 159, 255, 0.22);
}

.field-pill-option span {
  color: var(--text-color);
  font-size: 0.92rem;
  line-height: 1.35;
}

.modal-card--wide {
  width: min(1080px, calc(100vw - 40px));
}

#reportBuilderModal .modal-card {
  width: min(1080px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
}

#reportPreviewModal .modal-card {
  width: min(1500px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  overflow: auto;
}

#reportPreviewModal #reportPreviewModalWorkspace,
#reportPreviewModal .panel-card,
#reportPreviewModal .report-table-wrap--preview {
  min-width: 0;
}

#reportPreviewModal .panel-card {
  overflow: visible;
}

#reportPreviewModal .report-table-wrap--preview {
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: auto;
}

#reportPreviewModal .report-table {
  width: max-content;
  min-width: 100%;
}

#reportPreviewModal .report-table th,
#reportPreviewModal .report-table td {
  white-space: nowrap;
}

#reportBuilderModal .modal-card,
#userEditorModal .modal-card,
#accessManagerModal .modal-card {
  max-height: 92vh;
  overflow: auto;
  overflow-x: hidden;
}

.report-builder-modal-shell {
  display: grid;
  gap: 1rem;
  min-height: min(80vh, 900px);
  max-height: 86vh;
  overflow: visible;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: visible;
}

.report-builder-modal-shell--hubspot {
  gap: 0.75rem;
  padding: 0;
}

.report-builder-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 0.15rem;
}

.report-builder-topbar__title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 14px;
  row-gap: 2px;
}

.report-builder-topbar__title h4 {
  grid-column: 1;
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.08;
}

.report-builder-topbar__title .section-kicker {
  grid-column: 1 / -1;
  margin: 0;
}

.report-builder-topbar__title .workspace-copy {
  grid-column: 2;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.report-builder-topbar__close {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 1.45rem;
  line-height: 1;
  border-radius: 10px;
}

.report-builder-modal-shell > * {
  min-width: 0;
  box-sizing: border-box;
}

.field-create-modal__card {
  width: min(820px, calc(100vw - 32px));
}

.field-create-modal-shell {
  min-height: 0;
  max-height: min(78vh, 760px);
  gap: 0.85rem;
  padding: 0;
}

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

.field-create-grid__options {
  grid-column: 1 / -1;
}

@media (max-width: 1180px) {
  .field-library-table__header,
  .field-library-row {
    grid-template-columns: minmax(220px, 2fr) minmax(100px, 0.9fr) minmax(100px, 0.9fr) minmax(120px, 0.95fr) minmax(84px, 0.75fr) 64px minmax(124px, 0.95fr);
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .user-directory-toolbar,
  .user-editor-hero,
  .field-create-grid {
    grid-template-columns: 1fr;
  }

  .field-library-table__header {
    display: none;
  }

  .field-library-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .field-library-row__actions {
    justify-content: flex-start;
  }
}

.report-builder-steps {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.report-builder-steps--hubspot {
  gap: 0;
  padding: 0;
  border: 1px solid #d8e3ef;
  border-radius: 10px;
  overflow: hidden;
  background: #f7fbff;
}

.report-builder-step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--hubspot-line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--hubspot-muted);
}

.report-builder-steps--hubspot .report-builder-step {
  flex: 1 1 0;
  justify-content: center;
  border: 0;
  border-right: 1px solid #d8e3ef;
  border-radius: 0;
  background: transparent;
  min-height: 42px;
  padding: 0.45rem 0.75rem;
  font-size: 0.94rem;
}

.report-builder-steps--hubspot .report-builder-step:last-child {
  border-right: 0;
}

.report-builder-step.is-active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--hubspot-line));
  color: var(--text-color);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
}

.report-builder-steps--hubspot .report-builder-step.is-active {
  background: #ffffff;
  box-shadow: inset 0 -3px 0 #0fbfb6;
}

.report-builder-step__number {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
}

.report-column-sortable {
  display: grid;
  gap: 0.7rem;
  max-height: min(40vh, 420px);
  overflow: auto;
  overflow-x: hidden;
  padding-top: 0.2rem;
  padding-right: 0.1rem;
  padding-bottom: 0.2rem;
  align-content: start;
}

.report-column-sortable__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--hubspot-line);
  border-radius: 6px;
  background: #eef4fb;
  cursor: grab;
  min-height: 0;
  box-sizing: border-box;
}

.report-column-sortable__header {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--hubspot-line);
  border-radius: 6px;
  background: #eef4fb;
  color: var(--hubspot-muted);
  font-size: 0.9rem;
}

.report-column-sortable__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.report-column-sortable__item.is-dragging {
  opacity: 0.5;
}

.report-column-sortable__meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.report-column-sortable__titleline {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
  flex-wrap: wrap;
}

.report-column-sortable__titleline > strong,
.report-column-sortable__titleline > .field-help-text {
  min-width: 0;
}

.report-column-sortable__meta strong {
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 500;
}

.report-column-sortable__titleline .field-help-text {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--hubspot-muted);
}

.report-column-drag {
  color: #6b8ab2;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  min-width: 14px;
}

.report-builder-columns-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  align-items: start;
}

.report-builder-columns-layout__picker,
.report-builder-columns-layout__selected {
  display: grid;
  gap: 12px;
  min-height: 0;
  min-width: 0;
  max-height: min(52vh, 520px);
  overflow: auto;
  overflow-x: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  align-content: start;
  box-sizing: border-box;
}

.report-builder-columns-layout__picker {
  padding-right: 12px;
  border-right: 1px solid var(--hubspot-line);
}

.report-builder-column-picker {
  width: 100%;
}

.report-builder-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
}

.report-builder-pane-header--hubspot {
  padding-bottom: 0.15rem;
}

.report-builder-pane-header strong {
  color: var(--heading-color);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.report-builder-pane-header--compact {
  margin-bottom: -2px;
}

.report-builder-column-checklist {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.25rem 0 0;
}

.report-column-group {
  display: grid;
  gap: 0.5rem;
  padding-top: 0;
  border-top: 0;
}

.report-column-group__title {
  color: var(--heading-color);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-column-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.12rem;
  max-height: none;
  overflow: visible;
  padding-right: 0.1rem;
  align-content: start;
}

.report-column-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.82rem;
  min-height: 32px;
}

.report-column-check:hover {
  background: rgba(13, 110, 253, 0.03);
}

.report-column-check span {
  line-height: 1.3;
  color: var(--heading-color);
}

.report-column-check input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
}

.report-column-sortable__item .ghost-button {
  padding: 0.28rem 0.48rem;
  font-size: 0.74rem;
}

.report-builder-preview-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow-x: visible;
}

.report-builder-card {
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(20, 48, 79, 0.04);
}

.report-builder-card--hero {
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.report-builder-card .workspace-section__header {
  padding-bottom: 8px;
  margin-bottom: 0;
}

.report-builder-card .workspace-section__header h4 {
  font-size: 1rem;
  line-height: 1.25;
}

.report-builder-card .workspace-copy {
  margin: 0.25rem 0 0.75rem;
  line-height: 1.4;
}

.project-builder-grid--report-builder {
  gap: 10px 14px;
}

.report-builder-field {
  gap: 7px;
}

.report-builder-type-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-builder-type-card {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d8e3ef;
  border-radius: 10px;
  background: #f8fbfe;
  text-align: left;
  color: #35526d;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.report-builder-type-card strong {
  color: #173a59;
  font-size: 1rem;
}

.report-builder-type-card small {
  color: #5f7891;
  line-height: 1.35;
}

.report-builder-type-card.is-active {
  border-color: #0fbfb6;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(15, 191, 182, 0.22);
}

.report-builder-section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-builder-card--filters,
.report-builder-card--filters #reportBuilderFilterWorkspace,
.report-builder-filter-list--hubspot,
.report-builder-filter-row {
  overflow: visible;
}

.report-builder-filter-list--hubspot {
  display: grid;
  gap: 12px;
}

.report-builder-filter-row {
  display: grid;
  gap: 8px;
}

.report-builder-filter-row__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-builder-filter-row .hubspot-filter-rule {
  border-radius: 12px;
  background: #f4f8fb;
}

.report-builder-filter-row .hubspot-filter-rule__field {
  width: 100%;
}

.report-builder-card--filters .filter-combobox.is-open .filter-combobox__menu--properties {
  position: static;
  display: block;
  width: 100%;
  max-width: none;
  max-height: min(420px, calc(100vh - 320px));
  margin-top: 6px;
  z-index: 10050;
}

.report-builder-filter-row.is-picker-open {
  z-index: 12;
  scroll-margin-block: 180px 320px;
}

.report-builder-filter-row.is-picker-open .hubspot-filter-rule {
  box-shadow: 0 14px 36px rgba(22, 49, 78, 0.12);
}

.report-builder-actions {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: transparent !important;
}

.report-builder-actions #reportBuilderBackButton {
  background: linear-gradient(180deg, #eef3f8 0%, #dde6ef 100%);
  border-color: rgba(107, 129, 154, 0.28);
  color: #27415c;
}

.report-builder-actions #reportBuilderNextButton,
.report-builder-actions .primary-button[type="submit"] {
  background: linear-gradient(180deg, #1fa766 0%, #118553 100%);
  border-color: rgba(14, 122, 76, 0.56);
  color: #ffffff;
}

.report-builder-actions #reportBuilderBackButton:hover {
  background: linear-gradient(180deg, #e4ebf3 0%, #d4dfea 100%);
  border-color: rgba(107, 129, 154, 0.38);
}

.report-builder-actions #reportBuilderNextButton:hover,
.report-builder-actions .primary-button[type="submit"]:hover {
  background: linear-gradient(180deg, #19975c 0%, #0e7346 100%);
  border-color: rgba(14, 122, 76, 0.72);
}

.report-builder-filter-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.7fr) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  padding: 1rem;
  border-radius: 14px;
  background: #fbfdff;
  overflow: visible;
}

.report-builder-filter-card__header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.report-builder-filter-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf3fb;
  color: #305273;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.report-builder-filter-card__remove {
  min-height: 34px;
  padding: 0 12px;
}

.report-builder-filter-card .filter-control {
  min-width: 0;
}

.report-builder-filter-card .filter-control input,
.report-builder-filter-card .filter-control select {
  min-height: 44px;
}

.report-builder-filter-card__field {
  grid-column: span 2;
}

.report-builder-filter-card__value {
  grid-column: 1 / -1;
}

.report-builder-actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 0.2rem;
  padding: 1rem 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #ffffff 24%);
}

.panel-card--report-library {
  width: 100%;
}

.list-card--report {
  width: 100%;
  padding: 1rem 1.1rem;
}

.list-card--report .assignment-actions--spread {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.list-card--report .assignment-actions--inline {
  margin-left: auto;
  justify-content: flex-end;
}

#reportBuilderFilterWorkspace,
#reportSelectedColumns {
  min-height: 0;
}

#addReportFilterRule {
  margin-top: 0.35rem;
}

.report-column-sortable__item .ghost-button {
  min-width: 0;
}

.report-column-remove {
  padding: 0;
  border: 0;
  background: transparent;
  color: #7b93b3;
  font-size: 1.3rem;
  line-height: 1;
}

.report-column-remove:hover {
  color: var(--accent);
  background: transparent;
}

.report-table-wrap--preview {
  max-height: 62vh;
  overflow: auto;
}

.report-builder-flag {
  align-items: start;
}

.report-builder-merge-tags,
.report-builder-output-mode {
  padding: 14px;
  border: 1px solid #d6e5f3;
  border-radius: 16px;
  background: #f8fbfe;
}

.report-builder-merge-tags__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.report-builder-merge-tag {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #c6dced;
  border-radius: 999px;
  background: #fff;
  color: #007c9d;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.report-builder-merge-tag:hover {
  border-color: #00a6c8;
  background: #e7fafe;
}

.report-builder-pivot-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d8e7f4;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.report-builder-pivot-grid__fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  min-width: 0;
}

.report-builder-pivot-grid__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.report-builder-pivot-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #58718b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-builder-pivot-grid select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #c9dced;
  border-radius: 10px;
  background: #fff;
  color: #143650;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: none;
}

.report-builder-pivot-checkbox {
  display: inline-flex !important;
  gap: 8px !important;
  align-items: center;
  justify-content: flex-start;
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid #c9dced;
  border-radius: 10px;
  background: #f8fbfe;
  text-transform: none !important;
}

.report-builder-pivot-checkbox input {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #00a6c8;
}

.report-builder-pivot-checkbox span {
  color: #415f7a;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.report-builder-pivot-grid .secondary-button {
  align-self: end;
  min-height: 36px;
  padding: 0 14px;
  flex: 0 1 auto;
  max-width: 100%;
  white-space: normal;
  line-height: 1.15;
}

@media (max-width: 1120px) {
  .report-builder-columns-layout,
  .report-builder-type-toggle,
  .project-builder-grid--report-builder {
    grid-template-columns: 1fr;
  }

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

  .report-builder-filter-card {
    grid-template-columns: 1fr;
  }

  .report-builder-pivot-checkbox {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .report-builder-pivot-grid__fields {
    grid-template-columns: 1fr;
  }
}

.reporting-library-dataset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.query-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 1rem;
}

.panel-card--query-builder {
  width: 100%;
  margin-bottom: 1rem;
}

.entry-form--query-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.query-group-card {
  border: 1px solid var(--line, #d9e5f2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  padding: 1rem;
  margin-left: calc(var(--query-depth, 0) * 0.65rem);
  box-shadow: 0 10px 28px rgba(14, 30, 58, 0.06);
}

.query-group-card--root {
  margin-left: 0;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.94));
}

.query-group-card__header,
.query-code-preview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.query-group-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.query-group-card__body {
  display: grid;
  gap: 0.85rem;
}

.query-group-logic-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: #33475b;
  font-weight: 700;
}

.query-group-logic-control span {
  line-height: 1;
  white-space: nowrap;
}

.query-group-logic-control select {
  min-height: 36px;
  width: auto;
  min-width: 78px;
  padding: 7px 28px 7px 10px;
  border: 1px solid #cbd6e2;
  border-radius: 6px;
  background: #ffffff;
  color: #33475b;
  font-weight: 700;
}

.query-group-logic-control select:focus-visible {
  outline: none;
  border-color: #00a4bd;
  box-shadow: 0 0 0 3px rgba(0, 164, 189, 0.14);
}

.query-exclusion-card {
  display: grid;
  gap: 14px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #d5e2ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(33, 51, 67, 0.05);
}

.query-exclusion-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.query-exclusion-card__header h4,
.query-exclusion-card__header p {
  margin: 0;
}

.query-exclusion-card__toggle {
  flex: 0 0 auto;
  margin: 0;
  color: #33475b;
  font-weight: 700;
}

.query-exclusion-card__body {
  align-items: end;
  margin: 0;
}

.query-exclusion-card .multi-select-picker__trigger,
.query-exclusion-card .multi-select-picker__dropdown,
.query-exclusion-card .multi-select-picker__search-input {
  border-color: #cbd6e2;
  background: #ffffff;
  color: #33475b;
}

.query-exclusion-card .multi-select-picker__trigger {
  min-height: 40px;
  border-radius: 6px;
  padding: 8px 10px;
}

.query-exclusion-card .multi-select-picker__dropdown {
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(33, 51, 67, 0.14);
}

.query-exclusion-card .multi-select-picker__search-input {
  border-radius: 6px;
  background: #f8fbfd;
}

.query-exclusion-card .multi-select-option {
  border-radius: 6px;
  color: #33475b;
}

.query-exclusion-card .multi-select-option:hover,
.query-exclusion-card .multi-select-option.is-selected {
  border-color: #cbd6e2;
  background: #eaf0f6;
}

.query-exclusion-card .multi-select-picker__actions .secondary-button {
  border-color: #cbd6e2;
  background: #f8fbfd;
  color: #33475b;
}

.query-value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
  max-height: 48vh;
  overflow: auto;
  padding-right: 0.35rem;
}

.pill-row--expression {
  gap: 0.55rem;
  align-items: flex-start;
}

.pill--query {
  white-space: normal;
  max-width: 100%;
}

.filter-summary-bar--interactive {
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--hubspot-line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, white), rgba(255, 255, 255, 0.98));
  text-align: left;
  width: 100%;
}

.filter-summary-bar--interactive:hover {
  box-shadow: 0 10px 28px rgba(22, 48, 84, 0.08);
}

.contact-pool-summary-stack {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.contact-pool-summary-stack--embedded {
  gap: 8px;
  margin-bottom: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #d8e3ef;
  background: #ffffff;
  position: relative;
  z-index: 1;
}

.query-summary-card {
  display: grid;
  gap: 0.55rem;
  justify-items: stretch;
  width: 100%;
  max-width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--hubspot-line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, white), rgba(255, 255, 255, 0.98));
  box-shadow: 0 8px 24px rgba(22, 48, 84, 0.06);
  text-align: left;
}

.query-summary-card:hover {
  box-shadow: 0 12px 28px rgba(22, 48, 84, 0.1);
}

.query-summary-card .pill-row {
  flex-wrap: wrap;
}

.query-summary-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.assignment-actions--left {
  justify-content: flex-start;
}

.entry-form--query-values {
  margin-bottom: 1rem;
}

.list-card--interactive {
  cursor: pointer;
}

.list-card--interactive:focus-visible {
  outline: 3px solid rgba(65, 159, 255, 0.22);
  outline-offset: 2px;
}

.filter-row-card--query {
  grid-template-columns: minmax(180px, 0.9fr) minmax(140px, 0.65fr) minmax(220px, 1.1fr) auto;
  align-items: start;
  margin-left: calc(var(--query-depth, 0) * 0.65rem);
}

.query-rule-actions {
  display: inline-flex;
  gap: 0.6rem;
  align-self: end;
  flex-wrap: nowrap;
}

.filter-control--compact {
  min-width: 132px;
}

.filter-control--query-value textarea {
  min-height: 104px;
  resize: vertical;
}

.query-code-preview {
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-top: 1px solid rgba(186, 205, 227, 0.75);
  padding-top: 1rem;
}

.query-code-preview__body {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: #0f1d2f;
  color: #edf5ff;
  font-size: 0.86rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

.query-value-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2300;
  background: rgba(15, 23, 38, 0.42);
  display: grid;
  place-items: center;
  padding: 2rem;
  backdrop-filter: blur(4px);
}

.query-value-modal {
  width: min(1120px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto auto;
  gap: 0;
  padding-bottom: 0;
}

.entry-form--query-values {
  grid-template-columns: minmax(0, 1fr);
}

.query-value-modal .query-value-grid {
  min-height: 0;
  max-height: none;
  overflow: auto;
  margin: 0.75rem 0;
  padding: 0 0.35rem 0.35rem 0;
}

.query-value-modal .workspace-header,
.query-value-modal > .workspace-copy,
.query-value-modal > .entry-form--query-values,
.query-value-modal > .assignment-actions--inline {
  margin-bottom: 1rem;
}

.query-value-modal__footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: flex-end;
  margin: 0 -1.5rem -1.5rem;
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid #d8e3ef;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), #ffffff);
  box-shadow: 0 -10px 24px rgba(33, 51, 67, 0.08);
}

@media (max-width: 1100px) {
  .entry-form--query-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .entry-form--query-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .query-value-modal-backdrop {
    padding: 1rem;
  }
}

.list-card--template .assignment-actions--inline,
.list-card__top-actions .assignment-actions--inline {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
}

.list-card__top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.panel-card--template-editor {
  width: 100%;
}

.list-card--template {
  cursor: pointer;
}

.list-card--template:focus-visible {
  outline: 3px solid rgba(65, 159, 255, 0.26);
  outline-offset: 2px;
}

.list-card--template {
  cursor: pointer;
}

.list-card--template:focus-visible {
  outline: 3px solid rgba(65, 159, 255, 0.26);
  outline-offset: 2px;
}

.list-card__top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.assignment-actions--inline {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
}

.panel-card--template-editor {
  width: 100%;
}

/* Keep project contact-status tint visible in the final rendered table state. */
.contact-pool-row.contact-pool-row--status {
  border-bottom-color: color-mix(in srgb, var(--contact-status-color) 34%, rgba(223, 231, 239, 0.9));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--contact-status-color) 17%, #ffffff) 0%,
    color-mix(in srgb, var(--contact-status-color) 11%, #f7fbfd) 100%
  );
}

.contact-pool-row.contact-pool-row--status:hover {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--contact-status-color) 23%, #ffffff) 0%,
    color-mix(in srgb, var(--contact-status-color) 16%, #f5f9fc) 100%
  );
}

body.crm-theme-dark .contact-pool-row.contact-pool-row--status {
  border-bottom-color: color-mix(in srgb, var(--contact-status-color) 30%, rgba(255, 255, 255, 0.1));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--contact-status-color) 18%, #142335) 0%,
    color-mix(in srgb, var(--contact-status-color) 12%, #112033) 100%
  );
}

body.crm-theme-dark .contact-pool-row.contact-pool-row--status:hover {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--contact-status-color) 22%, #17273c) 0%,
    color-mix(in srgb, var(--contact-status-color) 16%, #132235) 100%
  );
}

.assignment-actions--spread {
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-admin-actions {
  justify-content: space-between;
  width: 100%;
}

.project-admin-actions #deleteProjectButton {
  margin-right: auto;
}

.project-admin-actions #saveProjectButton {
  margin-left: auto;
}

#contactColumnsModal .assignment-actions--spread > .assignment-actions {
  gap: 5px;
}

.user-editor-action {
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.user-editor-action--invite:hover {
  background: linear-gradient(180deg, #e1ecff 0%, #d0e0ff 100%);
  border-color: rgba(69, 116, 217, 0.44);
  color: #173f80;
}

.user-editor-action--save:hover {
  background: linear-gradient(180deg, #19975c 0%, #0e7346 100%);
  border-color: rgba(14, 122, 76, 0.72);
  color: #ffffff;
}

.user-editor-action--delete:hover {
  background: linear-gradient(180deg, #ffe3e8 0%, #ffc8d0 100%);
  border-color: rgba(200, 77, 87, 0.4);
  color: #9f3244;
}

.contact-columns-panel {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: 0;
}

.contact-columns-selected-panel,
.contact-columns-available-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), #f7fbff);
  min-height: 0;
}

.contact-columns-selected-list {
  display: grid;
  gap: 0.75rem;
  max-height: min(58vh, 640px);
  overflow: auto;
  padding-right: 0.3rem;
}

.contact-columns-selected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: 16px;
  background: #fff;
  cursor: grab;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.contact-columns-selected-item:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.contact-columns-selected-item.is-dragging {
  opacity: 0.68;
  cursor: grabbing;
}

.contact-columns-selected-item.is-drop-target {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
  transform: translateY(-1px);
}

.contact-columns-selected-item__meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.contact-columns-selected-item__meta strong,
.contact-columns-option__meta strong {
  display: block;
  font-size: 0.96rem;
  color: var(--ink);
}

.contact-columns-selected-item__meta p,
.contact-columns-option__meta span {
  margin: 0.16rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: capitalize;
}

.contact-columns-selected-item__index {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.contact-columns-selected-item__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.contact-columns-option {
  justify-content: space-between;
  gap: 1rem;
}

.contact-columns-option__meta {
  min-width: 0;
}

.contact-columns-option__meta strong,
.contact-columns-option__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

  .contact-columns-selected-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-columns-selected-item__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.contacts-ops-chooser {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contacts-ops-choice-card {
  display: grid;
  gap: 0.85rem;
  padding: 1.4rem;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 8%, white) 0%, transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
  text-align: left;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.contacts-ops-choice-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.1);
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
}

.contacts-ops-choice-card h4 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.contacts-ops-choice-card__cta {
  color: var(--accent);
  font-weight: 700;
}

.contacts-ops-page {
  display: grid;
  gap: 1rem;
}

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

.contacts-import-hero__card {
  display: grid;
  gap: 0.55rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: var(--shadow-soft);
}

.contacts-import-layout,
.contacts-export-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.55fr);
  gap: 1rem;
  align-items: start;
}

.contacts-import-layout--mapping {
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1.58fr);
}

.contacts-import-preview-panel {
  grid-column: 1 / -1;
}

.contacts-import-layout__sidebar,
.contacts-export-layout__filters {
  display: grid;
  gap: 1rem;
}

.contacts-export-layout__filters {
  position: sticky;
  top: 0;
}

.contacts-import-layout__main,
.contacts-export-layout__preview {
  display: grid;
  gap: 1rem;
}

.contacts-import-sidebar__actions {
  display: grid;
  gap: 0.75rem;
}

.contacts-import-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
}

.contacts-import-setup-grid label {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  color: #173a59;
  font-weight: 700;
}

.contacts-import-setup-grid select,
.contacts-import-setup-grid .filter-combobox,
.contacts-import-setup-grid .import-mapping-input {
  width: 100%;
  min-width: 0;
}

.contacts-import-setup-grid select,
.contacts-import-setup-grid .import-mapping-input {
  min-height: 44px;
  border: 1px solid #cbdced;
  border-radius: 10px;
  background: #fff;
}

.contacts-import-mapping-list {
  display: grid;
  gap: 0.85rem;
}

.contacts-import-mapping-panel {
  gap: 1rem;
}

.contacts-import-mapping-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.35fr) minmax(180px, 0.35fr);
  gap: 0.75rem;
  align-items: end;
}

.contacts-import-search input,
.contacts-import-mapping-toolbar select,
.import-property-type-select {
  width: 100%;
  min-height: 42px;
}

.contacts-import-mapping-table {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: visible;
  background: #fff;
}

.contacts-import-mapping-table__head,
.contacts-import-mapping-table__row {
  display: grid;
  grid-template-columns: minmax(145px, 0.9fr) minmax(190px, 1.2fr) minmax(120px, 0.55fr) minmax(190px, 1fr) minmax(260px, 1.2fr) minmax(80px, 0.35fr);
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
}

.contacts-import-mapping-table__head {
  background: #f4f8fc;
  color: #173a59;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.contacts-import-mapping-table__row {
  border-top: 1px solid var(--line);
}

.contacts-import-source strong {
  color: #173a59;
}

.contacts-import-preview-values {
  display: grid;
  gap: 0.2rem;
  color: #173a59;
}

.contacts-import-preview-values span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-map-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  color: #173a59;
}

.import-map-status span {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 0.9rem;
}

.import-map-status--mapped span {
  background: #00a48d;
}

.import-map-status--warning span {
  background: #f5b84b;
}

.import-map-status--unmapped span {
  background: #98a8ba;
}

.import-unmap-button {
  min-height: 36px;
  padding: 0.35rem 0.65rem;
}

.import-history-list {
  display: grid;
  gap: 0.85rem;
}

.import-history-row {
  display: grid;
  gap: 0.8rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.import-history-row__meta,
.import-history-row__actions,
.import-history-row__summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.import-history-row__meta strong {
  font-size: 1rem;
}

.import-history-row__meta p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.import-history-row__stats,
.import-history-row__summary {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.import-history-row__summary span {
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 6%, white);
  color: var(--muted);
  font-weight: 600;
}

.import-history-row__actions {
  justify-content: flex-end;
}

.import-history-row__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--warning) 12%, white);
  color: var(--warning-strong);
  font-weight: 700;
  text-decoration: none;
}

.import-history-row__download:hover {
  background: color-mix(in srgb, var(--warning) 20%, white);
}

.contacts-import-map-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.9fr);
  gap: 1rem;
  align-items: end;
}

.import-map-row--warning {
  border-color: color-mix(in srgb, var(--warning) 38%, var(--line));
  background: color-mix(in srgb, var(--warning) 9%, white);
}

.mapping-warning-panel {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #f3ddb2;
  border-radius: 12px;
  background: #fff8e8;
  color: #213343;
}

.mapping-warning-panel strong {
  color: #7a4a00;
}

.mapping-warning-panel div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mapping-warning-panel span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #ffffff;
  color: #33475b;
  font-weight: 700;
}

.mapping-warning-panel--ok {
  border-color: #bfe8d3;
  background: #ecfbf3;
  color: #12734a;
  font-weight: 800;
}

.import-mapping-combobox {
  width: 100%;
}

.contacts-import-map-card__meta h4 {
  margin: 0.2rem 0;
  font-size: 1.05rem;
}

.import-mapping-input {
  width: 100%;
}

.contacts-import-progress {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.contacts-import-progress__bar {
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, white);
  overflow: hidden;
}

.contacts-import-progress__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #63b2ff);
}

.contacts-import-progress--page,
.contacts-import-summary-page {
  width: 100%;
}

.contacts-import-progress-page {
  gap: 1rem;
  padding: 1.2rem;
}

.contacts-import-progress-page__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.contacts-import-progress-page__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 7%, white);
  color: var(--muted);
  font-weight: 600;
}

.contacts-import-summary-page {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
}

.contacts-import-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.contacts-import-summary-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  min-height: 132px;
  padding: 1rem 1.1rem;
  color: rgba(255, 255, 255, 0.96);
  border: 0;
  box-shadow: none;
}

.contacts-import-summary-card .section-kicker,
.contacts-import-summary-card h3,
.contacts-import-summary-card p {
  color: inherit;
}

.contacts-import-summary-card .section-kicker {
  opacity: 0.82;
}

.contacts-import-summary-card h3 {
  margin: 0.55rem 0 0;
  font-size: 2rem;
  line-height: 1;
}

.contacts-import-setup__toggle {
  margin: 0.15rem 0 0.85rem;
}

.contacts-import-setup__toggle.is-disabled {
  opacity: 0.58;
}

.contacts-import-summary-chart {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contacts-import-summary-chart__segment {
  min-height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  color: #fff;
  font-weight: 700;
}

.contacts-import-summary-chart__segment span {
  white-space: nowrap;
}

.contacts-import-summary-chart__segment--success,
.report-card--import-success {
  background: linear-gradient(180deg, #1f9d63 0%, #157347 100%);
}

.contacts-import-summary-chart__segment--accent,
.report-card--import-accent {
  background: linear-gradient(180deg, #2f80ed 0%, #1b63bd 100%);
}

.contacts-import-summary-chart__segment--warning,
.report-card--import-warning {
  background: linear-gradient(180deg, #d99310 0%, #b77907 100%);
}

.contacts-import-summary-chart__segment--danger,
.report-card--import-danger {
  background: linear-gradient(180deg, #d05b63 0%, #b33d47 100%);
}

.contacts-import-summary-chart__segment--neutral,
.report-card--import-neutral {
  background: linear-gradient(180deg, #54637a 0%, #334155 100%);
}

.feature-line--warning {
  border-left: 3px solid #d99310;
  padding-left: 10px;
}

.report-table__mapping-row th {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, white);
}

.report-table__mapping-cell--ignored {
  color: var(--muted) !important;
  background: color-mix(in srgb, #f59e0b 10%, white) !important;
}

.report-table__mapping-cell--ignored span {
  display: inline-flex;
  align-items: center;
  padding: 0.26rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, #f59e0b 18%, white);
  color: #8a5a00;
}

@media (max-width: 1024px) {
  .contacts-ops-chooser,
  .contacts-import-hero,
  .contacts-import-layout,
  .contacts-export-layout,
  .contacts-import-map-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .contacts-import-layout__sidebar,
  .contacts-export-layout__filters {
    position: static;
  }

  .contacts-import-mapping-toolbar,
  .contacts-import-mapping-table__head,
  .contacts-import-mapping-table__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .contacts-import-progress-page__meta {
    flex-direction: column;
  }
}

.user-directory-grid--panels {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.queue-row--panel {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.panel-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.panel-runtime-shell {
  margin-top: 1rem;
}

.panel-runtime-selector {
  display: grid;
  gap: 0.35rem;
  min-width: 220px;
}

.panel-runtime-layout {
  display: grid;
  gap: 1rem;
}

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

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

.panel-runtime-card {
  min-height: 100%;
}

.panel-runtime-field-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.panel-runtime-html {
  display: grid;
  gap: 0.75rem;
  min-height: 260px;
}

.panel-runtime-text {
  white-space: pre-wrap;
}

@media (max-width: 1024px) {
  .panel-runtime-layout--columns-2,
  .panel-runtime-layout--columns-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .queue-row--panel {
    flex-direction: column;
  }

  .panel-card__actions {
    justify-content: flex-start;
  }
}

/* Final dark-mode polish override */
body.crm-theme-dark {
  --hubspot-bg: #10161d;
  --hubspot-surface: #18212b;
  --hubspot-surface-alt: #1d2834;
  --hubspot-border: #2c3949;
  --hubspot-border-strong: #39506a;
  --hubspot-text: #edf3fa;
  --hubspot-muted: #9fb0c2;
  --hubspot-blue: #6ea8ff;
  --hubspot-blue-strong: #4b92ff;
  --hubspot-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --surface: #18212b;
  --surface-soft: #1d2834;
  --surface-muted: #223040;
  --line: #2c3949;
  --line-strong: #39506a;
  --ink: #edf3fa;
  --muted: #9fb0c2;
  --shell-nav-surface: #16202a;
  --shell-nav-border: rgba(137, 157, 180, 0.12);
  --shell-nav-text: #f5f8fd;
  --shell-nav-muted: rgba(181, 197, 216, 0.76);
}

body.crm-theme-dark,
body.crm-theme-dark .main-panel,
body.crm-theme-dark .app-shell {
  background: #10161d;
  color: var(--ink);
}

body.crm-theme-dark .sidebar,
body.crm-theme-dark .global-topbar,
body.crm-theme-dark .hero {
  background: #16202a !important;
  border-color: var(--shell-nav-border) !important;
}

body.crm-theme-dark .sidebar::before {
  opacity: 0.14;
}

body.crm-theme-dark .sidebar-nav-shell,
body.crm-theme-dark .sidebar-card,
body.crm-theme-dark .panel-card,
body.crm-theme-dark .workspace-shell,
body.crm-theme-dark .workspace-section,
body.crm-theme-dark .project-config-box,
body.crm-theme-dark .list-card,
body.crm-theme-dark .stat-card,
body.crm-theme-dark .assignment-row,
body.crm-theme-dark .agent-panel,
body.crm-theme-dark .field-admin-row,
body.crm-theme-dark .filter-row-card,
body.crm-theme-dark .detail-card,
body.crm-theme-dark .queue-row,
body.crm-theme-dark .contact-pool-row,
body.crm-theme-dark .pagination-bar,
body.crm-theme-dark .pagination-page,
body.crm-theme-dark .feature-line,
body.crm-theme-dark .report-item,
body.crm-theme-dark .template-preview-card,
body.crm-theme-dark .workspace-empty,
body.crm-theme-dark .filter-box,
body.crm-theme-dark .contact-columns-option,
body.crm-theme-dark .agent-topbar,
body.crm-theme-dark .report-table,
body.crm-theme-dark .template-preview,
body.crm-theme-dark .workspace-panel,
body.crm-theme-dark .modal-card,
body.crm-theme-dark .modal-card__header,
body.crm-theme-dark .global-search-results,
body.crm-theme-dark .user-menu-dropdown,
body.crm-theme-dark .contacts-ops-choice-card,
body.crm-theme-dark .contacts-import-hero__card,
body.crm-theme-dark .contacts-import-map-card,
body.crm-theme-dark .panel-runtime-card,
body.crm-theme-dark .panel-runtime-shell,
body.crm-theme-dark .contact-columns-sidebar,
body.crm-theme-dark .contact-columns-lane,
body.crm-theme-dark .contact-columns-available,
body.crm-theme-dark .company-detail-tab,
body.crm-theme-dark .agent-insight-card,
body.crm-theme-dark .agent-contact-summary--hubspot,
body.crm-theme-dark .agent-record-workspace-header,
body.crm-theme-dark .agent-record-rail__header,
body.crm-theme-dark .agent-workspace-kpi,
body.crm-theme-dark .readonly-field-card,
body.crm-theme-dark .project-ui-block,
body.crm-theme-dark .project-builder-field,
body.crm-theme-dark .response-list-row,
body.crm-theme-dark .email-log-card,
body.crm-theme-dark .query-builder-card,
body.crm-theme-dark .query-node,
body.crm-theme-dark .field-definition-card,
body.crm-theme-dark .response-modal-panel,
body.crm-theme-dark .response-scriptlet-shell,
body.crm-theme-dark .agent-record-column__header,
body.crm-theme-dark .agent-record-center-header,
body.crm-theme-dark .agent-contact-summary,
body.crm-theme-dark .agent-record-fact,
body.crm-theme-dark .agent-detail-tabs--hubspot,
body.crm-theme-dark .agent-side-card,
body.crm-theme-dark .email-verify-embed {
  background: #18212b !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

body.crm-theme-dark .agent-contact-summary--hubspot,
body.crm-theme-dark .agent-record-workspace-header,
body.crm-theme-dark .agent-record-rail__header,
body.crm-theme-dark .agent-record-column__header,
body.crm-theme-dark .agent-record-center-header {
  background: #1b2530 !important;
}

body.crm-theme-dark input,
body.crm-theme-dark select,
body.crm-theme-dark textarea,
body.crm-theme-dark input[disabled],
body.crm-theme-dark textarea[disabled],
body.crm-theme-dark #globalSearch,
body.crm-theme-dark .multi-select-picker__trigger,
body.crm-theme-dark .multi-select-picker__dropdown,
body.crm-theme-dark .multi-select-picker__search-input {
  background: #111922 !important;
  color: var(--ink) !important;
  border-color: #334152 !important;
}

body.crm-theme-dark input::placeholder,
body.crm-theme-dark textarea::placeholder,
body.crm-theme-dark #globalSearch::placeholder {
  color: #7f92a7 !important;
}

body.crm-theme-dark .ghost-button,
body.crm-theme-dark .secondary-button,
body.crm-theme-dark .ghost-link {
  background: #202b37 !important;
  color: var(--ink) !important;
  border-color: #334152 !important;
}

body.crm-theme-dark .ghost-button:hover,
body.crm-theme-dark .secondary-button:hover,
body.crm-theme-dark .ghost-link:hover {
  background: #263444 !important;
}

body.crm-theme-dark .primary-button {
  background: #4f92ff !important;
  color: #f8fbff !important;
  border-color: #4f92ff !important;
}

body.crm-theme-dark .primary-button:hover {
  background: #3f84f0 !important;
}

body.crm-theme-dark .danger-button {
  background: #6a3138 !important;
  color: #fdecef !important;
  border-color: #86444d !important;
}

body.crm-theme-dark .global-topbar h2,
body.crm-theme-dark #topbarTitle,
body.crm-theme-dark .brand-title,
body.crm-theme-dark .nav-chip,
body.crm-theme-dark .nav-subchip,
body.crm-theme-dark .section-heading h3,
body.crm-theme-dark .workspace-section__header h4,
body.crm-theme-dark .detail-section-title,
body.crm-theme-dark .modal-card h4,
body.crm-theme-dark .readonly-field-card__value,
body.crm-theme-dark .agent-workspace-kpi strong,
body.crm-theme-dark .agent-record-fact strong {
  color: var(--shell-nav-text) !important;
}

body.crm-theme-dark .hero .eyebrow,
body.crm-theme-dark .topbar-context .eyebrow,
body.crm-theme-dark .sidebar .eyebrow,
body.crm-theme-dark .nav-submenu-label,
body.crm-theme-dark .brand-copy,
body.crm-theme-dark .queue-row__sub,
body.crm-theme-dark .workspace-copy,
body.crm-theme-dark .readonly-field-card__label,
body.crm-theme-dark .agent-workspace-kpi span,
body.crm-theme-dark .agent-record-fact span,
body.crm-theme-dark .detail-caption,
body.crm-theme-dark .list-card__subtitle,
body.crm-theme-dark .list-card__meta,
body.crm-theme-dark label,
body.crm-theme-dark .field-help,
body.crm-theme-dark .section-kicker {
  color: var(--shell-nav-muted) !important;
}

body.crm-theme-dark .nav-chip.is-active,
body.crm-theme-dark .nav-subchip.is-active,
body.crm-theme-dark .workspace-tab.is-active,
body.crm-theme-dark .response-list-row.is-selected,
body.crm-theme-dark .agent-detail-tabs--hubspot .agent-detail-tab.is-active {
  background: rgba(79, 146, 255, 0.14) !important;
  color: #f5f8fd !important;
  border-color: rgba(79, 146, 255, 0.24) !important;
}

body.crm-theme-dark .workspace-tabs,
body.crm-theme-dark .agent-detail-tabs--hubspot,
body.crm-theme-dark .contact-pool-row--header,
body.crm-theme-dark .crm-list-toolbar,
body.crm-theme-dark .report-table th,
body.crm-theme-dark .response-list-row__content {
  background: #1a2430 !important;
}

body.crm-theme-dark .workspace-tab,
body.crm-theme-dark .agent-detail-tabs--hubspot .agent-detail-tab {
  color: var(--muted) !important;
  background: transparent !important;
  border-color: var(--line) !important;
}

body.crm-theme-dark .response-list-row:hover,
body.crm-theme-dark .queue-row:hover,
body.crm-theme-dark .list-card:hover,
body.crm-theme-dark .global-search-result:hover,
body.crm-theme-dark .global-search-result:focus,
body.crm-theme-dark .contact-pool-row:hover {
  background: #202b37 !important;
}

body.crm-theme-dark .status-pill,
body.crm-theme-dark .badge,
body.crm-theme-dark .badge--soft {
  background: #223140 !important;
  color: #dbe8f8 !important;
  border-color: #33495f !important;
}

body.crm-theme-dark .report-table td,
body.crm-theme-dark .report-table th,
body.crm-theme-dark .table-shell td,
body.crm-theme-dark .table-shell th {
  border-color: var(--line) !important;
}

body.crm-theme-dark .assignment-actions--wrapup {
  background: linear-gradient(180deg, rgba(24, 33, 43, 0), rgba(24, 33, 43, 0.96) 24%) !important;
}

body.crm-theme-dark .agent-record-rightpane {
  border-left-color: var(--line);
  background: var(--panel);
}

body.crm-theme-dark .agent-record-rightpane__footer {
  border-top-color: var(--line);
  background: linear-gradient(180deg, rgba(24, 33, 43, 0.94) 0%, rgba(15, 23, 42, 0.98) 100%);
  box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.24);
}

body.crm-theme-dark .assignment-actions--wrapup-fixed {
  background: transparent !important;
}

body.crm-theme-dark .email-verify-embed iframe {
  background: #fff;
}

.field-admin-row--backup {
  gap: 16px;
}

.field-admin-row--backup .feature-list {
  margin-top: 0;
}

.daily-revenue-filters {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) minmax(460px, 1.35fr);
  gap: 14px;
  align-items: end;
}

.daily-revenue-summary {
  margin-top: 18px;
}

.daily-revenue-panel {
  margin-top: 20px;
}

.daily-revenue-chart-shell {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px 0 8px;
}

.daily-revenue-chart {
  min-width: 1120px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.daily-revenue-chart__axis {
  position: relative;
  min-height: 430px;
}

.daily-revenue-chart__axis-row {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(50%);
}

.daily-revenue-chart__columns {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 20px 8px 0;
}

.daily-revenue-chart__columns::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 36px;
  height: 1px;
  background: rgba(120, 138, 163, 0.18);
}

.daily-revenue-chart__columns::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 108px;
  height: 2px;
  background: rgba(73, 96, 130, 0.4);
}

.daily-revenue-column {
  position: relative;
  width: 86px;
  flex: 0 0 86px;
  display: grid;
  grid-template-rows: 272px 2px 98px auto;
  gap: 0;
}

.daily-revenue-column--interactive {
  cursor: pointer;
}

.daily-revenue-column--interactive:focus-visible {
  outline: 2px solid rgba(57, 103, 255, 0.32);
  outline-offset: 6px;
  border-radius: 18px;
}

.daily-revenue-column__positive,
.daily-revenue-column__negative {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.daily-revenue-column__stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0;
}

.daily-revenue-column__segment {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  border-radius: 0;
}

.daily-revenue-column__segment span {
  display: block;
}

.daily-revenue-column__segment--revenue {
  background: #ff5a7d;
  border-radius: 16px 16px 0 0;
}

.daily-revenue-column__segment--leads {
  background: #ff9f43;
  min-height: 54px;
  border-radius: 0 0 16px 16px;
}

.daily-revenue-column__segment--dnq {
  background: #c7ccd5;
  color: #243447;
  border-radius: 0 0 14px 14px;
}

.daily-revenue-column__baseline {
  width: 100%;
}

.daily-revenue-column__footer {
  padding-top: 12px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.daily-revenue-column__footer strong {
  font-size: 13px;
  color: #223140;
}

.daily-revenue-column__footer span {
  font-size: 11px;
  color: #738398;
}

.daily-revenue-column__percentage {
  display: grid;
  gap: 6px;
  text-align: left;
}

.daily-revenue-column__percentage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: #6f8297;
}

.daily-revenue-column__percentage-meta strong {
  font-size: 11px;
  color: #223140;
}

.daily-revenue-column__percentage-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e8eef7;
  overflow: hidden;
}

.daily-revenue-column__percentage-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #84d9b7 0%, #2fb67c 100%);
}

.daily-revenue-column__tooltip {
  position: absolute;
  left: 50%;
  bottom: 288px;
  transform: translate(-50%, -12px);
  min-width: 172px;
  max-width: 210px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(19, 24, 30, 0.88);
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 34, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 4;
}

.daily-revenue-column:hover .daily-revenue-column__tooltip {
  opacity: 1;
  transform: translate(-50%, -20px);
}

.daily-revenue-tooltip__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.daily-revenue-tooltip__swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex: 0 0 12px;
}

.daily-revenue-tooltip__swatch--leads {
  background: #ff9f43;
}

.daily-revenue-tooltip__swatch--percentage {
  background: #31c0c9;
}

.daily-revenue-tooltip__swatch--revenue {
  background: #ff5a7d;
}

.daily-revenue-tooltip__swatch--dnq {
  background: #c7ccd5;
}

.daily-revenue-chart__grid {
  stroke: rgba(120, 138, 163, 0.18);
  stroke-width: 1;
}

.daily-revenue-chart__baseline {
  stroke: rgba(73, 96, 130, 0.4);
  stroke-width: 1.5;
}

.daily-revenue-chart__bar--revenue {
  fill: #ff8c42;
}

.daily-revenue-chart__bar--dnq {
  fill: #d84e68;
}

.daily-revenue-chart__axis-label,
.daily-revenue-chart__agent-label,
.daily-revenue-chart__team-label,
.daily-revenue-chart__value,
.daily-revenue-chart__bar-label,
.daily-revenue-chart__dnq-label {
  font-family: inherit;
}

.daily-revenue-chart__axis-label {
  fill: #5f6f84;
  font-size: 11px;
}

.daily-revenue-chart__agent-label {
  fill: #1e2b3a;
  font-size: 11px;
  font-weight: 700;
}

.daily-revenue-chart__team-label {
  fill: #6e7f95;
  font-size: 10px;
}

.daily-revenue-chart__value {
  fill: #1d2a38;
  font-size: 11px;
  font-weight: 700;
}

.daily-revenue-chart__bar-label,
.daily-revenue-chart__dnq-label {
  fill: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.daily-revenue-chart__dnq-value {
  fill: #b33e55;
  font-size: 11px;
  font-weight: 700;
}

.daily-revenue-range {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.daily-revenue-range > label,
.agent-performance-range > label {
  min-width: 0;
}

.agent-performance-range {
  grid-template-columns: minmax(170px, 0.7fr) minmax(180px, 0.65fr) minmax(180px, 0.65fr);
  align-items: end;
}

.agent-performance-range input,
.agent-performance-range select {
  width: 100%;
}

.agent-performance-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
}

.agent-performance-summary .stat-card {
  min-height: 0;
}

.agent-performance-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.agent-performance-campaigns {
  width: 100%;
}

.filter-combobox {
  position: relative;
}

.filter-combobox__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  min-width: 100%;
  width: max-content;
  max-width: min(620px, calc(100vw - 120px));
  z-index: 40;
  display: none;
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 8px;
}

.filter-combobox.is-open .filter-combobox__menu {
  display: grid;
  gap: 4px;
}

.filter-combobox__option,
.filter-combobox__empty {
  width: 100%;
  border: 0;
  background: var(--surface);
  border-radius: 10px;
  padding: 11px 12px;
  text-align: left;
  color: inherit;
}

.filter-combobox__option {
  display: grid;
  gap: 4px;
}

.filter-combobox__option strong {
  color: #173a59;
  font-size: 0.93rem;
  line-height: 1.25;
}

.filter-combobox__option span {
  color: #68829b;
  font-size: 0.78rem;
  line-height: 1.25;
}

.filter-combobox__option small {
  color: #68829b;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
}

.filter-combobox__option:hover,
.filter-combobox__option.is-highlighted {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.filter-combobox__option.is-selected {
  font-weight: 700;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 20%, white), color-mix(in srgb, var(--accent) 12%, white));
  color: color-mix(in srgb, var(--accent) 70%, #10243d);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 32%, white);
}

.filter-combobox__option.is-selected strong {
  color: inherit;
}

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

.inline-filter--project-picker {
  min-width: 0;
}

.reporting-home {
  display: grid;
  gap: 22px;
}

.reporting-home__body {
  display: grid;
  grid-template-columns: minmax(240px, 286px) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.reporting-home__body--full {
  grid-template-columns: minmax(0, 1fr);
}

.reporting-top-tabs {
  width: 100%;
  padding: 0 0 10px;
  border-bottom: 1px solid #dbe5ef;
  overflow-x: auto;
}

.reporting-top-tab {
  min-height: 50px;
  border-radius: 6px 6px 0 0;
}

.reporting-home__sidebar {
  display: grid;
  gap: 22px;
  align-content: start;
}

.reporting-sidebar-search input {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #d4dfec;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.reporting-sidebar-group {
  display: grid;
  gap: 12px;
}

.reporting-sidebar-group__title {
  font-size: 1rem;
  font-weight: 800;
  color: #334e68;
}

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

.reporting-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: none;
  border-left: 4px solid transparent;
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: #516a85;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.reporting-sidebar-link:hover {
  background: #edf5fc;
  color: #215c8f;
}

.reporting-sidebar-link.is-active {
  border-left-color: #16a1c9;
  background: #dff5fb;
  color: #214e78;
}

.reporting-sidebar-link__count {
  color: inherit;
  font-weight: 800;
}

.reporting-home__main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.reporting-home-card {
  display: grid;
  gap: 0;
  border: 1px solid #d6e1ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 42, 58, 0.04);
  overflow: hidden;
}

.reporting-home-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 18px;
}

.reporting-home-card__header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #21354d;
}

.reporting-library-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid #d6e1ec;
  border-radius: 10px 10px 0 0;
  border-bottom: none;
  overflow: hidden;
}

.reporting-library-tab {
  min-height: 44px;
  padding: 0 18px;
  border: none;
  border-right: 1px solid #d6e1ec;
  background: #f5f8fb;
  color: #4b6683;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.reporting-library-tab:last-child {
  border-right: none;
}

.reporting-library-tab.is-active {
  background: #fff;
  color: #1e567f;
}

.reporting-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.reporting-library-toolbar__search {
  flex: 1 1 360px;
  max-width: 460px;
}

.reporting-library-toolbar__search input {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #d4dfec;
  background: #fff;
}

.reporting-home-card--library {
  padding: 0 0 10px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.reporting-library-shell {
  border: 1px solid #d6e1ec;
  border-radius: 0 0 12px 12px;
  background: #fff;
  overflow: auto;
}

.reporting-library-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.reporting-library-table thead th {
  padding: 14px 12px;
  border-bottom: 1px solid #d6e1ec;
  background: #edf4fb;
  color: #38526d;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
}

.reporting-library-table tbody td {
  padding: 16px 12px;
  border-bottom: 1px solid #e5edf5;
  vertical-align: middle;
  color: #314a63;
}

.reporting-library-table tbody tr:hover {
  background: #f8fbfe;
}

.reporting-library-cell--check,
.reporting-library-cell--favorite {
  width: 46px;
}

.reporting-library-name {
  display: grid;
  gap: 4px;
}

.reporting-library-name strong {
  color: #1180aa;
  font-size: 1rem;
}

.reporting-library-name span {
  color: #6d8399;
  font-size: 0.86rem;
}

.reporting-library-star {
  border: none;
  background: transparent;
  color: #9bb1c6;
  font-size: 1.2rem;
  cursor: pointer;
}

.reporting-library-star.is-active {
  color: #efb32f;
}

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

.reporting-library-cell--actions {
  text-align: right;
}

.report-clean-workspace {
  display: grid;
  gap: 16px;
}

.report-clean-topbar,
.report-clean-panel {
  border: 1px solid #d7e5f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(31, 74, 110, 0.07);
}

.report-clean-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.report-clean-topbar h3,
.report-clean-panel h4 {
  margin: 0;
  color: #0e2d47;
}

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

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

.report-clean-kpi {
  display: grid;
  gap: 7px;
  min-height: 124px;
  padding: 18px;
  border: 1px solid #d7e5f2;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f5faff 100%);
  color: #506b86;
  box-shadow: 0 12px 28px rgba(31, 74, 110, 0.06);
}

.report-clean-kpi--score {
  background: linear-gradient(135deg, #e8fbff 0%, #ffffff 72%);
  border-color: #9be4ef;
}

.report-clean-kpi span,
.report-clean-panel .section-kicker {
  color: #627e9b;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-clean-kpi strong {
  color: #052b45;
  font-size: 2.05rem;
  line-height: 1;
}

.report-clean-kpi small {
  color: #657f98;
  font-weight: 650;
}

.report-clean-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 330px;
  gap: 14px;
  align-items: start;
}

.report-clean-sidebar,
.report-clean-inspector {
  display: grid;
  gap: 14px;
}

.report-clean-inspector {
  position: sticky;
  top: calc(var(--topbar-shell-height, 48px) + 16px);
}

.report-clean-panel {
  padding: 16px;
}

.report-clean-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.report-clean-filter,
.report-clean-issue {
  width: 100%;
  border: 1px solid #d8e5f1;
  border-radius: 12px;
  background: #f8fbfe;
  color: #183a58;
  cursor: pointer;
  text-align: left;
}

.report-clean-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  margin-top: 8px;
  padding: 9px 10px;
  font-weight: 800;
}

.report-clean-filter strong {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2f7fb;
  color: #007f9e;
  text-align: center;
}

.report-clean-filter.is-active {
  border-color: #00a4bd;
  background: #e9fbff;
  box-shadow: inset 3px 0 0 #00a4bd;
}

.report-clean-recipe,
.report-clean-view {
  border: 1px solid #d8e5f1;
  border-radius: 12px;
  background: #f8fbfe;
  color: #163650;
  cursor: pointer;
}

.report-clean-recipe {
  display: grid;
  gap: 4px;
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  text-align: left;
}

.report-clean-recipe strong {
  color: #0e2d47;
}

.report-clean-recipe span {
  color: #627e99;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.report-clean-recipe:hover,
.report-clean-view:hover {
  border-color: #00a4bd;
  background: #eefbff;
}

.report-clean-viewbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.report-clean-view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 11px;
  font-weight: 850;
}

.report-clean-view span {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2f7fb;
  color: #007f9e;
  text-align: center;
}

.report-clean-view.is-active {
  border-color: #00a4bd;
  background: #e9fbff;
  color: #006b82;
}

.secondary-button--full,
.ghost-button--full {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.report-clean-table-shell {
  max-height: min(62vh, 680px);
  overflow: auto;
  border: 1px solid #d8e5f1;
  border-radius: 14px;
  background: #fff;
}

.report-clean-table {
  min-width: 980px;
}

.report-clean-row {
  display: grid;
  grid-template-columns: var(--report-clean-columns);
}

.report-clean-row > div {
  min-height: 42px;
  padding: 11px 12px;
  border-right: 1px solid #e6eef6;
  border-bottom: 1px solid #e6eef6;
  color: #27445f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-clean-row > div:last-child {
  border-right: none;
}

.report-clean-row--header {
  position: sticky;
  top: 0;
  z-index: 2;
}

.report-clean-row--header > div {
  background: #edf4fb;
  color: #38526d;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.has-clean-issue {
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #f5b849;
}

.has-clean-issue--critical {
  background: #fff4f4;
  box-shadow: inset 3px 0 0 #d94f5c;
}

.has-clean-issue--notice {
  background: #f5fbff;
  box-shadow: inset 3px 0 0 #6ba6d9;
}

.has-clean-change {
  outline: 2px solid rgba(0, 164, 189, 0.22);
  outline-offset: -2px;
  background-image: linear-gradient(135deg, rgba(0, 164, 189, 0.08), rgba(255, 255, 255, 0));
}

.report-clean-issue {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 11px 12px;
}

.report-clean-issue strong {
  color: #102f49;
}

.report-clean-issue span,
.report-clean-issue small,
.report-clean-log-entry span {
  color: #627e99;
}

.report-clean-issue--critical {
  border-color: #fac7cc;
  background: #fff5f6;
}

.report-clean-issue--warning {
  border-color: #f5d58c;
  background: #fffaf0;
}

.report-clean-issue--notice {
  border-color: #b8d7f1;
  background: #f6fbff;
}

.report-clean-log-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf3f9;
}

.report-clean-log-entry:last-child {
  border-bottom: none;
}

.report-clean-panel--push {
  background: linear-gradient(135deg, #f7fbff 0%, #fff 100%);
}

.report-clean-panel--rules {
  border-color: #fac7cc;
  background: linear-gradient(135deg, #fff7f8 0%, #ffffff 100%);
}

.report-clean-panel--rules h4 {
  margin-top: 4px;
}

.report-clean-panel--rules small {
  display: block;
  color: #7a6170;
  font-weight: 750;
  line-height: 1.35;
}

.report-clean-panel--inspector {
  max-height: min(62vh, 680px);
  overflow: auto;
}

.report-clean-push-meta {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.report-clean-push-meta span {
  display: block;
  padding: 7px 9px;
  border: 1px solid #d8e5f1;
  border-radius: 10px;
  background: #fff;
  color: #23445f;
  font-size: 0.82rem;
  font-weight: 800;
}

.danger-button--full {
  width: 100%;
  justify-content: center;
  margin: 10px 0 8px;
}

.danger-text-button {
  color: #c84f5b;
}

.danger-text-button:hover {
  color: #a83c48;
}

.report-clean-governance {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr) minmax(260px, 0.9fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 1180px) {
  .reporting-home__body {
    grid-template-columns: 1fr;
  }

  .reporting-library-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .reporting-library-toolbar__search {
    max-width: none;
  }

  .report-clean-topbar,
  .report-clean-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .report-clean-kpi-grid,
  .report-clean-layout,
  .report-clean-governance {
    grid-template-columns: 1fr;
  }

  .report-clean-inspector {
    position: static;
  }
}

.reporting-project-picker {
  min-width: 0;
}

.reporting-project-picker .filter-combobox__menu {
  gap: 4px;
}

.reporting-projects-layout {
  align-items: start;
}

.reporting-projects-sidebar,
.reporting-projects-detail {
  display: grid;
  gap: 14px;
  min-height: 0;
  align-content: start;
  align-self: start;
}

.reporting-projects-sidebar {
  grid-template-rows: auto auto auto;
}

.reporting-projects-detail {
  grid-template-rows: minmax(0, 1fr);
}

.reporting-projects-sidebar__header {
  padding-bottom: 4px;
}

.reporting-projects-sidebar__filters {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: end;
}

.reporting-projects-sidebar__list,
.reporting-projects-detail__body {
  min-height: 0;
  align-self: start;
}

.reporting-projects-detail__body {
  display: grid;
  align-content: start;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.workload-enterprise-planner {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 1px solid #d5e5f3;
  border-radius: 18px;
  overflow: hidden;
  background: #f4f8fc;
  box-shadow: 0 14px 34px rgba(20, 52, 80, 0.07);
}

.workload-enterprise-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: #102f4a;
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 164, 189, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 58%, #eef7ff 100%);
  border-bottom: 1px solid #dbe9f5;
}

.workload-enterprise-hero h4 {
  margin: 2px 0 4px;
  font-size: clamp(1.25rem, 1.5vw, 1.7rem);
  letter-spacing: -0.04em;
}

.workload-enterprise-hero p:last-child {
  max-width: 760px;
  margin: 0;
  color: #52708a;
  font-size: 0.86rem;
  font-weight: 750;
}

.workload-enterprise-hero__metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 280px;
}

.workload-enterprise-hero__metrics span {
  display: grid;
  min-width: 96px;
  padding: 7px 9px;
  border: 1px solid #d5e5f3;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: #5d7489;
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.workload-enterprise-hero__metrics strong {
  color: #082f4d;
  font-size: 1.12rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.workload-enterprise-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(520px, 1.55fr) minmax(250px, 0.78fr);
  gap: 12px;
  padding: 0 14px;
}

.workload-enterprise-sidebar,
.workload-enterprise-command,
.workload-enterprise-risks {
  border: 1px solid #d5e5f3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 52, 80, 0.06);
}

.workload-enterprise-sidebar {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
}

.workload-enterprise-sidebar h5 {
  margin: 2px 0 0;
  color: #102f4a;
  font-size: 0.98rem;
}

.workload-enterprise-field {
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid #e0ebf5;
  border-radius: 11px;
  background: #f8fbfe;
}

.workload-enterprise-field span {
  color: #304d66;
  font-size: 0.75rem;
  font-weight: 950;
}

.workload-enterprise-field small,
.workload-enterprise-toggle span {
  color: #6d8498;
  font-size: 0.68rem;
  font-weight: 750;
}

.workload-enterprise-field select,
.workload-enterprise-field input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #cbddeb;
  border-radius: 9px;
  padding: 6px 8px;
  color: #102f4a;
  background: #fff;
  font: inherit;
  font-weight: 850;
}

.workload-enterprise-field--number input {
  font-size: 1rem;
  letter-spacing: -0.04em;
}

.workload-enterprise-scope {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.workload-enterprise-scope button {
  min-height: 28px;
  border: 1px solid #cbddeb;
  border-radius: 999px;
  padding: 5px 8px;
  color: #31536e;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}

.workload-enterprise-scope button.is-active {
  border-color: #00a4bd;
  color: #006d82;
  background: #e8fbff;
}

.workload-enterprise-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid #d5e5f3;
  border-radius: 11px;
  background: #fff;
}

.workload-enterprise-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #00a4bd;
}

.workload-enterprise-command {
  display: grid;
  gap: 10px;
  padding: 12px;
  color: #102f4a;
  background:
    radial-gradient(circle at 80% 0%, rgba(0, 164, 189, 0.14), transparent 34%),
    #fff;
}

.workload-enterprise-formula {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 164, 189, 0.22);
  border-radius: 12px;
  background: #effbff;
}

.workload-enterprise-formula span,
.workload-enterprise-risks span,
.workload-enterprise-scoreboard span,
.workload-enterprise-meter span {
  color: #5f7790;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workload-enterprise-formula strong {
  font-size: 0.96rem;
}

.workload-enterprise-formula small {
  color: #52708a;
  font-weight: 800;
}

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

.workload-enterprise-scoreboard article {
  display: grid;
  gap: 3px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid #dce8f3;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.workload-enterprise-scoreboard strong {
  color: #052d4a;
  font-size: clamp(1.65rem, 2.35vw, 2.45rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.workload-enterprise-scoreboard small {
  color: #6d8498;
  font-weight: 800;
}

.workload-enterprise-scoreboard article.is-danger {
  border-color: rgba(200, 77, 87, 0.34);
  background: #fff5f6;
}

.workload-enterprise-scoreboard article.is-success {
  border-color: rgba(25, 135, 84, 0.26);
  background: #f0fbf4;
}

.workload-enterprise-meter {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #dce8f3;
  border-radius: 12px;
  background: #f8fbfe;
}

.workload-enterprise-meter div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.workload-enterprise-meter strong {
  color: #102f4a;
  font-size: 0.9rem;
}

.workload-enterprise-recommendation {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 850;
}

.workload-enterprise-recommendation span {
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workload-enterprise-recommendation.is-danger {
  color: #842029;
  background: #fff2f3;
  border: 1px solid rgba(200, 77, 87, 0.28);
}

.workload-enterprise-recommendation.is-success {
  color: #0f5132;
  background: #eaf8ef;
  border: 1px solid rgba(25, 135, 84, 0.24);
}

.workload-enterprise-risks {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  background:
    radial-gradient(circle at 90% 4%, rgba(255, 122, 89, 0.14), transparent 34%),
    #fff;
}

.workload-enterprise-risks div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #e5edf5;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.workload-enterprise-risks strong {
  color: #082f4d;
  font-size: 1.42rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.workload-enterprise-risks small {
  color: #6d8498;
  font-weight: 800;
}

.workload-planner-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
}

.workload-planner-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.workload-planner-focus {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workload-planner-toolbar .inline-filter {
  min-width: 170px;
}

.workload-capacity-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid var(--hubspot-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.workload-capacity-controls .inline-filter {
  min-width: 0;
}

.workload-capacity-controls .inline-filter small {
  display: block;
  margin-top: 2px;
  color: #6f8498;
  font-size: 0.72rem;
  font-weight: 750;
}

.workload-capacity-controls input[type="number"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--hubspot-border);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--hubspot-text);
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.workload-capacity-toggle {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--hubspot-border);
  border-radius: 10px;
  color: var(--hubspot-text);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 800;
}

.workload-capacity-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--hubspot-blue-strong);
}

.workload-model-explainer {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 164, 189, 0.24);
  border-radius: 16px;
  color: #163a54;
  background: linear-gradient(90deg, #effbff 0%, #fff 100%);
}

.workload-model-explainer strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.workload-model-explainer span {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--hubspot-border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 850;
}

.workload-planning-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
  padding: 6px;
  border: 1px solid var(--hubspot-border);
  border-radius: 13px;
  background: #f6f9fc;
}

.workload-enterprise-planner > .workload-planning-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 14px 14px;
}

.workload-planning-tabs button {
  display: grid;
  gap: 2px;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #39536a;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.workload-planning-tabs button:hover {
  border-color: var(--hubspot-border);
  background: #fff;
  transform: translateY(-1px);
}

.workload-planning-tabs button.is-active {
  border-color: rgba(0, 164, 189, 0.38);
  color: #0c2f4f;
  background: #fff;
  box-shadow: 0 10px 24px rgba(33, 51, 67, 0.1);
}

.workload-planning-tabs span {
  font-size: 0.82rem;
  font-weight: 950;
}

.workload-planning-tabs small {
  color: #6f8498;
  font-size: 0.68rem;
  font-weight: 800;
}

.workload-planning-panel {
  display: none;
}

.workload-planning-panel.is-active {
  display: grid;
}

.workspace-section.workload-planning-panel.is-active {
  display: block;
}

.workload-command-center {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.workload-plan-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--hubspot-border);
  border-radius: 18px;
  color: #143550;
  background: #fff;
  box-shadow: 0 14px 34px rgba(33, 51, 67, 0.08);
}

.workload-plan-card--primary {
  min-height: 270px;
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 164, 189, 0.18), transparent 34%),
    linear-gradient(135deg, #f8fdff 0%, #fff 62%, #eef8ff 100%);
}

.workload-plan-card--capacity {
  background:
    radial-gradient(circle at 92% 4%, rgba(255, 122, 89, 0.16), transparent 30%),
    linear-gradient(180deg, #fff 0%, #fff8f5 100%);
}

.workload-plan-card--horizon {
  background:
    radial-gradient(circle at 92% 8%, rgba(18, 115, 234, 0.15), transparent 32%),
    linear-gradient(180deg, #fff 0%, #f7fbff 100%);
}

.workload-plan-card--calendar,
.workload-plan-card--watchlist {
  grid-column: span 3;
}

.workload-plan-card__header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.workload-plan-card h3 {
  margin: 6px 0 0;
  color: #062b49;
  font-size: clamp(2.7rem, 4.2vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.workload-plan-card__header span:not(.workload-plan-card__badge) {
  display: block;
  margin-top: 6px;
  color: #5f7790;
  font-weight: 850;
}

.workload-plan-card__badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--hubspot-border);
  border-radius: 999px;
  color: #164f8f;
  background: #edf6ff;
  font-size: 0.78rem;
  font-weight: 900;
}

.workload-progress-pair,
.workload-capacity-bars,
.workload-horizon-grid,
.workload-calendar-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.workload-progress-pair div,
.workload-capacity-bars div,
.workload-horizon-grid div,
.workload-calendar-strip div {
  padding: 12px;
  border: 1px solid rgba(126, 152, 176, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.workload-progress-pair span,
.workload-capacity-bars span,
.workload-horizon-grid span,
.workload-calendar-strip span {
  display: block;
  color: #5f7790;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workload-progress-pair strong,
.workload-capacity-bars strong,
.workload-horizon-grid strong,
.workload-calendar-strip strong {
  display: block;
  margin-top: 5px;
  color: #12344f;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.workload-calendar-strip small {
  display: block;
  margin-top: 4px;
  color: #6f8498;
  font-weight: 750;
}

.workload-meter {
  position: relative;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 164, 189, 0.12);
}

.workload-meter span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #00a4bd 0%, #1273ea 100%);
}

.workload-plan-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.workload-plan-card dt {
  color: #5f7790;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workload-plan-card dd {
  margin: 4px 0 0;
  color: #12344f;
  font-size: 1.22rem;
  font-weight: 950;
}

.workload-status-callout {
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 950;
}

.workload-status-callout--danger {
  color: #842029;
  background: #fff2f3;
  border: 1px solid rgba(200, 77, 87, 0.24);
}

.workload-status-callout--success {
  color: #0f5132;
  background: #eaf8ef;
  border: 1px solid rgba(25, 135, 84, 0.22);
}

.workload-plan-card small {
  color: #6f8498;
  font-weight: 750;
  line-height: 1.45;
}

.workload-plan-card--watchlist {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #f5fbff 0%, #fff 100%);
}

.workload-plan-card--watchlist .section-kicker {
  margin: 0;
  white-space: nowrap;
}

.workload-plan-card--watchlist div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workload-plan-card--watchlist span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--hubspot-border);
  border-radius: 999px;
  color: #39536a;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 850;
}

.workload-plan-card--watchlist strong {
  color: #003b5c;
  font-size: 1rem;
}

.workload-capacity-projects {
  margin-top: 14px;
}

.workload-capacity-pill {
  font-weight: 900;
}

.workload-capacity-pill--short {
  --status-color: #c84d57;
  color: #842029;
  background: #fff2f3;
}

.workload-capacity-pill--surplus {
  --status-color: #198754;
  color: #0f5132;
  background: #eaf8ef;
}

.workload-capacity-pill--covered {
  --status-color: #1273ea;
  color: #164f8f;
  background: #edf6ff;
}

.workload-planner-callout {
  margin-top: 1rem;
}

.workload-projection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.workload-projection-grid--lower {
  margin-top: 14px;
}

.workload-projection-table th,
.workload-projection-table td {
  white-space: nowrap;
}

.workload-projection-table th:last-child,
.workload-projection-table td:last-child {
  white-space: normal;
  min-width: 260px;
}

.workload-projection-breakdown {
  color: var(--hubspot-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.workload-planner-progress {
  display: grid;
  gap: 8px;
  margin: 10px 0 8px;
}

.workload-planner-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hubspot-muted);
}

.workload-planner-progress__track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e8eef5;
  overflow: hidden;
}

.workload-planner-progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #3f82c3 0%, #53b7a3 100%);
}

.workload-planner-progress__expected {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 3px;
  border-radius: 999px;
  background: #c84d57;
  transform: translateX(-50%);
  z-index: 2;
}

.workload-planner-row {
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.workload-planner-row:hover {
  background: rgba(18, 115, 234, 0.04);
}

.workload-planner-status-pill {
  font-weight: 800;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--status-color, #5c728a) 18%, white);
}

@media (max-width: 1180px) {
  .reporting-projects-sidebar__filters {
    grid-template-columns: 1fr;
  }

  .workload-enterprise-hero,
  .workload-enterprise-meter div:first-child {
    flex-direction: column;
  }

  .workload-enterprise-hero__metrics {
    justify-content: flex-start;
    min-width: 0;
  }

  .workload-enterprise-grid {
    grid-template-columns: 1fr;
  }

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

  .workload-planner-layout {
    grid-template-columns: 1fr;
  }

  .workload-projection-grid {
    grid-template-columns: 1fr;
  }

  .workload-command-center {
    grid-template-columns: 1fr;
  }

  .workload-planning-tabs {
    grid-template-columns: 1fr;
  }

  .workload-enterprise-planner > .workload-planning-tabs {
    grid-template-columns: 1fr;
  }

  .workload-plan-card--calendar,
  .workload-plan-card--watchlist {
    grid-column: auto;
  }

  .workload-model-explainer,
  .workload-plan-card--watchlist {
    align-items: flex-start;
    flex-direction: column;
  }

  .workload-plan-card--watchlist div {
    justify-content: flex-start;
  }

  .workload-capacity-controls {
    grid-template-columns: 1fr;
  }

  .workload-planner-toolbar {
    align-items: stretch;
  }

  .workload-planner-focus {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .workload-enterprise-hero,
  .workload-enterprise-grid {
    padding-right: 14px;
    padding-left: 14px;
  }

  .workload-enterprise-scoreboard {
    grid-template-columns: 1fr;
  }

  .workload-enterprise-planner > .workload-planning-tabs {
    margin-right: 14px;
    margin-left: 14px;
  }
}

.reporting-projects-detail__body .detail-shell {
  display: grid;
  gap: 14px;
}

.reporting-projects-detail__body .detail-card {
  padding: 20px 22px;
}

.agent-history-page,
.agent-history-section {
  min-height: 0;
}

.agent-history-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
}

.agent-history-table-shell {
  overflow: auto;
  min-height: 0;
  max-height: calc(100vh - 290px);
}

.report-table--history tbody tr {
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.report-table--history tbody tr:hover {
  background: color-mix(in srgb, var(--agent-history-status-color, var(--accent)) 8%, white);
}

.agent-history-row td:first-child {
  box-shadow: inset 3px 0 0 var(--agent-history-status-color, var(--line));
}

.agent-history-row__link {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.reporting-projects-detail__body .detail-title {
  gap: 14px;
}

.reporting-projects-detail__body .report-grid {
  gap: 14px;
}

.reporting-projects-detail__body .report-list,
.reporting-projects-detail__body .stack-list {
  gap: 12px;
}

.reporting-projects-sidebar__list .reporting-project-group + .reporting-project-group {
  margin-top: 14px;
}

.reporting-projects-sidebar .reporting-project-grid {
  grid-template-columns: 1fr;
}

body.crm-theme-dark .filter-combobox__menu {
  background: #162131;
}

body.crm-theme-dark .filter-combobox__option,
body.crm-theme-dark .filter-combobox__empty {
  background: #1b2738;
}

body.crm-theme-dark .filter-combobox__option:hover,
body.crm-theme-dark .filter-combobox__option.is-highlighted {
  background: color-mix(in srgb, var(--accent) 14%, #1b2738);
}

body.crm-theme-dark .daily-revenue-chart__grid {
  stroke: rgba(255, 255, 255, 0.08);
}

body.crm-theme-dark .daily-revenue-chart__columns::before {
  background: rgba(255, 255, 255, 0.08);
}

body.crm-theme-dark .daily-revenue-chart__columns::after {
  background: rgba(255, 255, 255, 0.18);
}

body.crm-theme-dark .daily-revenue-chart__axis-label,
body.crm-theme-dark .daily-revenue-column__footer span {
  fill: #97a8bc;
  color: #97a8bc;
}

body.crm-theme-dark .daily-revenue-column__footer strong {
  color: #e5edf7;
}

body.crm-theme-dark .daily-revenue-column__percentage-meta {
  color: #b1c3d8;
}

body.crm-theme-dark .daily-revenue-column__percentage-meta strong {
  color: #f4f7fb;
}

body.crm-theme-dark .daily-revenue-column__percentage-track {
  background: rgba(132, 157, 189, 0.22);
}

body.crm-theme-dark .daily-revenue-column__segment--dnq {
  background: #9da6b4;
  color: #0f1720;
}

body.crm-theme-dark .daily-revenue-column__tooltip {
  background: rgba(10, 14, 20, 0.94);
}

.daily-revenue-agent-modal__summary {
  margin-top: 18px;
}

.daily-revenue-agent-modal__projects {
  margin-top: 20px;
}

@media (max-width: 1180px) {
  .email-log-summary-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .daily-revenue-range {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .email-log-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-revenue-filters,
  .daily-revenue-range {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .report-builder-columns-layout {
    grid-template-columns: 1fr;
  }

  .field-admin-grid--team-inline {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-admin-actions--team {
    justify-content: flex-start;
    white-space: normal;
  }

  .entry-form--agent-tracker {
    grid-template-columns: minmax(0, 1fr);
  }

  .agent-tracker-filters-row,
  .agent-tracker-filters-row--secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .agent-tracker-filters-row,
  .agent-tracker-filters-row--secondary {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Agent workspace launcher refresh */
.agent-launcher--refined {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - var(--shell-topbar-height) - 166px);
  align-content: stretch;
}

.agent-launcher-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 18px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 12%, white) 0%, transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f5f9fd 100%);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.07);
}

.agent-launcher-hero__copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.agent-launcher-hero__copy h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.agent-launcher-stat--hero {
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--line));
  background: rgba(255, 255, 255, 0.84);
}

.agent-launcher-library {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  min-height: 0;
  overflow: hidden;
}

.agent-launcher-library__header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.agent-launcher-library__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-launcher-library__summary .render-summary {
  margin: 0;
}

.agent-project-grid--refined {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.agent-project-card--refined {
  display: grid;
  grid-template-rows: auto auto auto auto auto auto 1fr;
  grid-auto-flow: row;
  grid-auto-rows: max-content;
  align-items: start;
  justify-items: stretch;
  appearance: none;
  position: relative;
  min-width: 0;
  width: 100%;
  min-height: 400px;
  padding: 18px;
  gap: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  align-content: start;
  overflow: hidden;
  text-align: left;
}

.agent-project-card--refined > * {
  min-width: 0;
  align-self: start;
}

.agent-project-card--refined:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
}

.agent-project-card__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.agent-project-card__code {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, white);
  color: var(--accent);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.agent-project-card__titleblock {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.agent-project-card--refined h4 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-family: "Lexend", "Plus Jakarta Sans", sans-serif;
  overflow-wrap: anywhere;
}

.agent-project-card__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.agent-project-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.agent-project-card__badges span {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.2;
}

.agent-project-card__progress {
  display: grid;
  gap: 7px;
  width: 100%;
}

.agent-project-card__progress-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.86rem;
}

.agent-project-card__progress-top strong {
  color: var(--text);
  font-size: 0.98rem;
}

.agent-project-card__progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-strong);
  overflow: hidden;
}

.agent-project-card__progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 58%, white));
}

.agent-project-card__stats--refined {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.agent-project-card__stats--refined span {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  min-width: 0;
}

.agent-project-card__stats--refined small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-project-card__stats--refined strong {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.agent-project-card__meta--refined {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.agent-project-card__meta--refined span {
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.84rem;
}

.agent-project-card__cta {
  width: 100%;
  margin-top: auto;
  align-self: end;
}

body.crm-theme-dark .agent-launcher-hero,
body.crm-theme-dark .agent-launcher-library,
body.crm-theme-dark .agent-project-card--refined {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.96));
  border-color: var(--line);
  box-shadow: none;
}

body.crm-theme-dark .agent-launcher-stat--hero,
body.crm-theme-dark .agent-project-card__badges span,
body.crm-theme-dark .agent-project-card__stats--refined span,
body.crm-theme-dark .agent-project-card__meta--refined span {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--line);
}

body.crm-theme-dark .agent-project-card__code {
  background: rgba(15, 23, 42, 0.8);
  border-color: var(--line);
}

@media (max-width: 1120px) {
  .agent-launcher-hero {
    grid-template-columns: 1fr;
  }

  .agent-launcher-hero__stats,
  .agent-project-card__stats--refined {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 720px) {
  .agent-launcher-hero,
  .agent-launcher-library,
  .agent-project-card--refined {
    padding: 16px;
    border-radius: 18px;
  }

  .agent-launcher-hero__stats,
  .agent-project-card__stats--refined,
  .agent-project-grid--refined {
    grid-template-columns: 1fr;
  }

  .agent-launcher-library__header,
  .agent-project-card__eyebrow {
    align-items: start;
    flex-direction: column;
  }

  .agent-project-card__progress-top {
    flex-direction: column;
    align-items: start;
  }
}

/* Canonical surface and agent-workspace layout overrides */
.panel-card,
.workspace-shell,
.workspace-section,
.detail-card,
.list-card,
.filter-row-card,
.contact-columns-option,
.stat-card,
.render-summary,
.crm-table-shell,
.filter-summary-bar,
.template-preview-card,
.workspace-empty,
.utility-block,
.report-table,
.report-item {
  border-radius: 16px;
  background: var(--hubspot-surface);
  border: 1px solid var(--hubspot-border);
  box-shadow: none;
}

.panel-card {
  padding: 18px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.pagination-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 16px;
  background: var(--hubspot-surface);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.report-table th,
.report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.84rem;
}

.report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #f7fafc;
}

.report-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

/* Canonical shared table layout */
.contact-pool-list > .crm-table-shell {
  overflow-x: auto;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.contact-pool-list .contact-pool-row {
  width: max-content;
  min-width: 100%;
}

/* Canonical Agent Workspace layout */
.agent-launcher--refined {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - var(--shell-topbar-height) - 166px);
  align-content: stretch;
}

.agent-launcher-library {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  min-height: 0;
  overflow: hidden;
}

.agent-launcher--hubspot {
  min-height: calc(100vh - var(--shell-topbar-height) - 150px);
}

.agent-launcher-library--hubspot {
  gap: 0;
  padding: 0;
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
}

.agent-launcher-pagehead {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 20px 26px 12px;
  border-bottom: 1px solid #dbe7f3;
}

.agent-launcher-pagehead__title {
  display: grid;
  gap: 2px;
}

.agent-launcher-pagehead__title h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.agent-launcher-pagehead__title p {
  margin: 0;
  color: #5e738c;
  font-size: 0.94rem;
  font-weight: 600;
}

.agent-launcher-filterbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 26px 12px;
  border-bottom: 1px solid #dbe7f3;
}

.agent-launcher-filterbar__left,
.agent-launcher-filterbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.agent-launcher-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: min(460px, 100%);
  width: min(460px, 100%);
}

.agent-launcher-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 44px 0 15px;
  border-radius: 6px;
  border: 1px solid #cfdceb;
  background: #ffffff;
  color: #223a57;
  font-size: 0.98rem;
}

.agent-launcher-search__icon {
  position: absolute;
  right: 14px;
  color: #87a0ba;
  font-size: 1rem;
  pointer-events: none;
}

.agent-launcher-status-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  min-width: 180px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #cfdceb;
  background: #ffffff;
  color: #35516f;
  font-size: 0.92rem;
  font-weight: 700;
}

.agent-launcher-status-filter select {
  width: 100%;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: #223a57;
  font: inherit;
  padding-right: 18px;
}

.agent-project-directory {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
}

.agent-project-directory__header,
.agent-project-card--refined {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) minmax(180px, 1.1fr) 100px 120px 120px 120px minmax(180px, 1.2fr);
  align-items: center;
  gap: 16px;
}

.agent-project-directory__header {
  padding: 0 26px;
  min-height: 42px;
  background: #f3f8fc;
  border-bottom: 1px solid #dbe7f3;
  color: #35516f;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.agent-project-directory__body {
  min-height: 0;
  overflow-y: auto;
}

.agent-launcher-pagination {
  position: fixed;
  left: var(--sidebar-width, 245px);
  right: 0;
  bottom: 0;
  z-index: 95;
  display: flex;
  justify-content: center;
  min-height: 48px;
  padding: 6px 14px;
  border-top: 1px solid #dbe5ee;
  background: #ffffff;
  box-shadow: 0 -8px 18px rgba(33, 51, 67, 0.08);
}

.sidebar-collapsed .agent-launcher-pagination,
body.sidebar-collapsed .agent-launcher-pagination {
  left: var(--sidebar-collapsed-width, 72px);
}

.agent-launcher-pagination .pagination-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #0091ae;
  font-size: 0.88rem;
  font-weight: 800;
}

.agent-launcher-pagination .pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.agent-launcher-pagination .pagination-nav,
.agent-launcher-pagination .pagination-page {
  min-width: 0;
  height: 34px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #0091ae;
  box-shadow: none;
  font: inherit;
}

.agent-launcher-pagination .pagination-page.is-active {
  min-width: 28px;
  padding: 0 8px;
  border: 1px solid #7fd1de;
  border-radius: 4px;
  background: #dff8fc;
  color: #074e63;
}

.agent-launcher-pagination .pagination-nav:disabled {
  color: #99adc2;
  opacity: 1;
}

.agent-project-grid--refined {
  display: block;
  min-height: 0;
}

.agent-project-card--refined {
  appearance: none;
  position: static;
  width: 100%;
  height: 78px;
  min-height: 78px;
  padding: 0 26px;
  border: 0;
  border-bottom: 1px solid #e3edf7;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  text-align: left;
  transition: background-color 140ms ease;
  grid-template-rows: none;
  grid-auto-flow: column;
  grid-auto-rows: auto;
  justify-items: stretch;
  align-content: center;
  overflow: visible;
}

.agent-project-card--refined:hover {
  transform: none;
  box-shadow: none;
  border-color: #e3edf7;
  background: #f8fbfe;
}

.agent-project-card--refined > span {
  min-width: 0;
  padding: 8px 0;
  align-self: center;
}

.agent-project-row__name,
.agent-project-row__owner,
.agent-project-row__status {
  display: grid;
  gap: 2px;
}

.agent-project-row__name-main,
.agent-project-row__owner-main {
  color: #1293bf;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
}

.agent-project-row__owner-main {
  color: #243f5d;
  font-weight: 700;
}

.agent-project-row__name-sub,
.agent-project-row__owner-sub,
.agent-project-row__status-sub {
  color: #6b819b;
  font-size: 0.8rem;
  line-height: 1.2;
}

.agent-project-row__metric {
  color: #243f5d;
  font-size: 0.94rem;
  font-weight: 700;
}

.agent-project-row__status {
  justify-items: start;
}

.agent-project-row__status .status-pill {
  min-height: 24px;
  padding: 4px 10px;
}

body.crm-theme-dark .agent-launcher-library--hubspot,
body.crm-theme-dark .agent-project-card--refined {
  background: #0f172a;
}

body.crm-theme-dark .agent-launcher-pagehead,
body.crm-theme-dark .agent-launcher-viewbar,
body.crm-theme-dark .agent-launcher-filterbar,
body.crm-theme-dark .agent-project-directory__header,
body.crm-theme-dark .agent-project-card--refined {
  border-color: var(--line);
}

body.crm-theme-dark .agent-project-directory__header {
  background: rgba(15, 23, 42, 0.88);
}

body.crm-theme-dark .agent-project-card--refined:hover {
  background: rgba(30, 41, 59, 0.62);
}

body.crm-theme-dark .agent-launcher-search input {
  background: rgba(15, 23, 42, 0.72);
  border-color: var(--line);
  color: var(--text);
}

body.crm-theme-dark .agent-launcher-status-filter {
  background: rgba(15, 23, 42, 0.72);
  border-color: var(--line);
  color: var(--text);
}

body.crm-theme-dark .agent-launcher-status-filter select {
  color: var(--text);
}

@media (max-width: 1200px) {
  .agent-project-directory__header,
  .agent-project-card--refined {
    grid-template-columns: minmax(220px, 1.8fr) minmax(160px, 1.1fr) 90px 110px 110px 110px minmax(160px, 1.1fr);
    gap: 12px;
  }
}

@media (max-width: 980px) {
  .agent-launcher-pagehead,
  .agent-launcher-viewbar,
  .agent-launcher-filterbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .agent-launcher-filterbar {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-launcher-search {
    width: 100%;
    min-width: 0;
  }

  .agent-project-directory {
    margin: 0;
  }

  .agent-project-directory__header {
    display: none;
  }

  .agent-project-card--refined {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 14px 16px;
  }

  .agent-project-card--refined > span {
    padding: 4px 0;
  }
}

.agent-list-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.agent-list-shell.is-filter-open {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 25%);
}

.agent-list-shell__main {
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding-bottom: 0;
}

.contact-workspace-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid #dbe6f1;
  background: #f7fbff;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.contact-workspace-mode-switch__tab {
  border: 0;
  background: transparent;
  color: #4d6883;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.contact-workspace-mode-switch__tab.is-active {
  background: #ffffff;
  color: #163a5d;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.contact-pool-list--agent {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  flex: 1 1 auto;
  overflow: hidden;
  gap: 10px;
  padding-bottom: 0;
}

.agent-list-table-shell {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: auto;
  padding: 0 0 4px;
}

.contact-pool-footer--agent {
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  justify-content: center;
}

.contact-pool-footer--agent .pagination-bar {
  margin-inline: auto;
}

/* Final table and dark-surface authority block */
.contact-pool-row {
  min-height: 36px;
  padding: 4px 10px;
  gap: 10px;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  box-shadow: none;
}

.contact-pool-row:first-child {
  border-top: 1px solid var(--line);
}

.contact-pool-row--header {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 38px;
  padding: 0 10px;
  background: #f5f8fb;
  box-shadow: none;
}

.contact-pool-row--header span {
  font-size: 0.68rem;
}

body.crm-theme-dark .panel-card,
body.crm-theme-dark .workspace-shell,
body.crm-theme-dark .workspace-section,
body.crm-theme-dark .detail-card,
body.crm-theme-dark .list-card,
body.crm-theme-dark .crm-table-shell,
body.crm-theme-dark .pagination-bar,
body.crm-theme-dark .filter-summary-bar,
body.crm-theme-dark .template-preview-card,
body.crm-theme-dark .workspace-empty,
body.crm-theme-dark .report-table,
body.crm-theme-dark .report-table th {
  background: #18212b;
  border-color: var(--line);
  color: var(--ink);
}

body.crm-theme-dark .contact-pool-row {
  background: transparent;
  border-color: var(--line);
}

body.crm-theme-dark .contact-pool-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

body.crm-theme-dark .contact-pool-row--header {
  background: #222c3b;
}

/* Shared CRM visual refresh based on the stronger company-directory styling */
.panel-card,
.workspace-shell,
.detail-card,
.list-card,
.filter-row-card,
.crm-table-shell,
.filter-summary-bar,
.workspace-empty,
.report-table,
.report-item {
  border-color: #d8e3ef;
  background: #ffffff;
}

.panel-card {
  padding: 18px;
  border-radius: 16px;
}

.section-heading,
.workspace-header {
  align-items: center;
  gap: 12px;
}

.section-heading h3,
.workspace-header h4 {
  color: #163a59;
  font-weight: 800;
}

.section-kicker {
  color: #5f7891;
  letter-spacing: 0.08em;
}

.inline-filter {
  gap: 6px;
}

.inline-filter > span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f7891;
}

.inline-filter input,
.inline-filter select,
.filter-control input,
.filter-control select,
.filter-control textarea {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid #d8e3ef;
  background: #ffffff;
  box-shadow: none;
}

.inline-filter textarea,
.filter-control textarea {
  min-height: 96px;
}

.primary-button,
.secondary-button,
.ghost-button,
.workspace-header__meta button,
.contact-pool-footer .secondary-button {
  min-height: 40px;
  border-radius: 12px;
  box-shadow: none;
  font-weight: 700;
}

.primary-button {
  background: #ffffff;
  border-color: #cbd6e2;
  color: #33475b;
}

.primary-button:hover {
  background: #eaf0f6;
  border-color: #b7c7d6;
  color: #33475b;
}

.secondary-button,
.ghost-button,
.workspace-header__meta button {
  background: #ffffff;
  border-color: #d8e3ef;
  color: #35526d;
}

.secondary-button:hover,
.ghost-button:hover,
.workspace-header__meta button:hover {
  background: #f7fafc;
  border-color: #c6d7e8;
}

.badge,
.workspace-header__meta .badge {
  min-height: 26px;
  padding: 10px;
  border-radius: 999px;
  background: #e7eff8;
  border: 1px solid #d3e0ec;
  color: #315678;
}

.workspace-tabs {
  gap: 0;
  padding: 0;
  border-bottom: 1px solid #d8e3ef;
}

.workspace-tab,
.workspace-tabs button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px 12px 0 0;
  background: #f8fbfe;
  border-color: #d8e3ef;
  color: #35526d;
  font-weight: 700;
}

.workspace-tab.is-active,
.workspace-tabs button.is-active {
  background: #ffffff;
  color: #163a59;
  box-shadow: inset 0 -2px 0 #3f82c3;
}

.filter-summary-bar {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fbfe;
}

.crm-table-shell,
.report-table-wrap {
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.contact-pool-row--header,
.report-table th {
  background: #f5f8fb;
  border-bottom-color: #d8e3ef;
}

.contact-pool-row,
.report-table td {
  border-bottom-color: #e3ebf3;
}

.contact-pool-row:hover,
.report-table tbody tr:hover,
.response-list-row:hover {
  background: #f9fbfd;
}

.response-list-row {
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
}

.response-list-row.is-selected {
  background: #eef5fc;
  border-color: #bfd4e8;
}

.pagination-bar {
  border: 1px solid #d8e3ef;
  background: #ffffff;
}

.workspace-empty {
  padding: 22px;
  color: #627b93;
  background: #f8fbfe;
}

body.crm-theme-dark .panel-card,
body.crm-theme-dark .workspace-shell,
body.crm-theme-dark .detail-card,
body.crm-theme-dark .list-card,
body.crm-theme-dark .filter-row-card,
body.crm-theme-dark .crm-table-shell,
body.crm-theme-dark .filter-summary-bar,
body.crm-theme-dark .workspace-empty,
body.crm-theme-dark .report-table,
body.crm-theme-dark .report-table-wrap,
body.crm-theme-dark .report-item,
body.crm-theme-dark .response-list-row {
  background: #18212b;
  border-color: #2b3a4d;
}

body.crm-theme-dark .inline-filter input,
body.crm-theme-dark .inline-filter select,
body.crm-theme-dark .filter-control input,
body.crm-theme-dark .filter-control select,
body.crm-theme-dark .filter-control textarea,
body.crm-theme-dark .secondary-button,
body.crm-theme-dark .ghost-button,
body.crm-theme-dark .workspace-header__meta button {
  background: #16202c;
  border-color: #32465d;
  color: var(--ink);
}

body.crm-theme-dark .badge,
body.crm-theme-dark .workspace-header__meta .badge {
  background: #223246;
  border-color: #31455d;
  color: #d7e4f2;
}

body.crm-theme-dark .workspace-tab,
body.crm-theme-dark .workspace-tabs button {
  background: #16202c;
  border-color: #31455d;
  color: #bfd0e0;
}

body.crm-theme-dark .workspace-tab.is-active,
body.crm-theme-dark .workspace-tabs button.is-active {
  background: #1b2634;
  color: #ffffff;
  box-shadow: inset 0 -2px 0 #6aa7de;
}

.workspace-tabs--project-editor {
  margin-top: 12px;
  align-self: start;
  background: transparent;
  border-bottom: 1px solid #d8e3ef;
  padding: 0;
  gap: 0;
}

.workspace-tabs--project-editor .workspace-tab {
  min-height: 44px;
  background: #f8fbfe;
  border-color: #d8e3ef;
  color: #35526d;
  box-shadow: none;
}

.workspace-tabs--project-editor .workspace-tab.is-active {
  background: #ffffff;
  color: #163a59;
  box-shadow: inset 0 -2px 0 #5e7f9c;
}

.project-admin-card {
  background: #ffffff;
  border-color: #d8e3ef;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.project-admin-preview-card {
  border-style: dashed;
}

.project-admin-field--full {
  grid-column: 1 / -1;
}

.project-admin-inline-label > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-help-button {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #c8d7e6;
  background: #f4f8fb;
  color: #44627f;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.inline-help-button:hover {
  background: #eaf2f8;
  border-color: #b5cade;
}

.project-admin-products-card {
  gap: 16px;
}

.project-admin-product-list {
  display: grid;
  gap: 10px;
}

.project-admin-product-card {
  border: 1px solid #d8e3ef;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.project-admin-product-card__open {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
}

.project-admin-product-card__open:hover {
  background: #f9fbfd;
}

.project-admin-product-card__main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-admin-product-card__main h4 {
  margin: 0;
  color: #163a59;
  font-size: 1rem;
}

.project-admin-product-card__main p:last-child {
  margin: 0;
  color: #6b7f94;
  font-size: 0.86rem;
}

.project-admin-product-card__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.project-admin-product-card__meta .badge {
  padding: 0 10px;
}

.project-admin-product-card__meta .badge:first-child {
  margin-left: auto;
}

.project-admin-product-list .workspace-empty {
  border: 1px dashed #d8e3ef;
  border-radius: 16px;
  background: #fbfdff;
}

.project-additional-modal-shell .country-combobox {
  width: 100%;
}

.project-additional-modal-shell .country-combobox__trigger {
  min-height: 44px;
}

.project-admin-card .multi-select-picker__trigger {
  min-height: 46px;
}

.project-admin-card .multi-select-picker__dropdown {
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.project-additional-editor-list {
  display: grid;
  gap: 14px;
}

.project-additional-field-list {
  display: grid;
  gap: 10px;
}

.project-additional-field-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid #d8e3ef;
  border-radius: 16px;
  background: #ffffff;
  color: #223548;
  text-align: left;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.project-additional-field-card:hover {
  border-color: #b9cce2;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.project-additional-field-card__main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-additional-field-card__main strong {
  font-size: 0.98rem;
  color: #163a59;
}

.project-additional-field-card__main p {
  margin: 0;
  color: #6b7f94;
  font-size: 0.86rem;
}

.project-additional-field-card__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.project-additional-field-card__meta .badge {
  padding: 0 10px;
}

.project-additional-modal-shell {
  max-height: min(80vh, 820px);
  overflow: hidden;
}

.project-additional-modal-shell label {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #52667c;
}

.project-additional-modal-shell input,
.project-additional-modal-shell select,
.project-additional-modal-shell textarea {
  min-width: 0;
  font-size: 0.93rem;
  text-transform: none;
  letter-spacing: normal;
}

.project-additional-modal-shell textarea {
  min-height: 128px;
  line-height: 1.45;
}

.project-additional-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 2px 2px 0;
  overflow: auto;
}

.project-additional-modal-grid__full {
  grid-column: 1 / -1;
}

.project-additional-visibility-card {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #d8e3ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
}

.project-additional-visibility-card h5 {
  margin: 4px 0 6px;
  color: #163a59;
  font-size: 1rem;
}

.project-additional-visibility-card .workspace-copy {
  margin: 0;
}

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

.field-admin-actions--modal {
  position: sticky;
  bottom: 0;
  margin-top: 16px;
  padding-top: 14px;
  padding-bottom: 2px;
  border-top: 1px solid rgba(111, 145, 191, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), #ffffff 38%);
}

.field-admin-actions__spacer {
  flex: 1 1 auto;
}

body.crm-theme-dark .project-additional-field-card {
  background: #1b2634;
  border-color: #31455d;
  color: #edf4fb;
}

body.crm-theme-dark .workspace-tabs--project-editor {
  border-bottom-color: #31455d;
}

body.crm-theme-dark .workspace-tabs--project-editor .workspace-tab {
  background: #16202c;
  border-color: #31455d;
  color: #bfd0e0;
}

body.crm-theme-dark .workspace-tabs--project-editor .workspace-tab.is-active {
  background: #1b2634;
  color: #ffffff;
  box-shadow: inset 0 -2px 0 #6f91b4;
}

body.crm-theme-dark .project-admin-card,
body.crm-theme-dark .project-admin-product-card {
  background: #1b2634;
  border-color: #31455d;
}

body.crm-theme-dark .project-admin-product-card__open:hover {
  background: #202c3a;
}

body.crm-theme-dark .project-admin-product-card__main h4 {
  color: #ffffff;
}

body.crm-theme-dark .project-admin-product-card__main p:last-child {
  color: #bfd0e0;
}

body.crm-theme-dark .inline-help-button {
  background: #16202c;
  border-color: #31455d;
  color: #d7e5f2;
}

body.crm-theme-dark .project-additional-field-card__main strong,
body.crm-theme-dark .project-additional-visibility-card h5 {
  color: #ffffff;
}

body.crm-theme-dark .project-additional-field-card__main p,
body.crm-theme-dark .project-additional-modal-shell label {
  color: #bfd0e0;
}

body.crm-theme-dark .project-additional-visibility-card {
  background: linear-gradient(180deg, #192330 0%, #16202c 100%);
  border-color: #31455d;
}

body.crm-theme-dark .field-admin-actions--modal {
  border-top-color: #31455d;
  background: linear-gradient(180deg, rgba(22, 32, 44, 0.1), #16202c 40%);
}

@media (max-width: 900px) {
  .project-additional-field-card,
  .project-additional-visibility-grid,
  .project-additional-modal-grid {
    grid-template-columns: 1fr;
  }

  .project-additional-field-card {
    gap: 12px;
  }

  .project-additional-field-card__meta {
    justify-content: flex-start;
  }

  .project-admin-product-card__open {
    grid-template-columns: 1fr;
  }

  .project-admin-product-card__meta {
    justify-content: flex-start;
  }
}

body.crm-theme-dark .contact-pool-row--header,
body.crm-theme-dark .report-table th {
  background: #223042;
  border-bottom-color: #31455d;
}

body.crm-theme-dark .contact-pool-row:hover,
body.crm-theme-dark .report-table tbody tr:hover,
body.crm-theme-dark .response-list-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

body.crm-theme-dark .response-list-row.is-selected {
  background: #213247;
  border-color: #39516b;
}

/* Final Agent Workspace working-list redesign */
.agent-list-header {
  padding-bottom: 12px;
  border-bottom: 1px solid #d8e3ef;
}

.agent-list-header__title {
  display: flex;
  align-items: center;
  min-width: 0;
}

.agent-list-header__tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #d8e3ef;
  background: #ffffff;
  color: #163a59;
  font-size: 1rem;
  font-weight: 800;
}

.agent-list-header__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7eff8;
  color: #315678;
  font-size: 0.78rem;
  font-weight: 800;
}

.agent-list-header__meta {
  justify-content: flex-end;
}

.agent-list-header__meta:empty {
  display: none;
}

.agent-workspace-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 0 12px;
}

.agent-workspace-toolbar__filters {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-workspace-toolbar__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-pool-toolbar--header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  white-space: normal;
  width: 100%;
  max-width: 100%;
}

.contact-pool-toolbar--header > * {
  flex: 0 0 auto;
}

.contact-workspace-toolbar--shared {
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  row-gap: 8px;
  column-gap: 8px;
}

.contact-workspace-toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.contact-workspace-toolbar-row__left {
  flex: 1 1 260px;
  min-width: 0;
}

.contact-workspace-toolbar-row__right {
  flex: 1 1 520px;
  min-width: 0;
}

.contact-workspace-projectscope-filter {
  min-width: 210px;
  max-width: 280px;
  flex: 0 1 250px;
}

.contact-workspace-toolbar--shared .badge {
  align-self: center;
}

.agent-workspace-list-shell .contact-pool-list--agent {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.contact-list-shell .workspace-header {
  display: block;
  padding: 2px 0 12px;
  margin-bottom: 0;
  border-bottom: 1px solid #e3ebf3;
  position: relative;
  z-index: 6;
}

.contact-list-shell {
  height: calc(100vh - var(--shell-topbar-height) - 166px);
  min-height: calc(100vh - var(--shell-topbar-height) - 166px);
}

.agent-workspace-list-shell .agent-list-shell__main {
  position: relative;
  padding-bottom: 0 !important;
}

.contact-list-shell .workspace-header__meta {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  align-items: center;
  justify-content: stretch;
  overflow: visible;
  margin-left: 0;
  position: relative;
  z-index: 7;
}

.contact-list-shell .workspace-header__meta:empty {
  display: none;
}

.contact-list-shell .workspace-header > div:first-child {
  min-width: 0;
  flex: 1 1 260px;
}

.contact-workspace-header-actions {
  justify-content: flex-end;
  align-items: center;
  width: auto;
  max-width: 100%;
  position: relative;
  z-index: 7;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-list-shell .workspace-header__meta .filter-summary-bar--inline {
  margin: 0;
}

.contact-list-shell .workspace-header__meta .filter-summary-bar__meta,
.contact-list-shell .workspace-header__meta .pill-row {
  margin-top: 0;
}

.contact-list-shell .workspace-header__meta .filter-summary-bar--inline {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-width: 0;
}

.contact-list-shell .workspace-header__meta .filter-summary-bar--inline .pill-row {
  display: none;
}

.contact-list-shell .workspace-header__meta .filter-summary-bar__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.contact-list-shell .workspace-header__meta .filter-summary-bar__label {
  color: #163a5d;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.2;
}

.contact-list-shell .workspace-header__meta .filter-summary-bar--inline .badge {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef5fc;
  border: 1px solid #d7e3ef;
  color: #375a7d;
  font-size: 0.8rem;
  font-weight: 800;
}

.contact-workspace-header-actions .secondary-button.secondary-button--compact,
.contact-workspace-header-actions .primary-button,
.contact-workspace-header-actions .ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #d7e3ef;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  color: #32557a;
  font-size: 0.95rem;
  font-weight: 800;
}

.contact-workspace-header-actions .secondary-button.secondary-button--compact:hover,
.contact-workspace-header-actions .primary-button:hover,
.contact-workspace-header-actions .ghost-button:hover {
  border-color: #c6d8ea;
  background: #f8fbfe;
  color: #173b5d;
}

.hubspot-contact-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) auto;
  align-items: center;
  gap: 12px 18px;
  padding: 12px 0 14px;
  border-bottom: 1px solid #e7edf4;
}

.hubspot-contact-toolbar__left,
.hubspot-contact-toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.hubspot-contact-toolbar__left {
  flex: 1 1 auto;
}

.hubspot-contact-toolbar__right {
  justify-content: flex-end;
  flex: 0 1 auto;
}

.hubspot-contact-toolbar .agent-inline-filter,
.hubspot-contact-toolbar .pill,
.hubspot-contact-toolbar .badge {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 11px;
  border: 1px solid #d7e3ef;
  background: #ffffff;
  color: #315678;
  font-size: 0.96rem;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.hubspot-contact-toolbar .agent-inline-filter::after {
  display: none;
}

.hubspot-contact-toolbar .agent-inline-filter--active,
.hubspot-contact-toolbar .agent-inline-filter.is-active {
  background: #eef7ff;
  border-color: #c5daed;
  color: #163a5d;
}

.hubspot-contact-toolbar__search {
  flex: 1 1 520px;
  min-width: min(100%, 520px);
  max-width: 760px;
}

.hubspot-contact-toolbar__search input {
  min-width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid #d7e3ef;
  background: #ffffff;
  padding: 0 16px;
  color: #163a5d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-size: 0.98rem;
  font-weight: 600;
}

.agent-workspace-list-shell .contact-pool-footer--agent {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 24;
  width: max-content;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  padding: 10px 16px;
  border: 1px solid #d8e3ef;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.agent-workspace-list-shell .contact-pool-footer--agent .pagination-bar {
  margin-inline: auto;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-workspace-projectscope-filter,
.contact-workspace-projectscope-filter .multi-select-picker {
  position: relative;
  z-index: 7;
}

.agent-workspace-toolbar .agent-product-strip {
  flex: 1 1 auto;
  justify-content: flex-start;
  max-width: none;
}

.contact-pool-list--agent {
  gap: 12px;
}

.contact-list-shell .contact-pool-list--agent {
  display: block;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.filter-summary-bar--inline {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fbfe;
  border: 1px solid #d8e3ef;
}

.filter-summary-bar--inline .filter-summary-bar__meta {
  gap: 12px;
}

.filter-summary-bar--inline .pill {
  background: #ffffff;
  border: 1px solid #d8e3ef;
  text-align: center;
}

.agent-list-table-shell {
  padding: 0;
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  background: #ffffff;
}

.contact-list-shell .agent-list-table-shell {
  height: 100%;
  max-height: 100%;
}

.contact-list-shell .contact-pool-table-wrap {
  height: 100%;
  max-height: 100%;
}

.contact-pool-row {
  min-height: 44px;
  padding: 6px 14px;
}

.contact-pool-row--header {
  min-height: 40px;
  padding: 0 14px;
  background: #f5f8fb;
  border-bottom-color: #d8e3ef;
}

.contact-pool-row:hover {
  background: #f9fbfd;
}

.contact-pool-footer--agent {
  position: relative;
  padding-top: 12px;
  border-top: 1px solid #d8e3ef;
}

body.crm-theme-dark .agent-list-header {
  border-bottom-color: #2b3a4d;
}

body.crm-theme-dark .agent-list-header__tab,
body.crm-theme-dark .agent-list-table-shell,
body.crm-theme-dark .filter-summary-bar--inline {
  background: #18212b;
  border-color: #2b3a4d;
  color: var(--ink);
}

body.crm-theme-dark .agent-list-header__count {
  background: #223246;
  color: #d7e4f2;
}

body.crm-theme-dark .agent-workspace-toolbar__project-code {
  background: #18212b;
  border-color: #2b3a4d;
  color: var(--ink);
}

/* Final authority for agent detail action buttons */
.topbar-context-actions--agent-detail .agent-context-button {
  background: #ffffff !important;
  border: 1px solid #d8e3ef !important;
  color: #35526d !important;
  box-shadow: none !important;
}

.topbar-context-actions--agent-detail .agent-context-button:hover,
.topbar-context-actions--agent-detail .agent-context-button:focus-visible {
  background: #f7fafc !important;
  border-color: #c6d7e8 !important;
  color: #163a59 !important;
}

.topbar-context-actions--agent-detail .agent-context-button--project {
  background: #ff7a59 !important;
  border-color: #ff7a59 !important;
  color: #ffffff !important;
}

.topbar-context-actions--agent-detail .agent-context-button--project:hover,
.topbar-context-actions--agent-detail .agent-context-button--project:focus-visible {
  background: #f36d4c !important;
  border-color: #f36d4c !important;
  color: #ffffff !important;
}

.topbar-context-actions--agent-detail .agent-context-button--list {
  background: #eef5fc !important;
  border-color: #cfe0ef !important;
  color: #1a5277 !important;
}

.topbar-context-actions--agent-detail .agent-context-button--list:hover,
.topbar-context-actions--agent-detail .agent-context-button--list:focus-visible {
  background: #e1edf8 !important;
  border-color: #c6d7e8 !important;
  color: #163a59 !important;
}

.topbar-context-actions--agent-detail .agent-context-button--nav {
  background: #ffffff !important;
  border-color: #d8e3ef !important;
  color: #35526d !important;
}

.topbar-context-actions--agent-detail .agent-context-button--nav:hover,
.topbar-context-actions--agent-detail .agent-context-button--nav:focus-visible {
  background: #f7fafc !important;
  border-color: #c6d7e8 !important;
  color: #163a59 !important;
}

body.crm-theme-dark .topbar-context-actions--agent-detail .agent-context-button {
  background: #18212b !important;
  border-color: #32465d !important;
  color: var(--ink) !important;
}

body.crm-theme-dark .topbar-context-actions--agent-detail .agent-context-button:hover,
body.crm-theme-dark .topbar-context-actions--agent-detail .agent-context-button:focus-visible {
  background: #223042 !important;
  border-color: #39516b !important;
  color: #ffffff !important;
}

body.crm-theme-dark .topbar-context-actions--agent-detail .agent-context-button--project {
  background: #ff7a59 !important;
  border-color: #ff7a59 !important;
  color: #ffffff !important;
}

body.crm-theme-dark .filter-summary-bar--inline .pill {
  background: #16202c;
  border-color: #32465d;
}

body.crm-theme-dark .contact-pool-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

body.crm-theme-dark .contact-pool-row--header {
  background: #223042;
  border-bottom-color: #31455d;
}

/* Agent Workspace project tabs redesign */
.agent-workspace-project-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-height: 100%;
}

.agent-workspace-project-shell.is-filter-open {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.agent-workspace-project-shell__main {
  display: grid;
  gap: 16px;
  min-height: 0;
  padding: 20px 20px 24px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #dbe5ef;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.05);
}

.agent-workspace-project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e4edf6;
}

.agent-workspace-project-head__identity h3 {
  margin: 4px 0 6px;
  font-size: 33px;
  line-height: 1.08;
  color: #123454;
}

.agent-workspace-project-head__identity p:last-child {
  margin: 0;
  color: #67809b;
  font-size: 14px;
}

.agent-workspace-project-head__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.agent-workspace-project-tabshell {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  flex: 1 1 auto;
}

.agent-workspace-project-tabs {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0 0 1px;
  border-bottom: 1px solid #dfe7ef;
  overflow: hidden;
}

.agent-workspace-project-tabs__nav {
  display: flex;
  align-items: center;
  gap: 16px;
  grid-column: 1 / -1;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  padding: 0 0 8px 12px;
}

.agent-workspace-project-tabs__links,
.agent-workspace-project-tabs__buttons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.agent-workspace-project-tabs__links {
  min-width: 0;
}

.agent-workspace-project-tabs__buttons {
  justify-content: flex-end;
  margin-left: auto;
}

.agent-workspace-project-tabs__chip-divider {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: #d8e3ee;
}

.agent-record-fixed-utilities {
  position: fixed;
  right: 24px;
  bottom: 1px;
  z-index: 32;
  display: block;
}

.agent-record-fixed-utilities .agent-layout-link {
  position: static;
  right: auto;
  bottom: auto;
  margin: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #516f90;
  text-decoration: none;
}

.agent-workspace-tabbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  border-bottom: 1px solid #e4ebf3;
  padding-bottom: 2px;
}

.agent-workspace-tabbar-controls {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 8px 0 8px 16px;
}

.agent-workspace-project-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border: 1px solid #d9e4ef;
  border-bottom-color: transparent;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
  color: #355779;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  position: relative;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.agent-workspace-project-tab__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-workspace-project-tab:hover {
  color: #163b5d;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-color: #c8d9e8;
}

.agent-workspace-project-tab.is-active {
  background: #ffffff;
  color: #123454;
  border-color: #d5e2ef;
  border-bottom-color: #ffffff;
  box-shadow: inset 0 -4px 0 #10bfd4, 0 8px 16px rgba(18, 52, 84, 0.04);
  z-index: 2;
}

.agent-workspace-project-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 26px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #edf9fb;
  color: #2b5876;
  font-size: 0.82rem;
  font-weight: 800;
}

.agent-workspace-project-tab.is-active .agent-workspace-project-tab__count {
  background: #dff7fb;
  color: #0f6671;
}

.agent-workspace-project-toolbar--hubspot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 0 14px;
  border-bottom: 1px solid #e7eef6;
}

.agent-workspace-project-toolbar__left,
.agent-workspace-project-toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.agent-workspace-layer-picker,
.agent-workspace-project-search {
  display: grid;
  gap: 6px;
}

.agent-workspace-project-search--inline {
  display: flex;
  align-items: center;
  min-width: 340px;
}

.agent-workspace-layer-picker--inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-workspace-layer-picker--menu {
  position: relative;
  min-width: 334px;
}

.agent-workspace-layer-picker__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid #d7e3ef;
  background: #ffffff;
  color: #173552;
  text-align: left;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.agent-workspace-layer-picker__trigger:hover {
  border-color: #bcd1e2;
  background: #f8fbfe;
}

.agent-workspace-layer-picker.is-open .agent-workspace-layer-picker__trigger {
  border-color: #8eb7d8;
  box-shadow: 0 0 0 3px rgba(47, 105, 200, 0.08);
}

.agent-workspace-layer-picker__swatch,
.agent-workspace-layer-option__swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--layer-swatch, #315678);
  flex: 0 0 auto;
}

.agent-workspace-layer-picker__content,
.agent-workspace-layer-option__body {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.agent-workspace-layer-picker__value,
.agent-workspace-layer-option__title {
  color: #173552;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.agent-workspace-layer-picker__caret {
  color: #6f89a5;
  font-size: 12px;
  flex: 0 0 auto;
}

.agent-workspace-layer-picker__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 30;
  display: none;
  padding: 8px;
  border: 1px solid #d7e3ef;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.agent-workspace-layer-picker.is-open .agent-workspace-layer-picker__menu {
  display: grid;
  gap: 6px;
}

.agent-workspace-layer-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
}

.agent-workspace-layer-picker__meta {
  color: #7590ab;
  font-size: 0.82rem;
  line-height: 1.2;
}

.agent-workspace-layer-option:hover {
  background: #f7fbff;
  border-color: #dce8f4;
}

.agent-workspace-layer-option.is-active {
  background: #eef6ff;
  border-color: #c7dcf0;
}

.agent-workspace-layer-option__meta {
  color: #7690a8;
  font-size: 12px;
  line-height: 1.2;
}

.agent-workspace-layer-option__check {
  color: #2f69c8;
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 auto;
}

.agent-workspace-layer-picker__label,
.agent-workspace-project-search__label {
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b8198;
}

.agent-workspace-layer-picker select,
.agent-workspace-project-search input {
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid #d5e0ec;
  background: #ffffff;
  color: #173552;
  font-size: 14px;
  font-weight: 600;
  padding: 0 11px;
  box-shadow: none;
}

.agent-workspace-layer-picker select {
  min-width: 210px;
}

.agent-workspace-project-search input {
  min-width: 320px;
}

.agent-workspace-layer-picker__meta {
  font-size: 12px;
  color: #7690a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-workspace-project-toolbar__right .secondary-button.secondary-button--compact,
.agent-workspace-project-toolbar__right .ghost-button,
.agent-workspace-project-toolbar__right .primary-button {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  border-color: #d5e0ec;
  box-shadow: none;
}

.agent-workspace-project-toolbar__right .secondary-button.secondary-button--compact {
  background: #ffffff;
  color: #335270;
}

.agent-workspace-project-toolbar__right .secondary-button.secondary-button--compact:hover {
  background: #f7fafc;
  border-color: #bcd1e2;
  color: #163a5d;
}

.agent-workspace-project-content {
  min-width: 0;
  min-height: 0;
  display: grid;
  overflow: hidden;
}

.agent-workspace-project-detail,
.agent-workspace-project-content .panel-card--agent-detail,
.agent-workspace-project-content .detail-shell {
  min-height: 0;
  overflow: hidden;
}

.agent-list-table-shell--hubspot {
  border-radius: 16px;
  overflow: hidden;
}

.agent-workspace-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: calc(100vh - var(--shell-topbar-height) - 255px);
  max-height: calc(100vh - var(--shell-topbar-height) - 255px);
  overflow: hidden;
}

.agent-workspace-list-panel .filter-summary-bar {
  margin-bottom: 12px;
}

.agent-workspace-list-panel .agent-list-table-shell--hubspot {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.agent-workspace-list-panel__table-wrap {
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  position: relative;
}

.agent-workspace-list-panel.is-loading .pagination-bar {
  pointer-events: none;
  opacity: 0.62;
}

.agent-workspace-list-panel__loading {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #d7e3f0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  z-index: 2;
}

.agent-workspace-list-footer__loading {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.agent-workspace-project-detail {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.agent-workspace-project-detail--with-banner {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.agent-workspace-project-detail > .detail-shell {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.agent-workspace-company-detail {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.agent-workspace-company-detail .company-detail-shell {
  min-height: 0;
  padding-bottom: 24px;
}

.agent-workspace-project-detail .agent-record-shell--hubspot {
  height: 100% !important;
  max-height: 100% !important;
}

.agent-company-directory {
  border: 1px solid #d7e3f0;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.agent-company-directory-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.agent-company-directory-scroll {
  min-height: 0;
  overflow: auto;
}

.agent-company-directory-scroll .agent-company-directory {
  width: max-content;
  min-width: 100%;
}

.agent-company-directory__header,
.agent-company-directory__row {
  display: grid;
  grid-template-columns: minmax(180px, 1.45fr) minmax(128px, 0.82fr) 90px 100px 110px 120px 210px;
  gap: 16px;
  align-items: center;
  padding: 0 18px;
}

.agent-company-directory__header {
  min-height: 54px;
  background: #f5f9fd;
  border-bottom: 1px solid #dbe6f1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #496681;
}

.agent-company-directory__row {
  min-height: 76px;
  border-bottom: 1px solid #e8eef5;
}

.agent-company-directory__row:last-child {
  border-bottom: 0;
}

.agent-company-directory__name,
.agent-company-directory__meta {
  display: grid;
  gap: 4px;
}

.agent-company-directory__name strong {
  color: #0f6cbd;
  font-size: 16px;
}

.agent-company-directory__name small,
.agent-company-directory__meta {
  color: #6f879f;
  font-size: 13px;
}

.agent-company-directory__metric {
  font-size: 15px;
  font-weight: 700;
  color: #163a5d;
}

.agent-company-directory__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  white-space: nowrap;
}

.agent-company-directory__actions .secondary-button,
.agent-company-directory__actions .ghost-button {
  flex: 0 0 auto;
}

.agent-workspace-project-content .contact-pool-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}

.agent-workspace-project-content .floating-filter-link {
  position: fixed;
  right: 0px;
  bottom: -3px;
  z-index: 18;
  margin-left: 0;
  border-radius: 999px;
  background: none;
  padding: 6px 10px;
  box-shadow: none;
}

.agent-workspace-project-content .filter-summary-bar {
  margin-bottom: 14px;
}

.agent-workspace-project-content .detail-shell {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.agent-workspace-viewbar--hubspot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 2px 0 2px;
}

.agent-workspace-viewbar__left,
.agent-workspace-viewbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.agent-filter-drawer .assignment-actions--filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.agent-filter-drawer .primary-button,
.agent-filter-drawer .secondary-button,
.agent-filter-drawer .ghost-button {
  width: 100%;
  max-width: none;
}

.agent-filter-drawer .assignment-actions__half {
  width: 100%;
  max-width: none;
}

.agent-filter-drawer #closeAgentFilters {
  width: 100%;
}

.agent-filter-drawer .assignment-actions,
.agent-filter-drawer .assignment-actions--filter-stack,
.agent-filter-drawer .assignment-actions--filter-grid,
.agent-filter-drawer .assignment-actions--filter-stack > button,
.agent-filter-drawer .assignment-actions--filter-grid > button {
  align-self: stretch;
}

.agent-filter-drawer .assignment-actions--filter-stack > button,
.agent-filter-drawer .assignment-actions--filter-grid > button {
  justify-content: center;
}

.agent-filter-drawer [id*="SavedSearches"],
.contact-workspace-toolbar--shared [id*="SavedSearches"] {
  border-color: #b7d6f7;
  background: linear-gradient(180deg, #f3f9ff 0%, #e7f2ff 100%);
  color: #0b63c7;
}

.agent-filter-drawer [id*="SavedSearches"]:hover,
.contact-workspace-toolbar--shared [id*="SavedSearches"]:hover {
  border-color: #97c0ef;
  background: linear-gradient(180deg, #eef7ff 0%, #ddecff 100%);
  color: #084c99;
}

.agent-workspace-project-shell.is-filter-open {
  grid-template-columns: minmax(0, 1fr) 520px;
}

.agent-filter-drawer--hubspot {
  position: sticky;
  top: 18px;
  align-self: start;
  padding: 0;
  height: calc(100vh - 36px);
  min-height: 0;
  max-height: none;
  overflow: hidden;
  border-radius: 18px;
  border-color: #d9e5f1;
  box-shadow: 0 18px 38px rgba(17, 41, 68, 0.08);
}

.agent-filter-drawer--hubspot .agent-filter-drawer__shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  background: white;
}

.agent-filter-drawer--hubspot .agent-filter-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid #d8e3ef;
}

.agent-filter-drawer__header-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.agent-filter-drawer__header-copy h3 {
  margin: 0;
  color: #1f4a74;
  font-size: 1.25rem;
  line-height: 1.05;
  white-space: nowrap;
}

.agent-filter-close-button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #00a4bd;
  font-size: 0;
  line-height: 1;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.agent-filter-close-button::before {
  content: "×";
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

.agent-filter-drawer__close {
  flex: 0 0 auto;
  margin-left: auto;
}

.agent-filter-close-button:hover {
  background: transparent;
  color: #007a8c;
}

.agent-filter-drawer--hubspot .agent-filter-drawer__body {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px;
  background: #fbfdff;
}

.agent-filter-group-card {
  display: grid;
  gap: 16px;
}

.agent-filter-group-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
}

.agent-filter-group-card__clear {
  border-color: #d8e3ef;
  color: #52718d;
  background: #ffffff;
}

.agent-filter-group-card__body {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #e5edf5;
  background: #f7fafc;
}

.filter-builder--hubspot {
  display: grid;
  gap: 16px;
}

.hubspot-filter-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed #c9d9e8;
  background: #ffffff;
  color: #5b7690;
}

.hubspot-filter-empty strong {
  color: #244c73;
}

.hubspot-filter-row {
  position: relative;
  display: grid;
  gap: 10px;
}

.hubspot-filter-row__connector {
  padding-left: 4px;
  color: #3f5f7b;
  font-size: 0.95rem;
  font-weight: 600;
}

.hubspot-filter-rule {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: stretch;
  padding-right: 0;
}

.hubspot-filter-rule__fields {
  display: grid;
  gap: 10px;
  width: 100%;
}

.hubspot-filter-rule__value-row {
  display: grid;
  grid-template-columns: minmax(120px, 25%) minmax(0, 75%);
  gap: 10px;
}

.hubspot-filter-rule__field,
.hubspot-filter-rule__fields select,
.hubspot-filter-rule__fields input,
.hubspot-filter-rule__value-row select,
.hubspot-filter-rule__value-row input {
  width: 100%;
}

.hubspot-filter-rule__field .import-mapping-input,
.hubspot-filter-rule__fields select,
.hubspot-filter-rule__fields input,
.hubspot-filter-rule__value-row select,
.hubspot-filter-rule__value-row input {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #cfe0ef;
  background: #ffffff;
  font-size: 0.97rem;
  color: #244a70;
}

.hubspot-filter-rule__field .filter-combobox__menu {
  min-width: 100%;
  width: 100%;
  max-width: none;
}

.filter-combobox__menu--properties {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  display: none;
  max-height: min(430px, 62vh);
  overflow: auto;
  padding: 12px 0;
  border: 1px solid #c9d8e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(33, 51, 67, 0.16);
}

.filter-combobox.is-open .filter-combobox__menu--properties {
  display: block;
}

.agent-filter-drawer--hubspot .filter-combobox.is-open .filter-combobox__menu--properties {
  position: static;
  display: block;
  width: 100%;
  max-width: none;
  max-height: min(440px, calc(100vh - 300px));
  margin-top: 6px;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(33, 51, 67, 0.14);
}

.filter-combobox__group {
  padding: 12px 18px 8px;
  color: #33475b;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.filter-combobox__option--property {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 8px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #33475b;
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
}

.filter-combobox__option--property:hover,
.filter-combobox__option--property.is-highlighted,
.filter-combobox__option--property.is-selected {
  background: #e5f5f8;
}

.filter-combobox__property-icon {
  color: #7c98b6;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.filter-combobox__property-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hubspot-filter-rule__actions {
  display: grid;
  place-items: center;
  min-height: 100%;
  border-left: 1px solid #dbe7f3;
}

.hubspot-filter-rule__remove {
  position: static;
  transform: none;
  z-index: 3;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 999px;
  background: #ffffff;
}

.agent-filter-group-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.agent-filter-group-card__add {
  min-width: 0;
  width: auto;
  padding-inline: 16px;
  color: #476987;
}

.agent-filter-drawer__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.agent-filter-drawer__footer .primary-button {
  min-width: 168px;
}

body.crm-theme-dark .agent-filter-drawer--hubspot .agent-filter-drawer__shell,
body.crm-theme-dark .agent-filter-group-card,
body.crm-theme-dark .agent-filter-group-card__body,
body.crm-theme-dark .hubspot-filter-empty,
body.crm-theme-dark .hubspot-filter-rule__field .import-mapping-input,
body.crm-theme-dark .hubspot-filter-rule__fields select,
body.crm-theme-dark .hubspot-filter-rule__fields input,
body.crm-theme-dark .hubspot-filter-rule__remove {
  background: #18212b;
  color: var(--ink);
  border-color: var(--line);
}

body.crm-theme-dark .agent-filter-drawer--hubspot .agent-filter-drawer__header,
body.crm-theme-dark .agent-filter-group-card__body,
body.crm-theme-dark .hubspot-filter-rule__actions {
  border-color: var(--line);
}

body.crm-theme-dark .agent-filter-drawer__header-copy h3,
body.crm-theme-dark .agent-filter-group-card__title h4,
body.crm-theme-dark .hubspot-filter-empty strong {
  color: var(--ink);
}

body.crm-theme-dark .hubspot-filter-row__connector {
  color: var(--muted);
}

body.crm-theme-dark .filter-combobox__menu--properties,
body.crm-theme-dark .filter-combobox__option--property {
  background: #18212b;
  color: var(--ink);
  border-color: var(--line);
}

body.crm-theme-dark .filter-combobox__group,
body.crm-theme-dark .filter-combobox__property-label {
  color: var(--ink);
}

body.crm-theme-dark .filter-combobox__option--property:hover,
body.crm-theme-dark .filter-combobox__option--property.is-highlighted,
body.crm-theme-dark .filter-combobox__option--property.is-selected {
  background: #223343;
}

body.crm-theme-dark .agent-filter-close-button,
body.crm-theme-dark .agent-filter-close-button::before {
  color: #7adbe9;
}

@media (max-width: 760px) {
  .hubspot-filter-rule {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .hubspot-filter-rule__remove {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
  }
}

.agent-inline-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0b84b8;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.agent-inline-filter:hover {
  color: #08628a;
}

.agent-inline-filter::after {
  content: "";
  width: 1px;
  height: 18px;
  margin-left: 10px;
  background: #dbe5ef;
}

.agent-inline-filter:last-child::after,
.agent-inline-filter--active::after {
  background: #dbe5ef;
}

.agent-inline-filter.is-active,
.agent-inline-filter--active {
  color: #123454;
}

#agentReviewExcludedButton.agent-inline-filter.is-active {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #d7e3f0;
  background: #eef6ff;
  color: #123454;
  line-height: 1;
}

#agentReviewExcludedButton.agent-inline-filter.is-active::after {
  display: none;
}

.agent-workspace-viewbar--hubspot .pill {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f5f9fd;
  border: 1px solid #d7e3f0;
  color: #56758f;
}

.agent-workspace-viewbar--hubspot .badge {
  min-height: 30px;
  padding: 10px 10px;
}

body.crm-theme-dark .agent-workspace-project-shell__main,
body.crm-theme-dark .agent-company-directory,
body.crm-theme-dark .agent-workspace-project-tab.is-active {
  background: #102235;
  border-color: rgba(148, 163, 184, 0.24);
}

body.crm-theme-dark .agent-workspace-project-head,
body.crm-theme-dark .agent-workspace-project-toolbar--hubspot,
body.crm-theme-dark .agent-workspace-project-tabs,
body.crm-theme-dark .agent-company-directory__header {
  border-color: rgba(148, 163, 184, 0.18);
}

body.crm-theme-dark .agent-workspace-project-head__identity h3,
body.crm-theme-dark .agent-workspace-project-tab.is-active,
body.crm-theme-dark .agent-company-directory__metric,
body.crm-theme-dark .agent-company-directory__name strong {
  color: #e6f0fb;
}

body.crm-theme-dark .agent-workspace-project-head__identity p:last-child,
body.crm-theme-dark .agent-workspace-project-tab,
body.crm-theme-dark .agent-workspace-tabbar-controls,
body.crm-theme-dark .agent-workspace-layer-picker__meta,
body.crm-theme-dark .agent-company-directory__name small,
body.crm-theme-dark .agent-company-directory__meta {
  color: #98a9bd;
}

body.crm-theme-dark .agent-workspace-project-tab {
  background: linear-gradient(180deg, rgba(21, 39, 60, 0.98) 0%, rgba(13, 30, 47, 0.98) 100%);
  border-color: rgba(148, 163, 184, 0.22);
}

body.crm-theme-dark .agent-workspace-project-tab__count {
  background: rgba(59, 130, 246, 0.14);
  color: #cfe4fb;
}

body.crm-theme-dark .agent-workspace-layer-picker select,
body.crm-theme-dark .agent-workspace-project-search input {
  background: #0e1e30;
  border-color: rgba(148, 163, 184, 0.24);
  color: #e6f0fb;
}

body.crm-theme-dark .agent-workspace-layer-picker__trigger,
body.crm-theme-dark .agent-workspace-layer-picker__menu,
body.crm-theme-dark .agent-workspace-layer-option {
  background: #0e1e30;
  border-color: rgba(148, 163, 184, 0.24);
}

body.crm-theme-dark .agent-workspace-layer-picker__trigger:hover,
body.crm-theme-dark .agent-workspace-layer-option:hover {
  background: #13263a;
}

body.crm-theme-dark .agent-workspace-layer-option.is-active {
  background: #15314b;
  border-color: rgba(96, 165, 250, 0.35);
}

body.crm-theme-dark .agent-workspace-layer-picker__value,
body.crm-theme-dark .agent-workspace-layer-option__title {
  color: #e6f0fb;
}

body.crm-theme-dark .agent-workspace-project-toolbar__right .secondary-button.secondary-button--compact {
  background: #0f2236;
  border-color: rgba(148, 163, 184, 0.24);
  color: #dbeafe;
}

body.crm-theme-dark .agent-inline-filter {
  color: #6ec5ef;
}

body.crm-theme-dark .agent-inline-filter.is-active,
body.crm-theme-dark .agent-inline-filter--active {
  color: #f2f7fd;
}

body.crm-theme-dark #agentReviewExcludedButton.agent-inline-filter.is-active {
  background: #15314b;
  border-color: rgba(96, 165, 250, 0.35);
  color: #f2f7fd;
}

body.crm-theme-dark .agent-workspace-project-content .floating-filter-link {
  background: rgba(16, 34, 53, 0.94);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.38);
}

body.crm-theme-dark .agent-inline-filter::after {
  background: rgba(148, 163, 184, 0.24);
}

body.crm-theme-dark .agent-workspace-viewbar--hubspot .pill {
  background: #162536;
  border-color: rgba(148, 163, 184, 0.22);
  color: #a7bdd1;
}

body.crm-theme-dark .agent-workspace-project-tab:hover {
  background: linear-gradient(180deg, rgba(32, 58, 88, 0.98) 0%, rgba(19, 38, 58, 0.98) 100%);
  border-color: rgba(96, 165, 250, 0.34);
}

body.crm-theme-dark .agent-workspace-project-tab.is-active {
  border-bottom-color: #102235;
  box-shadow: 0 -3px 0 #25c7c1 inset, 0 10px 24px rgba(2, 6, 23, 0.28);
}

body.crm-theme-dark .agent-workspace-project-tab.is-active .agent-workspace-project-tab__count {
  background: rgba(37, 199, 193, 0.16);
  color: #c9f8f3;
}

@media (max-width: 1280px) {
  .agent-workspace-project-shell.is-filter-open {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .agent-workspace-tabbar {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-workspace-tabbar-controls {
    padding: 0 0 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .agent-workspace-list-panel {
    height: calc(100vh - var(--shell-topbar-height) - 280px);
    max-height: calc(100vh - var(--shell-topbar-height) - 280px);
  }

  .agent-company-directory__header,
  .agent-company-directory__row {
    grid-template-columns: minmax(176px, 1.35fr) minmax(124px, 0.78fr) repeat(4, minmax(84px, auto)) 210px;
  }

  .agent-workspace-project-search input {
    min-width: 240px;
  }

  .agent-workspace-layer-picker--menu {
    min-width: 260px;
  }
}

@media (max-width: 760px) {
  .agent-workspace-tabbar-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-workspace-project-head,
  .agent-workspace-project-toolbar--hubspot,
  .agent-workspace-project-content .contact-pool-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-workspace-project-content .floating-filter-link {
    right: 18px;
    bottom: 18px;
  }

  .agent-workspace-list-panel {
    height: calc(100vh - var(--shell-topbar-height) - 320px);
    max-height: calc(100vh - var(--shell-topbar-height) - 320px);
  }

  .agent-workspace-project-tabs {
    overflow-x: auto;
  }

  .agent-company-directory {
    overflow-x: auto;
  }

  .agent-company-directory__header,
  .agent-company-directory__row {
    min-width: 980px;
  }

  .agent-workspace-project-search input,
  .agent-workspace-layer-picker--menu {
    min-width: 100%;
  }
}



/* Final authority for HubSpot-style contact workspace */
.agent-workspace-project-shell__main {
  gap: 14px;
  padding: 18px 20px 24px;
  border-radius: 16px;
  border: 1px solid #dce6f1;
  box-shadow: 0 10px 24px rgba(17, 41, 68, 0.04);
}

.agent-workspace-tabbar {
  align-items: flex-end;
  gap: 20px;
  padding-bottom: 6px;
  border-bottom: 1px solid #dfe7ef;
}

.agent-workspace-project-tabshell {
  gap: 20px;
}

.agent-workspace-project-tabs {
  gap: 10px;
  padding: 0;
  border-bottom: 0;
}

.agent-workspace-project-tab {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #d9e4ef;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
  color: #355779;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: none;
}

.agent-workspace-project-tab:hover {
  color: #163b5d;
  border-color: #c9d9ea;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.agent-workspace-project-tab.is-active {
  border-color: #d8e3ef;
  background: #ffffff;
  color: #163a5d;
  box-shadow: inset 0 -3px 0 #12bfd3;
}

.agent-workspace-project-tab__count {
  min-width: 24px;
  min-height: 24px;
  padding: 0 8px;
  background: #e8f7fb;
  color: #245775;
  font-size: 0.78rem;
  font-weight: 800;
}

.agent-workspace-project-tab.is-active .agent-workspace-project-tab__count {
  background: #dff7fb;
  color: #0f6772;
}

.contact-list-shell .workspace-header {
  padding: 0 0 10px;
  border-bottom: 1px solid #e5edf5;
}

.contact-list-shell .workspace-header__meta {
  gap: 10px 16px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.contact-list-shell .workspace-header__meta .filter-summary-bar__label {
  font-size: 0.94rem;
  font-weight: 800;
  color: #193d5f;
  letter-spacing: -0.01em;
}

.contact-list-shell .workspace-header__meta .filter-summary-bar--inline .badge {
  min-height: 30px;
  padding: 0 10px;
  background: #eff5fb;
  border-color: #dae4ee;
  color: #40627f;
  font-size: 0.82rem;
}

.contact-workspace-header-actions {
  gap: 8px;
}

.contact-workspace-header-actions .secondary-button.secondary-button--compact,
.contact-workspace-header-actions .primary-button,
.contact-workspace-header-actions .ghost-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid #d9e4ef;
  background: #ffffff;
  color: #355779;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: none;
}

.contact-workspace-header-actions .secondary-button.secondary-button--compact:hover,
.contact-workspace-header-actions .primary-button:hover,
.contact-workspace-header-actions .ghost-button:hover {
  border-color: #c9d9ea;
  background: #f8fbfe;
  color: #173b5d;
}

.hubspot-contact-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  padding: 10px 0 12px;
  border-bottom: 1px solid #e7edf4;
}

.hubspot-contact-toolbar__left,
.hubspot-contact-toolbar__right {
  gap: 10px;
}

.hubspot-contact-toolbar__search {
  flex: 1 1 560px;
  min-width: min(100%, 560px);
  max-width: 760px;
}

.hubspot-contact-toolbar__search input {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid #d9e4ef;
  background: #ffffff;
  color: #274766;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: none;
}

.hubspot-contact-toolbar .agent-inline-filter,
.hubspot-contact-toolbar .pill,
.hubspot-contact-toolbar .badge {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #d9e4ef;
  background: #ffffff;
  color: #355779;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: none;
}

.hubspot-contact-toolbar .agent-inline-filter--active,
.hubspot-contact-toolbar .agent-inline-filter.is-active {
  background: #eef7fb;
  border-color: #cde3ea;
  color: #124969;
}

.agent-workspace-layer-picker--menu {
  min-width: 336px;
}

.agent-workspace-layer-picker__trigger {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #d9e4ef;
  box-shadow: none;
}

.agent-workspace-layer-picker__value,
.agent-workspace-layer-option__title {
  font-size: 0.92rem;
  font-weight: 800;
}

.agent-workspace-layer-picker__meta {
  font-size: 0.8rem;
  color: #7590ab;
}

.agent-list-table-shell,
.agent-list-table-shell--hubspot {
  border: 1px solid #dfe7ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.contact-list-shell .contact-pool-table-wrap {
  border-top: 1px solid #e8eef5;
}

.contact-pool-row--header {
  min-height: 42px;
  padding: 0 14px;
  background: #f7fafc;
  border-bottom: 1px solid #e1e9f1;
}

.contact-pool-row--header span {
  color: #3d5977;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.contact-pool-row {
  min-height: 46px;
  padding: 8px 14px;
  border-bottom: 1px solid #eaf0f5;
  background: #ffffff;
}

.contact-pool-row:hover {
  background: #fbfdff;
}

.contact-pool-row > span,
.contact-pool-row button,
.contact-pool-row a {
  font-size: 0.95rem;
}

.agent-workspace-list-shell .contact-pool-footer--agent {
  bottom: 14px;
  padding: 8px 14px;
  border: 1px solid #d9e4ef;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

.agent-workspace-list-shell .contact-pool-footer--agent .pagination-bar {
  gap: 10px;
}

.email-campaigns-shell {
  gap: 12px;
}

.email-campaigns-shell--detail {
  max-width: none;
}

.email-campaigns-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.email-campaigns-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(560px, 1.35fr);
  gap: 18px;
  align-items: start;
}

.email-campaigns-list-panel,
.email-campaign-detail-panel {
  min-width: 0;
}

.email-campaigns-list-panel--full {
  width: 100%;
}

.contact-pool-row--button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #eaf0f5;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.contact-pool-row--button.is-active {
  background: #e8f8fb;
  box-shadow: inset 4px 0 0 #00a4bd;
}

.email-campaign-table .contact-pool-header-row,
.email-campaign-table .contact-pool-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) 110px 120px 170px 150px;
  align-items: center;
}

.email-campaign-members-table .contact-pool-header-row,
.email-campaign-members-table .contact-pool-row {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1.25fr) minmax(140px, 1fr) minmax(190px, 1.15fr) 108px 138px 150px;
  align-items: center;
}

.email-campaign-messages-table .contact-pool-header-row,
.email-campaign-messages-table .contact-pool-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 1fr) minmax(160px, 1fr) 120px 150px;
  align-items: center;
}

.email-campaign-table .contact-pool-header-row,
.email-campaign-members-table .contact-pool-header-row,
.email-campaign-messages-table .contact-pool-header-row {
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid #dbe7f2;
  background: #f5f8fb;
}

.email-campaign-table .contact-pool-row,
.email-campaign-members-table .contact-pool-row,
.email-campaign-messages-table .contact-pool-row {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
}

.email-campaign-table .contact-pool-header-cell,
.email-campaign-members-table .contact-pool-header-cell,
.email-campaign-messages-table .contact-pool-header-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  color: #516f90;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.email-campaign-detail {
  display: grid;
  gap: 0;
}

.email-campaign-detail--page {
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe7f2;
  border-radius: 14px;
  background: #ffffff;
}

.email-campaign-detail__hero {
  display: grid;
  gap: 10px;
  padding: 14px 16px 0;
  background: #ffffff;
}

.email-campaign-detail__header {
  align-items: center;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid #dbe7f2;
  border-radius: 0;
  background: transparent;
}

.email-campaign-detail__header h2 {
  margin: 2px 0 4px;
  color: #17324d;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.email-campaign-settings-form {
  margin: 0;
}

.email-campaign-tab-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 0;
  border-top: 1px solid #e6eef6;
  border-radius: 0;
  background: #ffffff;
}

.email-campaign-detail .workspace-tabs--hubspot {
  display: flex;
  gap: 0;
  align-items: flex-end;
  padding: 0 16px;
  border-bottom: 1px solid #dbe7f2;
  background: #ffffff;
}

.email-campaign-detail .workspace-tabs--hubspot .workspace-tab {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #334e68;
  font-weight: 800;
}

.email-campaign-detail .workspace-tabs--hubspot .workspace-tab.is-active {
  border-bottom-color: #00a4bd;
  color: #17324d;
  box-shadow: none;
}

.email-campaign-detail .workspace-tabs--hubspot .workspace-tab b {
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dff7fb;
  color: #006b7d;
  font-size: 0.78rem;
  text-align: center;
}

.email-campaign-audience-header {
  align-items: end;
  padding-bottom: 2px;
}

.email-campaign-member-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.email-campaign-status-filterbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid #dbe7f2;
  border-radius: 12px;
  background: #f7fbff;
}

.email-campaign-status-filter {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #c9ddec;
  border-radius: 999px;
  background: #ffffff;
  color: #274866;
  font-weight: 800;
  cursor: pointer;
}

.email-campaign-status-filter.is-active {
  border-color: #00a4bd;
  background: #dff7fb;
  color: #006b7d;
}

.email-campaign-audience-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid #dbe7f2;
  border-radius: 8px;
  background: #f5f9fc;
  color: #48627d;
  font-weight: 700;
}

.email-campaign-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #17324d;
  font-weight: 800;
}

.email-campaign-select-all input,
.email-campaign-members-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  accent-color: #00a4bd;
  cursor: pointer;
}

.email-campaign-members-table .contact-pool-header-cell:first-child,
.email-campaign-members-table .contact-pool-cell:first-child {
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
}

.email-campaign-selection-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #b9d7ec;
  border-radius: 999px;
  background: #eaf7ff;
  color: #0a6689;
  font-size: 0.84rem;
  font-weight: 800;
}

.email-campaign-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 10px;
  border: 1px solid #cbd9e6;
  border-radius: 999px;
  background: #f5f8fb;
  color: #334e68;
  font-size: 0.8rem;
  font-weight: 900;
}

.email-campaign-status-badge--success {
  border-color: #b6e9c5;
  background: #e8f8ee;
  color: #0f6b37;
}

.email-campaign-status-badge--info {
  border-color: #b9d7ec;
  background: #eaf7ff;
  color: #0a6689;
}

.email-campaign-status-badge--danger {
  border-color: #f7b8be;
  background: #fff0f2;
  color: #b83245;
}

.email-campaign-status-badge--warning {
  border-color: #f5d28b;
  background: #fff8e7;
  color: #8a5b00;
}

.email-campaign-failure-note {
  display: block;
  max-width: 220px;
  margin-top: 5px;
  overflow: hidden;
  color: #8a4150;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.danger-button--compact {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
}

.email-campaign-members-table {
  border: 1px solid #dbe7f2;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.email-campaign-members-table .contact-pool-header-row {
  min-height: 38px;
  background: #f5f8fb;
}

.email-campaign-members-table .contact-pool-row {
  min-height: 42px;
}

.email-campaign-members-table .contact-pool-cell,
.email-campaign-members-table .contact-pool-header-cell {
  padding-top: 8px;
  padding-bottom: 8px;
}

.email-campaign-recipient-drawer {
  display: grid;
  gap: 14px;
  position: fixed;
  top: 72px;
  right: 18px;
  z-index: 70;
  width: min(430px, calc(100vw - 36px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #cfe0ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(12, 42, 70, 0.24);
}

.email-campaign-recipient-drawer__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid #cfe0ef;
  border-radius: 10px;
  background: #f7fbff;
  color: #006b7d;
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.email-campaign-recipient-drawer h3 {
  margin: 0;
  color: #17324d;
}

.email-campaign-recipient-drawer__status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dbe7f2;
  border-radius: 12px;
  background: #f8fbfe;
  color: #48627d;
  font-weight: 800;
}

.email-campaign-recipient-drawer__failure {
  padding: 10px 12px;
  border: 1px solid #f7b8be;
  border-radius: 12px;
  background: #fff6f7;
  color: #9a2738;
  font-weight: 800;
  overflow-wrap: anywhere;
}

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

.email-campaign-recipient-milestones div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #e2ebf4;
  border-radius: 12px;
  background: #fbfdff;
}

.email-campaign-recipient-milestones strong,
.email-campaign-recipient-events h4 {
  color: #17324d;
}

.email-campaign-recipient-milestones span {
  color: #58708a;
  font-size: 0.82rem;
}

.email-campaign-recipient-events {
  display: grid;
  gap: 10px;
}

.email-campaign-recipient-events article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e2ebf4;
  border-radius: 12px;
  background: #f8fbfe;
}

.email-campaign-recipient-events article span {
  color: #6d839a;
  font-size: 0.78rem;
  font-weight: 800;
}

.email-campaign-recipient-events article p {
  margin: 0;
  color: #48627d;
  overflow-wrap: anywhere;
}

.email-campaign-activity-summary {
  display: grid;
  gap: 10px;
}

.email-campaign-batch-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.email-campaign-batch-card {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(76px, 0.45fr)) minmax(120px, 0.7fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dbe7f2;
  border-radius: 14px;
  background: #ffffff;
}

.email-campaign-batch-card--compact {
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(72px, 0.45fr));
}

.email-campaign-batch-card > div {
  display: grid;
  gap: 3px;
}

.email-campaign-batch-card strong,
.email-campaign-batch-card b {
  color: #17324d;
}

.email-campaign-batch-card span,
.email-campaign-batch-card small {
  color: #58708a;
  font-size: 0.82rem;
  font-weight: 700;
}

.email-campaign-activity-list {
  display: grid;
  gap: 10px;
}

.email-campaign-activity-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #e2ebf4;
  border-radius: 12px;
  background: #f8fbfe;
}

.email-campaign-activity-item span {
  color: #6d839a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.email-campaign-activity-item p {
  margin: 0;
  color: #415a75;
}

.email-campaign-analytics-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #d8e8f6;
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(0, 164, 189, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f5fbff 100%);
}

.email-campaign-health-score {
  display: grid;
  place-items: center;
  min-width: 138px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid #bce2f4;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(24, 76, 115, 0.08);
}

.email-campaign-health-score strong {
  color: #008da6;
  font-size: 2.3rem;
  line-height: 1;
}

.email-campaign-health-score span {
  color: #48627d;
  font-weight: 800;
}

.email-campaign-analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.email-campaign-risk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.email-campaign-risk-grid article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #f1d1d7;
  border-radius: 14px;
  background: #fff8f9;
}

.email-campaign-risk-grid span {
  color: #8a4150;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.email-campaign-risk-grid strong {
  color: #9a2738;
  font-size: 1.45rem;
  line-height: 1;
}

.email-campaign-risk-grid p {
  margin: 0;
  color: #684451;
  font-size: 0.84rem;
}

.email-campaign-insight-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dbe7f2;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 56, 87, 0.06);
}

.email-campaign-insight-card span {
  color: #58708a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.email-campaign-insight-card strong {
  color: #12304d;
  font-size: 2rem;
  line-height: 1;
}

.email-campaign-insight-card p,
.email-campaign-insight-card small {
  margin: 0;
  color: #48627d;
}

.email-campaign-insight-card small {
  line-height: 1.45;
}

.email-campaign-funnel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dbe7f2;
  border-radius: 16px;
  background: #fbfdff;
}

.email-campaign-funnel__header,
.email-campaign-funnel__row {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(220px, 1.4fr) 92px;
  gap: 16px;
  align-items: center;
}

.email-campaign-funnel__header {
  color: #58708a;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.email-campaign-funnel__row > div:first-child {
  display: grid;
  gap: 3px;
}

.email-campaign-funnel__row strong {
  color: #17324d;
}

.email-campaign-funnel__row span {
  color: #6a8198;
  font-size: 0.86rem;
}

.email-campaign-funnel__bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7f0f8;
}

.email-campaign-funnel__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00a4bd, #7bdcb5);
}

.email-campaign-funnel__row b {
  color: #12304d;
  font-size: 1.05rem;
  text-align: right;
}

.metric-grid--compact {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.metric-card--compact {
  min-height: 92px;
  padding: 14px;
}

.metric-card--compact span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.metric-card--compact strong {
  font-size: 1.35rem;
}

.metric-card--action {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.metric-card--action .assignment-actions {
  margin-top: 0.25rem;
}

.metric-card--action .secondary-button,
.metric-card--action .ghost-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
}

@media (max-width: 1180px) {
  .email-campaigns-layout {
    grid-template-columns: 1fr;
  }

  .metric-grid--compact {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

/* Final containment pass for contact workspace */
.contact-list-shell .workspace-header {
  display: grid;
  gap: 10px;
  padding: 0 0 14px;
  margin-bottom: 0;
  border-bottom: 1px solid #e3ebf3;
}

.contact-list-shell .workspace-header__copy {
  display: none;
}

.contact-list-shell .workspace-header__meta.workspace-header__meta--contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
}

.contact-list-shell .workspace-header__meta-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.contact-list-shell .workspace-header__meta-summary,
.contact-list-shell .workspace-header__meta-actions {
  min-width: 0;
}

.contact-list-shell .workspace-header__meta-actions {
  display: flex;
  justify-content: flex-end;
}

.contact-list-shell .workspace-header__meta-summary .filter-summary-bar--inline {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.contact-list-shell .workspace-header__meta-summary .filter-summary-bar__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-list-shell .workspace-header__meta-summary .pill-row {
  display: none;
}

.contact-list-shell .workspace-header__meta-summary .filter-summary-bar__label {
  font-size: 0.98rem;
  font-weight: 800;
  color: #173b5d;
}

.contact-list-shell .workspace-header__meta-toolbar {
  display: block;
  width: 100%;
  min-width: 0;
}

.contact-list-shell .hubspot-contact-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  align-items: center;
  gap: 8px 14px;
  padding: 0;
  border: 0;
  width: 100%;
  min-width: 0;
}

.contact-list-shell .hubspot-contact-toolbar__search-row {
  grid-column: 1;
  min-width: 0;
}

.contact-list-shell .hubspot-contact-toolbar__left,
.contact-list-shell .hubspot-contact-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.contact-list-shell .hubspot-contact-toolbar__left {
  justify-content: flex-start;
}

.contact-list-shell .hubspot-contact-toolbar__right {
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-end;
  justify-self: stretch;
  margin-left: 0;
  width: 100%;
  flex-wrap: wrap;
  row-gap: 8px;
}

.contact-list-shell .hubspot-contact-toolbar__links {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.contact-list-shell .hubspot-contact-toolbar__search {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.contact-list-shell .hubspot-contact-toolbar__search input,
.contact-list-shell .agent-workspace-layer-picker__trigger,
.contact-list-shell .contact-workspace-header-actions .secondary-button.secondary-button--compact,
.contact-list-shell .contact-workspace-header-actions .primary-button,
.contact-list-shell .contact-workspace-header-actions .ghost-button,
.contact-list-shell .hubspot-contact-toolbar .hubspot-toolbar-button,
.contact-list-shell .hubspot-contact-toolbar .agent-inline-filter,
.contact-list-shell .hubspot-contact-toolbar .pill,
.contact-list-shell .hubspot-contact-toolbar .badge {
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid #d9e4ef;
  background: #ffffff;
  box-shadow: none;
}

.contact-list-shell .hubspot-contact-toolbar__search input {
  padding: 0 14px;
}

.contact-list-shell .contact-workspace-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-list-shell .contact-workspace-header-actions .secondary-button.secondary-button--compact,
.contact-list-shell .contact-workspace-header-actions .primary-button,
.contact-list-shell .contact-workspace-header-actions .ghost-button,
.contact-list-shell .hubspot-contact-toolbar .hubspot-toolbar-button,
.contact-list-shell .hubspot-contact-toolbar .agent-inline-filter,
.contact-list-shell .hubspot-contact-toolbar .pill,
.contact-list-shell .hubspot-contact-toolbar .badge {
  padding: 0 9px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #355779;
}

.contact-list-shell .hubspot-contact-toolbar .hubspot-toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
}

.contact-list-shell .hubspot-toolbar-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  color: #426482;
  line-height: 1;
}

.contact-list-shell .hubspot-toolbar-button__icon svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: currentColor;
}

.contact-list-shell .hubspot-toolbar-button__label {
  line-height: 1;
}

.contact-list-shell .hubspot-contact-toolbar .hubspot-toolbar-button:hover {
  border-color: #c9d9ea;
  background: #f8fbfe;
  color: #173b5d;
}

.contact-list-shell .hubspot-contact-toolbar .hubspot-toolbar-button.is-active {
  border-color: #cfdce9;
  background: #dfe7ef;
  color: #315678;
}

.contact-list-shell .hubspot-contact-toolbar .agent-inline-filter::after {
  display: none;
}

.contact-list-shell .hubspot-contact-toolbar .agent-inline-filter.is-active,
.contact-list-shell .hubspot-contact-toolbar .agent-inline-filter--active {
  background: #eef7fb;
  border-color: #cfe1eb;
  color: #124969;
}

.contact-list-shell .hubspot-contact-toolbar .agent-inline-filter--link {
  gap: 6px;
}

.contact-list-shell .agent-inline-filter__chevron {
  color: #0b84b8;
  font-size: 0.75rem;
  line-height: 1;
}

.contact-list-shell .agent-workspace-layer-picker--menu {
  flex: 0 1 230px;
  min-width: 210px;
  max-width: 240px;
}

.contact-list-shell .agent-workspace-layer-picker__trigger {
  min-height: 36px;
  border-radius: 6px;
}

.contact-list-shell .contact-pool-list--agent {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.contact-list-shell .contact-pool-summary-stack,
.contact-list-shell .crm-table-shell {
  min-height: 0;
}

.contact-list-shell .agent-list-table-shell,
.contact-list-shell .agent-list-table-shell--hubspot {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.contact-list-shell .contact-pool-table-wrap {
  min-height: 0;
  overflow: auto;
}

.contact-list-shell .contact-pool-footer--agent {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: auto;
  width: 100%;
  max-width: none;
  margin-top: 10px;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid #e4ebf3;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.contact-list-shell .contact-pool-footer--agent.contact-pool-footer--agent-with-action {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.contact-list-shell .contact-pool-footer__pagination {
  grid-column: 2;
  justify-self: center;
}

.contact-list-shell .contact-pool-footer__action {
  grid-column: 3;
  justify-self: end;
}

.contact-list-shell .contact-pool-footer--agent .pagination-bar {
  justify-content: center;
  gap: 10px;
}

.contact-list-shell .contact-pool-footer--agent .floating-filter-link {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #40627f;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
}

.contact-workspace-edit-columns-float {
  position: fixed !important;
  right: 22px !important;
  bottom: 58px !important;
  z-index: 120 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border: 1px solid #cfe0ef !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 22px rgba(33, 51, 67, 0.14) !important;
  color: #275273 !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

.contact-workspace-edit-columns-float:hover {
  border-color: #00a4bd !important;
  color: #007a8c !important;
  text-decoration: none !important;
}

.tal-workspace {
  display: grid;
  gap: 18px;
}

.tal-create-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.tal-create-grid__csv textarea {
  min-height: 116px;
  resize: vertical;
}

.tal-create-grid__actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.tal-threshold-control {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr) minmax(240px, 360px);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #dce7f1;
  border-radius: 12px;
  background: #ffffff;
  color: #173b5d;
}

.tal-threshold-control span {
  font-weight: 800;
}

.tal-threshold-control strong {
  color: #0091ae;
}

.tal-threshold-control input[type="range"] {
  width: 100%;
  accent-color: #0091ae;
}

.tal-threshold-control small {
  color: #617d96;
}

.tal-threshold-control--compact {
  grid-template-columns: minmax(170px, 220px) minmax(180px, 1fr) minmax(180px, 300px);
  margin: 8px 0 12px;
  background: #f8fbfe;
}

.tal-mapping-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dce7f1;
  border-radius: 12px;
  background: #f8fbfe;
}

.tal-column-map-table {
  display: grid;
  gap: 8px;
}

.tal-column-map-table__head,
.tal-column-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  gap: 12px;
  align-items: center;
}

.tal-column-map-table__head {
  color: #5a7590;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tal-column-map-row {
  padding: 10px;
  border: 1px solid #dce7f1;
  border-radius: 10px;
  background: #ffffff;
}

.tal-column-map-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tal-column-map-row span,
.tal-row-card__source small {
  overflow: hidden;
  color: #6a8197;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tal-review-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.tal-batch-list {
  position: sticky;
  top: 14px;
}

.tal-batch-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 1px solid #dce7f1;
  border-radius: 12px;
  background: #ffffff;
  color: #173b5d;
}

.tal-batch-card__main {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.tal-batch-card__main span,
.tal-batch-card__main small {
  color: #617d96;
}

.tal-batch-card__delete {
  align-self: start;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #f0c8bd;
  border-radius: 999px;
  background: #fff4f1;
  color: #a23d1c;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.tal-batch-card.is-active {
  border-color: #10b7c7;
  background: #f0fbfd;
  box-shadow: inset 3px 0 0 #10b7c7;
}

.tal-progress-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bfe8f1;
  border-radius: 14px;
  background: #effbfe;
  color: #173b5d;
}

.tal-progress-card > div:last-child {
  display: grid;
  gap: 3px;
}

.tal-progress-card span {
  color: #5d7791;
}

.tal-report-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.tal-report-strip article {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #dce7f1;
  border-radius: 12px;
  background: #f8fbfe;
}

.tal-report-strip span {
  color: #6a8197;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tal-report-strip strong {
  color: #173b5d;
  font-size: 1.1rem;
}

.tal-report-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

.tal-report-details article {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce7f1;
  border-radius: 12px;
  background: #ffffff;
}

.tal-project-actions {
  display: grid;
  grid-template-columns: minmax(240px, 360px) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}

.tal-match-table {
  display: grid;
  gap: 12px;
}

.tal-row-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(240px, 1fr) minmax(280px, 1.1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dce7f1;
  border-radius: 14px;
  background: #ffffff;
}

.tal-row-card h4,
.tal-row-card p {
  margin: 0;
}

.tal-row-card__source,
.tal-row-card__best {
  display: grid;
  gap: 5px;
}

.tal-row-card__source p,
.tal-row-card__best span,
.tal-row-card__best small {
  color: #5d7791;
}

.tal-row-card__matches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tal-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tal-alias-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tal-alias-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #d7e4ef;
  border-radius: 999px;
  background: #f8fbfe;
  color: #43627f;
  font-size: 0.76rem;
  font-weight: 800;
}

.tal-alias-status--saved {
  border-color: #bfe8d3;
  background: #ecfbf3;
  color: #12734a;
}

.tal-alias-status--auto {
  border-color: #bfe8f1;
  background: #effbfe;
  color: #007c89;
}

.tal-alias-status--pending {
  border-color: #f3ddb2;
  background: #fff8e8;
  color: #8a5b00;
}

.tal-alias-status--muted {
  background: #f4f8fc;
  color: #6a7f94;
}

.tal-match-pill {
  display: inline-grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #d7e4ef;
  border-radius: 999px;
  background: #f8fbfe;
  color: #173b5d;
  cursor: pointer;
}

.tal-match-pill span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.tal-match-pill small {
  color: #617d96;
}

.tal-match-use {
  align-self: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #b9d4ea;
  border-radius: 999px;
  background: #ffffff;
  color: #234d73;
  font-weight: 800;
  cursor: pointer;
}

.tal-confidence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #dbe7f2;
  background: #f4f8fc;
  color: #43627f;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.tal-confidence--high {
  border-color: #bfe8d3;
  background: #ecfbf3;
  color: #12734a;
}

.tal-confidence--medium {
  border-color: #f3ddb2;
  background: #fff8e8;
  color: #8a5b00;
}

.tal-confidence--low {
  border-color: #f4c9bc;
  background: #fff2ee;
  color: #a33d1c;
}

.tal-confidence--none {
  color: #6a7f94;
}

.tal-merge-modal-card {
  width: min(760px, calc(100vw - 32px));
  display: grid;
  gap: 16px;
}

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

.tal-merge-summary article,
.tal-merge-confirm-box {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dce7f1;
  border-radius: 12px;
  background: #f8fbfe;
}

.tal-merge-summary span {
  color: #6a8197;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tal-merge-summary strong,
.tal-merge-confirm-box strong {
  color: #173b5d;
}

.tal-merge-summary small,
.tal-merge-confirm-box p {
  margin: 0;
  color: #5d7791;
}

.tal-merge-search {
  display: grid;
  gap: 7px;
  color: #173b5d;
  font-weight: 800;
}

.tal-merge-search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd6e2;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #213343;
  font-size: 0.96rem;
}

.tal-merge-results {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #dce7f1;
  border-radius: 12px;
  background: #f8fbfe;
}

.tal-merge-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  border: 1px solid #dce7f1;
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  color: #173b5d;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.tal-merge-result:hover,
.tal-merge-result.is-selected {
  border-color: #00a4bd;
  background: #e5f5f8;
}

.tal-merge-result small {
  color: #6a8197;
  font-weight: 700;
}

.tal-merge-confirm-box.is-muted {
  opacity: 0.72;
}

.primary-button:not(.danger-button),
.entry-form button:not(.danger-button),
.assign-toolbar button:not(.danger-button) {
  border: 1px solid #cbd6e2 !important;
  background: #ffffff !important;
  color: #33475b !important;
  box-shadow: none !important;
}

.primary-button:not(.danger-button):hover,
.entry-form button:not(.danger-button):hover,
.assign-toolbar button:not(.danger-button):hover,
.primary-button:not(.danger-button):focus-visible,
.entry-form button:not(.danger-button):focus-visible,
.assign-toolbar button:not(.danger-button):focus-visible {
  border-color: #99acc2 !important;
  background: #eaf0f6 !important;
  color: #213343 !important;
}

.tal-mapping-panel {
  display: grid;
  gap: 1rem;
}

.tal-column-map-table.contacts-import-mapping-table {
  display: block;
  gap: 0;
}

.tal-column-map-table__head.contacts-import-mapping-table__head,
.tal-column-map-row.contacts-import-mapping-table__row {
  grid-template-columns: minmax(145px, 0.9fr) minmax(190px, 1.2fr) minmax(120px, 0.55fr) minmax(190px, 1fr) minmax(260px, 1.2fr) minmax(80px, 0.35fr);
  gap: 1rem;
}

.tal-column-map-row.contacts-import-mapping-table__row {
  padding: 0.85rem 1rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.tal-column-map-row .import-map-status span {
  color: #fff;
}

.tal-column-map-row select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbdced;
  border-radius: 10px;
  background: #fff;
  color: #173a59;
}

.tal-mapping-combobox .filter-combobox__menu {
  z-index: 45;
}

@media (max-width: 1080px) {
  .tal-create-grid,
  .tal-mapping-grid,
  .tal-review-layout,
  .tal-row-card,
  .tal-report-strip,
  .tal-report-details,
  .tal-project-actions,
  .tal-column-map-table__head,
  .tal-column-map-row {
    grid-template-columns: 1fr;
  }

  .tal-threshold-control,
  .tal-threshold-control--compact {
    grid-template-columns: 1fr;
  }

.tal-row-card__matches {
    justify-content: flex-start;
  }
}

/* Final HubSpot-density contact list pass */
.global-topbar {
  min-height: 48px;
  height: 48px;
  padding: 0 14px;
}

.global-topbar .ghost-button,
.topbar-context-cluster .secondary-button--compact {
  min-height: 32px;
  padding: 0 10px;
}

.global-search-shell input {
  min-height: 34px;
}

.contact-list-shell {
  height: calc(100vh - var(--shell-topbar-height) - 48px);
  min-height: calc(100vh - var(--shell-topbar-height) - 48px);
}

.contact-list-shell .agent-list-shell__main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0 16px 0;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}

.contact-list-shell .workspace-header {
  display: grid;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid #dbe5ee;
  background: #fff;
}

.contact-list-shell .workspace-header__copy {
  display: none;
}

.contact-list-shell .workspace-header__meta,
.contact-list-shell .workspace-header__meta--contact-shell,
.contact-list-shell .workspace-header__meta-top,
.contact-list-shell .workspace-header__meta-actions,
.contact-workspace-header-actions {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.contact-list-shell .workspace-header__meta-summary {
  display: none;
}

.contact-workspace-mode-switch--hubspot {
  min-height: 58px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 0 0 0;
  border-bottom: 1px solid #dbe5ee;
  background: #f5f8fa;
}

.contact-workspace-object-tab,
.contact-workspace-add-tab,
.contact-workspace-mode-switch--hubspot .contact-workspace-mode-switch__tab {
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: -1px;
  border: 1px solid #cbd6e2;
  border-bottom-color: #dbe5ee;
  border-radius: 3px 3px 0 0;
  background: #f4f8fc;
  color: #33475b;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: none;
}

.contact-workspace-object-tab {
  min-width: 124px;
}

.contact-workspace-mode-switch--hubspot .contact-workspace-mode-switch__tab {
  min-width: 210px;
  padding: 0 18px;
  background: #fff;
}

.contact-workspace-mode-switch--hubspot .contact-workspace-mode-switch__tab.is-active {
  border-bottom-color: #fff;
  background: #fff;
  color: #213343;
}

.contact-workspace-mode-switch--hubspot .agent-workspace-project-tab__count {
  min-width: 0;
  height: 22px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: #33475b;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.contact-workspace-add-tab {
  width: 38px;
  min-width: 38px;
  border-radius: 999px;
  margin-bottom: 6px;
  background: #eaf3fb;
  color: #42698b;
  font-size: 1.35rem;
  line-height: 1;
}

.contact-workspace-toolbar--shared {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 0 10px;
}

.contact-hubspot-search {
  position: relative;
  min-width: 0;
}

.contact-hubspot-search input {
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 0 42px 0 16px;
  border: 1px solid #cbd6e2;
  border-radius: 3px;
  background: #fff;
  color: #33475b;
  font-size: 0.9rem;
  font-weight: 500;
}

.contact-hubspot-search span {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: #7c98b6;
  font-size: 1.1rem;
}

.contact-hubspot-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.contact-hubspot-actions .hubspot-toolbar-button,
.contact-hubspot-actions .secondary-button.secondary-button--compact {
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #cbd6e2 !important;
  border-radius: 3px;
  background: #fff !important;
  color: #516f90 !important;
  box-shadow: none !important;
  font-size: 0.84rem;
  font-weight: 600;
}

.contact-hubspot-actions .hubspot-toolbar-button.is-active,
.contact-hubspot-actions .secondary-button.is-active {
  background: #dbe4ee !important;
  color: #33475b !important;
}

.contact-hubspot-actions .hubspot-toolbar-button__icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.contact-hubspot-filter-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 40px;
  padding: 0 0 2px;
}

.contact-hubspot-filter-chip,
.contact-hubspot-advanced-filter,
.contact-hubspot-circle-button {
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #0091ae;
  box-shadow: none;
  font-size: 0.92rem;
  font-weight: 800;
}

.contact-hubspot-circle-button {
  width: 30px;
  min-width: 30px;
  border: 1px solid #cbd6e2;
  border-radius: 999px;
  color: #516f90;
  font-size: 1.05rem;
}

.contact-hubspot-advanced-filter {
  padding: 0 14px;
  border-radius: 3px;
  background: #e5f5f8;
}

.contact-hubspot-advanced-filter.is-active {
  background: #d8edf4;
}

.contact-pool-list.contact-pool-list--agent {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.contact-list-shell .crm-table-shell.agent-list-table-shell {
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.contact-list-shell .contact-pool-summary-stack {
  display: none;
}

.contact-list-shell .contact-pool-table-wrap {
  height: 100%;
  max-height: 100%;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  overflow: auto;
  background: #fff;
}

.contact-list-shell .contact-pool-table {
  min-width: 1680px;
}

.contact-list-shell .contact-pool-row {
  min-height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid #dbe5ee;
  background: #fff;
  color: #33475b;
}

.contact-list-shell .contact-pool-row--header {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 36px;
  background: #f5f8fa;
  border-bottom: 1px solid #dbe5ee;
}

.contact-list-shell .contact-pool-header-cell,
.contact-list-shell .contact-pool-cell {
  min-height: 36px;
  align-items: center;
  color: #33475b;
  font-size: 0.86rem;
}

.contact-list-shell .contact-pool-header-cell {
  color: #33475b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.contact-list-shell .contact-pool-cell--primary strong,
.contact-list-shell .contact-pool-identity__text,
.contact-list-shell .contact-pool-cell a {
  color: #0091ae;
  font-weight: 800;
}

.contact-list-shell .contact-pool-avatar {
  width: 24px;
  height: 24px;
  background: #eaf7fb;
  color: #516f90;
  font-size: 0.72rem;
}

.contact-list-shell .contact-pool-row:hover {
  background: #f5f8fa;
}

.contact-list-shell .contact-pool-actions {
  justify-content: flex-start;
}

.contact-list-shell .contact-pool-actions select,
.contact-list-shell .contact-pool-actions button {
  height: 30px;
  min-height: 30px;
  border-radius: 3px;
}

.contact-list-shell .contact-pool-footer--agent {
  position: static;
  transform: none;
  width: 100%;
  max-width: none;
  display: flex;
  justify-content: center;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid #dbe5ee;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.contact-list-shell .pagination-bar {
  min-height: 32px;
  gap: 14px;
  color: #0091ae;
  font-weight: 800;
}

.contact-list-shell .pagination-bar button,
.contact-list-shell .pagination-bar select {
  min-height: 28px;
  border-radius: 3px;
}

@media (max-width: 1300px) {
  .contact-workspace-toolbar--shared {
    grid-template-columns: 1fr;
  }

  .contact-hubspot-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Contact workspace precision fixes */
.contact-list-shell,
.agent-workspace-list-shell.contact-list-shell,
.contact-list-shell .agent-list-shell__main,
.contact-list-shell .workspace-header,
.contact-list-shell .workspace-header__meta,
.contact-list-shell .workspace-header__meta-toolbar,
.contact-list-shell .hubspot-contact-toolbar {
  width: 100%;
  max-width: none;
}

.contact-list-shell .workspace-header__meta-toolbar {
  display: block;
  min-width: 0;
}

.hubspot-contact-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  padding: 12px 0 10px;
  border-bottom: 1px solid #dbe5ee;
}

.hubspot-contact-toolbar__top {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.hubspot-contact-toolbar__search-row {
  min-width: 0;
}

.hubspot-contact-toolbar__right {
  justify-content: flex-end;
  flex-wrap: nowrap;
  min-width: 0;
}

.hubspot-contact-toolbar__links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.active-criteria-chip-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: min(540px, 45vw);
}

.active-criteria-chip {
  appearance: none;
  min-height: 34px;
  max-width: 260px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #b8d9e6;
  border-radius: 6px;
  background: #e8f7fb;
  color: #174466;
  padding: 0 8px 0 10px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
  overflow: hidden;
}

.active-criteria-chip:hover,
.active-criteria-chip:focus-visible {
  border-color: #00a4bd;
  background: #dff4f8;
  outline: none;
}

.active-criteria-chip__icon {
  color: #008fa8;
  display: inline-flex;
  flex: 0 0 auto;
}

.active-criteria-chip__label {
  flex: 0 0 auto;
  color: #008fa8;
}

.active-criteria-chip__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #163f5f;
}

.active-criteria-chip__count {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #c8f2f6;
  color: #174466;
  font-size: 0.75rem;
  line-height: 1;
}

.active-criteria-chip__clear {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #008fa8;
  font-size: 1rem;
  line-height: 1;
}

.active-criteria-chip__clear:hover,
.active-criteria-chip__clear:focus-visible {
  background: rgba(0, 164, 189, 0.14);
  outline: none;
}

.company-directory-active-criteria {
  display: flex;
  align-items: center;
  min-width: 0;
}

.hubspot-contact-toolbar__search {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.hubspot-contact-toolbar__search input,
.agent-workspace-project-search--inline input {
  width: 100%;
}

.contact-pool-cell,
.contact-pool-header-cell,
.contact-list-shell .contact-pool-cell,
.contact-list-shell .contact-pool-header-cell,
.agent-workspace-list-shell .contact-pool-cell,
.agent-workspace-list-shell .contact-pool-header-cell {
  justify-content: flex-start !important;
  justify-items: start !important;
  text-align: left !important;
}

.contact-pool-cell > *,
.contact-pool-header-cell > * {
  text-align: left;
}

.agent-workspace-project-tabshell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.agent-workspace-project-tabs {
  min-height: 56px;
  align-items: flex-end;
  gap: 10px;
  padding: 0;
  border-bottom: 1px solid #dbe5ee;
  overflow: visible;
}

.agent-workspace-project-tabs__chips {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding-bottom: 8px;
  white-space: nowrap;
}

.agent-workspace-project-tabs__chips .agent-context-button--nav {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 800;
}

.agent-tab-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #cbd6e2;
  border-radius: 999px;
  background: #fff;
  color: #516f90;
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 800;
}

.agent-tab-chip strong {
  color: #213343;
  font-size: 0.8rem;
}

.agent-tab-chip:hover {
  border-color: #99acc2;
  background: #f5f8fa;
  color: #33475b;
}

.agent-tab-chip--toggle.is-active {
  border-color: #7fd1de;
  background: #e5f8fb;
  color: #006f80;
}

.agent-workspace-project-tab {
  height: 49px;
  min-height: 49px;
  padding: 0 20px;
  border: 1px solid #cbd6e2;
  border-bottom-color: #dbe5ee;
  border-radius: 4px 4px 0 0;
  background: #f4f8fc;
  color: #33475b;
  box-shadow: none;
  font-size: 0.94rem;
  font-weight: 800;
  transform: none;
}

.agent-workspace-project-tab:hover {
  border-color: #cbd6e2;
  border-bottom-color: #dbe5ee;
  background: #fff;
  color: #213343;
}

.agent-workspace-project-tab.is-active {
  margin-bottom: -1px;
  border-color: #cbd6e2;
  border-bottom-color: #fff;
  background: #fff;
  color: #213343;
  box-shadow: inset 0 -3px 0 #00a4bd;
  z-index: 2;
}

.agent-workspace-project-tab__count {
  min-width: 24px;
  min-height: 22px;
  padding: 0 9px;
  border: 0;
  background: #dff7fb;
  color: #0f6671;
  font-size: 0.78rem;
}

.contact-workspace-mode-switch--hubspot {
  min-height: 56px;
  align-items: flex-end;
  gap: 10px;
}

.contact-workspace-object-tab,
.contact-workspace-mode-switch--hubspot .contact-workspace-mode-switch__tab {
  height: 49px;
  min-height: 49px;
  border-radius: 4px 4px 0 0;
  font-size: 0.94rem;
  font-weight: 800;
}

.contact-workspace-mode-switch--hubspot .contact-workspace-mode-switch__tab.is-active {
  box-shadow: inset 0 -3px 0 #00a4bd;
}

@media (max-width: 1300px) {
  .hubspot-contact-toolbar__top {
    grid-template-columns: minmax(0, 1fr);
  }

  .hubspot-contact-toolbar__right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Canonical contact toolbar cleanup: overrides older redundant contact-list rules above. */
.contact-list-shell .workspace-header,
.agent-workspace-list-shell.contact-list-shell .workspace-header {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.contact-list-shell .workspace-header__meta.workspace-header__meta--contact-shell,
.agent-workspace-list-shell.contact-list-shell .workspace-header__meta.workspace-header__meta--contact-shell {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.contact-list-shell .workspace-header__meta-top,
.agent-workspace-list-shell.contact-list-shell .workspace-header__meta-top,
.contact-list-shell .workspace-header__meta-actions,
.agent-workspace-list-shell.contact-list-shell .workspace-header__meta-actions,
.contact-list-shell .workspace-header__meta-toolbar,
.agent-workspace-list-shell.contact-list-shell .workspace-header__meta-toolbar {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.contact-list-shell .hubspot-contact-toolbar,
.agent-workspace-list-shell.contact-list-shell .hubspot-contact-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  gap: 10px !important;
  padding: 12px 0 10px !important;
  border-bottom: 1px solid #dbe5ee !important;
}

.contact-list-shell .hubspot-contact-toolbar__top,
.agent-workspace-list-shell.contact-list-shell .hubspot-contact-toolbar__top {
  display: grid !important;
  grid-template-columns: minmax(340px, 0.42fr) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.contact-list-shell .hubspot-contact-toolbar__search-row,
.agent-workspace-list-shell.contact-list-shell .hubspot-contact-toolbar__search-row,
.contact-list-shell .hubspot-contact-toolbar__search,
.agent-workspace-list-shell.contact-list-shell .hubspot-contact-toolbar__search {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.contact-list-shell .hubspot-contact-toolbar__right,
.agent-workspace-list-shell.contact-list-shell .hubspot-contact-toolbar__right {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.contact-list-shell .hubspot-contact-toolbar__links,
.agent-workspace-list-shell.contact-list-shell .hubspot-contact-toolbar__links {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: none !important;
}

.contact-list-shell .agent-workspace-layer-picker--menu,
.agent-workspace-list-shell.contact-list-shell .agent-workspace-layer-picker--menu {
  flex: 0 1 236px !important;
  width: 236px !important;
  min-width: 210px !important;
  max-width: 236px !important;
}

.contact-list-shell .hubspot-contact-toolbar .hubspot-toolbar-button,
.agent-workspace-list-shell.contact-list-shell .hubspot-contact-toolbar .hubspot-toolbar-button {
  flex: 0 0 auto !important;
  height: 36px !important;
  min-height: 36px !important;
  white-space: nowrap !important;
}

.contact-list-shell.is-filter-open .hubspot-contact-toolbar__top,
.agent-workspace-list-shell.contact-list-shell.is-filter-open .hubspot-contact-toolbar__top,
.agent-workspace-project-shell.is-filter-open .contact-list-shell .hubspot-contact-toolbar__top,
.agent-workspace-project-shell.is-filter-open .agent-workspace-list-shell.contact-list-shell .hubspot-contact-toolbar__top {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
}

.contact-list-shell.is-filter-open .hubspot-contact-toolbar__right,
.agent-workspace-list-shell.contact-list-shell.is-filter-open .hubspot-contact-toolbar__right,
.agent-workspace-project-shell.is-filter-open .contact-list-shell .hubspot-contact-toolbar__right,
.agent-workspace-project-shell.is-filter-open .agent-workspace-list-shell.contact-list-shell .hubspot-contact-toolbar__right {
  justify-content: flex-start !important;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
}

.contact-list-shell.is-filter-open .active-criteria-chip-row,
.agent-workspace-list-shell.contact-list-shell.is-filter-open .active-criteria-chip-row,
.agent-workspace-project-shell.is-filter-open .contact-list-shell .active-criteria-chip-row,
.agent-workspace-project-shell.is-filter-open .agent-workspace-list-shell.contact-list-shell .active-criteria-chip-row {
  order: 20;
  flex: 1 0 100%;
  max-width: 100%;
}

.contact-list-shell.is-filter-open .active-criteria-chip,
.agent-workspace-list-shell.contact-list-shell.is-filter-open .active-criteria-chip,
.agent-workspace-project-shell.is-filter-open .contact-list-shell .active-criteria-chip,
.agent-workspace-project-shell.is-filter-open .agent-workspace-list-shell.contact-list-shell .active-criteria-chip {
  max-width: min(360px, 100%);
}

.contact-list-shell .contact-pool-row,
.agent-workspace-list-shell.contact-list-shell .contact-pool-row {
  text-align: left !important;
}

.contact-list-shell .contact-pool-cell,
.contact-list-shell .contact-pool-header-cell,
.agent-workspace-list-shell.contact-list-shell .contact-pool-cell,
.agent-workspace-list-shell.contact-list-shell .contact-pool-header-cell {
  display: flex !important;
  justify-content: flex-start !important;
  justify-items: start !important;
  align-items: center !important;
  text-align: left !important;
}

@media (max-width: 1320px) {
  .agent-workspace-project-tabshell {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .agent-workspace-project-tabs__chips {
    justify-content: flex-start;
    flex-wrap: wrap;
    min-height: 0;
    padding: 0 0 8px;
  }

  .contact-list-shell .hubspot-contact-toolbar__top,
  .agent-workspace-list-shell.contact-list-shell .hubspot-contact-toolbar__top {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .contact-list-shell .hubspot-contact-toolbar__right,
  .agent-workspace-list-shell.contact-list-shell .hubspot-contact-toolbar__right {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }
}

/* HubSpot-style contact pagination: keep the footer visible and integrated. */
.contact-list-shell .agent-list-shell__main,
.agent-workspace-list-shell.contact-list-shell .agent-list-shell__main {
  position: relative !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  min-height: 0 !important;
}

.contact-list-shell .agent-list-table-shell,
.agent-workspace-list-shell.contact-list-shell .agent-list-table-shell,
.contact-list-shell .contact-pool-list--agent,
.agent-workspace-list-shell.contact-list-shell .contact-pool-list--agent {
  min-height: 0 !important;
}

.contact-list-shell .contact-pool-footer--agent,
.agent-workspace-list-shell.contact-list-shell .contact-pool-footer--agent {
  position: fixed !important;
  left: var(--sidebar-width, 245px) !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 95 !important;
  display: block !important;
  align-items: center !important;
  justify-items: center !important;
  width: auto !important;
  min-height: 48px !important;
  padding: 6px 14px !important;
  border: 0 !important;
  border-top: 1px solid #dbe5ee !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: 0 -8px 18px rgba(33, 51, 67, 0.08) !important;
  transform: none !important;
}

.contact-list-shell .contact-pool-footer--agent-with-action,
.agent-workspace-list-shell.contact-list-shell .contact-pool-footer--agent-with-action {
  position: fixed !important;
  display: grid !important;
  grid-template-columns: minmax(120px, 1fr) minmax(0, auto) minmax(120px, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
}

.sidebar-collapsed .contact-list-shell .contact-pool-footer--agent,
.sidebar-collapsed .agent-workspace-list-shell.contact-list-shell .contact-pool-footer--agent,
body.sidebar-collapsed .contact-list-shell .contact-pool-footer--agent,
body.sidebar-collapsed .agent-workspace-list-shell.contact-list-shell .contact-pool-footer--agent {
  left: var(--sidebar-collapsed-width, 72px) !important;
}

.contact-list-shell .contact-pool-footer__pagination,
.agent-workspace-list-shell.contact-list-shell .contact-pool-footer__pagination {
  grid-column: 2 !important;
  justify-self: center !important;
  position: static !important;
  display: flex !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  transform: none !important;
}

.contact-list-shell .contact-pool-footer--agent > .pagination-bar,
.agent-workspace-list-shell.contact-list-shell .contact-pool-footer--agent > .pagination-bar {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

.contact-list-shell .contact-pool-footer__action,
.agent-workspace-list-shell.contact-list-shell .contact-pool-footer__action {
  grid-column: 3 !important;
  justify-self: end !important;
  position: static !important;
  display: flex !important;
  align-items: center !important;
}

.contact-list-shell .pagination-bar,
.agent-workspace-list-shell.contact-list-shell .pagination-bar {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 13px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #0091ae !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
}

.contact-list-shell .pagination-pages,
.agent-workspace-list-shell.contact-list-shell .pagination-pages {
  display: inline-flex !important;
  align-items: center !important;
  gap: 13px !important;
}

.contact-list-shell .pagination-nav,
.contact-list-shell .pagination-page,
.agent-workspace-list-shell.contact-list-shell .pagination-nav,
.agent-workspace-list-shell.contact-list-shell .pagination-page {
  min-width: 24px !important;
  height: 28px !important;
  min-height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #0091ae !important;
  padding: 0 2px !important;
  box-shadow: none !important;
  font: inherit !important;
  line-height: 1 !important;
}

.contact-list-shell .pagination-nav:not(:disabled):hover,
.contact-list-shell .pagination-page:not(.is-active):hover,
.agent-workspace-list-shell.contact-list-shell .pagination-nav:not(:disabled):hover,
.agent-workspace-list-shell.contact-list-shell .pagination-page:not(.is-active):hover {
  background: #e5f8fb !important;
  color: #006f80 !important;
}

.contact-list-shell .pagination-nav:disabled,
.agent-workspace-list-shell.contact-list-shell .pagination-nav:disabled {
  color: #99acc2 !important;
  cursor: not-allowed !important;
}

.contact-list-shell .pagination-nav__arrow,
.agent-workspace-list-shell.contact-list-shell .pagination-nav__arrow {
  font-size: 1.5rem !important;
  font-weight: 400 !important;
  line-height: 0.8 !important;
}

.contact-list-shell .pagination-page.is-active,
.agent-workspace-list-shell.contact-list-shell .pagination-page.is-active {
  border: 1px solid #00a4bd !important;
  background: #dff7fb !important;
  color: #006f80 !important;
}

.contact-list-shell .pagination-ellipsis,
.agent-workspace-list-shell.contact-list-shell .pagination-ellipsis {
  color: #516f90 !important;
  font-weight: 800 !important;
}

.contact-list-shell .pagination-page-size,
.agent-workspace-list-shell.contact-list-shell .pagination-page-size {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-left: 8px !important;
}

.contact-list-shell .pagination-page-size select,
.agent-workspace-list-shell.contact-list-shell .pagination-page-size select {
  height: 30px !important;
  min-height: 30px !important;
  width: auto !important;
  min-width: 112px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #0091ae !important;
  padding: 0 20px 0 0 !important;
  box-shadow: none !important;
  font: inherit !important;
  font-weight: 800 !important;
}

.contact-list-shell .pagination-page-size select:hover,
.agent-workspace-list-shell.contact-list-shell .pagination-page-size select:hover {
  background: #e5f8fb !important;
}

/* HubSpot-style company pagination: identical footer geometry to contact lists. */
#companies .company-directory-pagination,
#companies .company-directory-pagination.contact-pool-footer--agent,
#companies .company-directory-pagination.contact-pool-footer--agent.contact-pool-footer--agent-with-action,
.agent-company-directory-pagination,
.agent-company-directory-pagination.contact-pool-footer--agent,
.agent-company-directory-pagination.contact-pool-footer--agent.contact-pool-footer--agent-with-action {
  position: fixed !important;
  left: var(--sidebar-width, 245px) !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 95 !important;
  display: grid !important;
  grid-template-columns: minmax(120px, 1fr) minmax(0, auto) minmax(120px, 1fr) !important;
  align-items: center !important;
  justify-items: stretch !important;
  gap: 12px !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 5px 14px !important;
  border: 0 !important;
  border-top: 1px solid #dbe5ee !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: 0 -8px 18px rgba(33, 51, 67, 0.08) !important;
  transform: none !important;
}

.sidebar-collapsed #companies .company-directory-pagination,
.sidebar-collapsed .agent-company-directory-pagination,
body.sidebar-collapsed #companies .company-directory-pagination,
body.sidebar-collapsed .agent-company-directory-pagination {
  left: var(--sidebar-collapsed-width, 72px) !important;
}

#companies .company-directory-pagination .contact-pool-footer__pagination,
.agent-company-directory-pagination .contact-pool-footer__pagination {
  grid-column: 2 !important;
  justify-self: center !important;
  position: static !important;
  display: flex !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  transform: none !important;
}

#companies .company-directory-pagination .contact-pool-footer__action,
.agent-company-directory-pagination .contact-pool-footer__action {
  grid-column: 3 !important;
  justify-self: end !important;
  position: static !important;
  display: flex !important;
  align-items: center !important;
}

#companies .company-directory-pagination .pagination-bar,
.agent-company-directory-pagination .pagination-bar {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 13px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #0091ae !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  transform: none !important;
}

#companies .company-directory-list,
.agent-company-directory-shell {
  padding-bottom: 44px !important;
}

.agent-history-list-shell .contact-pool-table--history {
  min-width: 1500px;
}

.agent-history-list-shell .agent-history-row {
  cursor: pointer;
  box-shadow: inset 3px 0 0 var(--agent-history-status-color, #dbe5ee);
}

.agent-history-list-shell .agent-history-row:hover {
  background: color-mix(in srgb, var(--agent-history-status-color, #00a4bd) 8%, #fff) !important;
}

.agent-history-list-shell .agent-history-row__link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #0091ae;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

/* Final authority: agent contact right pane */
.agent-record-shell--hubspot {
  min-height: 0 !important;
  height: calc(100vh - var(--shell-topbar-height) - 176px) !important;
  max-height: calc(100vh - var(--shell-topbar-height) - 176px) !important;
  overflow: hidden !important;
}

.agent-record-layout--hubspot {
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

.agent-record-layout--hubspot .agent-record-rail--right {
  display: block !important;
  padding: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

.agent-record-layout--hubspot .agent-record-rightpane {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

.agent-record-layout--hubspot .agent-record-rightpane__scroll {
  display: grid !important;
  align-content: start !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
}

.agent-record-layout--hubspot .agent-record-rightpane__footer {
  flex: 0 0 auto !important;
  position: relative !important;
}

/* Final authority: dark mode for newer HubSpot-style CRM surfaces. */
body.crm-theme-dark {
  --hubspot-bg: #0b1220;
  --hubspot-surface: #111c2e;
  --hubspot-surface-alt: #16243a;
  --hubspot-border: #283852;
  --hubspot-border-strong: #3a4c68;
  --hubspot-text: #edf4ff;
  --hubspot-ink: #edf4ff;
  --hubspot-muted: #9fb1cb;
  --hubspot-navy: #edf4ff;
  --hubspot-blue: #7fc8ff;
  --hubspot-blue-strong: #4fb4df;
  --hubspot-shadow: 0 20px 52px rgba(0, 0, 0, 0.34);
}

body.crm-theme-dark,
body.crm-theme-dark .app-shell,
body.crm-theme-dark .workspace,
body.crm-theme-dark .main-workspace,
body.crm-theme-dark .workspace-content,
body.crm-theme-dark .workspace-page,
body.crm-theme-dark .workspace-panel {
  background:
    radial-gradient(circle at top left, rgba(0, 164, 189, 0.08), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-strong) 100%) !important;
  color: var(--ink) !important;
}

body.crm-theme-dark .workspace-shell,
body.crm-theme-dark .workspace-section,
body.crm-theme-dark .workspace-empty,
body.crm-theme-dark .panel-card,
body.crm-theme-dark .panel-card--subtle,
body.crm-theme-dark .crm-table-shell,
body.crm-theme-dark .crm-list-toolbar,
body.crm-theme-dark .hubspot-contact-toolbar,
body.crm-theme-dark .contact-list-shell,
body.crm-theme-dark .agent-workspace-list-shell,
body.crm-theme-dark .company-directory-list,
body.crm-theme-dark .agent-company-directory-shell,
body.crm-theme-dark .agent-hubspot-card,
body.crm-theme-dark .agent-hubspot-event__card,
body.crm-theme-dark .agent-hubspot-activity-composer,
body.crm-theme-dark .agent-association-card,
body.crm-theme-dark .agent-wrapup-pane,
body.crm-theme-dark .agent-record-rightpane,
body.crm-theme-dark .agent-record-column__footer,
body.crm-theme-dark .agent-record-column__scroll--center,
body.crm-theme-dark .agent-record-rail__header,
body.crm-theme-dark .agent-detail-tabs--hubspot,
body.crm-theme-dark .agent-company-overview-hero,
body.crm-theme-dark .agent-company-kpi-card,
body.crm-theme-dark .agent-company-source-row,
body.crm-theme-dark .agent-company-location-tile,
body.crm-theme-dark .filter-builder,
body.crm-theme-dark .filter-builder--hubspot,
body.crm-theme-dark .agent-filter-drawer,
body.crm-theme-dark .hubspot-filter-rule,
body.crm-theme-dark .report-builder-modal-shell,
body.crm-theme-dark .report-builder-card,
body.crm-theme-dark .report-builder-type-card,
body.crm-theme-dark .report-builder-step,
body.crm-theme-dark .report-builder-filter-row,
body.crm-theme-dark .report-builder-actions,
body.crm-theme-dark .report-builder-column-picker,
body.crm-theme-dark .report-builder-column-checklist,
body.crm-theme-dark .email-campaign-workspace,
body.crm-theme-dark .email-campaign-card,
body.crm-theme-dark .email-campaign-analytics-card,
body.crm-theme-dark .email-campaign-audience-bar,
body.crm-theme-dark .email-campaign-detail--page,
body.crm-theme-dark .email-campaign-detail__hero,
body.crm-theme-dark .email-campaign-tab-panel,
body.crm-theme-dark .email-campaign-status-filterbar,
body.crm-theme-dark .email-campaign-audience-tools,
body.crm-theme-dark .email-campaign-members-table,
body.crm-theme-dark .email-campaign-recipient-drawer,
body.crm-theme-dark .email-campaign-recipient-drawer__status,
body.crm-theme-dark .email-campaign-recipient-milestones div,
body.crm-theme-dark .email-campaign-recipient-events article,
body.crm-theme-dark .email-campaign-batch-card,
body.crm-theme-dark .email-campaign-activity-item,
body.crm-theme-dark .email-campaign-analytics-hero,
body.crm-theme-dark .email-campaign-health-score,
body.crm-theme-dark .email-campaign-insight-card,
body.crm-theme-dark .email-campaign-funnel,
body.crm-theme-dark .workload-planner-card,
body.crm-theme-dark .workload-planning-panel,
body.crm-theme-dark .workload-planner-shell,
body.crm-theme-dark .workload-planner-output-card,
body.crm-theme-dark .workload-planner-input-card,
body.crm-theme-dark .workload-planner-callout {
  background: linear-gradient(180deg, var(--hubspot-surface) 0%, #101a2b 100%) !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-text) !important;
  box-shadow: var(--hubspot-shadow) !important;
}

body.crm-theme-dark .agent-contact-company-link {
  color: #62d4f2;
}

body.crm-theme-dark .agent-company-subtabs {
  background: #0f1727;
  border-color: var(--hubspot-border);
}

body.crm-theme-dark .agent-company-subtab {
  color: var(--hubspot-muted);
  border-right-color: var(--hubspot-border);
}

body.crm-theme-dark .agent-company-subtab.is-active {
  background: #142238;
  color: var(--hubspot-text);
}

body.crm-theme-dark .agent-company-chip {
  border-color: rgba(98, 212, 242, 0.28);
  background: rgba(98, 212, 242, 0.12);
  color: var(--hubspot-text);
}

body.crm-theme-dark .agent-company-chip--muted,
body.crm-theme-dark .agent-company-source-row.is-empty,
body.crm-theme-dark .agent-company-location-tile--muted {
  background: #0f1727;
  color: var(--hubspot-muted);
}

body.crm-theme-dark .contact-pool-footer,
body.crm-theme-dark .contact-list-shell .contact-pool-footer,
body.crm-theme-dark .agent-workspace-list-shell.contact-list-shell .contact-pool-footer,
body.crm-theme-dark #companies .company-directory-pagination,
body.crm-theme-dark #companies .company-directory-pagination.contact-pool-footer--agent,
body.crm-theme-dark #companies .company-directory-pagination.contact-pool-footer--agent.contact-pool-footer--agent-with-action,
body.crm-theme-dark .agent-company-directory-pagination,
body.crm-theme-dark .agent-company-directory-pagination.contact-pool-footer--agent,
body.crm-theme-dark .agent-company-directory-pagination.contact-pool-footer--agent.contact-pool-footer--agent-with-action {
  background: #0f1727 !important;
  border-top-color: var(--hubspot-border) !important;
  color: var(--hubspot-text) !important;
  box-shadow: 0 -10px 22px rgba(0, 0, 0, 0.32) !important;
}

body.crm-theme-dark .workspace-tab,
body.crm-theme-dark .project-tab,
body.crm-theme-dark .reporting-tab,
body.crm-theme-dark .agent-detail-tab,
body.crm-theme-dark .hubspot-toolbar-button,
body.crm-theme-dark .secondary-button,
body.crm-theme-dark .ghost-button,
body.crm-theme-dark .pagination-page,
body.crm-theme-dark .pagination-nav,
body.crm-theme-dark .pagination-page-size select,
body.crm-theme-dark .floating-filter-link,
body.crm-theme-dark .agent-layout-link {
  background: linear-gradient(180deg, #17243a 0%, #111d30 100%) !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-blue) !important;
}

body.crm-theme-dark .email-campaign-detail .workspace-tabs--hubspot,
body.crm-theme-dark .email-campaign-detail .workspace-tabs--hubspot .workspace-tab,
body.crm-theme-dark .email-campaign-status-filter {
  background: #0f1727 !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .email-campaign-detail .workspace-tabs--hubspot .workspace-tab.is-active,
body.crm-theme-dark .email-campaign-status-filter.is-active {
  border-color: var(--hubspot-accent) !important;
  background: #132c42 !important;
  color: var(--hubspot-blue) !important;
}

body.crm-theme-dark .email-campaign-detail__header h2,
body.crm-theme-dark .email-campaign-recipient-drawer h3,
body.crm-theme-dark .email-campaign-recipient-milestones strong,
body.crm-theme-dark .email-campaign-recipient-events h4,
body.crm-theme-dark .email-campaign-batch-card strong,
body.crm-theme-dark .email-campaign-batch-card b,
body.crm-theme-dark .email-campaign-insight-card strong,
body.crm-theme-dark .email-campaign-funnel__row strong,
body.crm-theme-dark .email-campaign-funnel__row b {
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .email-campaign-recipient-drawer__failure,
body.crm-theme-dark .email-campaign-risk-grid article {
  background: rgba(154, 39, 56, 0.18) !important;
  border-color: rgba(247, 184, 190, 0.38) !important;
  color: #ffd6dc !important;
}

body.crm-theme-dark .workspace-tab.is-active,
body.crm-theme-dark .project-tab.is-active,
body.crm-theme-dark .reporting-tab.is-active,
body.crm-theme-dark .agent-detail-tab.is-active,
body.crm-theme-dark .report-builder-step.is-active,
body.crm-theme-dark .report-builder-type-card.is-active,
body.crm-theme-dark .pagination-page.is-active {
  background: linear-gradient(180deg, #173146 0%, #10283a 100%) !important;
  border-color: color-mix(in srgb, var(--hubspot-blue) 58%, var(--hubspot-border)) !important;
  color: #bfeeff !important;
  box-shadow: inset 0 -2px 0 var(--hubspot-blue-strong) !important;
}

body.crm-theme-dark .report-builder-merge-tags,
body.crm-theme-dark .report-builder-output-mode,
body.crm-theme-dark .report-builder-pivot-grid {
  border-color: rgba(148, 178, 208, 0.28) !important;
  background: rgba(148, 178, 208, 0.08) !important;
}

body.crm-theme-dark .report-builder-merge-tag {
  border-color: rgba(148, 178, 208, 0.34) !important;
  background: #0d1b2f !important;
  color: #71dff2 !important;
}

body.crm-theme-dark .report-builder-merge-tag:hover {
  border-color: #71dff2 !important;
  background: rgba(0, 174, 199, 0.16) !important;
}

body.crm-theme-dark .report-builder-pivot-grid label {
  color: #aac0d7 !important;
}

body.crm-theme-dark .report-builder-pivot-grid select {
  border-color: rgba(148, 178, 208, 0.34) !important;
  background: #0d1b2f !important;
  color: #f2f8ff !important;
}

body.crm-theme-dark .report-builder-pivot-checkbox {
  border-color: rgba(148, 178, 208, 0.34) !important;
  background: rgba(148, 178, 208, 0.08) !important;
}

body.crm-theme-dark .report-builder-pivot-checkbox span {
  color: #d8e8f7 !important;
}

body.crm-theme-dark .report-clean-kpi small,
body.crm-theme-dark .report-clean-recipe span,
body.crm-theme-dark .report-clean-issue span,
body.crm-theme-dark .report-clean-issue small,
body.crm-theme-dark .report-clean-log-entry span {
  color: #9db4ce !important;
}

body.crm-theme-dark .report-clean-topbar,
body.crm-theme-dark .report-clean-panel,
body.crm-theme-dark .report-clean-kpi,
body.crm-theme-dark .report-clean-table-shell,
body.crm-theme-dark .report-clean-recipe,
body.crm-theme-dark .report-clean-view,
body.crm-theme-dark .report-clean-push-meta span {
  background: #101b2d !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-text) !important;
  box-shadow: none !important;
}

body.crm-theme-dark .report-clean-topbar h3,
body.crm-theme-dark .report-clean-panel h4,
body.crm-theme-dark .report-clean-kpi strong,
body.crm-theme-dark .report-clean-recipe strong,
body.crm-theme-dark .report-clean-issue strong,
body.crm-theme-dark .report-clean-row > div {
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .report-clean-filter,
body.crm-theme-dark .report-clean-issue,
body.crm-theme-dark .report-clean-panel--push {
  background: #0f1a2d !important;
  border-color: var(--hubspot-border) !important;
}

body.crm-theme-dark .report-clean-filter.is-active,
body.crm-theme-dark .report-clean-view.is-active {
  background: rgba(0, 174, 199, 0.16) !important;
  border-color: #71dff2 !important;
  color: #bfeeff !important;
}

body.crm-theme-dark .report-clean-row > div {
  border-color: var(--hubspot-border) !important;
  background: transparent !important;
}

body.crm-theme-dark .report-clean-row--header > div {
  background: #162235 !important;
  color: var(--hubspot-muted) !important;
}

body.crm-theme-dark .has-clean-change {
  background-image: linear-gradient(135deg, rgba(0, 174, 199, 0.16), rgba(16, 27, 45, 0)) !important;
  outline-color: rgba(113, 223, 242, 0.34) !important;
}

body.crm-theme-dark .has-clean-issue {
  background: rgba(245, 184, 73, 0.13) !important;
}

body.crm-theme-dark .has-clean-issue--critical {
  background: rgba(217, 79, 92, 0.16) !important;
}

body.crm-theme-dark .has-clean-issue--notice {
  background: rgba(107, 166, 217, 0.14) !important;
}

body.crm-theme-dark .contact-pool-table,
body.crm-theme-dark .contact-pool-table-wrap,
body.crm-theme-dark .contact-pool-row,
body.crm-theme-dark .contact-pool-row > span,
body.crm-theme-dark .report-table,
body.crm-theme-dark .report-table td,
body.crm-theme-dark .email-log-hubspot-row,
body.crm-theme-dark .email-log-hubspot-row > div,
body.crm-theme-dark .field-admin-row,
body.crm-theme-dark .list-card,
body.crm-theme-dark .queue-row {
  background: transparent !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .contact-pool-row--header,
body.crm-theme-dark .contact-pool-header-cell,
body.crm-theme-dark .report-table th,
body.crm-theme-dark .email-log-hubspot-table__header,
body.crm-theme-dark .table-shell th {
  background: #162235 !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-muted) !important;
}

body.crm-theme-dark .contact-pool-row:hover,
body.crm-theme-dark .agent-history-list-shell .agent-history-row:hover,
body.crm-theme-dark .email-log-hubspot-row:hover,
body.crm-theme-dark .report-table tbody tr:hover,
body.crm-theme-dark .list-card:hover,
body.crm-theme-dark .queue-row:hover {
  background: rgba(127, 200, 255, 0.08) !important;
}

body.crm-theme-dark .contact-pool-avatar,
body.crm-theme-dark .agent-contact-summary__avatar,
body.crm-theme-dark .avatar,
body.crm-theme-dark .avatar-circle {
  background: linear-gradient(180deg, #223a58 0%, #18293f 100%) !important;
  color: #bfeeff !important;
  border-color: var(--hubspot-border) !important;
}

body.crm-theme-dark .filter-combobox,
body.crm-theme-dark .filter-combobox__input,
body.crm-theme-dark .filter-combobox__menu,
body.crm-theme-dark .filter-combobox__option,
body.crm-theme-dark .filter-combobox__empty,
body.crm-theme-dark .filter-combobox__group,
body.crm-theme-dark .import-mapping-input,
body.crm-theme-dark input,
body.crm-theme-dark select,
body.crm-theme-dark textarea {
  background: #0f1a2d !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .filter-combobox__menu,
body.crm-theme-dark .dropdown-menu,
body.crm-theme-dark .select-menu,
body.crm-theme-dark .global-search-results,
body.crm-theme-dark .user-menu-dropdown {
  background: #111c2e !important;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.46) !important;
}

body.crm-theme-dark .filter-combobox__option.is-highlighted,
body.crm-theme-dark .filter-combobox__option:hover,
body.crm-theme-dark .filter-combobox__option.is-selected {
  background: rgba(0, 164, 189, 0.16) !important;
  color: #dffaff !important;
}

body.crm-theme-dark .filter-combobox__property-icon,
body.crm-theme-dark .section-kicker,
body.crm-theme-dark .workspace-copy,
body.crm-theme-dark .detail-caption,
body.crm-theme-dark .list-card__subtitle,
body.crm-theme-dark .contact-pool-identity__text,
body.crm-theme-dark .report-builder-help,
body.crm-theme-dark .project-builder-field small,
body.crm-theme-dark .email-log-hubspot-row__created,
body.crm-theme-dark .email-log-hubspot-row__failure,
body.crm-theme-dark .report-clean-kpi small,
body.crm-theme-dark .report-clean-issue span,
body.crm-theme-dark .report-clean-issue small,
body.crm-theme-dark .report-clean-log-entry span {
  color: var(--hubspot-muted) !important;
}

body.crm-theme-dark .agent-contact-summary--hubspot,
body.crm-theme-dark .agent-record-fact-strip,
body.crm-theme-dark .agent-hubspot-highlight,
body.crm-theme-dark .readonly-field-card,
body.crm-theme-dark .project-builder-field,
body.crm-theme-dark .hubspot-filter-row,
body.crm-theme-dark .hubspot-filter-rule__value-row,
body.crm-theme-dark .report-builder-filter-card,
body.crm-theme-dark .report-builder-pane-header,
body.crm-theme-dark .workload-planner-metric,
body.crm-theme-dark .workload-planner-equation,
body.crm-theme-dark .workload-planner-recommendation,
body.crm-theme-dark .report-clean-topbar,
body.crm-theme-dark .report-clean-panel,
body.crm-theme-dark .report-clean-kpi,
body.crm-theme-dark .report-clean-table-shell {
  background: linear-gradient(180deg, #132037 0%, #101a2b 100%) !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .report-clean-topbar h3,
body.crm-theme-dark .report-clean-panel h4,
body.crm-theme-dark .report-clean-kpi strong,
body.crm-theme-dark .report-clean-issue strong,
body.crm-theme-dark .report-clean-row > div {
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .report-clean-filter,
body.crm-theme-dark .report-clean-issue,
body.crm-theme-dark .report-clean-panel--push {
  background: #0f1a2d !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .report-clean-filter.is-active {
  background: rgba(0, 164, 189, 0.16) !important;
  border-color: #5bd7ec !important;
  box-shadow: inset 3px 0 0 #5bd7ec !important;
}

body.crm-theme-dark .report-clean-row > div {
  border-color: var(--hubspot-border) !important;
}

body.crm-theme-dark .report-clean-row--header > div {
  background: #162235 !important;
  color: var(--hubspot-muted) !important;
}

body.crm-theme-dark .has-clean-issue {
  background: rgba(245, 184, 73, 0.14) !important;
}

body.crm-theme-dark .has-clean-issue--critical {
  background: rgba(217, 79, 92, 0.16) !important;
}

body.crm-theme-dark .has-clean-issue--notice {
  background: rgba(107, 166, 217, 0.14) !important;
}

body.crm-theme-dark .agent-hubspot-filterchip,
body.crm-theme-dark .filter-summary-chip,
body.crm-theme-dark .badge--soft,
body.crm-theme-dark .status-pill {
  background: rgba(0, 164, 189, 0.14) !important;
  border-color: rgba(127, 200, 255, 0.24) !important;
  color: #c7f4ff !important;
}

body.crm-theme-dark .danger-button,
body.crm-theme-dark .delete-button,
body.crm-theme-dark .button-danger {
  background: linear-gradient(180deg, rgba(220, 80, 94, 0.22), rgba(160, 46, 58, 0.18)) !important;
  border-color: rgba(255, 143, 155, 0.32) !important;
  color: #ffd8de !important;
}

body.crm-theme-dark .primary-button {
  background: linear-gradient(180deg, #7bdcff 0%, #46b8dc 100%) !important;
  border-color: rgba(127, 220, 255, 0.44) !important;
  color: #061520 !important;
}

body.crm-theme-dark .assignment-actions--wrapup,
body.crm-theme-dark .agent-record-rightpane__footer {
  background: linear-gradient(180deg, rgba(15, 23, 39, 0), #0f1727 24%) !important;
  border-color: var(--hubspot-border) !important;
}

body.crm-theme-dark .agent-override-banner,
body.crm-theme-dark .agent-override-banner.is-active {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06)) !important;
  border-color: rgba(245, 158, 11, 0.32) !important;
  color: #ffe7b3 !important;
}

/* Dark-mode authority: agent wrap-up cards and report library. */
body.crm-theme-dark .agent-wrapup-pane {
  background: linear-gradient(180deg, #0f1b2e 0%, #0c1524 100%) !important;
  border-color: var(--hubspot-border) !important;
}

body.crm-theme-dark .agent-wrapup-tabs {
  border-bottom-color: var(--hubspot-border) !important;
}

body.crm-theme-dark .agent-wrapup-tab {
  background: transparent !important;
  color: var(--hubspot-muted) !important;
}

body.crm-theme-dark .agent-wrapup-tab.is-active {
  color: #ffffff !important;
  border-bottom-color: #0fbfb6 !important;
}

body.crm-theme-dark .agent-wrapup-panel__block,
body.crm-theme-dark .agent-wrapup-panel__block--questions,
body.crm-theme-dark .agent-wrapup-preview,
body.crm-theme-dark .agent-wrapup-preview--empty,
body.crm-theme-dark .agent-company-location-card,
body.crm-theme-dark .agent-company-location-preview {
  background: linear-gradient(180deg, #111d31 0%, #0d1727 100%) !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-text) !important;
  box-shadow: none !important;
}

body.crm-theme-dark .agent-wrapup-panel__title strong,
body.crm-theme-dark .agent-wrapup-preview__header strong,
body.crm-theme-dark .agent-wrapup-effect p,
body.crm-theme-dark .agent-wrapup-shortcut,
body.crm-theme-dark .agent-wrapup-pane label,
body.crm-theme-dark .agent-wrapup-pane h4 {
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .agent-wrapup-panel__title span,
body.crm-theme-dark .agent-wrapup-preview--empty,
body.crm-theme-dark .agent-wrapup-preview--empty p,
body.crm-theme-dark .agent-wrapup-pane .workspace-copy {
  color: var(--hubspot-muted) !important;
}

body.crm-theme-dark .agent-wrapup-shortcut {
  background: linear-gradient(180deg, #132239 0%, #0f1a2d 100%) !important;
  border-color: var(--hubspot-border-strong) !important;
}

body.crm-theme-dark .agent-wrapup-shortcut:hover,
body.crm-theme-dark .agent-wrapup-shortcut:focus-visible {
  background: linear-gradient(180deg, #17314b 0%, #122238 100%) !important;
  border-color: rgba(127, 200, 255, 0.46) !important;
}

body.crm-theme-dark .agent-wrapup-pane .filter-combobox__input,
body.crm-theme-dark .agent-wrapup-pane input,
body.crm-theme-dark .agent-wrapup-pane select,
body.crm-theme-dark .agent-wrapup-pane textarea {
  background: #0b1424 !important;
  border-color: var(--hubspot-border-strong) !important;
  color: #ffffff !important;
}

body.crm-theme-dark .agent-wrapup-pane input::placeholder,
body.crm-theme-dark .agent-wrapup-pane textarea::placeholder {
  color: #8ea3c0 !important;
}

body.crm-theme-dark .assignment-actions--wrapup-fixed .primary-button {
  background: linear-gradient(180deg, #6bd8f7 0%, #44bfdc 100%) !important;
  border-color: rgba(127, 220, 255, 0.48) !important;
  color: #061520 !important;
}

body.crm-theme-dark .assignment-actions--wrapup-fixed .secondary-button {
  background: linear-gradient(180deg, #15253d 0%, #101b2f 100%) !important;
  border-color: var(--hubspot-border-strong) !important;
  color: #8bdcff !important;
}

body.crm-theme-dark .assignment-actions--wrapup-fixed .ghost-button {
  background: linear-gradient(180deg, rgba(220, 80, 94, 0.18), rgba(120, 42, 50, 0.14)) !important;
  border-color: rgba(255, 143, 155, 0.34) !important;
  color: #ffd0d8 !important;
}

body.crm-theme-dark .reporting-home,
body.crm-theme-dark .reporting-home__main,
body.crm-theme-dark .reporting-home-card--library {
  background: transparent !important;
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .reporting-top-tabs {
  border-bottom-color: var(--hubspot-border) !important;
}

body.crm-theme-dark .reporting-library-tabs {
  background: #0f1a2d !important;
  border-color: var(--hubspot-border) !important;
}

body.crm-theme-dark .reporting-library-tab {
  background: #111d31 !important;
  border-right-color: var(--hubspot-border) !important;
  color: var(--hubspot-muted) !important;
}

body.crm-theme-dark .reporting-library-tab.is-active {
  background: #16243a !important;
  color: #dff8ff !important;
  box-shadow: inset 0 -2px 0 #0fbfb6 !important;
}

body.crm-theme-dark .reporting-library-toolbar,
body.crm-theme-dark .reporting-library-shell {
  background: #0f1a2d !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .reporting-library-toolbar__search input {
  background: #0b1424 !important;
  border-color: var(--hubspot-border-strong) !important;
  color: #ffffff !important;
}

body.crm-theme-dark .reporting-library-table {
  background: #0f1a2d !important;
  color: var(--hubspot-text) !important;
}

body.crm-theme-dark .reporting-library-table thead th {
  background: #162235 !important;
  border-bottom-color: var(--hubspot-border) !important;
  color: var(--hubspot-muted) !important;
}

body.crm-theme-dark .reporting-library-table tbody td {
  background: #0f1a2d !important;
  border-bottom-color: var(--hubspot-border) !important;
  color: #d9e6f7 !important;
}

body.crm-theme-dark .reporting-library-table tbody tr:hover td {
  background: rgba(127, 200, 255, 0.08) !important;
}

body.crm-theme-dark .reporting-library-name strong {
  color: #7bdcff !important;
}

body.crm-theme-dark .reporting-library-name span {
  color: var(--hubspot-muted) !important;
}

body.crm-theme-dark .reporting-library-star {
  color: #8297b4 !important;
}

body.crm-theme-dark .reporting-library-star.is-active {
  color: #ffd36a !important;
}

body.crm-theme-dark .reporting-library-actions .secondary-button,
body.crm-theme-dark .reporting-library-actions .ghost-button,
body.crm-theme-dark .reporting-library-actions button {
  background: linear-gradient(180deg, #17243a 0%, #111d30 100%) !important;
  border-color: var(--hubspot-border-strong) !important;
  color: #8bdcff !important;
}

body.crm-theme-dark .reporting-home-card {
  background: #0f1a2d !important;
  border-color: var(--hubspot-border) !important;
  color: var(--hubspot-text) !important;
}

.project-command-center {
  display: grid;
  gap: 14px;
}

.project-command-hero,
.project-command-strip,
.project-command-comparison,
.project-command-table-card,
.project-intelligence-panel,
.project-command-chart {
  background: var(--panel-bg, #ffffff);
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(28, 52, 84, 0.08);
}

.project-command-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 20px;
  background: radial-gradient(circle at 12% 10%, rgba(0, 164, 189, 0.15), transparent 32%), linear-gradient(135deg, #ffffff 0%, #f4fbff 54%, #fff8f1 100%);
}

.project-command-hero h3 {
  margin: 2px 0 4px;
  font-size: 1.85rem;
}

.project-command-hero--focused {
  align-items: center;
}

.project-command-project-picker {
  display: grid;
  gap: 10px;
  justify-items: stretch;
  min-width: min(780px, 100%);
}

.project-command-project-picker__controls {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(170px, 220px);
  gap: 10px;
}

.project-command-project-picker .project-command-search {
  width: 100%;
}

.project-command-search--status select {
  min-height: 38px;
  border: 1px solid var(--border-color, #cfe0f1);
  border-radius: 10px;
  background: var(--input-bg, #ffffff);
  color: var(--text-color, #102a43);
  font-size: 0.92rem;
  padding: 0 10px;
}

.project-focus-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

.project-focus-metric {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 18px;
  background: var(--panel-bg, #ffffff);
  box-shadow: 0 12px 26px rgba(28, 52, 84, 0.07);
  padding: 15px;
}

.project-focus-metric::after {
  content: "";
  position: absolute;
  inset: auto -34px -52px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(0, 164, 189, 0.12);
}

.project-focus-metric span,
.project-focus-metric small {
  display: block;
  color: var(--muted-text, #58708a);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-focus-metric strong {
  display: block;
  margin: 8px 0;
  font-size: 2rem;
  line-height: 1;
}

.project-focus-metric--delivered::after { background: rgba(25, 135, 84, 0.14); }
.project-focus-metric--remaining::after { background: rgba(255, 193, 7, 0.16); }
.project-focus-metric--layers::after { background: rgba(18, 115, 234, 0.14); }
.project-focus-metric--forecast::after { background: rgba(124, 92, 255, 0.12); }

.project-command-split--focused {
  grid-template-columns: 1fr;
}

.project-focused-browser,
.project-layer-intelligence,
.project-layer-table-card {
  background: var(--panel-bg, #ffffff);
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(28, 52, 84, 0.08);
  padding: 14px;
}

.project-focused-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.project-focused-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-color, #102a43);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.project-focused-row:hover,
.project-focused-row.is-selected {
  border-color: #00a4bd;
  background: rgba(0, 164, 189, 0.08);
}

.project-focused-row strong,
.project-focused-row small {
  display: block;
}

.project-focused-row small {
  color: var(--muted-text, #58708a);
}

.project-focused-row .project-mini-progress {
  grid-column: 1 / -1;
}

.project-layer-intelligence {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.1fr) minmax(240px, 0.75fr) minmax(300px, 1fr);
  gap: 14px;
  min-width: 0;
  width: 100%;
  align-items: stretch;
}

.project-layer-focus-zone {
  display: grid;
  gap: 14px;
}

.project-layer-focus-zone__layers {
  background: var(--panel-bg, #ffffff);
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(28, 52, 84, 0.08);
  padding: 14px;
}

.project-pace-gauge--layer {
  grid-template-columns: 170px 1fr;
}

.project-layer-risk-card {
  border: 1px solid #bee8d2;
  border-radius: 16px;
  background: #effdf5;
  padding: 14px;
}

.project-layer-risk-card--warning {
  border-color: #f4d27c;
  background: #fff8e6;
}

.project-layer-risk-card--danger {
  border-color: #f2b7b1;
  background: #fff4f2;
}

.project-layer-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 10px;
}

.project-layer-mini-grid span {
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
  color: var(--muted-text, #58708a);
}

.project-layer-mini-grid strong {
  display: block;
  color: var(--text-color, #102a43);
  font-size: 1.35rem;
}

.project-layer-workspace {
  display: grid;
  gap: 14px;
}

.project-layer-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.project-layer-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 18px;
  background: var(--panel-bg, #ffffff);
  color: var(--text-color, #102a43);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(28, 52, 84, 0.06);
}

.project-layer-card:hover,
.project-layer-card.is-selected {
  border-color: #00a4bd;
  transform: translateY(-1px);
}

.project-layer-card__eyebrow,
.project-layer-card__stats {
  color: var(--muted-text, #58708a);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-layer-table-card {
  padding: 14px;
}

.project-layer-table {
  display: grid;
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 14px;
  overflow: hidden;
}

.project-layer-table__head,
.project-layer-table__row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) 100px 140px 120px 130px 110px;
  gap: 10px;
  align-items: center;
}

.project-layer-table__head {
  background: #f2f7fc;
  color: #39536f;
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-layer-table__row {
  border: 0;
  border-top: 1px solid var(--border-color, #e1ebf5);
  background: transparent;
  color: var(--text-color, #102a43);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.project-layer-table__row:hover,
.project-layer-table__row.is-selected {
  background: rgba(0, 164, 189, 0.08);
}

.project-layer-table__row strong,
.project-layer-table__row small {
  display: block;
}

.project-layer-table__row small {
  color: var(--muted-text, #58708a);
}

.project-layer-burnup {
  display: grid;
  gap: 10px;
}

.project-layer-burnup div {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) 1fr 110px;
  gap: 12px;
  align-items: center;
}

.project-layer-burnup i {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: #dfeaf5;
  overflow: hidden;
}

.project-layer-burnup em,
.project-layer-burnup b {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  border-radius: inherit;
}

.project-layer-burnup em {
  background: rgba(18, 115, 234, 0.18);
}

.project-layer-burnup b {
  background: linear-gradient(90deg, #00a4bd, #1273ea);
}

.project-status-strip--compact {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.project-layer-infographics {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.1fr;
  gap: 10px;
}

.project-layer-infographic {
  min-height: 160px;
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 18px;
  background: var(--panel-bg, #ffffff);
  box-shadow: 0 12px 26px rgba(28, 52, 84, 0.06);
  padding: 14px;
}

.project-layer-infographic h4 {
  margin: 8px 0 14px;
  font-size: 1.1rem;
}

.project-layer-infographic small {
  color: var(--muted-text, #58708a);
}

.project-layer-donut {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 8px auto;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--panel-bg, #fff) 0 56%, transparent 57%), conic-gradient(#00a4bd calc(var(--complete) * 1%), #dcebf7 0);
}

.project-layer-donut strong,
.project-layer-donut span {
  display: block;
  text-align: center;
}

.project-layer-donut strong {
  font-size: 1.7rem;
}

.project-layer-donut span {
  color: var(--muted-text, #58708a);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-layer-share-bar {
  height: 16px;
  border-radius: 999px;
  background: #dfeaf5;
  overflow: hidden;
  margin: 8px 0 12px;
}

.project-layer-share-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00a4bd, #1273ea);
}

.project-layer-risk-stack {
  display: grid;
  gap: 8px;
}

.project-layer-risk-stack span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 12px;
  padding: 8px 10px;
}

.project-layer-risk-stack strong {
  font-size: 1.2rem;
}

.project-layer-pressure {
  display: grid;
  gap: 8px;
  margin: 8px 0;
}

.project-layer-pressure div {
  display: grid;
  grid-template-columns: minmax(90px, 0.9fr) 1fr 48px;
  gap: 8px;
  align-items: center;
}

.project-layer-pressure span {
  height: 10px;
  border-radius: 999px;
  background: #dfeaf5;
  overflow: hidden;
}

.project-layer-pressure b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8a65, #00a4bd);
}

.project-layer-pressure small {
  overflow: hidden;
  color: var(--muted-text, #58708a);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-layer-pressure strong {
  text-align: right;
}

body.crm-theme-dark .project-focus-metric,
body.crm-theme-dark .project-focused-browser,
body.crm-theme-dark .project-layer-intelligence,
body.crm-theme-dark .project-layer-table-card,
body.crm-theme-dark .project-focused-row,
body.crm-theme-dark .project-layer-card,
body.crm-theme-dark .project-layer-mini-grid span,
body.crm-theme-dark .project-layer-focus-zone__layers,
body.crm-theme-dark .project-layer-infographic {
  background: #0f1c2e;
  border-color: #28405d;
  color: #e8f2ff;
}

body.crm-theme-dark .project-layer-table__head {
  background: #13243a;
}

body.crm-theme-dark .project-layer-table__row {
  border-color: #28405d;
  color: #e8f2ff;
}

body.crm-theme-dark .project-layer-risk-card {
  background: rgba(25, 135, 84, 0.18);
  border-color: rgba(83, 217, 162, 0.35);
}

body.crm-theme-dark .project-layer-risk-card--warning {
  background: rgba(154, 103, 0, 0.18);
  border-color: rgba(244, 210, 124, 0.35);
}

body.crm-theme-dark .project-layer-risk-card--danger {
  background: rgba(180, 35, 24, 0.18);
  border-color: rgba(242, 183, 177, 0.35);
}

.project-command-hero p {
  margin: 0;
  color: var(--muted-text, #58708a);
}

.project-command-presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 560px;
}

.project-command-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  padding: 12px;
}

.project-command-strip label,
.project-command-search {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted-text, #58708a);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-command-strip input,
.project-command-strip select,
.project-command-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border-color, #cfe0f1);
  border-radius: 10px;
  background: var(--input-bg, #ffffff);
  color: var(--text-color, #102a43);
  font-size: 0.92rem;
  padding: 0 10px;
}

.project-command-kpi-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(112px, 1fr));
  gap: 10px;
}

.project-command-kpi {
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,251,255,0.96));
  color: var(--text-color, #102a43);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(28, 52, 84, 0.06);
}

.project-command-kpi:hover,
.project-command-kpi.is-active {
  border-color: #00a4bd;
  transform: translateY(-1px);
}

.project-command-kpi span,
.project-command-kpi small {
  display: block;
  color: var(--muted-text, #58708a);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-command-kpi strong {
  display: block;
  margin: 7px 0;
  font-size: 1.55rem;
  line-height: 1;
}

.project-command-kpi small {
  font-size: 0.65rem;
  opacity: 0.8;
}

.project-health-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
}

.project-health-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 16px;
  background: var(--panel-bg, #ffffff);
  color: var(--text-color, #102a43);
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.project-health-card.is-active {
  outline: 2px solid #00a4bd;
  outline-offset: 2px;
}

.project-health-card span {
  font-weight: 900;
}

.project-health-card strong {
  font-size: 1.8rem;
}

.project-health-card__density {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  min-height: 26px;
}

.project-health-card__density i {
  display: block;
  align-self: end;
  height: var(--density);
  min-height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.34;
}

.project-health-card--success { color: #13795b; background: #f0fff8; }
.project-health-card--warning { color: #9a6700; background: #fff9e8; }
.project-health-card--danger,
.project-health-card--critical { color: #b42318; background: #fff4f2; }
.project-health-card--neutral { color: #4d647c; background: #f6f9fc; }

.project-command-comparison {
  position: sticky;
  top: calc(var(--shell-topbar-height, 48px) + 8px);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.project-command-comparison strong {
  margin-right: auto;
}

.project-command-export {
  display: flex;
  gap: 8px;
}

.project-command-split {
  display: grid;
  grid-template-columns: minmax(680px, 1fr) minmax(320px, 420px);
  gap: 14px;
  align-items: start;
}

.project-command-table-card {
  min-width: 0;
  padding: 14px;
}

.project-command-table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  margin-bottom: 12px;
}

.project-command-search {
  width: min(420px, 46%);
}

.project-command-table {
  display: grid;
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 14px;
  overflow: hidden;
}

.project-command-table__head,
.project-command-row__main {
  display: grid;
  gap: 10px;
  align-items: center;
}

.project-command-table__head {
  grid-template-columns: minmax(210px, 1.4fr) minmax(170px, 1fr) 90px 110px minmax(150px, 1fr) minmax(130px, 0.9fr) 80px;
}

.project-command-table__head {
  background: #f2f7fc;
  color: #39536f;
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-command-row {
  display: grid;
  grid-template-columns: 1fr 80px;
  border-top: 1px solid var(--border-color, #e1ebf5);
}

.project-command-row.is-selected {
  background: rgba(0, 164, 189, 0.08);
}

.project-command-row__main {
  grid-template-columns: minmax(210px, 1.4fr) minmax(170px, 1fr) 90px 110px minmax(150px, 1fr) minmax(130px, 0.9fr);
  width: 100%;
  min-height: 62px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--text-color, #102a43);
  text-align: left;
  cursor: pointer;
}

.project-command-row__main strong,
.project-command-row__main small {
  display: block;
}

.project-command-row__main small {
  margin-top: 2px;
  color: var(--muted-text, #58708a);
}

.project-health-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
  background: #eef6ff;
  color: #22577a;
}

.project-health-pill--success { background: #dff8eb; color: #10623f; }
.project-health-pill--warning { background: #fff1c7; color: #7a4b00; }
.project-health-pill--danger,
.project-health-pill--critical { background: #ffe2df; color: #9f241b; }

.project-mini-progress {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #dfeaf5;
  overflow: hidden;
}

.project-mini-progress em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00a4bd, #1273ea);
}

.project-command-expand {
  align-self: center;
  justify-self: center;
  border: 1px solid var(--border-color, #cfe0f1);
  border-radius: 999px;
  background: var(--panel-bg, #ffffff);
  color: #0086a8;
  font-weight: 900;
  padding: 7px 10px;
  cursor: pointer;
}

.project-command-row__expanded {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) minmax(180px, 1.5fr);
  gap: 10px;
  padding: 0 12px 12px;
}

.project-command-row__expanded div {
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.68);
}

.project-row-sparkline {
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 66px;
}

.project-row-sparkline i {
  flex: 1;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #39c8dc, #1273ea);
}

.project-intelligence-panel {
  position: sticky;
  top: calc(var(--shell-topbar-height, 48px) + 64px);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.project-intelligence-panel__header h4 {
  margin: 4px 0;
  font-size: 1.35rem;
}

.project-intelligence-panel__header span {
  color: var(--muted-text, #58708a);
}

.project-pace-gauge {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, #e9fbff, #f9fcff);
}

.project-pace-gauge__dial {
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--panel-bg, #fff) 0 54%, transparent 55%), conic-gradient(#00a4bd calc(var(--pace) * 1%), #dcebf7 0);
}

.project-pace-gauge__dial strong {
  font-size: 1.9rem;
}

.project-pace-gauge__dial span,
.project-pace-gauge__legend span {
  color: var(--muted-text, #58708a);
}

.project-pace-gauge__legend {
  display: grid;
  gap: 8px;
}

.project-pace-gauge__legend span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.project-risk-radar {
  display: grid;
  gap: 10px;
}

.project-risk-radar div {
  display: grid;
  grid-template-columns: 90px 1fr 44px;
  gap: 10px;
  align-items: center;
}

.project-risk-radar i {
  height: 8px;
  border-radius: 999px;
  background: #e1ebf5;
  overflow: hidden;
}

.project-risk-radar em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #20c997, #ffc107, #dc3545);
}

.project-forecast-card {
  border: 1px solid #bee8d2;
  border-radius: 16px;
  padding: 14px;
  background: #effdf5;
}

.project-command-drilldowns {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.project-command-chart {
  min-height: 230px;
  padding: 14px;
}

.project-command-chart--wide {
  grid-column: 1 / -1;
}

.project-burnup-chart {
  position: relative;
  display: flex;
  align-items: end;
  gap: 10px;
  height: 150px;
  padding: 18px 12px 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff, #eef7ff);
}

.project-burnup-chart .target-line {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 34%;
  border-top: 2px dashed #ff8a65;
}

.project-burnup-chart span {
  flex: 1;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #00a4bd, #1273ea);
}

.project-funnel,
.project-email-metrics,
.project-status-strip {
  display: grid;
  gap: 10px;
}

.project-funnel div {
  display: grid;
  grid-template-columns: 110px 1fr 54px;
  gap: 10px;
  align-items: center;
}

.project-funnel i {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00a4bd, #1273ea);
}

.project-activity-heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.project-activity-heatmap i {
  aspect-ratio: 1;
  border-radius: 8px;
  background: color-mix(in srgb, #00a4bd calc(var(--heat) * 1%), #e7f1fb);
}

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

.project-email-metrics span,
.project-status-strip span {
  border: 1px solid var(--border-color, #d7e4f2);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.72);
}

.project-email-metrics strong,
.project-status-strip strong {
  display: block;
  font-size: 1.45rem;
}

.project-status-strip {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.project-status-strip span {
  border-left: 5px solid var(--status-color, #00a4bd);
}

body.crm-theme-dark .project-command-hero,
body.crm-theme-dark .project-command-strip,
body.crm-theme-dark .project-command-comparison,
body.crm-theme-dark .project-command-table-card,
body.crm-theme-dark .project-intelligence-panel,
body.crm-theme-dark .project-command-chart,
body.crm-theme-dark .project-command-kpi,
body.crm-theme-dark .project-health-card {
  background: #0f1c2e;
  border-color: #28405d;
  color: #e8f2ff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
}

body.crm-theme-dark .project-command-hero {
  background: radial-gradient(circle at 12% 10%, rgba(0, 164, 189, 0.2), transparent 32%), linear-gradient(135deg, #0f1c2e 0%, #102239 56%, #172033 100%);
}

body.crm-theme-dark .project-command-table__head,
body.crm-theme-dark .project-burnup-chart,
body.crm-theme-dark .project-pace-gauge {
  background: #13243a;
}

body.crm-theme-dark .project-command-row {
  border-color: #28405d;
}

body.crm-theme-dark .project-forecast-card {
  background: rgba(25, 135, 84, 0.18);
  border-color: rgba(83, 217, 162, 0.35);
}

body.crm-theme-dark .project-email-metrics span,
body.crm-theme-dark .project-status-strip span,
body.crm-theme-dark .project-command-row__expanded div {
  background: rgba(13, 30, 49, 0.9);
  border-color: #28405d;
}

@media (max-width: 1400px) {
  .project-command-strip {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .project-command-kpi-row {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .project-command-split,
  .project-command-drilldowns {
    grid-template-columns: 1fr;
  }

  .project-layer-intelligence,
  .project-layer-infographics {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .project-intelligence-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .project-command-hero,
  .project-command-comparison,
  .project-command-table-toolbar {
    display: grid;
  }

  .project-command-strip,
  .project-command-kpi-row,
  .project-health-map,
  .project-status-strip,
  .project-command-project-picker__controls,
  .project-layer-intelligence,
  .project-layer-infographics {
    grid-template-columns: 1fr;
  }

  .project-command-search {
    width: 100%;
  }

  .project-command-table {
    overflow-x: auto;
  }

  .project-command-table__head,
  .project-command-row__main {
    min-width: 920px;
  }
}
/* Data Health admin cockpit */
.panel-grid--database-health {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.data-health-command {
  overflow: hidden;
}

.data-health-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.data-health-score,
.data-health-metric,
.data-health-issue-card {
  border: 1px solid var(--border-color);
  background: var(--panel-muted, #f7fbff);
  border-radius: 18px;
  padding: 16px;
}

.data-health-score {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 150px;
}

.data-health-score span,
.data-health-metric span,
.data-health-country-row span {
  color: var(--muted-text);
  font-weight: 700;
  font-size: 0.82rem;
}

.data-health-score strong {
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 0.95;
  color: var(--accent-color);
}

.data-health-score--good {
  background: linear-gradient(135deg, rgba(11, 176, 118, 0.16), rgba(255, 255, 255, 0.9));
}

.data-health-score--warning {
  background: linear-gradient(135deg, rgba(247, 185, 85, 0.2), rgba(255, 255, 255, 0.9));
}

.data-health-score--critical {
  background: linear-gradient(135deg, rgba(216, 80, 80, 0.18), rgba(255, 255, 255, 0.9));
}

.data-health-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.data-health-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.45rem;
  color: var(--heading-color);
}

.data-health-issue-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.data-health-issue-card {
  display: grid;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.data-health-issue-card strong {
  font-size: 1.8rem;
  color: var(--heading-color);
}

.data-health-country-list {
  display: grid;
  gap: 12px;
}

.data-health-country-row {
  display: grid;
  gap: 8px;
}

.data-health-country-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.data-health-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 151, 169, 0.12);
  overflow: hidden;
}

.data-health-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00a4bd, #1273ea);
}

.data-health-issue-row .feature-list--compact {
  margin-top: 10px;
}

.data-health-alert-grid,
.data-health-ops-grid,
.data-health-fixbar,
.data-health-workbench__toolbar,
.data-health-workbench__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.data-health-alert-grid,
.data-health-ops-grid {
  grid-column: 1 / -1;
  margin-top: 14px;
}

.data-health-alert,
.data-health-ops-card {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(15, 43, 73, 0.06);
}

.data-health-alert {
  flex: 1 1 260px;
  display: grid;
  gap: 4px;
}

.data-health-alert--critical {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(254, 242, 242, 0.95);
}

.data-health-alert--warning {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(255, 251, 235, 0.95);
}

.data-health-alert--good {
  border-color: rgba(22, 163, 74, 0.24);
  background: rgba(240, 253, 244, 0.95);
}

.data-health-ops-card {
  flex: 1 1 220px;
  min-height: 90px;
}

.data-health-ops-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.3rem;
  color: var(--heading-color);
}

.data-health-rule-manager {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 250, 255, 0.95), rgba(255, 255, 255, 0.96));
  box-shadow: 0 12px 28px rgba(15, 43, 73, 0.06);
}

.data-health-rule-manager__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.data-health-rule-manager__header h4 {
  margin: 4px 0 6px;
  color: var(--heading-color);
}

.data-health-rule-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(180px, 1.4fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(183, 211, 232, 0.85);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.data-health-rule-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #38536d;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.data-health-rule-form input,
.data-health-rule-form select {
  min-height: 42px;
  border: 1px solid var(--border-color);
  border-radius: 11px;
  padding: 0 12px;
  background: var(--surface-color, #fff);
  color: var(--heading-color);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.data-health-rule-list {
  display: grid;
  gap: 9px;
}

.data-health-rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--surface-color, #fff);
}

.data-health-rule-row strong,
.data-health-rule-row span {
  display: block;
}

.data-health-rule-row strong {
  color: var(--heading-color);
}

.data-health-rule-row span {
  margin-top: 3px;
  color: #5f7893;
  font-size: 0.88rem;
  font-weight: 750;
}

.data-health-rule-row.is-muted {
  opacity: 0.62;
  background: rgba(239, 245, 250, 0.72);
}

.data-health-trend {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 54px;
  margin-top: 8px;
}

.data-health-trend span {
  width: 12px;
  min-height: 8px;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, #5fd3ef, #00a4bd);
}

.data-health-workbench {
  display: grid;
  gap: 12px;
}

.data-health-workbench__toolbar {
  align-items: center;
}

.data-health-workbench__toolbar input,
.data-health-workbench__toolbar select {
  min-height: 42px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--surface-color, #fff);
  color: var(--heading-color);
}

.data-health-workbench__toolbar input {
  flex: 1 1 280px;
}

.data-health-fixbar {
  padding: 10px;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  background: rgba(229, 246, 250, 0.48);
}

.data-health-issue-table {
  display: grid;
  gap: 10px;
}

.data-health-issue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface-color, #fff);
}

.data-health-issue-row__main {
  min-width: 0;
}

.data-health-workbench__footer {
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

body.theme-dark .data-health-score,
body.theme-dark .data-health-metric,
body.theme-dark .data-health-issue-card,
body.theme-dark .data-health-alert,
body.theme-dark .data-health-ops-card,
body.theme-dark .data-health-rule-manager,
body.theme-dark .data-health-rule-form,
body.theme-dark .data-health-rule-row,
body.theme-dark .data-health-issue-row,
body.theme-dark .data-health-workbench__toolbar input,
body.theme-dark .data-health-workbench__toolbar select {
  background: rgba(15, 31, 52, 0.92);
}

body.theme-dark .data-health-rule-form input,
body.theme-dark .data-health-rule-form select {
  background: rgba(10, 20, 35, 0.96);
  color: var(--hubspot-text, #f2f8ff);
}

body.theme-dark .data-health-rule-row.is-muted {
  background: rgba(15, 31, 52, 0.58);
}

body.theme-dark .data-health-fixbar {
  background: rgba(14, 165, 233, 0.08);
}

body.theme-dark .data-health-score--good {
  background: linear-gradient(135deg, rgba(11, 176, 118, 0.22), rgba(15, 31, 52, 0.95));
}

body.theme-dark .data-health-score--warning {
  background: linear-gradient(135deg, rgba(247, 185, 85, 0.22), rgba(15, 31, 52, 0.95));
}

body.theme-dark .data-health-score--critical {
  background: linear-gradient(135deg, rgba(216, 80, 80, 0.22), rgba(15, 31, 52, 0.95));
}

@media (max-width: 1100px) {
  .panel-grid--database-health,
  .data-health-summary {
    grid-template-columns: 1fr;
  }

  .data-health-metric-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .data-health-rule-manager__header,
  .data-health-rule-row {
    grid-template-columns: 1fr;
  }

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