:root {
  --emailx-font-xs: 0.75rem;
  --emailx-font-compact: 0.8rem;
  --emailx-font-sm: 0.875rem;
  --emailx-font-base: 0.9rem;
  --emailx-font-md: 0.9375rem;
  --emailx-font-title: 1.2rem;
  --emailx-font-modal-title: 1.25rem;
  --emailx-font-auth-title: 1.4rem;
  --emailx-icon-checkbox: 1.125rem;
  --emailx-dropdown-bg: rgb(27, 28, 28);
  --emailx-dropdown-bg-hover: rgb(31, 32, 32);
  --emailx-dropdown-surface: rgb(30, 31, 31);
  --emailx-red: rgb(255, 76, 67);
  --emailx-border-strong: rgb(64, 64, 64);
  --emailx-content-narrow: 560px;
  --emailx-content-standard: 768px;
  --emailx-content-wide: 1024px;
}

/* Shared EmailX component primitives.
   New pages should use these before adding page-scoped CSS.
   Existing pages can migrate here one page at a time. */

.emailx-component {
  font-size: var(--emailx-font-base);
}

.emailx-component .component-helper {
  font-size: var(--emailx-font-xs);
}

.emailx-component .component-title {
  font-size: var(--emailx-font-title);
}

/* Shared toast notification */
.emailx-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-90px);
  background: #1b1c1c;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: .6rem 1rem;
  font-size: var(--emailx-font-compact);
  display: flex;
  align-items: center;
  gap: .55rem;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
  z-index: 1050;
  max-width: 90vw;
  pointer-events: none;
}

.emailx-toast.show {
  transform: translateX(-50%) translateY(0);
}

.btn[data-emailx-button-feedback] {
  overflow: hidden;
  position: relative;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn-tertiary[data-emailx-button-feedback].emailx-button-hovered {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.btn[data-emailx-button-feedback].emailx-button-pressed {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}

.btn-tertiary {
  --bs-btn-color: rgb(237, 237, 237);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: rgba(123, 123, 123, 0.4);
  --bs-btn-hover-color: var(--text-primary);
  --bs-btn-hover-bg: rgba(213, 219, 225, 0.07);
  --bs-btn-hover-border-color: rgba(213, 219, 225, 0.48);
  --bs-btn-focus-shadow-rgb: 130, 138, 145;
  --bs-btn-active-color: var(--text-primary);
  --bs-btn-active-bg: rgba(213, 219, 225, 0.11);
  --bs-btn-active-border-color: rgba(213, 219, 225, 0.56);
  --bs-btn-active-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
  --bs-btn-disabled-color: var(--text-muted);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: rgba(213, 219, 225, 0.1);
}

.btn-quaternary {
  --bs-btn-color: var(--text-secondary);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--text-primary);
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.05);
  --bs-btn-hover-border-color: var(--border-color);
  --bs-btn-focus-shadow-rgb: 130, 138, 145;
  --bs-btn-active-color: var(--text-primary);
  --bs-btn-active-bg: rgba(255, 255, 255, 0.08);
  --bs-btn-active-border-color: var(--border-color);
  --bs-btn-active-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
  --bs-btn-disabled-color: var(--text-muted);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: transparent;
}

.btn-quinary {
  --bs-btn-color: var(--text-muted);
  --bs-btn-bg: rgba(35, 37, 37, 0.8);
  --bs-btn-border-color: var(--border-color);
  --bs-btn-hover-color: var(--text-primary);
  --bs-btn-hover-bg: rgba(43, 45, 45, 0.92);
  --bs-btn-hover-border-color: var(--border-color);
  --bs-btn-focus-shadow-rgb: 130, 138, 145;
  --bs-btn-active-color: var(--text-primary);
  --bs-btn-active-bg: rgba(35, 37, 37, 1);
  --bs-btn-active-border-color: var(--border-color);
  --bs-btn-disabled-color: var(--text-muted);
  --bs-btn-disabled-bg: rgba(35, 37, 37, 0.55);
  --bs-btn-disabled-border-color: var(--border-color);
}

.emailx-action-group {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Minimal inline text link — no button chrome, just brightens on hover.
   Promoted from onboarding.html's page-scoped .ob-skip-link so other pages can reuse it. */
.emailx-quiet-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0;
  font-size: var(--emailx-font-xs);
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.emailx-quiet-link:hover {
  color: var(--text-primary);
}

/* Gear icon with a small "opens elsewhere" arrow badge, e.g. "Manage signatures". */
.emailx-quiet-link .emailx-icon-shortcut {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.85rem;
  height: 0.85rem;
  font-size: var(--emailx-font-compact);
  line-height: 1;
}

.emailx-quiet-link .emailx-icon-shortcut .bi-arrow-right-short {
  position: absolute;
  right: -0.2rem;
  bottom: -0.2rem;
  transform: scale(0.6);
  background: #1d1e1e;
  border-radius: 50%;
}

.emailx-quiet-link .emailx-icon-shortcut .bi-arrow-right-short:hover {
  background: #171818;
}

.emailx-table-actions {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  white-space: nowrap;
}

.emailx-icon-btn {
  align-items: center;
  display: inline-flex;
  height: 31px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: relative;
  width: 31px;
}

.emailx-icon-btn i {
  font-size: var(--emailx-font-base);
  line-height: 1;
}

.emailx-global-tooltip {
  position: fixed;
  z-index: 2100;
  max-width: 220px;
  padding: 0.35rem 0.55rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-compact);
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translate(-50%, 0.25rem);
  transition: opacity 0.08s ease, transform 0.08s ease;
}

.emailx-global-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

html:not([data-emailx-icon-tooltips-bound="true"]) .emailx-icon-btn[data-emailx-title]::after {
  position: absolute;
  bottom: calc(100% + 0.45rem);
  left: 50%;
  z-index: 1090;
  max-width: 220px;
  padding: 0.35rem 0.55rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-compact);
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  content: attr(data-emailx-title);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translate(-50%, 0.25rem);
  transition: opacity 0.08s ease 0.18s, transform 0.08s ease 0.18s;
}

html:not([data-emailx-icon-tooltips-bound="true"]) .emailx-icon-btn[data-emailx-title]:hover::after,
html:not([data-emailx-icon-tooltips-bound="true"]) .emailx-icon-btn[data-emailx-title]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.emailx-table-action-danger {
    --bs-btn-color: #FF5454;
    --bs-btn-bg: transparent;
    --bs-btn-border-color: rgba(123, 123, 123, 0.4);
    --bs-btn-hover-color: #FF5454;
    --bs-btn-hover-bg: rgb(123 123 123 / 12%);
    --bs-btn-hover-border-color: rgba(123, 123, 123, 0.4);
    --bs-btn-focus-shadow-rgb: var(--bs-danger-rgb);
    --bs-btn-active-color: #FF5454;
    --bs-btn-active-bg: rgb(123 123 123 / 20%);
    --bs-btn-active-border-color: rgba(123, 123, 123, 0.4);
}

/* Segmented control */
.segmented-control {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.seg-btn {
  flex: 1;
  padding: 8px 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.seg-btn.active {
  background: rgba(213, 219, 225, 0.1);
  color: var(--text-primary);
}

.seg-btn:hover:not(.active) {
  background: rgba(213, 219, 225, 0.04);
  color: var(--text-primary);
}

/* Rating table */
.rating-container {
  background-color: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
}

.rating-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.rating-table th,
.rating-table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-table thead th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 500;
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.rating-table tbody td {
  padding: 1rem 0.75rem;
  vertical-align: top;
  color: var(--text-secondary);
}

.rating-table tbody td:nth-child(1) {
  width: 15%;
  font-weight: 500;
}

.rating-table tbody td:nth-child(2) {
  width: 15%;
}

.rating-table tbody td:nth-child(3) {
  width: 70%;
  line-height: 1.6;
}

/* Editor card */
#editor-card {
  background-color: rgba(67, 68, 68, 0.14);
  border: 1px solid var(--border-color-light);
  border-radius: 5px;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: visible;
  position: relative;
}

.editor-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

.editor-card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-card-row {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
}

.editor-card-label {
  min-width: 80px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.editor-card-field {
  flex: 1;
  min-width: 0;
}

.editor-card-divider {
  height: 1px;
  margin: 0;
  background-color: var(--border-color);
}

/* Sidebar panel */
.sidebar-panel {
  width: 340px;
  padding: 1.5rem;
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(67, 68, 68, 0.14), rgba(81, 82, 82, 0.14));
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
}

.sidebar-panel:hover {
  background: linear-gradient(145deg, rgba(28, 30, 30, 0.7), rgba(21, 22, 22, 0.7));
}

.sidebar-header-template {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header-template i {
  display: flex;
  align-items: center;
}

@media (max-width: 900px) {
  .sidebar-panel {
    width: 100%;
  }
}

/* Select dropdown */
.email-select-wrapper {
  position: relative;
}

.email-select-trigger {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  width: 100%;
  min-height: 46px;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  color: var(--text-primary);
  cursor: pointer;
  background-color: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.email-select-trigger:hover {
  background-color: rgba(35, 37, 37, 0.8);
  border-color: var(--accent-primary);
}

.email-select-trigger.active {
  z-index: 1001;
  background-color: rgba(35, 37, 37, 0.9);
  border-color: var(--accent-primary);
}

.email-select-placeholder {
  color: var(--text-muted);
  font-size: var(--emailx-font-md);
}

.email-select-placeholder.is-selected {
  color: var(--text-primary);
}

.email-tag {
  display: inline-flex;
  align-items: center;
  max-width: 250px;
  padding: 0.25rem 0.5rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-xs);
  background-color: rgba(213, 219, 225, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  animation: tagSlideIn 0.2s ease;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

@keyframes tagSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

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

.email-tag:hover {
  background-color: rgba(213, 219, 225, 0.12);
  border-color: var(--accent-primary);
}

.email-tag-text,
.email-text,
.email-text-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-text {
  flex: 1;
  min-width: 0;
}

.email-text-sub {
  display: block;
  color: var(--text-muted);
}

.email-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  cursor: pointer;
  background-color: transparent;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}

.email-tag-remove:hover {
  background-color: rgba(220, 53, 69, 0.2);
}

.email-tag-remove svg {
  width: 0.625rem;
  height: 0.625rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.chevron-icon,
.sort-column-chevron {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.chevron-icon {
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
}

.chevron-icon.rotated {
  transform: translateY(-50%) rotate(180deg);
}

.chevron-icon svg,
.sort-column-chevron svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
}

.email-dropdown-menu {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 1000;
  max-height: 0;
  margin-top: 0.5rem;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.email-dropdown-menu.open {
  z-index: 1002;
  max-height: 350px;
  opacity: 1;
}

/* Set by EmailXUI single-selects when there is no room below the trigger. */
.email-dropdown-menu.opens-up {
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.email-dropdown-content {
  padding: 0.5rem;
  background: var(--emailx-dropdown-surface);
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  box-shadow: 1px 2px 5px 2px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

.email-dropdown-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.email-dropdown-list::-webkit-scrollbar,
.sort-column-menu::-webkit-scrollbar {
  width: 6px;
}

.email-dropdown-list::-webkit-scrollbar-track,
.sort-column-menu::-webkit-scrollbar-track {
  background: transparent;
}

.email-dropdown-list::-webkit-scrollbar-thumb,
.sort-column-menu::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.email-dropdown-list::-webkit-scrollbar-thumb:hover,
.sort-column-menu::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

.email-dropdown-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  margin: 0.125rem 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--emailx-font-sm);
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

button.email-dropdown-item,
label.email-dropdown-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

.email-dropdown-item:hover {
  color: var(--text-primary);
  background-color: rgba(213, 219, 225, 0.1);
}

.email-dropdown-item.selected {
  color: var(--text-primary);
  background-color: rgba(213, 219, 225, 0.05);
}

.checkmark-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-left: auto;
  color: var(--accent-primary);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.email-dropdown-item.selected .checkmark-icon {
  opacity: 1;
}

/* Grouped dropdown lists: a quiet section heading, a hairline between groups,
   and a compact badge beside an option title (Recommended, Owner, You). */
.email-dropdown-list.is-grouped {
  max-height: 300px;
}

.email-dropdown-group-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem 0.125rem;
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
}

.email-dropdown-divider {
  margin: 0.375rem 0.5rem;
  border-top: 1px solid var(--border-color);
}

.email-text-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.email-text-title > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-dropdown-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  padding: 0 0.4rem;
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
  line-height: 1.5;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.email-dropdown-badge.is-recommended {
  color: var(--emailx-teal, rgb(76, 212, 169));
  background: rgba(76, 212, 169, 0.1);
  border-color: rgba(76, 212, 169, 0.3);
}

.email-dropdown-footer {
  margin-top: 0.25rem;
  padding: 0.5rem 0.25rem 0.25rem;
  border-top: 1px solid var(--border-color);
}

/* Compact overflow/action menu. This intentionally reuses the default
   dropdown surface and item states above; only its density is different. */
.emailx-action-menu {
  min-width: 194px;
  padding: 0.45rem;
  background: var(--emailx-dropdown-surface);
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  box-shadow: 1px 2px 5px 2px rgba(0, 0, 0, 0.4);
}

.dropdown-menu.emailx-action-menu {
  background-color: var(--emailx-dropdown-surface) !important;
  border: 1px solid var(--border-color-light) !important;
  padding: 0.45rem !important;
}

.emailx-table-row-link {
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
}

.emailx-table-row-link:hover,
.emailx-table-row-link:focus-visible {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.emailx-action-cell {
  width: 52px;
  min-width: 52px;
  text-align: right;
}

.emailx-action-cell > .dropdown {
  display: inline-flex;
}

.emailx-data-table-wrap {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  margin-bottom: 0;
}

.emailx-data-table {
  width: max-content;
  min-width: 100%;
}

.emailx-data-table.emailx-resource-table thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--emailx-app-canvas) !important;
}

.emailx-data-table th:last-child,
.emailx-data-table td:last-child {
  width: 52px;
  min-width: 52px;
  padding-right: 0.65rem;
  padding-left: 0.4rem;
}

.emailx-action-menu-list {
  display: grid;
  gap: 0.15rem;
  padding: 0;
}

.emailx-action-menu-item {
  min-height: 32px;
  gap: 0.5rem;
  margin: 0;
  padding: 0.375rem 0.5rem;
  color: var(--text-primary);
  line-height: 1.2;
  text-decoration: none;
}

.emailx-action-menu-item + .emailx-action-menu-item {
  margin-top: 1px;
}

.emailx-action-menu-item i {
  width: 15px;
  flex: 0 0 15px;
  color: var(--text-muted);
  text-align: center;
}

.emailx-action-menu-item.is-danger,
.emailx-action-menu-item.is-danger i {
  color: var(--emailx-red);
}

.emailx-action-menu-divider {
  height: 1px;
  margin: 0.25rem -0.45rem;
  background: var(--border-color);
}

.emailx-overflow-menu-toggle {
  border-color: transparent;
  opacity: 0.62;
}

.emailx-overflow-menu-toggle:hover,
.emailx-overflow-menu-toggle:focus-visible,
.emailx-overflow-menu-toggle[aria-expanded="true"] {
  border-color: transparent;
  background: rgba(213, 219, 225, 0.05);
  opacity: 1;
}

.styleguide-open-dropdown-demo {
  margin-bottom: 14rem;
}

.email-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.email-add-btn:hover {
  background: rgba(213, 219, 225, 0.05);
  border-color: var(--accent-primary);
}

/* Grid feature cards */
.grid-feature-showcase {
  background: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  max-width: 100%;
  min-height: min(64rem, calc(100vh - 7rem));
  padding: 5rem 1.6rem 6rem;
  width: calc(100vw - 80px - 2rem);
}

#sidebar.expanded ~ .app-main .grid-feature-showcase {
  width: calc(100vw - 220px - 2rem);
}

.grid-feature-container {
  margin: 0 auto;
  max-width: 94rem;
  width: 100%;
}

.grid-feature-copy {
  margin: 0 auto 4.45rem;
  max-width: 48rem;
  text-align: center;
}

.grid-feature-copy h1 {
  --grid-feature-title-size: clamp(2.6rem, 4.5vw, 4.65rem);
  color: var(--text-primary);
  font-size: var(--grid-feature-title-size);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
}

.grid-feature-copy p {
  --grid-feature-subtitle-size: clamp(var(--emailx-font-title), 2.1vw, 1.95rem);
  color: var(--text-secondary);
  font-size: var(--grid-feature-subtitle-size);
  font-weight: 500;
  line-height: 1.35;
  margin: 2.3rem 0 0;
}

.grid-feature-board {
  border: 1px dashed rgba(213, 219, 225, 0.16);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-feature-card {
  min-height: 21.7rem;
  overflow: hidden;
  padding: 3.15rem 3rem 2.8rem;
  position: relative;
}

.grid-feature-card + .grid-feature-card {
  border-left: 1px dashed rgba(213, 219, 225, 0.16);
}

.grid-feature-card:nth-child(3n + 1) {
  border-left: 0;
}

.grid-feature-card:nth-child(n + 4) {
  border-top: 1px dashed rgba(213, 219, 225, 0.16);
}

.grid-feature-icon {
  --grid-feature-icon-size: 1.55rem;
  color: rgba(245, 247, 249, 0.78);
  display: inline-flex;
  font-size: var(--grid-feature-icon-size);
  line-height: 1;
  position: relative;
  z-index: 2;
}

.grid-feature-card h2 {
  color: var(--text-primary);
  font-size: var(--emailx-font-title);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 6.35rem 0 0;
  position: relative;
  z-index: 2;
}

.grid-feature-card p {
  color: var(--text-secondary);
  font-size: var(--emailx-font-title);
  font-weight: 300;
  line-height: 1.28;
  margin: 1.55rem 0 0;
  max-width: 24rem;
  position: relative;
  z-index: 2;
}

.grid-feature-pattern-wrap {
  height: 64%;
  left: 38%;
  mask-image: linear-gradient(to bottom, white 0%, rgba(255, 255, 255, 0.72) 46%, transparent 100%);
  pointer-events: none;
  position: absolute;
  top: -1px;
  width: 82%;
}

.grid-feature-pattern-glow {
  background:
    radial-gradient(ellipse at 68% 12%, rgba(245, 247, 249, 0.03), transparent 58%),
    linear-gradient(90deg, transparent, rgba(245, 247, 249, 0.01));
  inset: 0;
  mask-image: radial-gradient(farthest-side at top, white, transparent);
  opacity: 1;
  position: absolute;
}

.grid-feature-pattern {
  color: rgba(245, 247, 249, 0.18);
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.grid-feature-pattern path {
  stroke: currentColor;
}

.grid-feature-pattern-square {
  fill: currentColor;
  opacity: 0.28;
  stroke-width: 0;
}

.grid-feature-animate {
  animation: gridFeatureReveal 0.8s ease both;
}

.grid-feature-animate-delay {
  animation-delay: 0.4s;
}

@keyframes gridFeatureReveal {
  from {
    filter: blur(4px);
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .grid-feature-animate {
    animation: none;
  }
}

@media (max-width: 991.98px) {
  #pricingActivationModal .pricing-gate-header .btn-close {
    width: 44px;
    height: 44px;
    padding: 0;
    margin-top: -0.5rem;
    margin-right: -0.5rem;
    margin-bottom: -0.5rem;
  }

  .grid-feature-showcase {
    padding-top: 4rem;
  }

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

  .grid-feature-card:nth-child(3n + 1) {
    border-left: 1px dashed rgba(213, 219, 225, 0.16);
  }

  .grid-feature-card:nth-child(2n + 1) {
    border-left: 0;
  }

  .grid-feature-card:nth-child(n + 3) {
    border-top: 1px dashed rgba(213, 219, 225, 0.16);
  }
}

@media (max-width: 575.98px) {
  .grid-feature-showcase {
    padding: 3rem 1rem 4rem;
    width: calc(100vw - 2rem);
  }

  #sidebar.expanded ~ .app-main .grid-feature-showcase {
    width: calc(100vw - 2rem);
  }

  .grid-feature-copy {
    margin-bottom: 2.5rem;
  }

  .grid-feature-board {
    grid-template-columns: 1fr;
  }

  .grid-feature-card,
  .grid-feature-card:nth-child(2n + 1),
  .grid-feature-card:nth-child(3n + 1) {
    border-left: 0;
  }

  .grid-feature-card:nth-child(n + 2) {
    border-top: 1px dashed rgba(213, 219, 225, 0.16);
  }

  .grid-feature-card {
    min-height: 18rem;
    padding: 2.4rem 2rem 2.3rem;
  }

  .grid-feature-card h2 {
    margin-top: 4.8rem;
  }
}

/* Day checkbox tiles */
.day-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.day-checkbox {
  position: relative;
}

.day-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}

.day-checkbox label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.day-checkbox input[type="checkbox"]:checked + label {
  color: var(--text-primary);
  background: rgba(213, 219, 225, 0.08);
  border-color: var(--accent-primary);
}

.day-checkbox label:hover {
  background: rgba(213, 219, 225, 0.05);
  border-color: var(--accent-primary);
}

.day-checkbox .icon-unchecked,
.day-checkbox .icon-checked {
  display: flex;
  align-items: center;
}

.day-checkbox .icon-checked {
  display: none;
  color: var(--accent-primary);
}

.day-checkbox input[type="checkbox"]:checked + label .icon-unchecked {
  display: none;
}

.day-checkbox input[type="checkbox"]:checked + label .icon-checked {
  display: flex;
}

/* Sliders */
.volume-slider-wrapper {
  position: relative;
  margin-bottom: 2.5rem;
}

.volume-output {
  position: absolute;
  right: 0;
  bottom: -2.5rem;
  min-width: 35px;
  margin-top: 0.75rem;
  color: var(--text-primary);
  text-align: center;
  cursor: default;
}

.boxed {
  padding: 0.2rem 0.5rem;
  cursor: default;
  border: 1px solid var(--border-color);
  border-radius: 3px;
}

.timing-range-container {
  padding: 0.5rem 0 !important;
}

.single-slider,
.dual-slider {
  position: relative;
  height: 6px;
  cursor: pointer;
  background: rgba(213, 219, 225, 0.1);
  border-radius: 3px;
}

.single-slider-track,
.dual-slider-track {
  position: absolute;
  height: 100%;
  pointer-events: none;
  background: var(--accent-primary);
  border-radius: 3px;
}

.single-slider-thumb,
.dual-slider-thumb {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 18px;
  height: 18px;
  cursor: grab;
  background: var(--accent-primary);
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.single-slider-thumb:hover,
.dual-slider-thumb:hover {
  box-shadow: 0 2px 12px rgba(213, 219, 225, 0.4);
  transform: translate(-50%, -50%) scale(1.1);
}

.single-slider-thumb:active,
.dual-slider-thumb:active {
  cursor: grabbing;
  box-shadow: 0 2px 12px rgba(213, 219, 225, 0.4);
  transform: translate(-50%, -50%) scale(1.15);
}

.time-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
}

/* Table controls */
.column-toggle-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  margin: 0.125rem 0;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.column-toggle-item:hover {
  background-color: rgba(213, 219, 225, 0.1);
}

.column-toggle-item label {
  flex: 1;
  margin: 0;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.column-toggle-item:hover label,
.column-toggle-item .hidden-checkbox:checked ~ label {
  color: var(--text-primary);
}

.column-toggle-item .hidden-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.column-toggle-item .checkbox-icon {
  display: inline-block;
  font-size: var(--emailx-icon-checkbox);
  cursor: pointer;
  transition: color 0.15s ease;
}

.column-toggle-item .unchecked-icon {
  color: var(--text-muted);
}

.column-toggle-item .checked-icon {
  display: none;
  color: var(--accent-primary);
}

.column-toggle-item .hidden-checkbox:checked ~ .unchecked-icon {
  display: none;
}

.column-toggle-item .hidden-checkbox:checked ~ .checked-icon {
  display: inline-block;
}

.sort-column-dropdown-wrapper {
  position: relative;
}

.sort-column-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  height: 42px;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  color: var(--text-primary);
  cursor: pointer;
  font-size: var(--emailx-font-sm);
  background-color: var(--emailx-dropdown-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sort-column-trigger:hover,
.sort-column-trigger.active {
  background-color: var(--emailx-dropdown-bg-hover);
  border-color: var(--accent-primary);
}

.sort-column-chevron {
  top: 0;
  right: 0.75rem;
  bottom: 0;
  margin: auto 0;
}

.sort-column-chevron.rotated {
  transform: rotate(180deg);
}

.sort-column-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  left: 0;
  z-index: 505;
  max-height: 0;
  overflow: hidden;
  background: var(--emailx-dropdown-surface);
  border: 1px solid var(--emailx-border-strong);
  border-radius: 0.5rem;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.sort-column-menu.open {
  max-height: 380px;
  overflow-y: auto;
  opacity: 1;
}

.sort-column-item {
  padding: 0.625rem 0.875rem;
  margin: 0.25rem;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--emailx-font-sm);
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sort-column-item:hover {
  color: var(--text-primary);
  background-color: rgba(213, 219, 225, 0.1);
}

.sort-column-item.selected {
  color: var(--text-primary);
  background-color: rgba(213, 219, 225, 0.05);
}

.sort-order-toggle {
  display: flex;
  gap: 0.5rem;
}

.sort-order-btn {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  background-color: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Forms */
.form-label {
  margin-bottom: .5rem;
}

.form-section {
  margin-bottom: 1.5rem;
}

.form-section .form-label {
  display: block;
  color: var(--text-primary);
}

/* The styleguide's Form Field, inside or outside a .form-section. */
.form-control,
.form-section .form-control,
.form-section .form-select {
  padding: 0.625rem 0.875rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-md);
  background-color: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.form-control:hover,
.form-section .form-control:hover,
.form-section .form-select:hover {
  border-color: #4a4d51;
}

.form-control:focus,
.form-section .form-control:focus,
.form-section .form-select:focus {
  color: var(--text-primary);
  background-color: rgba(35, 37, 37, 0.9);
  border-color: var(--accent-primary);
  outline: none;
  box-shadow: none;
}

.form-control::placeholder,
.form-section .form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-section .form-control.is-invalid,
.form-section .form-control.is-invalid:hover,
.form-section .form-control.is-invalid:focus {
  border-color: var(--bs-form-invalid-border-color);
}

.form-section .input-group-text {
  color: var(--text-muted);
  font-size: var(--emailx-font-md);
  background-color: rgba(35, 37, 37, 0.6);
  border-color: var(--border-color);
  border-radius: 8px;
}

/* Search bars */
.emailx-search-group .input-group-text {
  height: 35px;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  color: var(--text-muted);
  font-size: var(--emailx-font-sm);
  background-color: rgba(35, 37, 37, 0.6);
  border-color: var(--border-color);
}

.emailx-search-group .form-control {
  height: 35px;
  color: var(--text-primary);
  font-size: var(--emailx-font-sm);
  background-color: rgba(35, 37, 37, 0.6);
  border-color: var(--border-color);
}

.emailx-search-group .form-control:focus {
  background-color: rgba(35, 37, 37, 0.9);
  border-color: var(--accent-primary);
  box-shadow: none;
}

.rv-search {
  flex: 1;
  padding: 0.4rem 0.7rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-compact);
  background: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
}

.rv-search:focus {
  border-color: var(--accent-primary);
}

/* Confirmation modals */
.emailx-confirm-demo {
  max-width: 500px;
  margin: 0 auto;
}

.emailx-confirm-demo .modal-content {
  font-size: var(--emailx-font-base);
}

.emailx-confirm-modal {
  background: var(--emailx-dropdown-surface) !important;
  border: 1px solid var(--border-color-light);
  border-radius: 8px;
}

.emailx-confirm-modal .modal-title {
  color: var(--text-primary);
  font-size: var(--emailx-font-modal-title);
  margin-bottom: 0;
}

.emailx-confirm-modal .modal-header,
.modal[id*="delete" i] .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0;
}

.emailx-confirm-modal .modal-footer,
.modal[id*="delete" i] .modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.5rem;
}

.emailx-confirm-modal--actions .btn-close,
.modal[id*="delete" i] .btn-close {
  display: none;
}

/* Bootstrap auto-margins each footer child (.modal-footer > * { margin: calc(var(--bs-modal-footer-gap)*.5) }).
   Neutralize it so spacing is driven solely by the footer's own gap. */
.emailx-confirm-modal .modal-footer > * {
  margin: 0;
}

.emailx-confirm-modal .modal-body,
.modal[id*="delete" i] .modal-body {
  padding: 1rem;
}

.emailx-confirm-modal p {
  margin-bottom: 0;
}

/* Bootstrap modal shells and standalone styleguide samples share the same
   elevated surface. Shell styles stay off the content inside each modal. */
.emailx-modal-surface,
.modal .modal-content,
.modal-dialog > .modal-content {
  background: var(--emailx-dropdown-surface) !important;
  border: 1px solid var(--border-color-light) !important;
  border-radius: 8px !important;
}

/* Modal categories (see /styleguide, "Modal categories"):
   No category has a header border. Footer border-top: Dialog, Side sheet and destructive Confirm only.
   1. Dialog (default).
   2. Side sheet (.emailx-side-modal).
   3. Confirm, stacked (.emailx-confirm-modal--stacked): no dividers.
   4. Confirm, destructive (.emailx-confirm-modal--actions, #*delete*): footer border-top only, no close button.
   The default uses :where() so the Confirm variants win without raising specificity. */
:where(.modal, .emailx-modal-surface, .modal-dialog > .modal-content) .modal-header {
  border-bottom: 0 !important;
}

/* One close button size everywhere: markup is always `btn-close btn-close-white xsmall`. */
.modal-content .btn-close.xsmall,
.emailx-modal-surface .btn-close.xsmall,
.contacts-record-drawer .btn-close.xsmall {
  box-sizing: content-box;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  margin: 0;
  padding: 0.25em;
}

:where(.modal, .emailx-modal-surface, .modal-dialog > .modal-content) .modal-footer {
  border-top: 1px solid var(--border-color) !important;
}

.emailx-confirm-modal .modal-header,
.modal[id*="delete" i] .modal-header {
  border-bottom: 0 !important;
}

.emailx-confirm-modal--stacked .modal-footer {
  border-top: 0 !important;
}

.emailx-confirm-modal--actions .modal-footer [data-bs-dismiss="modal"],
.modal[id*="delete" i] .modal-footer [data-bs-dismiss="modal"] {
  --bs-btn-color: var(--text-secondary);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--text-primary);
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.05);
  --bs-btn-hover-border-color: var(--border-color);
  --bs-btn-active-color: var(--text-primary);
  --bs-btn-active-bg: rgba(255, 255, 255, 0.08);
  --bs-btn-active-border-color: var(--border-color);
}

.emailx-confirm-danger,
.modal[id*="delete" i] .modal-footer .btn-danger {
  --button-background-base: rgb(235, 59, 59);
  --button-background-hover: rgb(255, 84, 84);
  --button-background-active: rgb(255, 84, 84);
  --bs-btn-color: rgb(255, 255, 255);
  --bs-btn-bg: var(--button-background-base);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: rgb(255, 255, 255);
  --bs-btn-hover-bg: var(--button-background-hover);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: rgb(255, 255, 255);
  --bs-btn-active-bg: var(--button-background-active);
  --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: rgb(255, 255, 255);
  --bs-btn-disabled-bg: var(--button-background-base);
  --bs-btn-disabled-border-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
}

.emailx-confirm-danger::before,
.modal[id*="delete" i] .modal-footer .btn-danger::before {
  content: "\f5de";
  font-family: "bootstrap-icons";
  font-style: normal;
  font-weight: 400;
  line-height: 1;
}

.emailx-confirm-danger:disabled::before,
.modal[id*="delete" i] .modal-footer .btn-danger:disabled::before {
  display: none;
}

/* Bootstrap's default modal enters from above. A small scale change keeps the
   transition calm and spatially stable. Side sheets retain directional motion. */
.modal.fade:not(.emailx-side-modal) .modal-dialog {
  transform: scale(0.985);
  transition: transform 0.16s ease-out;
}

.modal.show:not(.emailx-side-modal) .modal-dialog {
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .modal.fade:not(.emailx-side-modal) .modal-dialog {
    transform: none;
    transition: none;
  }
}

/* Campaign activation pricing gate */
.emailx-activation-pricing {
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  color: var(--text-primary);
}

.emailx-activation-pricing .modal-header {
  align-items: flex-start;
  padding: 1.5rem 1.75rem 1rem;
  border: 0;
}

.emailx-activation-pricing .modal-title {
  margin: 0.3rem 0 0.35rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-auth-title);
}

.emailx-activation-pricing .modal-header p {
  max-width: 760px;
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--emailx-font-base);
}

.emailx-activation-pricing .modal-body {
  padding: 0 1.75rem 1.75rem;
}

.emailx-activation-eyebrow {
  color: var(--emailx-teal);
  font-size: var(--emailx-font-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.emailx-activation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.emailx-activation-toolbar .segmented-control {
  min-width: 250px;
}

.emailx-activation-toolbar .seg-btn span {
  display: block;
  margin-top: 0.15rem;
  color: var(--emailx-teal);
  font-size: var(--emailx-font-xs);
}

.emailx-activation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.emailx-activation-config,
.emailx-activation-summary {
  padding: 1.75rem;
}

.emailx-activation-config h3 {
  margin: 0.5rem 0;
  color: var(--text-primary);
  font-size: var(--emailx-font-auth-title);
  font-weight: 500;
}

.emailx-activation-config > p {
  max-width: 620px;
  margin: 0 0 1.75rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-base);
}

.emailx-activation-field + .emailx-activation-field {
  margin-top: 1.5rem;
}

.emailx-activation-field > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.emailx-activation-field label,
.emailx-activation-field strong {
  color: var(--text-primary);
  font-size: var(--emailx-font-sm);
}

.emailx-activation-field input[type="range"] {
  width: 100%;
  accent-color: var(--emailx-teal);
}

.emailx-activation-steps {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
}

.emailx-activation-summary {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
}

.emailx-activation-price {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.emailx-activation-price strong {
  color: var(--text-primary);
  font-size: var(--emailx-font-auth-title);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.emailx-activation-price span,
.emailx-activation-summary > p {
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
}

.emailx-activation-price span {
  padding-bottom: 0.4rem;
}

.emailx-activation-summary > p {
  margin: 0.6rem 0 0;
}

.emailx-activation-summary ul {
  flex: 1;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.emailx-activation-summary li {
  display: flex;
  gap: 0.55rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
}

.emailx-activation-summary li i {
  color: var(--emailx-teal);
}

.emailx-activation-fineprint {
  text-align: center;
}

.emailx-activation-error {
  min-height: 1.1rem;
  color: var(--bs-danger-text-emphasis) !important;
  text-align: center;
}

.emailx-activation-inline {
  padding: 1rem;
}

.emailx-activation-inline .emailx-activation-toolbar {
  margin-bottom: 1rem;
}

@media (max-width: 820px) {
  .emailx-activation-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .emailx-activation-toolbar .segmented-control {
    min-width: 0;
  }

  .emailx-activation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .emailx-activation-pricing {
    border: 0;
    border-radius: 0;
  }

  .emailx-activation-pricing .modal-header,
  .emailx-activation-pricing .modal-body {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .emailx-activation-config,
  .emailx-activation-summary {
    padding: 1.25rem;
  }
}

/* Side modal. The surface-only class preserves legacy dialog sizing and motion. */
.emailx-side-modal .modal-dialog {
  max-width: 520px;
  height: 100vh;
  margin: 0 0 0 auto;
}

.emailx-side-modal.fade .modal-dialog {
  transform: translateX(100%);
  transition: transform 0.2s ease-in-out;
}

.emailx-side-modal.show .modal-dialog {
  transform: translateX(0);
}

.emailx-side-modal .modal-content {
  height: 100%;
}

.emailx-side-modal .modal-content,
.emailx-side-modal-surface .modal-content {
  background: var(--emailx-dropdown-surface) !important;
  border: 0 !important;
  border-left: 1px solid var(--border-color) !important;
  border-radius: 0 !important;
}

.emailx-side-modal .modal-header {
  padding: 1.25rem 1.75rem;
}

.emailx-side-modal .modal-body {
  padding: 0;
  overflow-y: auto;
}

.emailx-side-modal .circle-2 {
  padding: 7px 11px;
  color: rgb(255, 244, 124);
  border: 1px solid var(--border-color);
  border-radius: 100%;
}

.emailx-side-modal-preview {
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.emailx-side-modal-preview .modal {
  position: relative;
  display: block;
  height: 420px;
  overflow: hidden;
}

.emailx-side-modal .modal-preview-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.emailx-side-modal .modal-preview-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid var(--border-color);
}

.emailx-side-modal .modal-preview-row.top {
  background-color: rgba(255, 255, 255, 0.05);
}

.emailx-side-modal .modal-preview-label {
  min-width: 3rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
}

.emailx-side-modal .modal-preview-value {
  color: var(--text-primary);
  font-size: var(--emailx-font-sm);
}

.emailx-side-modal .modal-preview-body {
  padding: 0.875rem;
}

.emailx-side-modal .modal-preview-input,
.emailx-side-modal .modal-preview-textarea {
  width: 100%;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--emailx-font-sm);
  background: transparent;
  border: none;
  outline: none;
}

.emailx-side-modal .modal-preview-textarea {
  min-height: 140px;
  line-height: 1.6;
  resize: none;
}

/* A dialog opened from a side sheet sits above it, with its own backdrop. */
.modal.emailx-modal-over-sheet {
  z-index: 1065;
}

.modal-backdrop ~ .modal-backdrop {
  z-index: 1060;
}

/* Admin lifecycle messages sheet: one message per preview row. */
.emailx-side-modal .emailx-message-row {
  align-items: flex-start;
}

.emailx-message-row-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.emailx-message-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
}

/* A sent email, rendered as the recipient saw it (light, like a mail client). */
.emailx-sent-email-frame {
  display: block;
  width: 100%;
  height: 65vh;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: white;
}

/* Chips and badges */
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-compact);
  background: rgba(35, 37, 37, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 7px;
}

.rv-dot,
.chip-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--text-muted);
}

.rv-dot.ready,
.chip-dot.ready {
  background: var(--emailx-teal);
}

.rv-dot.gen,
.chip-dot.gen {
  background: var(--emailx-blue);
}

.rv-dot.approved,
.chip-dot.approved {
  background: var(--accent-primary);
}

.approved-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  padding: 0.15rem 0.45rem;
  color: var(--emailx-teal);
  font-size: var(--emailx-font-compact);
  background: rgba(76, 212, 169, 0.12);
  border: 1px solid rgba(76, 212, 169, 0.3);
  border-radius: 20px;
}

.emailx-side-modal .modal-preview-input::placeholder,
.emailx-side-modal .modal-preview-textarea::placeholder {
  color: var(--text-muted);
}

/* Unscoped base for modal-preview-panel — same look as the .emailx-side-modal /
   #helpModal variants above, but usable inside any modal (e.g. mailbox settings). */
.modal-preview-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.modal-preview-panel .modal-preview-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-preview-panel .modal-preview-row.top {
  background-color: rgba(255, 255, 255, 0.05);
}

.modal-preview-panel .modal-preview-label {
  min-width: 3rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
}

.modal-preview-panel .modal-preview-value {
  color: var(--text-primary);
  font-size: var(--emailx-font-sm);
}

.modal-preview-panel .modal-preview-body {
  padding: 0.875rem;
}

.modal-preview-panel .modal-preview-input,
.modal-preview-panel .modal-preview-textarea {
  width: 100%;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--emailx-font-sm);
  background: transparent;
  border: none;
  outline: none;
}

.modal-preview-panel .modal-preview-textarea {
  min-height: 140px;
  line-height: 1.6;
  resize: none;
}

.modal-preview-panel .modal-preview-input::placeholder,
.modal-preview-panel .modal-preview-textarea::placeholder {
  color: var(--text-muted);
}

/* Quill editor skinned to sit borderless inside a modal-preview-panel, so the
   toolbar + editor read as one bordered panel instead of Quill's own two stacked boxes.
   overflow stays visible here (rounding moves onto the toolbar/editor themselves) so the
   Quill link-input tooltip, which is positioned absolutely inside the panel, isn't clipped. */
.modal-preview-panel:has(.ql-container) {
  border-color: #495057;
  overflow: visible;
}

.modal-preview-panel .ql-toolbar.ql-snow {
  background-color: rgba(255, 255, 255, 0.05);
  border: none;
  border-bottom: 1px solid #495057;
  border-radius: 8px 8px 0 0;
  padding: 0.5rem 0.75rem;
}

.modal-preview-panel .ql-container.ql-snow {
  border: none;
  border-radius: 0 0 8px 8px;
  font-family: inherit;
  font-size: var(--emailx-font-sm);
}

.modal-preview-panel .ql-editor {
  border-radius: 0 0 8px 8px;
}

/* Quill "snow" link-input tooltip, reskinned dark app-wide — unscoped so every Quill
   instance (inbox reply, templates, campaign review, mailbox signature, ...) picks it up.
   Quill's own quill.snow.css ships a light theme with equal selector specificity and loads
   after components.css, so it wins cascade ties without !important here. Positioning
   (left/top) is left to Quill's own logic; pass `bounds: <container>` at init on any editor
   whose wrapper can scroll/clip, so Quill auto-clamps instead of computing an off-panel
   coordinate that gets clipped by that ancestor. */
.ql-tooltip {
  z-index: 20;
  background-color: #1b1c1c !important;
  border: 1px solid rgb(69, 69, 69) !important;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  color: var(--text-primary) !important;
}

.ql-tooltip input[type="text"] {
  background-color: transparent !important;
  border: 1px solid rgb(69, 69, 69) !important;
  border-radius: 4px;
  color: var(--text-primary) !important;
}

.ql-tooltip a.ql-action,
.ql-tooltip a.ql-remove {
  color: var(--text-primary) !important;
  opacity: 1 !important;
}

.ql-tooltip a.ql-action::after,
.ql-tooltip a.ql-remove::before {
  color: var(--text-primary) !important;
  border-color: rgb(69, 69, 69) !important;
}

.modal-preview-panel .ql-editor {
  min-height: 110px;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.75rem 0.875rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.modal-preview-panel .ql-editor.ql-blank::before {
  color: var(--text-muted);
  font-style: normal;
  font-size: var(--emailx-font-sm);
  white-space: pre-line;
}

.modal-preview-panel .ql-toolbar .ql-stroke {
  stroke: #a1a1aa !important;
}

.modal-preview-panel .ql-toolbar .ql-fill {
  fill: #a1a1aa !important;
}

.modal-preview-panel .ql-toolbar .ql-picker {
  color: #a1a1aa !important;
}

.modal-preview-panel .ql-toolbar button {
  color: #a1a1aa !important;
}

.modal-preview-panel .ql-toolbar button:hover,
.modal-preview-panel .ql-toolbar button.ql-active {
  color: #f3f3f3 !important;
}

.modal-preview-panel .ql-toolbar button:hover .ql-stroke,
.modal-preview-panel .ql-toolbar button.ql-active .ql-stroke {
  stroke: #f3f3f3 !important;
}

.modal-preview-panel .ql-toolbar button:hover .ql-fill,
.modal-preview-panel .ql-toolbar button.ql-active .ql-fill {
  fill: #f3f3f3 !important;
}

.modal-preview-panel.disabled {
  opacity: 0.6;
}

.sort-order-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.sort-order-btn.active {
  color: var(--text-primary);
  background-color: rgba(213, 219, 225, 0.1);
  border-color: var(--accent-primary);
}

.emailx-settings-body {
  width: 100%;
  max-width: 560px;
  align-self: center;
  margin-left: auto;
  margin-right: auto;
}

/* ── Billing settings ── */
.emailx-billing-wrap {
  width: 100%;
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
}

.emailx-billing-card,
.emailx-billing-detail-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.012);
  overflow: hidden;
}

.emailx-billing-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--border-color);
}

.emailx-billing-overview-pane {
  min-width: 0;
  padding: 1rem;
}

.emailx-billing-overview-pane + .emailx-billing-overview-pane {
  border-left: 1px solid var(--border-color);
}

.emailx-billing-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  color: var(--text-muted);
  background: rgba(213, 219, 225, 0.06);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.emailx-billing-total {
  font-size: var(--emailx-font-title);
  font-weight: 600;
  line-height: 1.15;
}

.emailx-billing-breakdown {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid transparent;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transition: grid-template-rows 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              margin-top 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              padding-top 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.2s ease,
              border-color 0.2s ease,
              visibility 0s linear 0.28s;
}

.emailx-billing-breakdown-inner {
  min-height: 0;
  overflow: hidden;
  transform: translateY(-0.35rem);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.emailx-billing-overview-pane.is-expanded .emailx-billing-breakdown {
  grid-template-rows: 1fr;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top-color: var(--border-color);
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.emailx-billing-overview-pane.is-expanded .emailx-billing-breakdown-inner {
  transform: translateY(0);
}

.emailx-billing-overview-pane.is-expanded [data-emailx-bill-details-toggle] .bi-chevron-down {
  transform: rotate(180deg);
}

[data-emailx-bill-details-toggle] .bi-chevron-down {
  transition: transform 0.2s ease;
}

.emailx-billing-breakdown-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.3rem 0;
}

.emailx-billing-breakdown-divider {
  height: 1px;
  margin: 0.4rem 0;
  background: var(--border-color);
}

.emailx-billing-metrics {
  display: grid;
  /* Auto-fit, not a fixed 3: the tiles now follow the plan's entitlements, so
     a LinkedIn-only or email-only account has fewer of them and a fixed grid
     left an empty bordered cell where a tile used to be. */
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1px;
  background: var(--border-color);
}

.emailx-billing-metric {
  min-width: 0;
  padding: 1rem;
  background: rgba(12, 13, 13, 0.7);
}

.emailx-billing-progress {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(213, 219, 225, 0.08);
  overflow: hidden;
}

.emailx-billing-progress-bar {
  width: var(--billing-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--emailx-blue);
}

.emailx-billing-progress-bar.is-over {
  background: rgb(245, 180, 90);
}

/* Capacity meters that fill up over time (e.g. weekly LinkedIn invites). */
.emailx-billing-progress-bar.is-ok {
  background: var(--emailx-teal);
}

.emailx-billing-progress-bar.is-mid {
  background: var(--emailx-blue);
}

.emailx-billing-progress-bar.is-near {
  background: rgb(245, 180, 90);
}

.emailx-billing-progress-bar.is-full {
  background: rgb(235, 59, 59);
}

.emailx-billing-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.emailx-billing-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.emailx-billing-detail-card {
  padding: 1rem;
}

.emailx-billing-line-list {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.012);
}

.emailx-billing-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.emailx-billing-line:last-child {
  border-bottom: 0;
}

.emailx-billing-line-main {
  min-width: 0;
}

.emailx-billing-form-row {
  display: flex;
  gap: 0.5rem;
}

.emailx-billing-form-row .form-control {
  min-width: 0;
}

@media (max-width: 767.98px) {
  .emailx-billing-overview,
  .emailx-billing-metrics,
  .emailx-billing-detail-grid {
    grid-template-columns: 1fr;
  }

  .emailx-billing-overview-pane + .emailx-billing-overview-pane {
    border-left: 0;
    border-top: 1px solid var(--border-color);
  }

  .emailx-billing-form-row,
  .emailx-billing-line {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .emailx-billing-breakdown,
  .emailx-billing-breakdown-inner,
  [data-emailx-bill-details-toggle] .bi-chevron-down {
    transition: none;
  }
}

/* ── Pagination — Option B (segmented pill) ── */
.pg-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.pg-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-width: 28px;
  padding: 0 0.4rem;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--emailx-font-compact);
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.pg-pill-btn:hover:not(.pg-disabled):not(.pg-active) {
  background: rgba(213, 219, 225, 0.06);
  color: var(--text-primary);
}

.pg-pill-btn.pg-active {
  background: rgba(213, 219, 225, 0.12);
  color: var(--text-primary);
  pointer-events: none;
}

.pg-pill-btn.pg-disabled {
  color: rgba(108, 117, 125, 0.4);
  cursor: default;
  pointer-events: none;
}

.pg-pill-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-width: 20px;
  color: var(--text-muted);
  font-size: var(--emailx-font-compact);
}

.btn-quinary,
.pg-perpage-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 30px;
  padding: 0 0.6rem;
  background: rgba(35, 37, 37, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--emailx-font-compact);
  transition: background 0.15s, color 0.15s;
}

.btn-quinary:hover,
.pg-perpage-pill:hover {
  background: rgba(43, 45, 45, 0.92);
  color: var(--text-primary);
}

.btn-quinary.dropdown-toggle::after,
.pg-perpage-pill.dropdown-toggle::after {
  display: none;
}

.pg-perpage-chevron {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.btn-quinary[aria-expanded="true"] .pg-perpage-chevron,
.pg-perpage-pill[aria-expanded="true"] .pg-perpage-chevron {
  transform: rotate(180deg);
}

.pg-divider-v {
  width: 1px;
  height: 18px;
  background: var(--border-color);
  flex-shrink: 0;
}

/* ── Chip menus ── */
.pg-menu-chips { min-width: auto; padding: 0.35rem; }
.pg-menu-chips .dropdown-divider { margin: 0.2rem 0.35rem; }
.pg-menu-chips-inner { display: flex; gap: 3px; }
.pg-menu-chips-inner.pg-chips-v { flex-direction: column; min-width: 90px; }

.pg-menu-chip {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: hsl(0, 0%, 62%);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.825rem;
  height: 28px;
  justify-content: center;
  min-width: 36px;
  padding: 0 0.55rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

li > .pg-menu-chip {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.sidebar-user-footer .pg-menu-chip {
  font-size: var(--emailx-font-base);
}

.pg-chips-v .pg-menu-chip {
  justify-content: flex-start;
  width: 100%;
}

.pg-menu-chip:hover {
  background: rgba(213, 219, 225, 0.08);
  color: var(--text-primary);
}

.logout-link-btn {
  text-align: left;
  width: 100%;
}

.pg-menu-chip.pg-active,
.pg-menu-chip.active {
  background: rgba(213, 219, 225, 0.13);
  color: var(--text-primary);
}

/* ── Avatars ── */
.emailx-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2a2c2c, #1b1c1c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 600;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
    position: relative;
    flex-shrink: 0;
    text-transform: uppercase;
    overflow: hidden;
}


.emailx-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emailx-avatar-lg {
  width: 88px;
  height: 88px;
  font-size: var(--emailx-font-modal-title);
}

.emailx-avatar-md {
  width: 72px;
  height: 72px;
  font-size: var(--emailx-font-modal-title);
}

.emailx-avatar-pending {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* ── Role badges ── */
.emailx-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  font-size: var(--emailx-font-compact);
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid transparent;
}

.emailx-role-owner {
  color: rgb(201, 184, 255);
  background: rgba(149, 117, 255, 0.14);
  border-color: rgba(149, 117, 255, 0.32);
}

.emailx-role-admin {
  color: var(--emailx-blue);
  background: rgba(116, 169, 255, 0.12);
  border-color: rgba(116, 169, 255, 0.3);
}

.emailx-role-member {
  color: var(--text-primary);
  background: rgba(213, 219, 225, 0.08);
  border-color: var(--border-color);
}

/* ── Compact alerts ──
   One short line with an icon; details go in the icon's popover. Same look as
   the mailbox reauth alert on campaign creation. */
.emailx-compact-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  padding: 0.6rem 0.85rem;
  line-height: 1.3;
}

.emailx-compact-alert--warning {
  background: rgba(110, 32, 23, 0.1);
  border: 1px solid rgba(226, 51, 21, 0.3);
}

.emailx-compact-alert--warning .emailx-compact-alert-text,
.emailx-compact-alert--warning > i {
  color: #fe6969;
}

.emailx-compact-alert--info {
  background: rgba(79, 172, 254, 0.1);
  border: 1px solid rgba(79, 172, 254, 0.3);
}

.emailx-compact-alert--neutral {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
}

.emailx-compact-alert-text {
  flex-grow: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* ── Status pills ── */
.emailx-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.55rem;
  border-radius: 20px;
  font-size: var(--emailx-font-compact);
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid transparent;
}

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

.emailx-status-active {
  color: var(--emailx-teal);
  background: rgba(76, 212, 169, 0.12);
  border-color: rgba(76, 212, 169, 0.3);
}

/* A discount is the one line in the breakdown worth reading as good news, so it
   takes the same teal the active status pill uses instead of secondary grey. */
.emailx-billing-discount {
  color: var(--emailx-teal);
}

.emailx-status-pending {
  color: rgb(245, 180, 90);
  background: rgba(245, 180, 90, 0.12);
  border-color: rgba(245, 180, 90, 0.32);
}

/* ── Members page layout ── */
.emailx-team-wrap {
  width: 100%;
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
}

.emailx-team-wrap-small {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Shared table variants ── */
.emailx-table-shell {
  width: 100%;
  min-width: 0;
}

.emailx-table-card,
.emailx-members-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.012);
}

/* ── Channel upgrade card — shown in place of a page's content when the
   account's plan doesn't include that channel (email-only plan viewing a
   LinkedIn-only page, or vice versa). Reuses the trial-expired overlay's
   grid/right-side markup and class names (.trial-overlay-grid,
   .trial-overlay-right, .trial-testimonial-card, ...) so the trust panel
   stays visually identical. Those rules normally only ship inside
   base.html's `{% if show_upgrade_overlay %}` block, which isn't true on
   these pages — so they're duplicated here globally. Keep in sync with
   base.html's copy if that overlay's design changes. ── */
.trial-overlay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid hsl(210, 6%, 19%);
  border-radius: 12px;
  max-width: 1200px;
}
@media (max-width: 900px) {
  .trial-overlay-grid {
    grid-template-columns: 1fr;
    margin: 1rem 0rem !important;
    border: none;
    border-radius: 0;
  }
}
.trial-overlay-right {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 3rem;
  overflow: hidden;
  border-left: 1px solid #1a1a1a;
}
@media (max-width: 900px) {
  .trial-overlay-right {
    padding: 3rem 1rem 4rem;
    border-left: none;
    border-top: 1px solid #1a1a1a;
  }
}
.trial-overlay-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 40%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.trial-overlay-right > * {
  position: relative;
  z-index: 1;
}
.trial-testimonial-card {
  position: relative;
  background: #111111;
  border-radius: 12px;
  padding: 2.5rem 3.5rem 2.25rem;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid #4CD4A9;
  box-shadow:
    0 0 0 10px rgba(32, 255, 169, 0.15),
    0 8px 30px rgba(0, 0, 0, 0.6);
}
.trial-quote-mark {
  position: absolute;
  top: -2.2rem;
  left: 0.1rem;
  font-family: 'Cabinet Grotesk', 'Georgia', serif;
  font-size: 22rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255,255,255,0.04);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.trial-testimonial-text {
  position: relative;
  font-size: 0.95rem;
  color: #d1d5db;
  line-height: 1.35;
  margin-bottom: 1.5rem;
  z-index: 1;
}
.trial-testimonial-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #374151, #4b5563);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #d1d5db;
  flex-shrink: 0;
}

.channel-lock-grid {
  /* Centred in the page, not pinned an arbitrary rem from the top. */
  margin: auto;
}
.channel-lock-left {
  display: flex;
  flex-direction: column;
  /* Was space-between over a 420px floor, which pushed the buttons to the
     bottom edge and left a hole between them and the body copy. */
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  gap: 1.75rem;
  min-height: 360px;
  padding: 2.5rem 3rem;
  border-radius: 12px;
  background-color: #111111;
}
@media (max-width: 900px) {
  .channel-lock-left {
    padding: 2.5rem 1.5rem 2rem;
    background-color: transparent !important;
  }
}
.channel-lock-copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.channel-lock-title {
  font-size: 1.8rem;
  font-weight: 500;
  color: whitesmoke;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}
.channel-lock-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  max-width: 420px;
}
.channel-lock-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.emailx-table-card.is-quiet {
  border-color: transparent;
  border-radius: 0;
  background: transparent;
}

.emailx-table-scroll {
  width: 100%;
  overflow: auto;
}

.emailx-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.emailx-resource-table-shell {
  min-height: 0;
}

.emailx-resource-table-shell .emailx-table-card {
  min-height: 0;
}

.emailx-table-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.emailx-round-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 34px;
  height: 34px;
  min-height: 32px;
  padding: 0;
  color: var(--text-primary);
  font-size: var(--emailx-font-compact);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-color-light);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.emailx-round-control:hover,
.emailx-round-control.is-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(213, 219, 225, 0.44);
}

.emailx-expandable-search {
  display: flex;
  align-items: center;
}

.emailx-inline-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 38px;
  width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid transparent;
  opacity: 0;
  transform: translateX(0.35rem) scaleX(0.98);
  transform-origin: right center;
  pointer-events: none;
  transition: width 0.18s ease, padding 0.18s ease, border-color 0.18s ease, opacity 0.16s ease, transform 0.16s ease;
}

.emailx-expandable-search.is-open .emailx-round-control {
  display: none;
}

.emailx-expandable-search.is-open .emailx-inline-search {
  width: min(260px, 36vw);
  padding: 0 0.75rem;
  border-color: var(--border-color-light);
  opacity: 1;
  transform: translateX(0) scaleX(1);
  pointer-events: auto;
}

.emailx-inline-search input {
  min-width: 0;
  flex: 1;
  color: var(--text-primary);
  font-size: var(--emailx-font-base);
  background: transparent;
  border: 0;
  outline: 0;
}

.emailx-inline-search input[type="search"]::-webkit-search-cancel-button,
.emailx-inline-search input[type="search"]::-webkit-search-decoration {
  display: none;
  appearance: none;
}

.emailx-inline-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  font-size: var(--emailx-font-tiny);
  background: transparent;
  border: 0;
}

.emailx-inline-search-clear:hover {
  color: var(--text-primary);
}

.emailx-operations-table-container {
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.emailx-operations-table-container .emailx-resource-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgb(30, 31, 31);
}

@media (max-width: 900px) {
  .emailx-expandable-search.is-open {
    flex: 1 1 min(100%, 280px);
  }

  .emailx-expandable-search.is-open .emailx-inline-search {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .emailx-expandable-search {
    min-width: 34px;
  }

  .emailx-expandable-search.is-open {
    flex-basis: 100%;
  }
}

.emailx-resource-table,
.emailx-members-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.emailx-resource-table th:first-child,
.emailx-resource-table td:first-child,
.emailx-members-table th:first-child,
.emailx-members-table td:first-child {
  padding-left: 1rem;
}

.emailx-resource-table th:last-child,
.emailx-resource-table td:last-child,
.emailx-members-table th:last-child,
.emailx-members-table td:last-child {
  padding-right: 1rem;
}

.emailx-resource-table th,
.emailx-members-table th {
  padding: 0.5rem 0.75rem;
  font-size: var(--emailx-font-compact);
  color: var(--text-secondary);
  font-weight: 400;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.emailx-resource-table td,
.emailx-members-table td {
  padding: 0.7rem 0.75rem;
  font-size: var(--emailx-font-base);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.emailx-resource-table tbody tr:last-child td,
.emailx-members-table tbody tr:last-child td {
  border-bottom: 0;
}

.emailx-resource-table tbody tr,
.emailx-members-table tbody tr {
  transition: background 0.15s ease;
}

.emailx-resource-table tbody tr:hover,
.emailx-members-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.emailx-database-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.emailx-database-table th,
.emailx-database-table td {
  width: var(--emailx-column-width, 170px);
  min-width: var(--emailx-column-width, 170px);
  max-width: var(--emailx-column-width, 170px);
  height: 44px;
  padding: 0.45rem 0.75rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-base);
  line-height: 1.25;
  vertical-align: middle;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.emailx-database-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: left;
  background: transparent;
}

.emailx-database-table tbody tr {
  transition: background 0.12s ease;
}

.emailx-database-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.emailx-database-table tbody tr.is-selected,
.emailx-database-table tbody tr.is-active {
  background: rgba(42, 103, 255, 0.12);
}

.emailx-database-table .emailx-table-sticky-column {
  position: sticky;
  left: 0;
  z-index: 2;
}

.emailx-database-table th.emailx-table-sticky-column {
  z-index: 4;
}

.emailx-table-scroll.is-scrolled-x .emailx-table-sticky-column,
.emailx-table-scroll.is-sticky-active .emailx-table-sticky-column,
.emailx-database-table.is-resizing .emailx-table-sticky-column {
  background: rgb(27, 28, 28);
  box-shadow: 14px 0 22px -18px rgba(0, 0, 0, 0.95);
}

.emailx-table-header-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.emailx-table-person-cell {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.emailx-table-person-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.emailx-table-person-name {
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  text-decoration-color: rgba(255, 255, 255, 0.28);
  text-underline-offset: 0.18rem;
}

.emailx-table-person-cell:hover .emailx-table-person-name {
  text-decoration-line: underline;
}

.emailx-table-person-secondary {
  color: var(--text-muted);
  font-size: var(--emailx-font-compact);
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.emailx-table-cell-link,
.contacts-link-cell {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.28);
  text-underline-offset: 0.18rem;
}

.emailx-table-cell-link:hover,
.contacts-link-cell:hover {
  color: var(--text-primary);
  text-decoration-color: rgba(255, 255, 255, 0.72);
}

.emailx-table-checkbox-wrap {
  position: relative;
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.emailx-table-checkbox {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.emailx-table-checkbox-visual {
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
  align-items: center;
  justify-content: center;
  color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 0.3rem;
  background: transparent;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.emailx-table-checkbox-visual i {
  font-size: var(--emailx-font-xs);
  line-height: 1;
}

.emailx-table-checkbox:hover + .emailx-table-checkbox-visual,
.emailx-table-checkbox:focus-visible + .emailx-table-checkbox-visual {
  border-color: var(--text-secondary);
}

.emailx-table-checkbox:checked + .emailx-table-checkbox-visual {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.12);
}

.emailx-table-selection-bar {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  z-index: 1070;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: 0.42rem;
  color: var(--text-primary);
  background: rgb(30, 31, 31);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 1px 2px 5px 2px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 120%);
  visibility: hidden;
  transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.emailx-table-selection-bar.is-visible,
.emailx-table-selection-bar.is-static {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  visibility: visible;
}

.emailx-table-selection-bar.is-static {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  display: inline-flex;
}

.emailx-table-selection-divider {
  width: 1px;
  align-self: stretch;
  margin: 0 0.25rem;
  background: var(--border-color);
}

@media (max-width: 640px) {
  .emailx-table-selection-bar {
    justify-content: center;
    flex-wrap: wrap;
    width: calc(100% - 1rem);
    max-width: calc(100% - 1rem);
    bottom: 0.5rem;
  }

  .emailx-table-selection-divider {
    display: none;
  }

  .emailx-table-selection-bar .btn {
    flex: 1 1 auto;
  }

  .emailx-table-selection-bar .emailx-table-action-danger {
    flex: 0 0 34px !important;
  }
}

.emailx-table-empty {
  color: var(--text-muted);
}

.emailx-table-skeleton {
  display: block;
  width: 100%;
  height: 0.85rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045));
  background-size: 240% 100%;
  animation: emailx-table-skeleton 1.2s ease-in-out infinite;
}

@keyframes emailx-table-skeleton {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

/* A row added in place (e.g. a duplicated campaign) fades in with a brief highlight. */
.emailx-row-enter > td {
  animation: emailx-row-enter 1.4s ease-out;
}

@keyframes emailx-row-enter {
  0% { opacity: 0; background-color: rgba(76, 212, 169, 0.14); }
  20% { opacity: 1; }
  100% { opacity: 1; background-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .emailx-row-enter > td { animation: none; }
}

.emailx-member-name {
  color: var(--text-primary);
  line-height: 1.3;
}

.emailx-member-email {
  color: var(--text-muted);
  font-size: var(--emailx-font-compact);
  line-height: 1.3;
}

.emailx-member-empty {
  padding: 2.5rem 0.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--emailx-font-base);
}

/* ── Members search ── */
.emailx-member-search {
  position: relative;
  max-width: 320px;
  flex: 1;
}

.emailx-member-search .bi-search {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--emailx-font-compact);
  pointer-events: none;
}

.emailx-member-search input {
  width: 100%;
  background: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: var(--emailx-font-base);
  padding: 0.45rem 0.75rem 0.45rem 2.1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.emailx-member-search input::placeholder {
  color: var(--text-muted);
}

.emailx-member-search input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(35, 37, 37, 0.9);
}

/* ── LinkedIn exclusion disclosure ── */
.li-exclusion-panel {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  margin-top: 1rem;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.li-exclusion-panel:hover,
.li-exclusion-panel.is-open {
  border-color: rgba(213, 219, 225, 0.18);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

.li-exclusion-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  text-align: left;
  transition: background 0.2s ease;
}

.li-exclusion-toggle:hover,
.li-exclusion-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.035);
}

.li-exclusion-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.18);
  outline-offset: -2px;
}

.li-exclusion-summary {
  color: var(--text-secondary);
  font-size: var(--emailx-font-xs);
}

.li-exclusion-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease, color 0.2s ease;
}

.li-exclusion-toggle:hover .li-exclusion-chevron,
.li-exclusion-toggle:focus-visible .li-exclusion-chevron {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.li-exclusion-body {
  display: grid;
  grid-template-rows: 0fr;
  max-height: 0;
  border-top: 1px solid transparent;
  padding: 0 1rem;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transition: grid-template-rows 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), max-height 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), padding 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease, border-color 0.2s ease, visibility 0s linear 0.28s;
}

.li-exclusion-body-inner {
  min-height: 0;
  overflow: hidden;
  transform: translateY(-0.35rem);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.li-exclusion-panel.is-open .li-exclusion-body {
  grid-template-rows: 1fr;
  max-height: 36rem;
  border-top-color: var(--border-color);
  padding: 1rem;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* Lists add rows below the chip grid; give the open body room for them. */
.li-exclusion-panel.is-open .li-exclusion-body:has(.li-exclusion-lists:not([hidden])) {
  max-height: 80rem;
}

.li-exclusion-panel.is-open .li-exclusion-body-inner {
  transform: translateY(0);
}

.li-exclusion-panel.is-open .li-exclusion-chevron {
  transform: rotate(180deg);
}

.li-exclusion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.li-exclusion-chipbox {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.45rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.li-exclusion-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  border: 1px solid rgba(213, 219, 225, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: var(--emailx-font-compact);
  padding: 0.25rem 0.38rem 0.25rem 0.55rem;
}

.li-exclusion-chip button {
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.li-exclusion-chip button:hover,
.li-exclusion-chip button:focus-visible {
  background-color: rgba(220, 53, 69, 0.2);
  color: var(--text-primary);
}

.li-exclusion-input {
  flex: 1 1 120px;
  min-width: 100px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  outline: 0;
  font-size: var(--emailx-font-compact);
  padding: 0.25rem;
}

/* Do-not-contact lists inside "Do not include" */
.li-exclusion-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.li-exclusion-dropzone:hover,
.li-exclusion-dropzone:focus-visible,
.li-exclusion-dropzone.is-dragover {
  border-color: rgba(213, 219, 225, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  outline: 0;
}

.li-exclusion-dropzone.is-busy {
  pointer-events: none;
  opacity: 0.6;
}

.li-exclusion-dropzone-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.li-exclusion-lists {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.li-exclusion-list {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.li-exclusion-list.is-off .li-exclusion-list-copy {
  opacity: 0.55;
}

.li-exclusion-list-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(213, 219, 225, 0.08);
  color: var(--text-secondary);
}

.li-exclusion-list-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.li-exclusion-list-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.li-dnc-mapping {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.li-dnc-choice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.li-dnc-choice-grid .seg-btn {
  white-space: nowrap;
}

.li-dnc-search {
  max-width: 16rem;
}

@media (max-width: 768px) {
  .li-exclusion-grid,
  .li-dnc-mapping {
    grid-template-columns: 1fr;
  }

  .li-dnc-search {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .li-exclusion-panel,
  .li-exclusion-toggle,
  .li-exclusion-chevron,
  .li-exclusion-body,
  .li-exclusion-body-inner {
    transition: none;
  }
}

/* ── Public feedback portal ── */
.feedback-portal-body {
  --text-primary: hsl(0, 0%, 98%);
  --text-secondary: #bec1c3;
  --text-muted: hsl(0, 0%, 48%);
  --border-color: hsl(210, 6%, 19%);
  --border-color-light: hsl(210, 6%, 24%);
  --accent-primary: rgb(76, 212, 169);
  --emailx-teal: rgb(76, 212, 169);
  --emailx-blue: rgb(101, 153, 255);
  min-height: 100vh;
  margin: 0;
  background: rgb(14, 14, 14);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: var(--emailx-font-base);
}

.feedback-portal-body a {
  color: inherit;
}

.feedback-portal-page {
  width: min(100% - 2rem, 1360px);
  margin: 0 auto;
  padding: 1.35rem 0 4rem;
}

.feedback-portal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.feedback-brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.feedback-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-title);
  font-weight: 600;
  text-decoration: none;
}

.feedback-brand-icon {
  width: 2.3rem;
  height: 2.3rem;
  padding: 0.32rem;
  border: 1px solid rgba(213, 219, 225, 0.12);
  border-radius: 50%;
  background: rgba(213, 219, 225, 0.08);
  box-sizing: border-box;
  object-fit: contain;
}

.feedback-public-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.feedback-nav-item,
.feedback-dashboard-link,
.feedback-account-chip,
.feedback-sort-btn,
.feedback-type-filter,
.feedback-icon-action,
.feedback-filter-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
  font-weight: 400;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.feedback-nav-item,
.feedback-sort-btn,
.feedback-type-filter {
  padding: 0.45rem 0.75rem;
}

.feedback-nav-item:hover,
.feedback-nav-item:focus-visible,
.feedback-nav-item.is-active,
.feedback-sort-btn:hover,
.feedback-sort-btn:focus-visible,
.feedback-sort-btn.is-active,
.feedback-type-filter:hover,
.feedback-type-filter:focus-visible,
.feedback-type-filter.is-active {
  background: rgba(213, 219, 225, 0.08);
  border-color: rgba(213, 219, 225, 0.12);
  color: var(--text-primary);
}

.feedback-nav-item.is-active,
.feedback-sort-btn.is-active,
.feedback-type-filter.is-active {
  box-shadow: inset 0 0 0 1px rgba(213, 219, 225, 0.03);
}

.feedback-header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.feedback-dashboard-link,
.feedback-account-chip {
  min-height: 2.45rem;
  padding: 0.45rem 0.75rem;
  background: rgba(213, 219, 225, 0.06);
  border-color: rgba(213, 219, 225, 0.1);
}

.feedback-dashboard-link:hover,
.feedback-dashboard-link:focus-visible,
.feedback-type-pill:hover {
  border-color: #6f6f6f;
  color: var(--text-primary);
  background-color: rgba(123, 123, 123, 0.5);
}

.feedback-account-chip {
  max-width: 18rem;
  color: var(--text-muted);
}

.feedback-account-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-portal-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
  gap: 1.6rem;
  align-items: start;
}

.feedback-board-column {
  min-width: 0;
}

.feedback-public-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 10.5rem;
  margin-bottom: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  background-color: rgb(16, 19, 21);
  background-image:
    linear-gradient(90deg, rgba(9, 12, 14, 0.98) 0%, rgba(9, 12, 14, 0.78) 49%, rgba(9, 12, 14, 0.25) 100%),
    linear-gradient(0deg, rgba(9, 12, 14, 0.58), transparent 68%),
    url("../feedback-hero-mountains.webp");
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.feedback-public-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 72% 42%, rgba(76, 212, 169, 0.09), transparent 31%);
  content: "";
  pointer-events: none;
}

.feedback-hero-copy {
  max-width: 39rem;
}

.feedback-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.8rem;
  margin: 0 0 0.75rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(213, 219, 225, 0.16);
  border-radius: 999px;
  background: rgba(13, 17, 19, 0.58);
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  font-weight: 500;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.feedback-eyebrow i {
  color: var(--emailx-teal);
}

.feedback-public-hero h1 {
  margin: 0 0 0.45rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-auth-title);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.feedback-public-hero p:not(.feedback-eyebrow) {
  margin: 0;
  color: rgba(245, 247, 248, 0.68);
  font-size: var(--emailx-font-md);
  line-height: 1.55;
}

.feedback-summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.feedback-summary .stat-chip {
  border-color: rgba(213, 219, 225, 0.13);
  background: rgba(13, 17, 19, 0.55);
  color: rgba(245, 247, 248, 0.72);
  backdrop-filter: blur(8px);
}

.feedback-summary .stat-chip i,
.feedback-summary .stat-chip [data-feedback-idea-count],
.feedback-summary .stat-chip [data-feedback-vote-total] {
  color: var(--text-primary);
}

.feedback-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.feedback-control-stack {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.feedback-sort-tabs,
.feedback-type-tabs,
.feedback-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.feedback-sort-btn,
.feedback-type-filter,
.feedback-icon-action {
  background: none;
  border-color: var(--border-color);
}

.feedback-search-control {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.45rem;
  width: 12rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: none;
  color: var(--text-muted);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.feedback-search-control:focus-within {
  border-color: var(--emailx-teal);
  background: hsl(210, 11%, 5%);
  box-shadow: 0 0 0 2px rgba(76, 212, 169, 0.15);
  color: var(--text-primary);
}

.feedback-search-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--emailx-font-base);
}

.feedback-search-control input::placeholder {
  color: var(--text-muted);
}

.feedback-filter-wrap {
  position: relative;
}

.feedback-icon-action {
  width: 2.45rem;
  padding: 0;
}

.feedback-filter-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 30;
  width: 12rem;
  padding: 0.45rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: rgb(24, 25, 25);
  box-shadow: 0 1.1rem 2.4rem rgba(0, 0, 0, 0.32);
}

.feedback-filter-menu p {
  margin: 0 0 0.35rem;
  padding: 0.35rem 0.45rem;
  color: var(--text-muted);
  font-size: var(--emailx-font-compact);
}

.feedback-filter-option {
  justify-content: flex-start;
  width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.45rem;
  font-weight: 500;
}

.feedback-filter-option:hover,
.feedback-filter-option:focus-visible,
.feedback-filter-option.is-active {
  background: rgba(213, 219, 225, 0.08);
  color: var(--text-primary);
}

.feedback-create-button,
.feedback-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0 0.95rem;
  border-radius: 7px;
  font-size: var(--emailx-font-base);
  font-weight: 400;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.feedback-portal-body .btn-outline-light {
  --bs-btn-color: rgb(26, 26, 26);
  --bs-btn-bg: rgb(229, 229, 229);
  --bs-btn-border-color: rgb(229, 229, 229);
  --bs-btn-hover-color: rgb(237, 237, 237);
  --bs-btn-hover-bg: rgba(30, 30, 30, 0.7);
  --bs-btn-hover-border-color: rgb(237, 237, 237);
  --bs-btn-active-color: rgb(255, 255, 255);
  --bs-btn-active-bg: rgb(29, 29, 29);
  --bs-btn-active-border-color: rgb(237, 237, 237);
}

.feedback-create-button:hover,
.feedback-create-button:focus-visible,
.feedback-submit-button:hover,
.feedback-submit-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.8rem 1.8rem rgba(0, 0, 0, 0.18);
}

.feedback-public-list {
  display: grid;
  gap: 0.65rem;
}

.feedback-public-item {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.8rem;
  min-height: 7.2rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(101, 153, 255, 0.035), transparent 32%),
    rgba(22, 23, 25, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease, transform 0.2s ease;
}

.feedback-public-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: rgba(213, 219, 225, 0.18);
  content: "";
}

.feedback-public-item[data-request-type="feature"]::before {
  background: rgba(76, 212, 169, 0.65);
}

.feedback-public-item[data-request-type="bug"]::before {
  background: rgba(255, 126, 126, 0.62);
}

.feedback-public-item:hover {
  border-color: var(--border-color-light);
  box-shadow: 0 0.8rem 1.8rem rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transform: translateY(-1px);
}

.feedback-public-item.is-hidden {
  display: none;
}

.feedback-public-item-body {
  min-width: 0;
  padding: 1.2rem 1.35rem 1.15rem 1.45rem;
}

.feedback-public-item-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.feedback-public-item-heading h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--emailx-font-title);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.feedback-kind-pill,
.feedback-severity-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.45rem;
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(213, 219, 225, 0.14);
  border-radius: 999px;
  background: rgba(213, 219, 225, 0.06);
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  font-weight: 500;
}

.feedback-kind-feature {
  color: var(--emailx-teal);
  border-color: rgba(76, 212, 169, 0.22);
  background: rgba(76, 212, 169, 0.08);
}

.feedback-kind-bug,
.feedback-severity-blocking {
  color: rgb(255, 126, 126);
  border-color: rgba(255, 126, 126, 0.28);
  background: rgba(255, 126, 126, 0.09);
}

.feedback-severity-major {
  color: rgb(245, 180, 90);
  border-color: rgba(245, 180, 90, 0.28);
  background: rgba(245, 180, 90, 0.09);
}

.feedback-severity-minor {
  color: var(--text-secondary);
}

.feedback-public-description {
  max-width: 50rem;
  margin: 0.15rem 0 0;
  color: rgba(245, 247, 248, 0.66);
  font-size: var(--emailx-font-md);
  line-height: 1.55;
  white-space: pre-line;
}

.feedback-public-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: var(--emailx-font-sm);
}

.feedback-public-meta > span:nth-child(3)::before {
  margin-right: 0.5rem;
  color: rgba(213, 219, 225, 0.25);
  content: "\00b7";
}

.feedback-public-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.25rem;
}

.feedback-public-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.7rem;
  padding: 0.18rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--emailx-font-compact);
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.feedback-public-actions button:hover,
.feedback-public-actions button:focus-visible {
  border-color: rgba(213, 219, 225, 0.14);
  background: rgba(213, 219, 225, 0.06);
  color: var(--text-primary);
}

.feedback-public-actions button.is-confirming {
  border-color: rgba(255, 126, 126, 0.28);
  background: rgba(255, 126, 126, 0.09);
  color: rgb(255, 126, 126);
}

.feedback-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  border: 1px solid rgba(213, 219, 225, 0.12);
  background: rgba(213, 219, 225, 0.07);
  color: var(--text-primary);
  font-size: var(--emailx-font-compact);
  font-weight: 700;
}

.feedback-public-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-left: 1px solid var(--border-color);
  background: rgba(213, 219, 225, 0.018);
  color: var(--text-secondary);
  font-size: var(--emailx-font-title);
  font-weight: 700;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.feedback-public-vote i {
  color: var(--text-secondary);
  font-size: var(--emailx-font-title);
}

.feedback-public-vote:hover,
.feedback-public-vote:focus-visible {
  color: var(--text-primary);
  background: rgba(213, 219, 225, 0.055);
}

.feedback-public-vote:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 2px rgba(76, 212, 169, 0.32);
}

.feedback-public-vote.is-voted {
  color: var(--text-primary);
  background: rgba(76, 212, 169, 0.055);
}

.feedback-public-vote.is-voted i {
  color: var(--emailx-teal);
}

.feedback-public-vote.is-loading {
  pointer-events: none;
  transform: translateY(-1px);
}

.feedback-empty-state {
  display: flex;
  min-height: 13rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  text-align: center;
}

.feedback-empty-state i {
  color: var(--emailx-teal);
  font-size: var(--emailx-font-modal-title);
}

.feedback-empty-state p {
  color: var(--text-primary);
  font-weight: 700;
}

.feedback-empty-state span {
  font-size: var(--emailx-font-sm);
}

.feedback-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.25rem;
}

.feedback-side-panel {
  padding: 0.15rem 0 1rem;
  border-bottom: 1px solid var(--border-color);
}

.feedback-side-panel h2 {
  margin: 0 0 0.9rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-title);
  font-weight: 400;
}

.feedback-side-panel p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--emailx-font-base);
  line-height: 1.5;
}

.feedback-helpful-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.feedback-helpful-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
}

.feedback-helpful-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-helpful-item strong {
  color: var(--emailx-teal);
}

.feedback-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 6, 8, 0.66);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.feedback-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.feedback-modal-card {
  position: relative;
  width: min(100%, 660px);
  overflow: hidden;
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  background-image: linear-gradient(to bottom, rgb(14, 14, 14), rgba(75, 85, 99, 0.1));
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.5);
  transform: translateY(0.75rem) scale(0.98);
  transition: transform 0.22s ease;
}

.feedback-identity-card {
  position: relative;
  width: min(100%, 390px);
  padding: 1.35rem;
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  background-image: linear-gradient(to bottom, rgb(14, 14, 14), rgba(75, 85, 99, 0.1));
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.5);
  transform: translateY(0.75rem) scale(0.98);
  transition: transform 0.22s ease;
}

.feedback-modal-backdrop.is-open .feedback-modal-card {
  transform: translateY(0) scale(1);
}

.feedback-modal-backdrop.is-open .feedback-identity-card {
  transform: translateY(0) scale(1);
}

.feedback-modal-card form {
  display: flex;
  flex-direction: column;
  min-height: 28rem;
}

.feedback-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.feedback-modal-author {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 1.2rem 1.45rem 0.75rem;
  color: var(--text-muted);
}

.feedback-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(213, 219, 225, 0.12);
  padding: 0.38rem 0.65rem;
  border-radius: 8px;
  background: rgba(213, 219, 225, 0.08);
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
  font-weight: 500;
}

.feedback-type-picker {
  position: relative;
}

.feedback-type-pill .bi-chevron-down {
  font-size: var(--emailx-font-compact);
}

.feedback-type-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 4;
  width: 13rem;
  padding: 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: rgb(24, 25, 25);
  box-shadow: 0 1.1rem 2.4rem rgba(0, 0, 0, 0.32);
}

.feedback-type-menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.2rem;
  padding: 0.35rem 0.5rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
  text-align: left;
}

.feedback-type-menu button:hover,
.feedback-type-menu button:focus-visible {
  background: rgba(213, 219, 225, 0.08);
  color: var(--text-primary);
}

.feedback-modal-title-input,
.feedback-modal-description,
.feedback-modal-email {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  padding-left: 1.45rem;
  padding-right: 1.45rem;
}

.feedback-modal-title-input {
  min-height: 3rem;
  font-size: var(--emailx-font-auth-title);
  font-weight: 500;
}

.feedback-modal-description {
  height: 10rem;
  min-height: 10rem;
  max-height: 16rem;
  resize: none;
  overflow-y: auto;
  color: var(--text-secondary);
  font-size: var(--emailx-font-title);
  line-height: 1.5;
}

.feedback-modal-email {
  min-height: 2.6rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-base);
}

.feedback-modal-title-input::placeholder,
.feedback-modal-description::placeholder,
.feedback-modal-email::placeholder {
  color: var(--text-muted);
}

.feedback-severity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.6rem 1.45rem 0.2rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
}

.feedback-severity-options {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.feedback-severity-options label {
  margin: 0;
  cursor: pointer;
}

.feedback-severity-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feedback-severity-options span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: var(--emailx-font-sm);
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.feedback-severity-options input:checked + span,
.feedback-severity-options span:hover {
  border-color: rgba(76, 212, 169, 0.32);
  background: rgba(76, 212, 169, 0.1);
  color: var(--text-primary);
}

.feedback-modal-footer {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: auto;
  padding: 1rem 1.45rem;
  border-top: 1px solid var(--border-color);
  background: rgba(18, 19, 22, 0.5);
}

.feedback-modal-footer p {
  flex: 1;
  min-height: 1rem;
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
}

.feedback-modal-footer p.is-error {
  color: rgb(255, 126, 126);
}

.feedback-identity-card form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.feedback-identity-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(76, 212, 169, 0.24);
  border-radius: 50%;
  background: rgba(76, 212, 169, 0.1);
  color: var(--emailx-teal);
}

.feedback-identity-card h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--emailx-font-auth-title);
  font-weight: 500;
  letter-spacing: 0;
}

.feedback-identity-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--emailx-font-base);
  line-height: 1.5;
}

.feedback-identity-input {
  width: 100%;
  min-height: 45px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: none;
  color: var(--text-primary);
  font-size: var(--emailx-font-base);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-identity-input:focus {
  border-color: var(--emailx-teal);
  background: hsl(210, 11%, 5%);
  box-shadow: 0 0 0 2px rgba(76, 212, 169, 0.15);
  outline: none;
}

.feedback-identity-input::placeholder {
  color: var(--text-muted);
}

.feedback-identity-message {
  min-height: 1rem;
}

.feedback-identity-message.is-error {
  color: rgb(255, 126, 126);
}

.feedback-identity-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.feedback-identity-secondary {
  --bs-btn-color: var(--text-secondary);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--border-color);
  --bs-btn-hover-color: var(--text-primary);
  --bs-btn-hover-bg: rgba(213, 219, 225, 0.08);
  --bs-btn-hover-border-color: var(--border-color-light);
}

.feedback-create-more {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
  white-space: nowrap;
}

.feedback-create-more input {
  appearance: none;
  width: 2rem;
  height: 1.15rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: rgba(213, 219, 225, 0.08);
  position: relative;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.feedback-create-more input::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.18rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--text-muted);
  transform: translateY(-50%);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.feedback-create-more input:checked {
  background: rgba(76, 212, 169, 0.22);
  border-color: rgba(76, 212, 169, 0.35);
}

.feedback-create-more input:checked::after {
  background: var(--emailx-teal);
  transform: translate(0.78rem, -50%);
}

.emailx-status-open {
  color: var(--text-primary);
  background: rgba(213, 219, 225, 0.08);
  border-color: rgba(213, 219, 225, 0.18);
}

.emailx-status-planned {
  color: var(--emailx-blue);
  background: rgba(101, 153, 255, 0.12);
  border-color: rgba(101, 153, 255, 0.3);
}

.emailx-status-in-progress {
  color: rgb(245, 180, 90);
  background: rgba(245, 180, 90, 0.12);
  border-color: rgba(245, 180, 90, 0.32);
}

.emailx-status-shipped {
  color: var(--emailx-teal);
  background: rgba(76, 212, 169, 0.12);
  border-color: rgba(76, 212, 169, 0.3);
}

.emailx-status-closed {
  color: var(--text-muted);
  background: rgba(213, 219, 225, 0.05);
  border-color: rgba(213, 219, 225, 0.12);
}

@media (max-width: 1040px) {
  .feedback-portal-main {
    grid-template-columns: 1fr;
  }

  .feedback-sidebar {
    display: none;
  }
}

@media (max-width: 760px) {
  .feedback-portal-page {
    width: min(100% - 1rem, 1360px);
    padding-top: 0.7rem;
  }

  .feedback-portal-header,
  .feedback-public-hero,
  .feedback-board-toolbar,
  .feedback-modal-footer,
  .feedback-severity-row,
  .feedback-identity-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-header-actions,
  .feedback-summary {
    justify-content: flex-start;
  }

  .feedback-public-hero {
    min-height: 13rem;
    background-position: 62% center;
  }

  .feedback-toolbar-actions,
  .feedback-sort-tabs,
  .feedback-type-tabs,
  .feedback-control-stack {
    width: 100%;
  }

  .feedback-sort-btn {
    flex: 1 1 0;
  }

  .feedback-type-filter {
    flex: 1 1 0;
  }

  .feedback-search-control {
    width: 100%;
  }

  .feedback-create-button {
    width: 100%;
  }

  .feedback-public-item {
    grid-template-columns: minmax(0, 1fr) 4rem;
  }

  .feedback-public-item-body {
    padding: 1rem;
  }

  .feedback-public-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
  }

  .feedback-nav-item {
    flex: 0 0 auto;
  }
}

/* Pricing modal concept gallery */
.pricing-lab-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 2rem;
}

.pricing-lab-intro {
  align-items: flex-end;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  padding: 1.5rem;
}

.pricing-lab-intro > div {
  max-width: 760px;
}

.pricing-lab-intro h1 {
  font-size: var(--emailx-font-auth-title);
  margin: 0.8rem 0 0.5rem;
}

.pricing-lab-intro p {
  margin: 0;
}

.pricing-lab-gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-lab-concept-card {
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 1rem;
}

.pricing-lab-concept-card:last-child {
  grid-column: 1 / -1;
}

.pricing-lab-card-number {
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color-light);
  border-radius: 8px;
  color: var(--text-muted);
  display: flex;
  font-size: var(--emailx-font-compact);
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.pricing-lab-concept-card h2 {
  color: var(--text-primary);
  font-size: var(--emailx-font-base);
  margin: 0.45rem 0 0.2rem;
}

.pricing-lab-concept-card p {
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  margin: 0;
}

.pricing-lab-modal .modal-dialog {
  --bs-modal-width: min(1240px, calc(100vw - 2rem));
}

.pricing-lab-modal .modal-lg {
  --bs-modal-width: min(900px, calc(100vw - 2rem));
}

.pricing-lab-dialog {
  background: var(--bg-primary);
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  color: var(--text-primary);
  overflow: hidden;
}

.pricing-lab-modal-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color);
  padding: 1.35rem 1.5rem;
}

.pricing-lab-modal-header > div {
  max-width: 850px;
}

.pricing-lab-modal-header .modal-title {
  color: var(--text-primary);
  font-size: var(--emailx-font-auth-title);
  margin: 0.25rem 0;
}

.pricing-lab-modal-header p {
  color: var(--text-secondary);
  margin: 0;
}

.pricing-lab-option-label {
  color: var(--emailx-teal);
  font-size: var(--emailx-font-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pricing-lab-marketing {
  padding: 1.5rem;
}

.pricing-lab-centered-toggle {
  margin: 0 auto 1.5rem;
  max-width: 370px;
}

.pricing-lab-centered-toggle > span {
  align-items: center;
  color: var(--emailx-teal);
  display: flex;
  font-size: var(--emailx-font-xs);
  padding: 0 0.65rem;
  white-space: nowrap;
}

.pricing-lab-plan-grid {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-lab-plan-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.pricing-lab-plan-card.featured {
  border-color: var(--emailx-teal);
  box-shadow: 0 20px 60px rgb(0 0 0 / 24%);
  transform: translateY(-0.35rem);
}

.pricing-lab-best-value {
  align-items: center;
  background: var(--emailx-teal);
  border-radius: 999px;
  color: var(--bg-primary);
  display: inline-flex;
  font-size: var(--emailx-font-xs);
  gap: 0.3rem;
  padding: 0.3rem 0.55rem;
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
}

.pricing-lab-plan-card header,
.pricing-lab-plan-card .pricing-lab-card-controls,
.pricing-lab-plan-card > ul,
.pricing-lab-plan-card footer {
  padding: 1.25rem;
}

.pricing-lab-plan-card header,
.pricing-lab-plan-card .pricing-lab-card-controls,
.pricing-lab-plan-card footer {
  border-bottom: 1px solid var(--border-color);
}

.pricing-lab-plan-card h3 {
  color: var(--text-primary);
  font-size: var(--emailx-font-lg);
  margin: 0;
}

.pricing-lab-plan-card header > p,
.pricing-lab-plan-card header > small {
  color: var(--text-secondary);
  display: block;
  font-size: var(--emailx-font-compact);
  margin: 0.3rem 0 0;
}

.pricing-lab-card-price {
  align-items: flex-end;
  display: flex;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.pricing-lab-card-price strong {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.pricing-lab-card-price span {
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  padding-bottom: 0.2rem;
}

.pricing-lab-card-controls {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pricing-lab-card-controls label,
.pricing-lab-slider-field label {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  font-size: var(--emailx-font-xs);
  justify-content: space-between;
  text-transform: uppercase;
}

.pricing-lab-card-controls label strong,
.pricing-lab-slider-field label strong {
  color: var(--text-primary);
  font-size: var(--emailx-font-compact);
}

.pricing-lab-card-controls input[type="range"],
.pricing-lab-slider-field input[type="range"] {
  accent-color: var(--emailx-teal);
  width: 100%;
}

.pricing-lab-range-labels {
  color: var(--text-muted);
  display: flex;
  font-size: var(--emailx-font-xs);
  justify-content: space-between;
}

.pricing-lab-plan-card > ul,
.pricing-lab-picker-summary ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
}

.pricing-lab-plan-card > ul {
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
}

.pricing-lab-plan-card > ul li::before {
  color: var(--emailx-teal);
  content: "✓";
  margin-right: 0.5rem;
}

.pricing-lab-plan-card footer {
  border-bottom: 0;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.pricing-lab-global-note,
.pricing-lab-fineprint {
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  margin: 1rem 0 0;
  text-align: center;
}

.pricing-lab-native-panel {
  margin: 0;
}

.pricing-lab-native-tabs {
  margin: 1rem;
}

.pricing-lab-native-grid {
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.55fr);
}

.pricing-lab-native-controls,
.pricing-lab-native-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
}

.pricing-lab-native-summary {
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-color);
}

.pricing-lab-slider-field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pricing-lab-native-summary .pricing-lab-card-price {
  margin: 0;
}

.pricing-lab-valley {
  --lab-valley-accent: var(--emailx-blue);
  --lab-valley-accent-soft: rgb(116 169 255 / 10%);
  background: var(--bg-primary);
  border: 1px solid var(--border-color-light);
  color: var(--text-primary);
  overflow: hidden;
}

.pricing-lab-valley .pricing-lab-option-label {
  color: var(--lab-valley-accent);
}

.pricing-lab-valley-body {
  padding: 0.9rem;
}

.pricing-lab-valley-shell {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.9rem;
}

.pricing-lab-valley-tabs,
.pricing-lab-valley-billing {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  display: grid;
  gap: 0.2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.25rem;
}

.pricing-lab-valley-tabs button,
.pricing-lab-valley-billing button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.65rem;
}

.pricing-lab-valley-tabs button.active,
.pricing-lab-valley-billing button.active {
  background: var(--bg-elevated);
  box-shadow: inset 0 0 0 1px var(--lab-valley-accent);
  color: var(--text-primary);
}

.pricing-lab-valley-tabs small,
.pricing-lab-valley-billing small {
  color: var(--text-muted);
  display: block;
  font-size: var(--emailx-font-xs);
  font-weight: 400;
  margin-top: 0.1rem;
}

.pricing-lab-valley-billing small {
  color: var(--lab-valley-accent);
}

.pricing-lab-valley-price-row {
  align-items: flex-end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 1rem 0;
}

.pricing-lab-valley-price {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pricing-lab-valley-price > div {
  align-items: flex-end;
  display: flex;
  gap: 0.4rem;
  white-space: nowrap;
}

.pricing-lab-valley-price-row strong {
  letter-spacing: -0.05em;
  line-height: 1;
}

/* Setup reward pill next to the price ("€5 onboarding reward"); the billed
   line under it strikes the full price. */
.pricing-lab-valley .pricing-lab-valley-price .pricing-lab-valley-reward-pill,
.pricing-lab-valley .pricing-lab-valley-price .pricing-lab-valley-reward-pill span {
  color: var(--emailx-teal);
}

.pricing-lab-valley-reward-pill {
  align-self: center;
  margin-left: 0.35rem;
}

.pricing-lab-valley-reward-pill::before {
  display: none;
}

.pricing-lab-valley-price-row span,
.pricing-lab-valley-price-row small {
  color: var(--text-secondary);
}

.pricing-lab-valley-plan-name {
  color: var(--lab-valley-accent) !important;
  font-size: var(--emailx-font-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-lab-valley-billing {
  min-width: 260px;
}

.pricing-lab-valley-pickers {
  align-items: stretch;
  display: flex;
  gap: 0.5rem;
}

.pricing-lab-currency-dropdown {
  display: flex;
}

.pricing-lab-valley .pricing-lab-currency-toggle {
  background: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  height: 100%;
  justify-content: space-between;
  padding: 0.35rem 0.75rem;
  width: 82px;
}

.pricing-lab-valley-price-row .pricing-lab-currency-toggle span {
  color: var(--text-primary);
}

.pricing-lab-valley .pricing-lab-currency-toggle:hover,
.pricing-lab-valley .pricing-lab-currency-toggle:focus-visible,
.pricing-lab-valley .pricing-lab-currency-toggle[aria-expanded="true"] {
  background: rgb(37 38 40);
  border-color: var(--border-color);
  box-shadow: none;
  color: var(--text-primary);
}

.pricing-lab-currency-toggle .bi-chevron-down {
  font-size: var(--emailx-font-xs);
  transition: transform 0.14s ease;
}

.pricing-lab-currency-toggle[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

.pricing-lab-currency-menu {
  background: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 1px 2px 5px 2px rgba(0, 0, 0, 0.4);
  min-width: 110px;
  padding: 0.35rem;
}

.pricing-lab-currency-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text-primary);
  display: flex;
  font-size: var(--emailx-font-compact);
  justify-content: space-between;
  min-height: 38px;
  padding: 0 0.55rem;
  text-align: left;
  width: 100%;
}

.pricing-lab-currency-item:hover,
.pricing-lab-currency-item:focus-visible,
.pricing-lab-currency-item.active {
  background: rgb(37 38 40);
  color: var(--text-primary);
}

.pricing-lab-valley-price-row .pricing-lab-currency-item span {
  color: var(--text-primary);
}

.pricing-lab-currency-item .bi-check-lg {
  opacity: 0;
}

.pricing-lab-currency-item.active .bi-check-lg {
  opacity: 1;
}

.pricing-lab-valley-allowances {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0.9rem;
}

.pricing-lab-valley-allowances:has(.pricing-lab-valley-allowance.d-none) {
  grid-template-columns: 1fr;
}

.pricing-lab-valley-allowance {
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0.65rem;
}

.pricing-lab-valley-allowance > div:nth-child(2) strong,
.pricing-lab-valley-allowance > div:nth-child(2) small {
  display: block;
}

.pricing-lab-valley-allowance > div:nth-child(2) strong {
  color: var(--text-primary);
  font-size: var(--emailx-font-compact);
}

.pricing-lab-valley-allowance > div:nth-child(2) small {
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
  margin-top: 0.1rem;
}

.pricing-lab-allowance-icon {
  align-items: center;
  background: var(--lab-valley-accent-soft);
  border: 1px solid rgb(116 169 255 / 22%);
  border-radius: 50%;
  color: var(--lab-valley-accent);
  display: flex;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.pricing-lab-stepper {
  align-items: center;
  /* Same surface as .segmented-control, so the two read as one family. */
  background: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 2rem minmax(2rem, auto) 2rem;
}

.pricing-lab-stepper-wide {
  grid-template-columns: 2rem minmax(4rem, auto) 2rem;
}

.pricing-lab-stepper button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text-muted);
  display: flex;
  height: 2rem;
  justify-content: center;
}

.pricing-lab-stepper button:hover:not(:disabled) {
  background: rgba(213, 219, 225, 0.04);
  color: var(--text-primary);
}

.pricing-lab-stepper button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.pricing-lab-stepper output {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.pricing-lab-valley-table {
  border: 1px solid var(--border-color);
  border-radius: 9px;
  display: grid;
  overflow: hidden;
}

.pricing-lab-valley-table > div {
  border-bottom: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.pricing-lab-valley-table > div:last-child {
  border-bottom: 0;
}

.pricing-lab-valley-table span,
.pricing-lab-valley-table strong {
  align-items: center;
  display: flex;
  font-size: var(--emailx-font-compact);
  justify-content: center;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.pricing-lab-valley-table span:first-child {
  color: var(--text-muted);
  gap: 0.4rem;
  justify-content: flex-start;
}

.pricing-lab-valley-table strong {
  border-left: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
}

.pricing-lab-valley[data-plan="linkedin"] [data-valley-column="linkedin"],
.pricing-lab-valley[data-plan="multichannel"] [data-valley-column="multichannel"] {
  background: var(--lab-valley-accent-soft);
  color: var(--text-primary);
}

.pricing-lab-valley-table .head strong {
  font-weight: 600;
}

.pricing-lab-valley-cta {
  margin-top: 0.9rem;
}

.pricing-lab-valley-note {
  color: var(--text-muted);
  font-size: var(--emailx-font-compact);
  margin: 0.55rem 0 0;
  text-align: center;
}

.pricing-lab-valley-note2 {
  font-size: var(--emailx-font-md);
}

/* "Your campaign is live" modal: what happens next, as numbered steps. */
.emailx-launch-steps {
  list-style: none;
  counter-reset: launch-step;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.emailx-launch-steps li {
  counter-increment: launch-step;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-left: 2rem;
  position: relative;
}

.emailx-launch-steps li::before {
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-muted);
  content: counter(launch-step);
  display: flex;
  font-size: var(--emailx-font-compact);
  height: 1.35rem;
  justify-content: center;
  left: 0;
  position: absolute;
  top: 0.05rem;
  width: 1.35rem;
}

/* The setup reward line reads as good news, like other discounts. */
.pricing-lab-valley .pricing-lab-valley-note.emailx-billing-discount {
  color: var(--emailx-teal);
  margin: 0 0 0.55rem;
}

.pricing-lab-valley .pricing-lab-preview-message {
  color: var(--lab-valley-accent);
}

/* Option 3 composes the shared Emailx segmented controls, member tables, avatars, and buttons. */
.pricing-lab-valley.emailx-confirm-modal {
  background: var(--bg-surface);
}

.pricing-lab-valley.emailx-confirm-modal .modal-header {
  align-items: flex-start;
  padding: 1rem 1.25rem 0.75rem;
}

.pricing-lab-valley .modal-header > div {
  min-width: 0;
}

.pricing-lab-valley .modal-header p {
  margin-top: 0.25rem;
  font-size: var(--emailx-font-base);
}

.pricing-lab-valley .pricing-lab-valley-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0 1.25rem 1rem;
}

.pricing-lab-valley .pricing-lab-valley-body > * {
  flex-shrink: 0;
}

.pricing-lab-valley .pricing-lab-valley-shell {
  background: transparent;
  border: 0;
  padding: 0.65rem;
}

.pricing-lab-valley-plan-control {
  width: 100%;
}

.pricing-lab-valley-plan-control .seg-btn {
  padding: 0.3rem 0.75rem;
}

.pricing-lab-valley-plan-control strong,
.pricing-lab-valley-plan-control small {
  display: block;
}

.pricing-lab-valley-plan-control strong {
  color: inherit;
  font-weight: 500;
}

.pricing-lab-valley-plan-control small {
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
  font-weight: 400;
}

.pricing-lab-valley-plan-control .active small {
  color: var(--text-secondary);
}

.pricing-lab-valley .pricing-lab-valley-price-row {
  align-items: center;
  margin: 0;
  padding: 0.75rem 0.35rem;
}

.pricing-lab-valley .pricing-lab-valley-price {
  gap: 0.1rem;
}

.pricing-lab-valley .pricing-lab-valley-price > div {
  gap: 0.35rem;
}

.pricing-lab-valley .pricing-lab-valley-price .display-6 {
  letter-spacing: -0.05em;
  line-height: 1;
}

.pricing-lab-valley .pricing-lab-valley-price span,
.pricing-lab-valley .pricing-lab-valley-price small {
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
}

.pricing-lab-valley .pricing-lab-valley-billing {
  display: flex;
  min-width: 250px;
  background: rgba(35, 37, 37, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 3px;
  font-size: var(--emailx-font-base);
}

.pricing-lab-valley .pricing-lab-valley-billing .seg-btn {
  align-items: center;
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  line-height: 1;
}

.pricing-lab-valley .pricing-lab-valley-billing .seg-btn.active {
  background: rgba(213, 219, 225, 0.1);
  box-shadow: none;
}

.pricing-lab-valley-billing .seg-btn span {
  color: var(--emailx-teal);
  font-size: 0.6rem;
  line-height: 1;
}

.pricing-lab-valley .pricing-lab-valley-allowances {
  display: block;
  margin-bottom: 0.65rem;
}

.pricing-lab-valley-allowances .emailx-members-table td {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.pricing-lab-valley-allowances .emailx-members-table td:last-child {
  width: 1%;
}

.pricing-lab-valley-allowances strong {
  color: var(--text-primary);
  font-size: var(--emailx-font-base);
}

.pricing-lab-valley-allowances small {
  font-size: var(--emailx-font-xs);
}

.pricing-lab-valley-allowances .emailx-avatar {
  color: var(--emailx-blue);
}

.pricing-lab-valley .pricing-lab-stepper {
  display: inline-grid;
  grid-template-columns: 1.9rem minmax(2rem, auto) 1.9rem;
  gap: 0.2rem;
  padding: 0;
  background: transparent;
  border: 0;
}

.pricing-lab-valley .pricing-lab-stepper-wide {
  grid-template-columns: 1.9rem minmax(4rem, auto) 1.9rem;
}

.pricing-lab-valley .pricing-lab-stepper .btn {
  min-height: 1.9rem;
  height: 1.9rem;
  padding: 0;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-color-light);
}

.pricing-lab-valley .pricing-lab-stepper .btn:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.pricing-lab-valley .pricing-lab-stepper output {
  align-items: center;
  display: flex;
  justify-content: center;
}

.pricing-lab-valley-comparison .emailx-members-table {
  table-layout: fixed;
}

.pricing-lab-valley-comparison .emailx-members-table td {
  width: 32%;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  text-align: center;
}

.pricing-lab-valley-comparison .emailx-members-table td:first-child {
  width: 30%;
  color: var(--text-secondary);
  text-align: left;
}

.pricing-lab-valley-comparison td:first-child i {
  width: 1.25rem;
  margin-right: 0.4rem;
  color: var(--text-muted);
  text-align: center;
}

.pricing-lab-valley-comparison td:last-child {
  color: var(--text-primary);
  border-left: 1px solid var(--border-color);
  width: 38% !important;
}

.pricing-lab-valley-comparison td:last-child .bi-check-lg {
  margin-left: 0.2rem;
  color: var(--emailx-teal);
}

.pricing-lab-comparison-heading td {
  color: var(--text-primary) !important;
  font-weight: 500;
}

.pricing-lab-comparison-heading td:first-child {
  color: transparent !important;
}

.pricing-lab-valley .pricing-lab-valley-cta {
  margin-top: 0.65rem;
}

.pricing-lab-valley .pricing-lab-valley-note {
  margin: 0.45rem 0 0;
}

.pricing-lab-walkthrough-outer {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.pricing-lab-walkthrough {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
}

.pricing-lab-walkthrough > strong {
  flex: 1;
  font-size: var(--emailx-font-base);
}

.pricing-lab-avatar-stack {
  display: flex;
  padding-left: 0.4rem;
}

.pricing-lab-avatar-stack .emailx-avatar {
  width: 34px;
  height: 34px;
  margin-left: -0.4rem;
  border: 2px solid var(--bg-surface);
}

.pricing-lab-simple-compare {
  padding: 1.5rem;
}

.pricing-lab-simple-compare .seg-btn small {
  color: var(--emailx-teal);
  display: block;
  font-size: var(--emailx-font-xs);
}

.channel-title {
  font-size: var(--emailx-font-md);
}

.pricing-lab-compare-price {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 0;
}

.pricing-lab-compare-price > div {
  align-items: baseline;
  display: flex;
  gap: 0.5rem;
}

.pricing-lab-compare-price > div > span {
  color: var(--text-secondary);
}

.pricing-lab-compare-price strong {
  color: var(--text-primary);
}

.pricing-lab-compare-price small {
  color: var(--text-muted);
}

.pricing-lab-compare-rows {
  border: 1px solid var(--border-color);
  border-radius: 9px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.pricing-lab-compare-rows > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) 1fr;
}

.pricing-lab-compare-rows > div + div {
  border-top: 1px solid var(--border-color);
}

.pricing-lab-compare-rows span,
.pricing-lab-compare-rows strong {
  padding: 0.8rem;
}

.pricing-lab-compare-rows span {
  border-right: 1px solid var(--border-color);
  color: var(--text-muted);
}

.pricing-lab-compare-rows strong {
  color: var(--text-primary);
  font-weight: 500;
}

.pricing-lab-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  padding: 0;
}

.pricing-lab-picker-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem;
}

.pricing-lab-picker-options button {
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  color: var(--text-secondary);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0.9rem;
  text-align: left;
}

.pricing-lab-picker-options button.active {
  background: var(--bg-elevated);
  border-color: var(--emailx-teal);
}

.pricing-lab-plan-icon {
  align-items: center;
  background: var(--bg-elevated);
  border-radius: 8px;
  color: var(--emailx-teal);
  display: flex;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.pricing-lab-picker-options strong,
.pricing-lab-picker-options small {
  display: block;
}

.pricing-lab-picker-options strong {
  color: var(--text-primary);
}

.pricing-lab-picker-options small {
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
}

.pricing-lab-picker-summary {
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
}

.pricing-lab-picker-summary h3 {
  color: var(--text-primary);
  margin: 0;
}

.pricing-lab-picker-summary .pricing-lab-card-price {
  margin: 0;
}

.pricing-lab-picker-summary ul {
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  padding: 0;
}

.pricing-lab-picker-summary li {
  display: flex;
  gap: 0.5rem;
}

.pricing-lab-picker-summary li i {
  color: var(--emailx-teal);
}

.pricing-lab-preview-message {
  color: var(--emailx-teal);
  font-size: var(--emailx-font-compact);
  margin-top: 0.5rem;
  text-align: center;
}

@media (max-width: 991.98px) {
  .pricing-lab-gallery,
  .pricing-lab-plan-grid,
  .pricing-lab-native-grid,
  .pricing-lab-picker {
    grid-template-columns: 1fr;
  }

  .pricing-lab-concept-card:last-child {
    grid-column: auto;
  }

  .pricing-lab-plan-card.featured {
    transform: none;
  }

  .pricing-lab-native-summary,
  .pricing-lab-picker-summary {
    border-left: 0;
    border-top: 1px solid var(--border-color);
  }
}

@media (max-width: 575.98px) {
  .pricing-lab-intro,
  .pricing-lab-valley-price-row,
  .pricing-lab-compare-price {
    align-items: stretch;
    flex-direction: column;
  }

  .pricing-lab-concept-card {
    align-items: stretch;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .pricing-lab-concept-card .btn {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }

  .pricing-lab-modal .modal-dialog {
    --bs-modal-margin: 0.5rem;
    --bs-modal-width: calc(100vw - 1rem);
  }

  .pricing-lab-valley-shell {
    padding: 0.65rem;
  }

  .pricing-lab-valley-billing {
    min-width: 0;
    width: 100%;
  }

  .pricing-lab-valley-pickers {
    width: 100%;
  }

  .pricing-lab-valley-allowances {
    grid-template-columns: 1fr;
  }

  .pricing-lab-valley-table > div {
    grid-template-columns: 0.72fr 1fr 1fr;
  }

  .pricing-lab-valley-table span,
  .pricing-lab-valley-table strong {
    font-size: var(--emailx-font-xs);
    padding: 0.45rem;
  }

  .pricing-lab-valley .pricing-lab-valley-body {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .pricing-lab-walkthrough {
    flex-wrap: wrap;
  }

  .pricing-lab-walkthrough .btn {
    flex: 1 0 100%;
    width: 100%;
    justify-content: center;
  }

  .pricing-lab-picker-options button {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .pricing-lab-picker-options button > span:last-child {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-nav-item,
  .feedback-dashboard-link,
  .feedback-sort-btn,
  .feedback-icon-action,
  .feedback-create-button,
  .feedback-submit-button,
  .feedback-public-item,
  .feedback-public-vote,
  .feedback-modal-backdrop,
  .feedback-modal-card,
  .feedback-identity-card {
    transition: none;
  }
}

/* LinkedIn import UX option prototypes */
.linkedin-import-preview {
  min-height: calc(100vh - 9rem);
}

.linkedin-import-preview-shell {
  display: grid;
  grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.linkedin-import-preview-sidebar,
.linkedin-import-option-panel,
.linkedin-import-recap-card,
.linkedin-import-review-panel,
.linkedin-import-workspace {
  border: 1px solid var(--border-color);
  background: rgba(35, 37, 37, 0.42);
  border-radius: 8px;
}

.linkedin-import-preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  position: sticky;
  top: 1rem;
}

.linkedin-import-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.linkedin-import-metric,
.linkedin-import-review-stat {
  border: 1px solid rgba(213, 219, 225, 0.12);
  background: rgba(213, 219, 225, 0.04);
  border-radius: 8px;
  padding: 0.75rem;
  min-width: 0;
}

.linkedin-import-metric span,
.linkedin-import-review-stat span,
.linkedin-import-review-stat small {
  color: var(--text-muted);
  display: block;
  font-size: var(--emailx-font-compact);
}

.linkedin-import-metric strong,
.linkedin-import-review-stat strong {
  color: var(--text-primary);
  display: block;
  font-size: var(--emailx-font-title);
  font-weight: 650;
  line-height: 1.2;
  margin-top: 0.25rem;
}

.linkedin-import-review-stat.strong {
  background: rgba(76, 212, 169, 0.08);
  border-color: rgba(76, 212, 169, 0.22);
}

.linkedin-import-note {
  align-items: flex-start;
  color: var(--text-muted);
  display: flex;
  font-size: var(--emailx-font-compact);
  gap: 0.5rem;
  line-height: 1.45;
}

.linkedin-import-note.compact {
  max-width: 34rem;
}

.linkedin-import-preview-main {
  min-width: 0;
}

.linkedin-import-option-tabs {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
}

.linkedin-import-option-tab {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text-muted);
  display: inline-flex;
  gap: 0.5rem;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.5rem 0.75rem;
}

.linkedin-import-option-tab:hover,
.linkedin-import-option-tab.active {
  background: rgba(213, 219, 225, 0.1);
  color: var(--text-primary);
}

.linkedin-import-option-panel {
  display: none;
  padding: 1rem;
}

.linkedin-import-option-panel.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.linkedin-import-option-header,
.linkedin-import-review-header,
.linkedin-import-review-footer,
.linkedin-import-workspace-summary {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.linkedin-import-current-flow {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
}

.linkedin-import-upload-box {
  align-items: center;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  min-height: 12rem;
  padding: 1rem;
}

.linkedin-import-recap-card,
.linkedin-import-review-panel,
.linkedin-import-workspace {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.linkedin-import-compact-stats,
.linkedin-import-evaluation,
.linkedin-import-workspace-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.linkedin-import-review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.linkedin-import-preview-table {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.linkedin-import-preview-row {
  align-items: center;
  border-top: 1px solid rgba(213, 219, 225, 0.08);
  color: var(--text-primary);
  display: grid;
  font-size: var(--emailx-font-compact);
  gap: 0.75rem;
  grid-template-columns: 1.15fr 0.9fr 1.25fr minmax(7rem, 0.7fr);
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
}

.linkedin-import-preview-row:first-child {
  border-top: 0;
}

.linkedin-import-preview-row.head {
  background: rgba(213, 219, 225, 0.05);
  color: var(--text-muted);
  font-weight: 600;
}

.linkedin-import-preview-table.dense .linkedin-import-preview-row {
  grid-template-columns: 1fr 1fr 1fr minmax(7rem, 0.8fr);
}

.linkedin-import-workspace-steps {
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-bottom: 0.9rem;
}

.linkedin-import-workspace-steps span {
  align-items: center;
  color: var(--text-muted);
  display: inline-flex;
  font-size: var(--emailx-font-compact);
  gap: 0.4rem;
}

.linkedin-import-workspace-steps span.active {
  color: var(--text-primary);
}

.linkedin-import-workspace-body {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr);
}

.linkedin-import-column-map {
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-right: 1rem;
}

.linkedin-import-map-row {
  border: 1px solid rgba(213, 219, 225, 0.12);
  border-radius: 8px;
  padding: 0.65rem;
}

.linkedin-import-map-row span,
.linkedin-import-map-row strong {
  display: block;
  font-size: var(--emailx-font-compact);
}

.linkedin-import-map-row span {
  color: var(--text-muted);
}

.linkedin-import-map-row strong {
  color: var(--text-primary);
  margin-top: 0.2rem;
}

.linkedin-import-map-row.good {
  border-color: rgba(76, 212, 169, 0.22);
}

.linkedin-import-map-row.warn {
  border-color: rgba(245, 180, 90, 0.28);
}

.linkedin-import-workspace-table {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

@media (max-width: 1120px) {
  .linkedin-import-preview-shell,
  .linkedin-import-current-flow,
  .linkedin-import-workspace-body {
    grid-template-columns: 1fr;
  }

  .linkedin-import-preview-sidebar {
    position: static;
  }

  .linkedin-import-column-map {
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 0;
    padding-bottom: 1rem;
  }

  .linkedin-import-column-map > p {
    grid-column: 1 / -1;
  }

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

@media (max-width: 760px) {
  .linkedin-import-option-tabs,
  .linkedin-import-metric-grid,
  .linkedin-import-review-grid,
  .linkedin-import-column-map {
    grid-template-columns: 1fr;
  }

  .linkedin-import-option-header,
  .linkedin-import-review-header,
  .linkedin-import-review-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .linkedin-import-preview-row,
  .linkedin-import-preview-table.dense .linkedin-import-preview-row {
    align-items: start;
    grid-template-columns: 1fr;
  }
}

/* Native pricing concept overrides the wider import-workspace proportions. */
.pricing-lab-native-panel .pricing-lab-native-tabs {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: calc(100% - 2rem);
}

.pricing-lab-native-panel .pricing-lab-native-tabs .linkedin-import-option-tab {
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem;
}

.pricing-lab-native-controls .linkedin-import-review-grid {
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-lab-native-controls .linkedin-import-review-stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
}

@media (max-width: 575.98px) {
  .pricing-lab-native-panel .pricing-lab-native-tabs,
  .pricing-lab-native-controls .linkedin-import-review-grid {
    grid-template-columns: 1fr;
  }
}

/* Pricing gate: the reason card slides out to the left as the plan picker
   arrives from the right. Both share one grid cell so the modal never jumps. */
.cp-launch-progress {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--bg-surface);
}

.cp-launch-progress-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 32rem;
  padding: 2rem;
  text-align: center;
}

.pricing-gate-stack {
  display: grid;
  grid-template-areas: "stack";
  overflow: hidden;
}

.pricing-gate-step {
  grid-area: stack;
  transition:
    transform 0.45s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.3s ease-in-out,
    height 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform, opacity;
}

.pricing-gate-step.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
  visibility: visible;
}

/* Both steps share one grid cell, so an inactive step would otherwise keep the
   modal as tall as the plan picker. */
.pricing-gate-step:not(.active) {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

/* Where each step waits its turn: the reason card to the left, plans to the right. */
.pricing-gate-step[data-pricing-gate-step="reason"]:not(.active) {
  transform: translateX(-6%);
}

.pricing-gate-step-next:not(.active) {
  transform: translateX(6%);
}

@media (prefers-reduced-motion: reduce) {
  .pricing-gate-step { transition: opacity 0.2s ease-in-out; transform: none !important; }
}

/* The lock card is sized for a full page; inside the modal it only needs to
   hold a title, a line of copy and two buttons. */
.pricing-gate-step .channel-lock-left {
  min-height: auto;
  gap: 1.5rem;
  padding: 2rem 2rem 1.75rem;
  width: 100%;
}

.pricing-gate-step .channel-lock-title {
  font-size: var(--emailx-font-auth-title);
}

/* ── The modal shell ──────────────────────────────────────────────────────
   One compact header for every step: back chevron, icon, title, close. It never
   changes height, so the body can swap beneath it without the dialog jumping. */
.pricing-gate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
}

#pricingActivationModal .pricing-gate-header {
  border-bottom: 0 !important;
}

/* Keep the plan picker comfortable at tablet widths; Bootstrap's default
   500px dialog between 576px and 991px squeezes the billing controls. */
#pricingActivationModal .modal-dialog {
  --bs-modal-width: 920px;
  width: calc(100% - 3rem);
  max-width: var(--bs-modal-width);
  margin-right: auto;
  margin-left: auto;
}

#pricingActivationModal .pricing-lab-valley-price-row {
  flex-wrap: wrap;
  gap: 1rem;
}

#pricingActivationModal .pricing-lab-valley-price > div {
  flex-wrap: wrap;
}

#pricingActivationModal .pricing-lab-valley-allowances,
#pricingActivationModal .pricing-lab-valley-comparison {
  background: transparent;
  border: 0;
}

@media (max-width: 991.98px) {
  #pricingActivationModal .pricing-lab-valley-price-row {
    align-items: stretch;
    flex-direction: column;
  }

  #pricingActivationModal .pricing-lab-valley-pickers {
    width: 100%;
  }

  #pricingActivationModal .pricing-lab-valley-billing {
    flex: 1;
    min-width: 0;
  }

  #pricingActivationModal .pricing-lab-valley-plan-control .seg-btn,
  #pricingActivationModal .pricing-lab-currency-toggle,
  #pricingActivationModal .pricing-lab-valley-billing .seg-btn {
    min-height: 44px;
  }

  #pricingActivationModal .pricing-lab-stepper {
    grid-template-columns: 44px minmax(2rem, auto) 44px;
  }

  #pricingActivationModal .pricing-lab-stepper-wide {
    grid-template-columns: 44px minmax(4rem, auto) 44px;
  }

  #pricingActivationModal .pricing-lab-stepper .btn {
    height: 44px;
    min-height: 44px;
  }
}

@media (max-width: 575.98px) {
  #pricingActivationModal .modal-dialog {
    width: calc(100% - 1rem);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    height: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  #pricingActivationModal .pricing-lab-valley-shell {
    padding: 0;
  }

  #pricingActivationModal .pricing-lab-valley-plan-control small {
    display: none;
  }

  #pricingActivationModal .pricing-lab-valley-price-row {
    padding-right: 0;
    padding-left: 0;
    gap: 0.75rem;
  }

  #pricingActivationModal .pricing-lab-valley-price {
    text-align: left;
  }

  #pricingActivationModal .pricing-lab-valley-price > div {
    justify-content: flex-start;
  }

  #pricingActivationModal .pricing-lab-valley-reward-pill {
    margin-left: 0;
  }

  #pricingActivationModal .pricing-lab-valley-billing .seg-btn {
    padding-right: 0.35rem;
    padding-left: 0.35rem;
  }

  #pricingActivationModal .pricing-lab-valley-allowances .emailx-avatar {
    display: none;
  }

  #pricingActivationModal .pricing-lab-valley-allowances td {
    padding-right: 0;
    padding-left: 0;
    white-space: normal;
  }

  /* The price already states cost. Show the included benefits directly on
     phones, rather than repeating the three-column sales comparison. */
  #pricingActivationModal .pricing-lab-comparison-heading,
  #pricingActivationModal .pricing-lab-comparison-cost,
  #pricingActivationModal .pricing-lab-valley-comparison td:nth-child(2),
  #pricingActivationModal .pricing-lab-valley-comparison td:first-child span {
    display: none;
  }

  #pricingActivationModal .pricing-lab-valley-comparison td:first-child {
    width: 2rem;
    padding-left: 0;
    padding-right: 0;
  }

  #pricingActivationModal .pricing-lab-valley-comparison td:last-child {
    width: auto !important;
    border-left: 0;
    text-align: left;
    padding-right: 0;
    white-space: normal;
  }

  #pricingActivationModal .pricing-lab-valley-cta {
    min-height: 44px;
  }

  #pricingActivationModal .pricing-lab-valley-note {
    line-height: 1.5;
  }
}

.pricing-gate-header .modal-title {
  font-size: var(--emailx-font-md);
  font-weight: 500;
  margin: 0;
}

.pricing-gate-header-icon {
  font-size: var(--emailx-font-md);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.pricing-gate-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--emailx-font-md);
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pricing-gate-back:hover {
  background: hsl(210, 6%, 16%);
  color: whitesmoke;
}

/* ── Step 1: the reason card ──────────────────────────────────────────────
   Copy top-left, actions bottom-left, art on the right. No min-height here:
   the modal owns the height, and the page-sized card left a hole between the
   body copy and the buttons. */
.pricing-gate-reason {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  align-items: stretch;
  gap: 0;
}

.pricing-gate-step .channel-lock-left {
  min-height: auto;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 2rem 1.75rem;
  width: 100%;
  background-color: transparent;
}

.pricing-gate-step .channel-lock-title {
  font-size: var(--emailx-font-auth-title);
}

.pricing-gate-reason-art {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: hsl(210, 6%, 10%);
}

.pricing-gate-reason-art img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: cover;
  display: block;
}

@media (max-width: 720px) {
  .pricing-gate-reason { grid-template-columns: 1fr; }
  .pricing-gate-reason-art { display: none; }
}

/* Short factual lines under the body copy: sends used, reset date. */
.pricing-gate-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pricing-gate-facts li {
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.pricing-gate-facts li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  margin-top: 0.5em;
  opacity: 0.6;
}

/* ── Step 3: confirmation ─────────────────────────────────────────────────
   What changes on the left, what it costs on the right. */
.pricing-gate-confirm {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 720px) {
  .pricing-gate-confirm { grid-template-columns: 1fr; }
}

.pricing-gate-confirm-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pricing-gate-confirm-card,
.pricing-gate-summary {
  padding: 1.25rem;
}

.pricing-gate-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.pricing-gate-summary-divider {
  height: 1px;
  background: hsl(210, 6%, 19%);
  margin: 0.9rem 0;
}

/* The one block that stops a support ticket: what this change takes away. */
.pricing-gate-loss {
  padding: 1rem 1.15rem;
  border-radius: 10px;
  background: hsl(35, 80%, 10%);
  border: 1px solid hsl(35, 65%, 22%);
  color: hsl(35, 90%, 72%);
  font-size: var(--emailx-font-sm);
}

.pricing-gate-loss i {
  font-size: var(--emailx-font-md);
  flex-shrink: 0;
  margin-top: 0.1em;
}

/* ── LinkedIn account rows past the plan's seat count ──────────────────────
   Listed so the customer can see the account is still connected, dimmed so it
   never reads as selectable. Clicking opens the plan modal. ── */
.email-dropdown-item.li-account-excluded {
  opacity: 0.55;
  cursor: pointer;
}
.email-dropdown-item.li-account-excluded:hover {
  opacity: 0.8;
}
.email-dropdown-item.li-account-excluded .email-text-sub {
  color: var(--emailx-warning, hsl(35, 90%, 72%));
}

/* ── Campaign-style status badge, shared ──────────────────────────────────
   Was page-scoped in linkedin_campaigns.html; billing needs the same pill for
   a cancelled subscription, so the base and the neutral variant live here. ── */
.status-badge-campaign {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.1rem 0.6rem;
  border-radius: 20px;
  width: fit-content;
  flex-shrink: 0;
}

/* Neutral, not danger: a cancelled plan still works until the period ends,
   and red would tell the customer something is broken when nothing is. Same
   grey as .status-draft, which is the other "nothing is wrong here" state. */
.status-cancelled {
  background-color: rgba(108, 117, 125, 0.15);
  border: 1px solid var(--bs-secondary, hsl(208, 7%, 46%));
  color: var(--bs-secondary, hsl(208, 7%, 46%));
}

/* Owner-only action ---------------------------------------------------------
   A control an invited teammate can see but not use. It keeps its shape and
   its tooltip (so no `disabled` attribute, which would kill pointer events and
   with them the explanation), and simply stops responding. Dimmed the same way
   a locked sidebar item is, so "not yours" reads consistently across the app.
*/
.emailx-action-locked {
  opacity: 0.45;
  cursor: not-allowed;
}
.emailx-action-locked:hover,
.emailx-action-locked:focus,
.emailx-action-locked:active {
  opacity: 0.45;
  box-shadow: none;
}
.emailx-action-locked .fa-lock {
  font-size: var(--emailx-font-compact);
}

/* ── Import recap card (LinkedIn lead import + CSV import confirmation) ── */
.import-recap-card {
  background: rgba(35, 37, 37, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.import-recap-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.import-recap-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(213, 219, 225, 0.08);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.import-recap-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.import-recap-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: var(--emailx-font-compact);
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 768px) {
  .import-recap-header {
    flex-direction: column;
  }
}

/* ── Compose panel (inbox reply; same framing as the side modal's preview panel) ── */
.emailx-compose-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.012);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.emailx-compose-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid var(--border-color);
}

.emailx-compose-row.top {
  background-color: rgba(255, 255, 255, 0.05);
}

.emailx-compose-label {
  min-width: 3rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
}

.emailx-compose-value {
  min-width: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: var(--emailx-font-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emailx-compose-body {
  padding: 0.25rem;
}

/* ── Shared flat application shell ── */
.app-main:has(.emailx-page-shell) {
  height: 100vh;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

.emailx-page-shell {
  display: flex;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
}

.emailx-pagebar {
  position: relative;
  z-index: 1010;
  display: flex;
  width: 100%;
  height: 50px;
  min-height: 50px;
  flex: 0 0 50px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--emailx-app-canvas);
}

.emailx-page-shell > main {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

.emailx-pagebar-identity,
.emailx-pagebar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
}

.emailx-pagebar-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color-light);
  border-radius: 6px;
  color: var(--text-primary);
  background: transparent;
}

.emailx-page-body {
  width: 100%;
  min-width: 0;
  margin-right: auto;
  margin-left: auto;
  padding: 1rem;
}

.emailx-page-body--narrow { max-width: var(--emailx-content-narrow); }
.emailx-page-body--standard { max-width: var(--emailx-content-standard); }
.emailx-page-body--wide { max-width: var(--emailx-content-wide); }
.emailx-page-body--full { max-width: none; }

.emailx-template-editor-page #templateForm {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.emailx-page-body--flush {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

/* Campaign people picker: People workspace table with persistent pagination. */
.emailx-contact-picker-body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden !important;
  background: var(--emailx-app-canvas);
}

.emailx-contact-picker-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.75rem 0.65rem;
}

.emailx-contact-picker-toolbar {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  min-height: 46px;
  margin: 0;
  padding: 0.35rem 0.75rem 0.65rem;
  overflow: visible;
}

.emailx-contact-picker-dataset {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.emailx-contact-picker-dataset > i {
  color: var(--text-muted);
}

.emailx-contact-picker-form,
.emailx-contact-picker-workspace,
.emailx-contact-picker-table-wrap {
  min-height: 0;
  flex: 1 1 auto;
}

.emailx-contact-picker-form {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.emailx-contact-picker-workspace {
  display: flex;
}

.emailx-contact-picker-workspace .emailx-contact-picker-table-wrap {
  height: 100%;
  margin: 0;
  overflow: auto;
  border-top: 1px solid var(--border-color);
  border-right: 0;
  border-bottom: 1px solid var(--border-color);
  border-left: 0;
  border-radius: 0;
  background: transparent;
}

.emailx-contact-picker-table {
  margin: 0;
  background: transparent;
}

.emailx-contact-picker-table > :not(caption) > * > * {
  background: transparent;
  box-shadow: none;
}

.emailx-contact-picker-table.contacts-crm-table th {
  background: var(--emailx-app-canvas) !important;
}

.emailx-contact-picker-table-wrap.is-scrolled-y .emailx-contact-picker-table.contacts-crm-table th,
.emailx-contact-picker-table-wrap.is-scrolled-x .emailx-contact-picker-table.contacts-crm-table .contacts-person-column {
  background: var(--emailx-app-canvas) !important;
}

.emailx-contact-picker-table-wrap.is-scrolled-x .emailx-contact-picker-table.contacts-crm-table tbody tr.selected .contacts-person-column {
  background: rgb(30, 31, 31) !important;
}

.emailx-contact-picker-table tbody tr.selected > * {
  background: rgba(255, 255, 255, 0.045) !important;
}

.emailx-contact-picker-table [data-column="name"] { --contacts-column-width: 320px; }
.emailx-contact-picker-table [data-column="email"] { --contacts-column-width: 250px; }
.emailx-contact-picker-table [data-column="title"] { --contacts-column-width: 240px; }
.emailx-contact-picker-table [data-column="company"] { --contacts-column-width: 220px; }
.emailx-contact-picker-table [data-column="linkedin"] { --contacts-column-width: 280px; }
.emailx-contact-picker-table [data-column="campaigns"] { --contacts-column-width: 240px; }

.emailx-contact-picker-table .contacts-person-cell {
  cursor: pointer;
}

.emailx-contact-picker-pagination {
  display: flex;
  min-height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0.45rem 0.75rem;
  background: var(--emailx-app-canvas);
}

.emailx-contact-picker-pagination .dropdown-menu {
  min-width: 150px;
}

.emailx-contact-picker-page .contacts-filter-row:not(.has-filter-field) #pickerClearFilterBtn {
  grid-column: 4;
  justify-self: end;
}

@media (max-width: 767.98px) {
  .emailx-contact-picker-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .emailx-contact-picker-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .emailx-contact-picker-toolbar-actions {
    width: 100%;
  }

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

  .emailx-contact-picker-pagination > div {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.emailx-core-list-page {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.emailx-table-scroll-page {
  height: 100%;
  min-height: 0;
  overflow: hidden !important;
}

.emailx-table-scroll-page > .emailx-data-table-wrap {
  height: 0;
  min-height: 0;
  flex: 1 1 0;
  overflow-x: auto !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

.emailx-table-scroll-page .emailx-resource-table-shell {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.emailx-viewport-workspace {
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.emailx-page-intro {
  margin-bottom: 1rem;
}

.emailx-page-intro > :last-child {
  margin-bottom: 0;
}

/* ── LinkedIn accounts V2: flat, simple database layout ── */
.linkedin-accounts-v2-page {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  overflow-x: clip;
}

.linkedin-accounts-v2-content {
  min-width: 0;
}

.linkedin-accounts-v2-toolbar {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
}

.linkedin-accounts-v2-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.linkedin-accounts-v2-fields-menu label {
  gap: 0.5rem;
  cursor: pointer;
}

.linkedin-accounts-v2-menu {
  min-width: 180px;
  padding: 0 !important;
  border: 0;
  background: transparent;
}

.linkedin-accounts-v2-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: transparent;
}

#linkedinAccountsTableWrap .emailx-action-menu {
  z-index: 1040;
}

.linkedin-accounts-v2-grid {
  min-width: 980px;
  table-layout: fixed;
  background: transparent;
}

.linkedin-accounts-v2-grid th:nth-child(1) { width: 21%; }
.linkedin-accounts-v2-grid th:nth-child(2) { width: 24%; }
.linkedin-accounts-v2-grid th:nth-child(3) { width: 32%; }
.linkedin-accounts-v2-grid th:nth-child(4) { width: 15%; }
.linkedin-accounts-v2-grid th:nth-child(5) { width: 8%; }

.linkedin-accounts-v2-grid th,
.linkedin-accounts-v2-grid td {
  border-right: 1px solid var(--border-color);
}

.linkedin-accounts-v2-grid th:last-child,
.linkedin-accounts-v2-grid td:last-child {
  border-right: 0;
}

.linkedin-accounts-v2-grid th {
  height: 38px;
  background: transparent;
}

.linkedin-accounts-v2-grid td {
  height: 62px;
  background: transparent;
}

.linkedin-accounts-v2-grid tbody tr:last-child td {
  border-bottom: 1px solid var(--border-color);
}

.linkedin-accounts-v2-grid.linkedin-accounts-hide-email th:nth-child(2),
.linkedin-accounts-v2-grid.linkedin-accounts-hide-email td:nth-child(2),
.linkedin-accounts-v2-grid.linkedin-accounts-hide-headline th:nth-child(3),
.linkedin-accounts-v2-grid.linkedin-accounts-hide-headline td:nth-child(3),
.linkedin-accounts-v2-grid.linkedin-accounts-hide-status th:nth-child(4),
.linkedin-accounts-v2-grid.linkedin-accounts-hide-status td:nth-child(4) {
  display: none;
}

.linkedin-accounts-v2-column-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.emailx-table-column-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.emailx-table-column-label i {
  color: var(--text-muted);
  font-size: 0.85em;
}

.linkedin-accounts-v2-column-label i {
  color: var(--text-muted);
}

.linkedin-accounts-v2-empty {
  min-height: 320px;
  padding: 2rem;
}

.linkedin-accounts-v3-table-wrap {
  margin: 0;
}

.linkedin-accounts-v3-content {
  max-width: 1120px;
}

.linkedin-accounts-v3-grid {
  min-width: 1040px;
  table-layout: fixed;
}

.linkedin-accounts-v3-grid th:nth-child(1) { width: 21%; }
.linkedin-accounts-v3-grid th:nth-child(2) { width: 26%; }
.linkedin-accounts-v3-grid th:nth-child(3) { width: 28%; }
.linkedin-accounts-v3-grid th:nth-child(4) { width: 14%; }
.linkedin-accounts-v3-grid th:nth-child(5) { width: 11%; }

.linkedin-accounts-v3-grid td {
  min-width: 0;
  height: auto;
  min-height: 62px;
}

.linkedin-accounts-v3-grid [data-account-email-cell] span,
.linkedin-accounts-v3-grid [data-account-headline-cell] span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.linkedin-accounts-v3-grid [data-account-email-cell] > div {
  min-width: 0;
}

.linkedin-accounts-v3-grid th:last-child,
.linkedin-accounts-v3-grid td:last-child {
  padding-right: 1.25rem;
}

/* ── LinkedIn account sending limits (/linkedin_accounts_2) ──
   Name, email, owner, plan, weekly invites, status, actions. */
.linkedin-limits-grid th:nth-child(1) { width: 21%; }
.linkedin-limits-grid th:nth-child(2) { width: 18%; }
.linkedin-limits-grid th:nth-child(3) { width: 15%; }
.linkedin-limits-grid th:nth-child(4) { width: 10%; }
.linkedin-limits-grid th:nth-child(5) { width: 16%; }
.linkedin-limits-grid th:nth-child(6) { width: 13%; }
.linkedin-limits-grid th:nth-child(7) { width: 7%; }

.linkedin-limits-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 11rem;
}

.linkedin-limits-warn {
  color: rgb(245, 180, 90);
}

.linkedin-limits-full {
  color: rgb(235, 59, 59);
}

.linkedin-limits-modal .modal-header {
  padding: 1rem;
}

.linkedin-limits-modal .modal-body {
  padding-top: 1.25rem;
}

.linkedin-limits-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.linkedin-limits-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.linkedin-limits-input-row .form-control {
  width: 6.5rem;
  flex-shrink: 0;
}

.linkedin-limits-usage {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.linkedin-limits-campaigns {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.linkedin-limits-campaigns li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
}

.linkedin-limits-campaigns li + li {
  border-top: 1px solid var(--border-color);
}

.linkedin-limits-summary {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.linkedin-limits-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
}

.linkedin-limits-summary > div + div {
  border-top: 1px solid var(--border-color);
}

.linkedin-limits-summary dt {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
}

.linkedin-limits-summary dd {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--emailx-font-sm);
  font-variant-numeric: tabular-nums;
}

.linkedin-limits-summary .is-total dt {
  color: var(--text-primary);
}

.linkedin-limits-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: hsl(35, 80%, 10%);
  border: 1px solid hsl(35, 65%, 22%);
  color: hsl(35, 90%, 72%);
}

.linkedin-limits-warning i {
  flex-shrink: 0;
  margin-top: 0.1em;
}

@media (max-width: 767.98px) {
  .app-main:has(.emailx-page-shell) {
    height: calc(100dvh - 53px);
  }

  .emailx-viewport-workspace {
    height: auto;
  }

  .linkedin-accounts-v2-toolbar {
    align-items: flex-start;
    flex-direction: column;
    overflow-x: auto;
  }

  .linkedin-accounts-v2-empty {
    min-height: 360px;
    padding: 1.25rem;
  }

  .linkedin-accounts-v3-table-wrap {
    margin: 0;
  }
}

/* ── LinkedIn accounts structure whiteboard ── */
.app-main:has(.liw-page) {
  overflow-x: hidden;
}

.liw-page {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 1rem;
  overflow-x: hidden;
}

.liw-whiteboard-header,
.liw-object-bar,
.liw-concept-note,
.liw-view-bar,
.liw-list-toolbar,
.liw-detail-heading,
.liw-card-heading,
.liw-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.liw-concept-switch {
  align-self: flex-start;
  width: min(100%, 1050px);
}

.liw-concept-switch .seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  white-space: nowrap;
}

.liw-stage,
.liw-concept,
.liw-canvas {
  min-width: 0;
}

.liw-concept-note {
  min-height: 58px;
  padding: .7rem .85rem;
  border: 1px solid var(--border-color);
  border-bottom: 0;
  background: rgba(255, 255, 255, .018);
}

.liw-recommendation {
  display: inline-flex;
  margin-bottom: .35rem;
  color: var(--emailx-teal);
  font-size: var(--emailx-font-xs);
  font-weight: 600;
}

.liw-canvas {
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.liw-canvas-edge,
.liw-canvas-split {
  min-height: min(640px, calc(100vh - 220px));
}

.liw-object-bar {
  min-height: 58px;
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.liw-object-title,
.liw-person {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .65rem;
}

.liw-object-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color-light);
  border-radius: 6px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, .04);
}

.liw-grid {
  margin: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.liw-grid-row,
.liw-data-row,
.liw-calculation-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.15fr) minmax(210px, 1.25fr) minmax(260px, 1.6fr) minmax(140px, .75fr) minmax(82px, .45fr);
  min-width: 980px;
}

.liw-grid-row > div,
.liw-data-row > div {
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  padding: .65rem .8rem;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.liw-grid-row > div:last-child,
.liw-data-row > div:last-child {
  justify-content: flex-end;
  border-right: 0;
}

.liw-grid-row:last-child > div,
.liw-data-row:last-of-type > div {
  border-bottom: 0;
}

.liw-grid-head > div,
.liw-data-head > div {
  min-height: 38px;
  gap: .45rem;
  padding-top: .45rem;
  padding-bottom: .45rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  font-weight: 500;
  background: rgba(255, 255, 255, .035);
}

.liw-grid-head i,
.liw-data-head i,
.liw-detail-fields dt i,
.liw-card-fields dt i {
  color: var(--text-muted);
}

.liw-cell-stack {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .15rem;
}

.liw-cell-stack strong,
.liw-cell-stack span,
.liw-grid-row > div,
.liw-data-row > div {
  overflow: hidden;
  text-overflow: ellipsis;
}

.liw-cell-stack strong {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
}

.liw-cell-stack span,
.liw-muted-value {
  color: var(--text-muted) !important;
  font-size: var(--emailx-font-compact);
}

.liw-view-bar {
  min-height: 50px;
  padding: .5rem .8rem;
  border-bottom: 1px solid var(--border-color);
}

.liw-view-actions {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.liw-data-grid {
  overflow-x: auto;
}

.liw-shared-table-shell {
  width: auto;
  margin: 1rem;
}

.liw-shared-table-shell .emailx-table-header-cell i {
  color: var(--text-muted);
}

.liw-data-row > div {
  min-height: 46px;
  padding-top: .45rem;
  padding-bottom: .45rem;
}

.liw-data-row .emailx-avatar {
  width: 24px;
  height: 24px;
}

.liw-calculation-row {
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
}

.liw-calculation-row span {
  min-height: 38px;
  padding: .65rem .8rem;
  border-right: 1px solid var(--border-color);
}

.liw-split {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(430px, 1.4fr);
  min-height: 520px;
}

.liw-account-list {
  border-right: 1px solid var(--border-color);
}

.liw-list-toolbar {
  min-height: 44px;
  padding: .4rem .65rem .4rem .85rem;
  border-bottom: 1px solid var(--border-color);
}

.liw-account-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
  align-items: center;
  gap: .7rem;
  padding: .75rem .85rem;
  border: 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  background: transparent;
  text-align: left;
}

.liw-account-option:hover,
.liw-account-option.is-active {
  background: rgba(255, 255, 255, .055);
}

.liw-account-option.is-active {
  box-shadow: inset 2px 0 0 var(--emailx-teal);
}

.liw-account-option > i {
  color: var(--text-muted);
}

.liw-account-detail {
  padding: 1.15rem;
}

.liw-detail-heading {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.liw-detail-fields,
.liw-card-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 1rem 0 0;
}

.liw-detail-fields > div,
.liw-card-fields > div {
  min-width: 0;
  padding: .75rem;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.liw-detail-fields > div:nth-child(2n),
.liw-card-fields > div:nth-child(2n) {
  border-right: 0;
}

.liw-detail-fields dt,
.liw-card-fields dt {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .35rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-xs);
  font-weight: 500;
}

.liw-detail-fields dd,
.liw-card-fields dd {
  margin: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: var(--emailx-font-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.liw-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1rem;
}

.liw-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  padding: 1rem;
}

.liw-account-card {
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, .018);
}

.liw-card-heading {
  align-items: flex-start;
  min-height: 76px;
  padding: .85rem;
  border-bottom: 1px solid var(--border-color);
}

.liw-card-fields {
  grid-template-columns: 1fr;
  margin: 0;
}

.liw-card-fields > div,
.liw-card-fields > div:nth-child(2n) {
  border-right: 0;
}

.liw-card-footer {
  justify-content: flex-end;
  padding: .65rem .85rem;
}

@media (max-width: 991.98px) {
  .liw-concept-switch {
    align-self: stretch;
    overflow-x: auto;
  }

  .liw-concept-switch .seg-btn {
    min-width: max-content;
  }

  .liw-grid {
    overflow-x: auto;
  }

  .liw-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .liw-whiteboard-header,
  .liw-object-bar,
  .liw-concept-note,
  .liw-view-bar,
  .liw-detail-heading,
  .liw-card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .liw-canvas {
    min-height: 0;
  }

  .liw-canvas-edge,
  .liw-canvas-split {
    min-height: 560px;
  }

  .liw-object-bar .btn,
  .liw-whiteboard-header .btn {
    width: 100%;
    justify-content: center;
  }

  .liw-view-actions {
    width: 100%;
    overflow-x: auto;
  }

  .liw-split {
    grid-template-columns: 1fr;
  }

  .liw-account-list {
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .liw-account-detail {
    padding: .85rem;
  }

  .liw-detail-fields {
    grid-template-columns: 1fr;
  }

  .liw-detail-fields > div,
  .liw-detail-fields > div:nth-child(2n) {
    border-right: 0;
  }

  .liw-detail-actions {
    flex-direction: column;
  }
}
.ig50-launch { max-width: 560px; margin: 0 auto; padding: 24px 8px 12px; text-align: center; }
.ig50-kicker { display: inline-flex; padding: 6px 10px; border: 1px solid hsl(210 8% 28%); border-radius: 999px; color: hsl(210 8% 72%); font-size: 12px; margin-bottom: 20px; }
.ig50-variant { display: none; }
.ig50-variant.active { display: block; }
.ig50-variant h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.035em; }
.ig50-variant p { color: hsl(210 6% 68%); margin: 0 auto 24px; max-width: 470px; }
.ig50-plan-card { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; margin: 0 0 16px; border: 1px solid hsl(210 8% 25%); border-radius: 12px; background: hsl(210 8% 25%); text-align: left; }
.ig50-plan-card > div { display: flex; flex-direction: column; gap: 4px; padding: 15px 16px; background: hsl(210 8% 10%); }
.ig50-plan-card span { color: hsl(210 6% 60%); font-size: 12px; }
.ig50-plan-card strong { color: hsl(0 0% 98%); font-size: 16px; }
.ig50-plan-card s { color: hsl(210 6% 55%); font-weight: 400; margin-right: 6px; }
.ig50-change-plan { border: 0; background: transparent; color: hsl(210 8% 72%); font-size: 13px; margin: 13px 0 7px; text-decoration: underline; text-underline-offset: 3px; }
.ig50-fineprint { margin: 0; color: hsl(210 6% 55%); font-size: 12px; }
@media (max-width: 575px) { .ig50-launch { padding-top: 10px; } .ig50-plan-card { grid-template-columns: 1fr; } }

/* ── LinkedIn step attachments (step 4 message cards, /styleguide) ── */
/* Header paperclip: sits with Preview/Delete; neutral hover instead of Preview's teal */
.attachment-header-button { min-width: 32px; padding: 0 .5rem; }
/* Step delete button uses the Emailx tooltip; keep it the same size as the paperclip */
.node-delete-btn.emailx-icon-btn { width: 32px; height: 32px; }
.node-preview-btn.attachment-header-button:hover,
.node-preview-btn.attachment-header-button:focus-visible {
  background: rgba(213, 219, 225, .06);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}
.attachment-footer-control { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; margin: .65rem 0; }
.attachment-file-list { display: grid; gap: .45rem; margin-top: .8rem; }
.attachment-file-list:empty { display: none; }
.attachment-file {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  border: 1px solid var(--border-color);
  background: rgba(213, 219, 225, .035);
  border-radius: 7px;
  padding: .45rem .6rem;
}
.attachment-file-icon { color: var(--text-muted); font-size: var(--emailx-font-title); }
.attachment-file-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.attachment-file-name { color: var(--text-primary); font-size: var(--emailx-font-compact); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.attachment-file-meta { color: var(--text-muted); font-size: var(--emailx-font-xs); }
.attachment-file-actions { display: flex; flex-shrink: 0; gap: .2rem; }
.attachment-file-actions button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: 5px;
  padding: .2rem .35rem;
  font-size: var(--emailx-font-xs);
}
.attachment-file-actions button:hover,
.attachment-file-actions button:focus-visible { background: rgba(213, 219, 225, .09); color: var(--text-primary); }
.attachment-file-actions button:disabled { opacity: .45; }
.attachment-progress { height: 2px; background: var(--border-color); border-radius: 2px; margin-top: .25rem; overflow: hidden; }
.attachment-progress::before { content: ''; display: block; width: 55%; height: 100%; background: var(--emailx-teal); animation: attachment-progress-slide .65s ease-in-out infinite alternate; }
@keyframes attachment-progress-slide { from { transform: translateX(-40%); } to { transform: translateX(130%); } }
.attachment-step-note { margin: .75rem 0 0 !important; color: var(--text-muted); font-size: var(--emailx-font-xs); }
@media (max-width: 600px) { .attachment-file-actions button { padding: .3rem; } }

/* ── Interface language offer (base.html, utils/i18n.py) ── */
.emailx-locale-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.emailx-locale-offer-copy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.emailx-locale-offer-copy > .bi-translate {
  color: var(--text-secondary);
}

.emailx-locale-offer-actions {
  display: flex;
  gap: 0.5rem;
}

.emailx-locale-offer-actions form {
  margin: 0;
}

/* ── Autosave status (e.g. Profile header) ── */
.emailx-save-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.25rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.emailx-save-status[data-state="saved"] {
  color: var(--text-secondary);
}

.emailx-save-status[data-state="failed"] {
  color: var(--bs-danger);
}

/* Single selects (ui.single_select, reply owner) sit in rows of .form-control
   fields: same padding, type size and height as the styleguide Form Field. */
[data-emailx-select] .email-select-trigger {
  min-height: 0;
  padding: 0.625rem 2.5rem 0.625rem 0.875rem;
  font-size: var(--emailx-font-md);
  line-height: 1.5;
}

/* Fixed-height buttons are single-line by design; longer labels (Italian runs
   ~25% longer) must not wrap inside them. Containers wrap between buttons. */
.btn.fixed-height {
  white-space: nowrap;
}


/* ── Record drawer ──
   The side panel for one person: /people (contacts.html) and the LinkedIn
   campaign page. Open with .contacts-crm-workspace.has-drawer (people) or
   .is-open on the drawer itself. */
.contacts-record-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1060;
    width: min(560px, 100vw);
    height: 100vh;
    min-width: 0;
    overflow: hidden;
    border-left: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--emailx-dropdown-surface) !important;
    box-shadow: -18px 0 38px rgba(0, 0, 0, 0.34);
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

.contacts-crm-workspace.has-drawer .contacts-record-drawer,
.contacts-record-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.contacts-record-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 64px;
    padding: 1.25rem 1.75rem;
}

.contacts-record-drawer-body {
    overflow: auto;
    padding: 1.25rem 1.5rem;
}

.contacts-record-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.contacts-record-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.contacts-record-tabs {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.contacts-record-tab {
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 0.55rem 0;
    color: var(--text-secondary);
    background: transparent;
    font-size: var(--emailx-font-base);
    transition: color 0.14s ease, border-color 0.14s ease;
}

.contacts-record-tab.active,
.contacts-record-tab[aria-selected="true"] {
    color: var(--text-primary);
    border-bottom-color: currentColor;
}

.contacts-record-panel[hidden] {
    display: none;
}

.contacts-record-section {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    overflow: hidden;
}

.contacts-record-section + .contacts-record-section {
    margin-top: 0.85rem;
}

.contacts-record-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 38px;
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--emailx-font-compact);
}

.contacts-record-fields {
    display: grid;
    gap: 0;
}

.contacts-record-field {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    min-height: 36px;
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid var(--border-color);
}

.contacts-record-field:last-child {
    border-bottom: 0;
}

.contacts-record-field-label {
    color: var(--text-secondary);
    font-size: var(--emailx-font-compact);
}

.contacts-record-field-value {
    min-width: 0;
    color: var(--text-primary);
    font-size: var(--emailx-font-base);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.contacts-record-field-value.cw-field-value {
    display: block;
    width: 100%;
    min-height: 28px;
    border-radius: 6px;
    padding: 0.28rem 0.35rem;
    outline: none;
    transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

.contacts-record-field-value.cw-field-value:hover,
.contacts-record-field-value.cw-field-value:focus {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px var(--border-color-light);
}

.contacts-record-field-value a {
    color: var(--emailx-blue);
    text-decoration: underline;
    text-decoration-color: rgba(116, 169, 255, 0.35);
    text-underline-offset: 3px;
}

.contacts-record-empty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 64px;
    padding: 0.75rem;
    color: var(--text-secondary);
    font-size: var(--emailx-font-compact);
}

.contacts-record-empty i {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.035);
}

.contacts-record-timeline {
    display: grid;
    gap: 0;
}

.contacts-record-event {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--emailx-font-base);
}

.contacts-record-event .small {
    font-size: var(--emailx-font-compact);
}

.contacts-record-event:last-child {
    border-bottom: 0;
}

.contacts-record-event-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.035);
}

.contacts-record-note {
    padding: 0.75rem;
    color: var(--text-primary);
    font-size: var(--emailx-font-base);
    line-height: 1.5;
    white-space: pre-wrap;
}

.contacts-record-research {
    display: grid;
    gap: 0.85rem;
    padding: 0.75rem;
}

.contacts-record-research-about {
    color: var(--text-primary);
    font-size: var(--emailx-font-base);
    line-height: 1.55;
    white-space: pre-wrap;
}

.contacts-record-research-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.contacts-record-research-meta-item {
    min-width: 0;
}

.contacts-record-research-meta-label {
    display: block;
    color: var(--text-secondary);
    font-size: var(--emailx-font-compact);
    margin-bottom: 0.2rem;
}

.contacts-record-research-meta-value {
    display: block;
    color: var(--text-primary);
    font-size: var(--emailx-font-base);
}

.contacts-record-research-footer {
    color: var(--text-secondary);
    font-size: var(--emailx-font-compact);
}

.contacts-record-footer {
    position: relative;
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.contacts-record-field.is-hidden {
    display: none;
}

@media (max-width: 1100px) {
  .contacts-record-drawer {
    width: min(520px, 100%);
  }
}

/* ── Guided tour (static/js/emailx-tour.js) ──
   The app's one tooltip tour, for "How it works" and every page tour
   (CoachMarks). The page dims around a bright spotlight that glides between
   steps; a thin progress line, an icon chip in the title, a crisp ring.
   Catalogued on /styleguide. */
.emailx-tour {
  --tour-dim: rgba(5, 6, 7, 0.62);
  --tour-ease: cubic-bezier(0.16, 1, 0.3, 1);
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}

.emailx-tour-shield {
  position: fixed;
  inset: 0;
  pointer-events: auto;
}

/* Everything outside the spotlight dims; the target stays at full brightness. */
.emailx-tour-spotlight {
  position: fixed;
  pointer-events: none;
  border-radius: 10px;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.4), 0 0 0 200vmax var(--tour-dim);
  opacity: 0;
  transition:
    top 0.45s var(--tour-ease), left 0.45s var(--tour-ease),
    width 0.45s var(--tour-ease), height 0.45s var(--tour-ease),
    border-radius 0.45s var(--tour-ease), opacity 0.3s ease;
}

.emailx-tour.is-open .emailx-tour-spotlight { opacity: 1; }
.emailx-tour.is-closing .emailx-tour-spotlight,
.emailx-tour.is-closing .emailx-tour-card { opacity: 0; }

.emailx-tour-card {
  position: fixed;
  pointer-events: auto;
  width: 360px;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  border: 1px solid var(--border-color-light);
  border-radius: 12px;
  background: var(--emailx-dropdown-surface) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  font-size: var(--emailx-font-base);
  transition: opacity 0.28s ease, transform 0.28s var(--tour-ease);
}

.emailx-tour-card.is-entering,
.emailx-tour-card.is-leaving {
  opacity: 0;
  transform: translateY(6px) scale(0.985);
}

.emailx-tour-card.is-leaving { pointer-events: none; }

.emailx-tour-bar {
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.emailx-tour-bar span {
  display: block;
  height: 100%;
  background: var(--text-primary);
  transition: width 0.4s var(--tour-ease);
}

.emailx-tour-body { padding: 1rem 2.5rem 0.9rem 1.25rem; }

.emailx-tour-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  font-size: var(--emailx-font-md);
}

.emailx-tour-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color-light);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  font-size: var(--emailx-font-sm);
}

.emailx-tour-text {
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
  line-height: 1.55;
}

.emailx-tour-text b,
.emailx-tour-text strong { color: var(--text-primary); font-weight: 400; }

.emailx-tour-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  border-top: 1px solid var(--border-color);
}

.emailx-tour-count {
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
  font-variant-numeric: tabular-nums;
}

.emailx-tour-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.emailx-tour-actions button,
.emailx-tour-close {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.emailx-tour-back:hover,
.emailx-tour-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.emailx-tour-actions .emailx-tour-next {
  padding: 0.4rem 0.85rem;
  background: var(--text-primary);
  color: var(--bg-primary);
}

.emailx-tour-actions .emailx-tour-next:hover { background: var(--accent-primary); }

.emailx-tour-close {
  position: absolute;
  top: 0.65rem;
  right: 0.6rem;
  padding: 0.3rem 0.4rem;
  font-size: var(--emailx-font-xs);
}

@media (prefers-reduced-motion: reduce) {
  .emailx-tour-spotlight,
  .emailx-tour-card,
  .emailx-tour-bar span { transition: none; }
}


/* ── Pulse ring ──
   The live "working" ring: /linkedin-campaigns/create launch log, /onboarding,
   the LinkedIn campaign page feed. Size it per use. */
.mc-pulse-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(76, 212, 169, 0.15);
    border: 2px solid var(--emailx-teal);
    flex-shrink: 0;
    position: relative;
    transition: background 0.4s ease, border-color 0.4s ease;
}
.mc-pulse-ring.pulsing::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--emailx-teal);
    opacity: 0;
    animation: mc-pulse 1.8s ease-in-out infinite;
}
.mc-pulse-ring.done-ring {
    background: rgba(76, 212, 169, 0.35);
    border-color: var(--emailx-teal);
    animation: mc-ring-burst 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes mc-pulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    70%  { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1.6); opacity: 0; }
}
@keyframes mc-ring-burst {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════════
   Campaign page ("cp-"): shared by the LinkedIn and email campaign pages.
   Markup: templates/components/campaign_page.html. Behaviour:
   static/js/campaign-page.js. Normal weight throughout: hierarchy comes
   from size and colour. Generic names (sentiment-badge, filter-btn,
   skeleton-cell, detail-item) are scoped to .cp-page because older pages
   define their own versions.
   ═══════════════════════════════════════════════════════════════════════ */
/* Tokens on :root: the drawer and modals render outside .cp-page. */
:root {
  --cp-card-bg: linear-gradient(145deg, rgba(35, 37, 37, 0.55), rgba(27, 28, 28, 0.55));
  --cp-card-solid: hsl(180, 3%, 12%);
  --cp-soft: rgba(213, 219, 225, 0.06);
  --cp-teal-soft: rgba(76, 212, 169, 0.12);
  --cp-teal-line: rgba(76, 212, 169, 0.35);
  --cp-blue-soft: rgba(116, 169, 255, 0.14);
  --cp-blue-line: rgba(116, 169, 255, 0.45);
  --cp-warning: rgb(255, 193, 7);
}

.cp-page {
  font-size: var(--emailx-font-base);
}

/* ── Header, as on the campaign page ── */
.cp-page .status-active {
  background-color: var(--cp-teal-soft);
  border: 1px solid var(--emailx-teal);
  color: var(--emailx-teal);
}

.cp-page .status-paused {
  background-color: rgba(255, 193, 7, 0.15);
  border: 1px solid var(--cp-warning);
  color: var(--cp-warning);
}

.cp-page .status-draft {
  background-color: rgba(108, 117, 125, 0.15);
  border: 1px solid var(--bs-secondary, rgb(108, 117, 125));
  color: var(--bs-secondary, rgb(108, 117, 125));
}

.cp-page .status-completed {
  background-color: var(--cp-blue-soft);
  border: 1px solid var(--emailx-blue);
  color: var(--emailx-blue);
}

/* The name edits in place, like fields on /people and /profile. */
.cp-name {
  align-self: flex-start;
  max-width: 100%;
  margin-left: -0.35rem !important;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  outline: none;
  overflow-wrap: anywhere;
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

.cp-name:hover,
.cp-name:focus {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--border-color-light);
}

/* ── Tabs ── */
.cp-tabs {
  align-self: flex-start;
  margin: 0 0.5rem;
}

.cp-tabs .seg-btn,
.cp-subtabs .seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.cp-tab-count {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.cp-panel {
  padding: 0 0.5rem;
  animation: cp-in 0.2s ease-out;
}

@keyframes cp-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ── Cards and grid ── */
.cp-card {
  background: var(--cp-card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  min-width: 0;
}

.cp-card-title {
  color: var(--text-primary);
  font-size: var(--emailx-font-md);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.cp-card-kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.cp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.cp-main,
.cp-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.cp-draft-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

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

/* ── Chips ── */
.cp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.cp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  white-space: nowrap;
}

.cp-chip--strong {
  border-color: transparent;
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.cp-chip--live {
  border-color: var(--cp-teal-line);
  background: var(--cp-teal-soft);
  color: var(--emailx-teal);
}

.cp-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emailx-teal);
  animation: cp-live 1.8s ease-out infinite;
  flex-shrink: 0;
}

@keyframes cp-live {
  0% { box-shadow: 0 0 0 0 rgba(76, 212, 169, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(76, 212, 169, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 212, 169, 0); }
}

/* ── Journey: what happens next, step by step ──
   Neutral finished steps with a small check, one lifted card for the step in
   progress, quiet steps ahead. Every surface is opaque, so the rail never
   shows through an icon or the current card. */
.cp-journey-card {
  background: var(--cp-card-solid);
}

.cp-journey-card .cp-card-title {
  font-size: var(--emailx-font-title);
  margin-bottom: 0.25rem;
}

.cp-journey {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cp-journey-step {
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  display: flex;
  gap: 0.9rem;
  padding: 0.65rem 0.75rem;
  margin: 0 -0.75rem;
  border-radius: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .cp-journey-step { transition: none; }
}

/* The rail: from under this icon to the top of the next step. */
.cp-journey-step:not(:last-child)::after {
  content: '';
  position: absolute;
  z-index: 0;
  left: calc(0.75rem + 17px);
  top: calc(0.65rem + 36px);
  bottom: -0.65rem;
  width: 2px;
  background: var(--border-color);
}

.cp-journey-step.is-done:not(:last-child)::after {
  background: var(--border-color-light);
}

.cp-journey-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color-light);
  border-radius: 10px;
  background: var(--cp-card-solid);
  color: var(--text-secondary);
}

.cp-journey-check {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--cp-card-solid);
  border-radius: 50%;
  background: var(--emailx-teal);
  color: var(--bg-primary);
  font-size: var(--emailx-font-xs);
}

.cp-journey-step.is-now {
  z-index: 2;
  margin: 0.4rem -1.4rem;
  padding: 1rem 1.4rem;
  background: hsl(210, 5%, 17%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--border-color-light);
}

.cp-journey-step.is-now::after {
  left: calc(1.4rem + 17px);
  top: calc(1rem + 36px);
  bottom: 1rem;
}

.cp-journey-step.is-now .cp-journey-icon {
  border-color: var(--cp-blue-line);
  background: hsl(217, 30%, 22%);
  color: var(--emailx-blue);
}

.cp-journey-step.is-next .cp-journey-icon,
.cp-journey-step.is-next .cp-journey-body {
  opacity: 0.4;
}

.cp-journey-body {
  min-width: 0;
  padding-top: 0.1rem;
}

.cp-journey-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-weight: 400;
}

.cp-journey-sub {
  margin-top: 0.1rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
}

.cp-now {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--emailx-blue);
  font-size: var(--emailx-font-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Live activity feed (same look as the launch log) ── */
.cp-feed-card {
  padding: 0;
  overflow: hidden;
}

.cp-feed-footer {
  padding: 1rem;
  text-align: center;
}

.cp-feed-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.mc-pulse-ring.cp-feed-ring {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
}

.cp-feed {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.75rem 0.75rem;
  max-height: 560px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.cp-feed-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
}

.cp-feed-row.is-new {
  animation: cp-row-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cp-row-in {
  from { opacity: 0; transform: translateY(-6px); background: var(--cp-teal-soft); }
  to { opacity: 1; transform: none; }
}

.cp-feed-row--skeleton .skeleton-cell {
  width: 70%;
}

.cp-feed-row--empty {
  justify-content: center;
  padding: 1.5rem 0.5rem;
  color: var(--text-secondary);
}

.cp-feed-icon {
  flex: 0 0 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--cp-soft);
  color: var(--text-secondary);
}

.cp-feed-icon--invited,
.cp-feed-icon--written,
.cp-feed-icon--written_many,
.cp-feed-icon--sent { color: var(--emailx-blue); background: var(--cp-blue-soft); }
.cp-feed-icon--bounced { color: var(--emailx-red, rgb(255, 76, 67)); background: rgba(255, 76, 67, 0.1); }
.cp-feed-icon--accepted,
.cp-feed-icon--replied { color: var(--emailx-teal); background: var(--cp-teal-soft); }

.cp-feed-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cp-feed-line {
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-feed-sub,
.cp-feed-time {
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
}

.cp-feed-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-feed-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cp-avatar-stack {
  display: flex;
}

.cp-avatar-stack .emailx-avatar {
  width: 24px;
  height: 24px;
  margin-left: -6px;
  border: 2px solid var(--bg-surface);
  font-size: var(--emailx-font-xs);
}

.cp-avatar-stack .emailx-avatar:first-child {
  margin-left: 0;
}

/* A person's name opens their details, as on /people. */
.cp-person-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cp-person-link:hover,
.cp-person-link:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(213, 219, 225, 0.55);
}

/* Stages, as the campaign page's engagement table shows them. */
:is(.cp-page, .cp-drawer) .sentiment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: var(--emailx-font-xs);
  white-space: nowrap;
}

:is(.cp-page, .cp-drawer) .sentiment-badge.positive {
  background: var(--cp-teal-soft);
  border: 1px solid var(--cp-teal-line);
  color: var(--emailx-teal);
}

:is(.cp-page, .cp-drawer) .sentiment-badge.negative {
  background: rgba(255, 76, 67, 0.1);
  border: 1px solid rgba(255, 76, 67, 0.3);
  color: var(--emailx-red, rgb(255, 76, 67));
}

:is(.cp-page, .cp-drawer) .sentiment-badge.neutral {
  background: rgba(116, 169, 255, 0.1);
  border: 1px solid rgba(116, 169, 255, 0.3);
  color: var(--emailx-blue);
}

:is(.cp-page, .cp-drawer) .sentiment-badge.warning {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: var(--cp-warning);
}

/* ── Today: segmented meters ── */
.cp-page [data-meter] + [data-meter] {
  margin-top: 0.9rem;
}

.cp-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
  font-size: var(--emailx-font-sm);
  font-variant-numeric: tabular-nums;
}

.cp-meter-bar {
  display: flex;
  gap: 3px;
}

.cp-meter-bar span {
  flex: 1;
  height: 6px;
  border-radius: 2px;
  background: var(--cp-soft);
  transition: background-color 0.4s ease;
}

.cp-meter-bar span.is-on {
  background: var(--emailx-teal);
}

/* ── Forecast ── */
.cp-forecast-rows {
  margin: 0 0 0.6rem;
}

.cp-forecast-rows div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-color);
}

.cp-forecast-rows div:last-child {
  border-bottom: 0;
}

.cp-forecast-rows dt {
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
  font-weight: 400;
}

.cp-forecast-rows dd {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--emailx-font-title);
  font-variant-numeric: tabular-nums;
}

/* ── Results phase: stat tiles ── */
.cp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cp-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--cp-card-bg);
  color: inherit;
  text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cp-stat:hover,
.cp-stat:focus-visible {
  outline: none;
  border-color: var(--border-color-light);
  background: var(--cp-soft);
}

.cp-stat-value {
  font-size: var(--emailx-font-auth-title);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

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

/* ── People lists ── */
.cp-people-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-person {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.4rem 0;
}

.cp-person-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cp-kv {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: var(--emailx-font-sm);
}

.cp-kv:last-child {
  border-bottom: 0;
}

.cp-kv > span:first-child {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.cp-kv > span:last-child {
  min-width: 0;
  color: var(--text-primary);
  text-align: right;
}

.cp-kv--block {
  flex-direction: column;
  gap: 0.3rem;
}

.cp-kv--block > span:last-child {
  color: var(--text-secondary);
  text-align: left;
  white-space: pre-line;
}

/* People table: scrolls sideways inside its card on narrow screens. */
.cp-page .contact-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cp-page .table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
}

.cp-page .table-container .emailx-resource-table {
  min-width: 760px;
}

@media (max-width: 767.98px) {
  .cp-page .table-container .emailx-resource-table.cp-people-table {
    min-width: 0;
    table-layout: fixed;
  }

  .cp-people-table th:first-child {
    width: 55%;
  }

  .cp-page .cp-people-table th {
    position: static;
  }

  .cp-people-table .sentiment-badge {
    max-width: 100%;
    white-space: normal;
  }
}

.cp-page .filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cp-page .filter-btn:hover,
.cp-page .filter-btn.active {
  border-color: var(--cp-teal-line);
  background: var(--cp-teal-soft);
  color: var(--emailx-teal);
}

.cp-page .filter-btn span {
  color: inherit;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.cp-page .skeleton-cell {
  display: block;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: cp-shimmer 1.5s infinite;
}

@keyframes cp-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Settings: the campaign editor's panels, settings first ── */
.cp-settings-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cp-subtabs {
  align-self: flex-start;
}

/* Settings save on their own; this says where they stand. */
.cp-save-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  min-height: 1.2rem;
}

.cp-save-status.is-error {
  color: var(--emailx-red, rgb(255, 76, 67));
}

/* Information rows: the campaign page's Details rows (icon, label, value)
   drawn like the builder's review summary-row, without a background. */
.cp-page .details-content {
  display: flex;
  flex-direction: column;
}

.cp-page .detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
}

.cp-page .detail-item:last-child {
  border-bottom: 0;
}

.cp-page .detail-item--block {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.cp-page .detail-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: var(--emailx-font-sm);
}

.cp-page .detail-value {
  color: var(--text-primary);
  text-align: right;
}

/* ── Person drawer: the /people record drawer, plus the sequence timeline ── */
.cp-drawer .contacts-record-event.is-planned {
  opacity: 0.55;
}

.cp-drawer-message {
  margin-top: 0.4rem;
}

.cp-drawer-wait {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem;
  padding: 0.45rem 0.65rem;
  border: 1px dashed var(--border-color-light);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
}

.cp-drawer-planned {
  margin-left: auto;
  padding: 0.05rem 0.45rem;
  border-radius: 5px;
  background: var(--cp-soft);
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
}

.cp-bubble {
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: var(--cp-soft);
  color: var(--text-primary);
  font-size: var(--emailx-font-sm);
  line-height: 1.5;
  white-space: pre-wrap;
}

.cp-bubble--out {
  background: var(--cp-blue-soft);
}

@media (prefers-reduced-motion: reduce) {
  .cp-live-dot,
  .cp-feed-row.is-new,
  .cp-panel,
  .cp-page .skeleton-cell {
    animation: none;
  }
}

/* Delete in the ⋯ menu: the chip menu's hover, in the danger colour. */
.pg-menu-chip.cp-menu-danger:hover {
  color: var(--emailx-red, rgb(255, 76, 67));
}

/* Impersonation stays outside the page flow and below dialogs. */
.emailx-impersonation {
  position: fixed;
  right: 20px;
  bottom: 64px;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: .4rem;
  max-width: calc(100vw - 24px);
  padding: .4rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--emailx-dropdown-bg);
  color: var(--text-primary);
  font-size: var(--emailx-font-compact);
  box-shadow: 0 6px 20px rgb(0 0 0 / 15%);
}
.emailx-impersonation-identity { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.emailx-impersonation-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emailx-impersonation-identity > .emailx-text-secondary { white-space: nowrap; }
.emailx-impersonation-action { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 32px; min-width: 32px; flex-shrink: 0; font-size: var(--emailx-font-compact); }
.emailx-impersonation { cursor: grab; touch-action: none; }
.emailx-impersonation:focus-visible { outline: 2px solid var(--text-secondary); outline-offset: 2px; }
.emailx-impersonation-action { cursor: pointer; touch-action: manipulation; }
.emailx-impersonation-toggle { min-width: 24px; min-height: 28px; padding: .15rem; }
.emailx-impersonation.is-dragging { user-select: none; cursor: grabbing; }
.emailx-impersonation.is-collapsed .emailx-impersonation-identity,
.emailx-impersonation.is-collapsed .emailx-impersonation-exit-label { display: none; }
@media (max-width: 767.98px) {
  .emailx-impersonation { right: 12px; }
  .emailx-impersonation-identity { flex-direction: column; align-items: flex-start; gap: 0; }
  .emailx-impersonation-action { min-width: 32px; min-height: 32px; }
  .emailx-impersonation-toggle { min-width: 28px; min-height: 32px; }
}

.qualification-hint {
  color: inherit;
  opacity: 0.65;
  font-size: var(--emailx-font-compact);
  font-weight: 400;
}

/* Shared campaign Interest indicators reuse LinkedIn Fit. */
/* Fit: three bars, like signal strength. */
.lcp-fit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--emailx-font-xs);
  white-space: nowrap;
}

.lcp-fit-bars {
  display: inline-flex;
  gap: 2px;
}

.lcp-fit-bars span {
  width: 3px;
  height: 11px;
  border-radius: 1px;
  background: var(--border-color-light);
}

.lcp-fit--high { color: var(--emailx-teal); }
.lcp-fit--medium { color: var(--cp-warning); }
.lcp-fit--low { color: var(--text-muted); }
.lcp-fit--high .lcp-fit-bars span,
.lcp-fit--medium .lcp-fit-bars span:nth-child(-n+2),
.lcp-fit--low .lcp-fit-bars span:first-child { background: currentColor; }

/* Reply notifications field (ui.reply_owner_select + EmailXUI.replyRouting). */
.reply-routing-routes:empty {
  display: none;
}

.reply-routing-routes {
  margin-top: 0.75rem;
}

.reply-routing-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.5rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--border-color);
  font-size: var(--emailx-font-sm);
}

.reply-routing-row:first-child {
  border-top: 0;
}

.reply-routing-row .emailx-avatar {
  width: 26px;
  height: 26px;
}

.reply-routing-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.reply-routing-name,
.reply-routing-dest {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-routing-name {
  color: var(--text-primary);
  font-size: var(--emailx-font-sm);
}

.reply-routing-dest {
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
}

.reply-routing-invite {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-size: var(--emailx-font-compact);
}

.reply-routing-note {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--emailx-font-compact);
}

/* Invite team members modal (components/invite_modal.html). */
.invite-context-note {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  color: var(--text-secondary);
  font-size: var(--emailx-font-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.invite-email-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  background-color: rgba(67, 68, 68, 0.14);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.375rem 0.5rem;
  min-height: 38px;
  cursor: text;
  transition: border-color 0.2s ease;
}

.invite-email-container:focus-within {
  border-color: var(--accent-primary);
}

.invite-email-container.has-error {
  border-color: var(--emailx-red);
}

.invite-email-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: rgba(213, 219, 225, 0.12);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: var(--emailx-font-compact);
  max-width: 100%;
}

.invite-email-pill.invalid {
  background-color: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.5);
  color: var(--emailx-red);
}

.invite-email-pill .pill-remove {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--emailx-font-xs);
  line-height: 1;
  display: flex;
  align-items: center;
}

.invite-email-pill .pill-remove:hover {
  color: var(--text-primary);
}

.invite-email-pill .pill-warn {
  font-size: var(--emailx-font-xs);
  color: var(--emailx-red);
}

#inviteEmailInput {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: var(--emailx-font-sm);
  min-width: 140px;
  flex: 1;
  padding: 0.1rem 0.25rem;
}

#inviteEmailInput::placeholder,
#user-message::placeholder {
  color: var(--text-muted);
  font-size: var(--emailx-font-sm);
}

/* ═══════════════════════════════════════════════════════════════════════
   Emailx for Agencies: workspace switcher (templates/components/agency_switcher.html)
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --agency-ramp: linear-gradient(90deg, rgb(255, 179, 148), rgb(255, 207, 115), rgb(133, 215, 189), rgb(138, 188, 245));
}
.agency-switcher { padding: 0 0.6rem; margin-bottom: 0.6rem; }
.agency-switcher-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.35rem 0.4rem;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
}
.agency-switcher-btn:hover, .agency-switcher-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.05); border-color: var(--border-color); }
.agency-switcher-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.agency-switcher-name, .agency-switcher-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agency-switcher-sub { color: var(--text-secondary); }
.agency-switcher-chevron { color: var(--text-secondary); }
.sidebar:not(.expanded) .agency-switcher-text,
.sidebar:not(.expanded) .agency-switcher-chevron { display: none; }
.sidebar:not(.expanded) .agency-switcher-btn { justify-content: center; }
.agency-avatar {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  font-size: var(--emailx-font-xs);
  font-weight: 600;
  color: rgb(18, 19, 19);
}
.agency-avatar--home { background: var(--agency-ramp); }
.agency-c-blue { background: rgb(138, 188, 245); }
.agency-c-teal { background: rgb(133, 215, 189); }
.agency-c-amber { background: rgb(255, 207, 115); }
.agency-c-violet { background: rgb(190, 170, 255); }
.agency-c-rose { background: rgb(255, 179, 148); }
.agency-c-green { background: rgb(170, 220, 140); }
.agency-c-slate { background: rgb(170, 178, 186); }
.agency-switcher-menu { width: 280px; padding: 0.4rem; border-radius: 12px; border: 1px solid var(--emailx-border-strong); background: var(--emailx-dropdown-bg); }
.agency-switcher-search { display: flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.5rem; margin: 0 0 0.25rem; width: 100%; color: var(--text-muted); border-bottom: 1px solid var(--border-color); }
.agency-switcher-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text-primary); }
.agency-switcher-item { display: flex; align-items: center; gap: 0.55rem; width: 100%; padding: 0.35rem 0.5rem; border: 0; border-radius: 7px; background: transparent; color: var(--text-secondary); text-align: left; }
.agency-switcher-item:hover { background: var(--emailx-dropdown-bg-hover); color: var(--text-primary); }
.agency-switcher-item.is-current { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); }
.agency-switcher-item[hidden] { display: none; }
.agency-switcher-label { display: block; color: var(--text-muted); padding: 0.4rem 0.5rem 0.15rem; }
.agency-switcher-divider { height: 1px; background: var(--border-color); margin: 0.3rem 0; }
.agency-switcher-empty { display: block; color: var(--text-muted); padding: 0.4rem 0.5rem; }
.agency-stale-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100vw - 2rem);
  padding: 0.6rem 0.75rem 0.6rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 207, 115, 0.4);
  background: var(--emailx-dropdown-bg);
  color: var(--text-primary);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.agency-color-line { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1900; pointer-events: none; }
.agency-switcher-add { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.4rem 0.5rem; }
.agency-switcher-setting { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.4rem 0.5rem; margin: 0; width: 100%; }

/* Agency switcher in the sidebar profile menu + Cmd+K palette */
.agency-profile-menu { min-width: 290px; }
.agency-menu { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.15rem 0; }
.agency-menu-head { display: flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0.5rem 0.45rem; }
.agency-menu-list { display: flex; flex-direction: column; gap: 0.1rem; max-height: 260px; overflow-y: auto; }
.agency-kbd { cursor: pointer; background: rgba(255, 255, 255, 0.06); color: var(--text-muted); border: 1px solid var(--border-color); border-radius: 5px; padding: 0 0.35rem; }
.agency-kbd:hover { color: var(--text-primary); }
.sidebar-user-avatar.agency-avatar-on-dark { color: rgb(18, 19, 19); font-weight: 600; font-size: var(--emailx-font-xs); }
.agency-palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 14vh 1rem 1rem;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.agency-palette-backdrop[hidden] { display: none; }
.agency-palette {
  width: min(620px, 100%);
  border-radius: 14px;
  border: 1px solid var(--emailx-border-strong);
  background-color: rgb(24, 25, 25);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.agency-palette-input { display: flex; align-items: center; gap: 0.6rem; width: 100%; margin: 0; padding: 0.9rem 1rem; border-bottom: 1px solid var(--border-color); color: var(--text-muted); }
.agency-palette-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font-size: var(--emailx-font-md); }
.agency-palette-input kbd, .agency-palette-foot kbd { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); border-radius: 4px; padding: 0 0.3rem; margin-right: 0.15rem; }
.agency-palette-body { max-height: 360px; overflow-y: auto; padding: 0.4rem; display: flex; flex-direction: column; }
.agency-palette-label { color: var(--text-muted); padding: 0.45rem 0.6rem 0.2rem; }
.agency-palette-row { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.45rem 0.6rem; border: 0; border-radius: 8px; background: transparent; color: var(--text-primary); text-align: left; }
.agency-palette-row i { width: 1.6rem; text-align: center; color: var(--text-secondary); }
.agency-palette-row { transition: background-color 0.12s ease; }
.agency-palette-row.is-selected { background: rgba(255, 255, 255, 0.07); }
.agency-palette-empty { padding: 0.9rem 0.6rem; color: var(--text-muted); }
.agency-palette-skeleton { pointer-events: none; }
.agency-palette-skeleton .agency-palette-skeleton-avatar { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 7px; }
.agency-palette-foot { display: flex; gap: 1rem; flex-wrap: wrap; padding: 0.55rem 1rem; border-top: 1px solid var(--border-color); color: var(--text-muted); }
.agency-menu a.agency-switcher-item { text-decoration: none; }
.agency-menu-label { display: block; color: var(--text-muted); padding: 0.35rem 0.6rem 0.15rem; }
.agency-menu-section { display: flex; flex-direction: column; gap: 0.05rem; padding: 0.1rem 0; }
.agency-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  text-decoration: none;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.agency-menu-item > i { width: 1.6rem; text-align: center; font-size: var(--emailx-font-base); }
.agency-menu-item:hover, .agency-menu-item:focus-visible { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); outline: none; }
.agency-menu-client.is-current { color: var(--text-primary); }
.agency-menu-client .bi-check2 { width: auto; color: var(--text-primary); }
.agency-menu-list { max-height: 248px; }

/* Add a client modal (components/agency_add_client_modal.html), Valley-style */
.ac-modal .modal-dialog { max-width: 460px; }
.ac-modal .modal-content {
  padding: 1.5rem 1.75rem 1.75rem;
  border-radius: 22px !important;
  overflow: hidden;
  border: 1px solid var(--emailx-border-strong);
  background: rgb(24, 25, 25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.ac-modal-top { position: relative; display: flex; justify-content: center; align-items: center; min-height: 36px; margin-bottom: 1.25rem; }
.ac-crumbs { display: flex; align-items: center; gap: 0.6rem; list-style: none; margin: 0; padding: 0; color: var(--text-muted); }
.ac-crumbs li { transition: color 0.2s ease; }
.ac-crumbs li.is-active { color: var(--text-primary); }
.ac-crumbs li.is-done { color: var(--text-secondary); }
.ac-crumbs i { font-size: var(--emailx-font-xs); }
.ac-modal-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ac-modal-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); }
.ac-modal-step { display: flex; flex-direction: column; }
.ac-modal-step.is-active { animation: ac-modal-in 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes ac-modal-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.ac-modal-icon {
  position: relative;
  align-self: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: var(--emailx-font-title);
  margin-bottom: 1rem;
}
.ac-modal-icon-badge { position: absolute; right: -3px; bottom: -3px; font-size: var(--emailx-font-base); color: var(--text-primary); background: rgb(24, 25, 25); border-radius: 50%; }
.ac-modal-title { text-align: center; font-size: var(--emailx-font-auth-title); font-weight: 500; color: var(--text-primary); margin: 0 0 0.4rem; }
.ac-modal-sub { text-align: center; color: var(--text-secondary); font-size: var(--emailx-font-base); margin: 0 0 1.5rem; }
.ac-modal-note { display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 1rem; padding: 0.7rem 0.85rem; border-radius: 10px; border: 1px solid var(--border-color); color: var(--text-secondary); background: rgba(255, 255, 255, 0.03); }
.ac-modal-error { color: var(--emailx-red); margin: 0.75rem 0 0; }
.ac-modal-team { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; }
.ac-modal-team li { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.1rem; border-top: 1px solid var(--border-color); }
.ac-modal-team li:first-child { border-top: 0; }
.ac-modal-person { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); border-radius: 50%; }
.ac-modal-plan-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.35rem 0; }
.ac-modal-plan-row[hidden] { display: none; }
.ac-modal-price { display: flex; align-items: baseline; gap: 0.35rem; margin-top: 0.75rem; }
.ac-modal-price [data-ac-partner] { font-size: var(--emailx-font-auth-title); font-weight: 500; }
/* "You" next to your own row in member tables (team, agency billing, mailboxes). */
.you-badge { font-size: var(--emailx-font-compact); padding: 1px 6px; }
.ac-partner-tag {
  padding: 0.15rem 0.55rem;
  font-size: var(--emailx-font-compact);
  color: var(--text-primary);
  border: 1px solid transparent;
  border-radius: 20px;
  /* Brand ramp as the border only: stands out without competing with the price. */
  background: linear-gradient(rgb(24, 25, 25), rgb(24, 25, 25)) padding-box, var(--agency-ramp) border-box;
}
.ac-modal-back { align-self: center; margin-top: 0.75rem; border: 0; background: transparent; color: var(--text-secondary); }
.ac-modal-back:hover { color: var(--text-primary); }
@media (prefers-reduced-motion: reduce) { .ac-modal-step.is-active { animation: none; } }

/* ── Knowledge (/knowledge): company profile, senders (profile, voice, conversation), sources ── */
.kn-studio {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.kn-panel {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.012);
  min-width: 0;
}
.kn-rail { position: sticky; top: 1rem; padding: 0.5rem; }
.kn-rail-label {
  margin: 0.75rem 0.5rem 0.35rem;
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kn-rail-label:first-child { margin-top: 0.35rem; }
.kn-rail-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.kn-rail-item:hover { background: rgba(213, 219, 225, 0.05); color: var(--text-primary); }
.kn-rail-item.active { background: rgba(213, 219, 225, 0.08); border-color: var(--border-color); color: var(--text-primary); }
.kn-rail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
}
.kn-rail-text { display: flex; flex-direction: column; min-width: 0; }
.kn-rail-name { color: inherit; font-size: var(--emailx-font-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kn-rail-meta { display: flex; align-items: center; gap: 0.35rem; color: var(--text-muted); font-size: var(--emailx-font-xs); }

.kn-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}
.kn-detail-title { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.kn-detail-body { padding: 1.25rem; }
.kn-tabs { padding: 0.75rem 1.25rem 0; }
.kn-section + .kn-section { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
.kn-section-label {
  margin-bottom: 0.85rem;
  color: var(--text-muted);
  font-size: var(--emailx-font-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kn-field + .kn-field { margin-top: 0.9rem; }
.kn-field .form-label { margin-bottom: 0.3rem; color: var(--text-secondary); font-size: var(--emailx-font-compact); }
.kn-hint { margin: -0.15rem 0 0.4rem; color: var(--text-muted); font-size: var(--emailx-font-xs); }
.kn-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.kn-grid-2 > .kn-field + .kn-field { margin-top: 0; }
.kn-grid-2 + .kn-field, .kn-field + .kn-grid-2 { margin-top: 0.9rem; }
/* Textareas grow with the text (knowledge.js autosize) up to a cap, then scroll. */
.kn-page textarea.form-control { font-size: var(--emailx-font-base); resize: none; max-height: 260px; overflow-y: auto; }
.kn-manual {
  margin-left: 0.35rem;
  color: var(--emailx-blue);
  font-size: var(--emailx-font-xs);
}
.kn-list { display: flex; flex-direction: column; gap: 0.5rem; }
.kn-list-row { display: flex; align-items: center; gap: 0.5rem; }
.kn-list-row > .form-control { flex: 1 1 auto; }
.kn-add {
  width: 100%;
  padding: 0.55rem;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
}
.kn-add:hover { border-color: var(--border-color-light); color: var(--text-primary); }
.kn-cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.kn-cases:empty { display: none; }
.kn-case { padding: 0.8rem 0.9rem; border: 1px solid var(--border-color); border-radius: 8px; background: rgba(255, 255, 255, 0.02); min-width: 0; }
.kn-case-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.kn-case-name { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.kn-case-result { color: var(--text-secondary); font-size: var(--emailx-font-compact); line-height: 1.5; white-space: pre-wrap; }

/* Quiet row actions: small, muted, full strength on hover. */
.kn-quiet-actions { display: flex; align-items: center; gap: 0.1rem; flex: 0 0 auto; opacity: 0.65; transition: opacity 0.15s ease; }
.kn-case:hover .kn-quiet-actions, .kn-source:hover .kn-quiet-actions, .kn-quiet-actions:focus-within { opacity: 1; }
.emailx-icon-btn.kn-quiet-btn {
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
}
.emailx-icon-btn.kn-quiet-btn i { font-size: var(--emailx-font-compact); }
.emailx-icon-btn.kn-quiet-btn:hover, .emailx-icon-btn.kn-quiet-btn:focus-visible { background: rgba(213, 219, 225, 0.06); color: var(--text-primary); }
.emailx-icon-btn.kn-quiet-btn.is-danger:hover, .emailx-icon-btn.kn-quiet-btn.is-danger:focus-visible { color: var(--emailx-red); }
/* The thin X from the campaign builder's tags. */
.kn-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
}
.kn-remove svg { width: 0.85rem; height: 0.85rem; fill: none; stroke: currentColor; stroke-width: 2; }
.kn-remove:hover, .kn-remove:focus-visible { background: rgba(220, 53, 69, 0.2); color: var(--text-primary); }

/* Setting row with a label, a description and a toggle (create_campaign_new's .preview-section). */
.kn-setting {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(35, 37, 37, 0.4);
}
.kn-setting label { cursor: pointer; }
.kn-setting-title { font-size: var(--emailx-font-md); }
.kn-setting.is-disabled { opacity: 0.55; }
.kn-source-options { display: flex; flex-direction: column; gap: 0.5rem; }
.kn-build-sample + .kn-build-sample { margin-top: 0.75rem; }
.kn-build-sample .form-label { color: var(--text-secondary); font-size: var(--emailx-font-compact); }

/* New voice progress: minimal, like the onboarding research row. */
.kn-progress-head { display: flex; align-items: center; gap: 0.75rem; }
.mc-pulse-ring.kn-progress-ring { width: 14px; height: 14px; border-width: 1.5px; }
.mc-pulse-ring.kn-progress-ring.is-stopped { border-color: var(--text-muted); background: transparent; }
.kn-progress-title { flex: 1 1 auto; min-width: 0; color: var(--text-primary); font-size: var(--emailx-font-md); }
.kn-progress-timer { color: var(--text-muted); font-size: var(--emailx-font-xs); font-variant-numeric: tabular-nums; }
.kn-progress-steps { display: flex; flex-direction: column; gap: 0.55rem; margin: 1.1rem 0 0 calc(14px + 0.75rem); }
.kn-progress-step { display: flex; align-items: center; gap: 0.55rem; color: var(--text-muted); font-size: var(--emailx-font-compact); opacity: 0.55; transition: opacity 0.3s ease; }
.kn-progress-step i { font-size: var(--emailx-font-xs); }
.kn-progress-step.is-active, .kn-progress-step.is-done { opacity: 1; }
.kn-progress-step.is-done i { color: var(--emailx-teal); }
.kn-progress-step.is-active span { animation: kn-shimmer-sweep 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.kn-progress-result { margin: 1.1rem 0 0 calc(14px + 0.75rem); }
/* Text shimmer (onboarding .ob-ai-line). */
.kn-shimmer, .kn-progress-step.is-active span {
  color: transparent;
  background-color: var(--text-muted);
  background-image: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.78) 50%, rgba(255, 255, 255, 0.06) 75%, transparent 100%);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.kn-shimmer { animation: kn-shimmer-sweep 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes kn-shimmer-sweep {
  0% { background-position: -200px center; }
  100% { background-position: calc(100% + 200px) center; }
}
@media (prefers-reduced-motion: reduce) {
  .kn-shimmer, .kn-progress-step.is-active span { animation: none; background-image: none; -webkit-text-fill-color: currentColor; color: var(--text-primary); }
}
.kn-empty { padding: 1.5rem 0.5rem; color: var(--text-muted); font-size: var(--emailx-font-sm); text-align: center; }

.kn-do-dont { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.kn-do-title, .kn-dont-title { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.6rem; font-size: var(--emailx-font-sm); }
.kn-do-title { color: var(--emailx-teal); }
.kn-dont-title { color: var(--emailx-red); }
.kn-card-field { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; gap: 0.5rem; }
.kn-card-field + .kn-card-field { margin-top: 0.45rem; }
.kn-card-field > span { color: var(--text-muted); font-size: var(--emailx-font-compact); }
.kn-sample { display: flex; align-items: flex-start; gap: 0.6rem; }
.kn-sample .kn-remove { margin-top: 0.35rem; }
.kn-sample + .kn-sample { margin-top: 0.5rem; }
.kn-sample textarea { flex: 1 1 auto; }
.kn-sample.is-excluded textarea { opacity: 0.5; }

.kn-convo { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.kn-chat { display: flex; flex-direction: column; min-height: 520px; }
.kn-chat-head { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-color); }
.kn-chat-log { display: flex; flex-direction: column; gap: 0.75rem; flex: 1 1 auto; max-height: 560px; overflow-y: auto; padding: 1rem; }
.kn-bubble {
  max-width: 82%;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: var(--emailx-font-sm);
  line-height: 1.55;
  white-space: pre-wrap;
}
.kn-bubble-kind { display: block; margin-bottom: 0.3rem; color: var(--text-muted); font-size: var(--emailx-font-xs); letter-spacing: 0.06em; text-transform: uppercase; white-space: normal; }
.kn-bubble-subject { display: block; margin-bottom: 0.35rem; font-weight: 600; white-space: normal; }
.kn-bubble--prospect { align-self: flex-end; background: rgba(101, 153, 255, 0.16); }
.kn-chat-note { align-self: center; color: var(--text-muted); font-size: var(--emailx-font-xs); text-align: center; }
.kn-chat-foot { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.85rem 1rem; border-top: 1px solid var(--border-color); }
.kn-chat-foot .kn-row { display: flex; gap: 0.5rem; }
.kn-chat-foot .form-control { flex: 1 1 auto; }
.kn-prospect p { margin-bottom: 0.5rem; }
.kn-finding { padding-left: 0.6rem; border-left: 2px solid var(--border-color); color: var(--text-secondary); font-size: var(--emailx-font-compact); }
.kn-finding + .kn-finding { margin-top: 0.5rem; }
.kn-steps { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
.kn-step { display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: var(--emailx-font-compact); }
.kn-step.is-sent { color: var(--text-primary); }
.kn-step.is-sent i { color: var(--emailx-teal); }

.kn-source { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.85rem 0; }
.kn-source + .kn-source { border-top: 1px solid var(--border-color); }
.kn-source-text { flex: 1 1 auto; min-width: 0; }
.kn-source-preview { color: var(--text-muted); font-size: var(--emailx-font-compact); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kn-dropzone {
  padding: 1.5rem 1rem;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: var(--emailx-font-compact);
  text-align: center;
  cursor: pointer;
}
.kn-dropzone.is-over { border-color: var(--accent-primary); color: var(--text-primary); }

@media (max-width: 1200px) {
  .kn-convo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .kn-studio { grid-template-columns: minmax(0, 1fr); }
  .kn-rail { position: static; }
  .kn-grid-2, .kn-do-dont, .kn-cases { grid-template-columns: minmax(0, 1fr); }
}
