    /* Instant paint when local inbox cache exists (see boot script after #inboxLeadList) */
    html.acq-inbox-swr #page-inbox .inbox-loading-state .inbox-loading-dots {
      display: none !important;
    }
    html.acq-inbox-swr #page-inbox .inbox-loading-state .inbox-loading-logo {
      animation: none !important;
    }
    .inbox-lead-item.acq-swr-shell {
      opacity: 1;
      pointer-events: none;
      cursor: default;
    }
    .inbox-lead-item.acq-swr-shell .thread-select-btn,
    .inbox-lead-item.acq-swr-shell .thread-star-btn {
      pointer-events: none;
      cursor: default;
    }
    /* Early inbox: full card chrome + shimmer bars (no bare email-address flash before real render). */
    .inbox-lead-item.acq-swr-shell .acq-skel-line {
      display: block;
      height: 0.55rem;
      border-radius: 4px;
      background: linear-gradient(
        90deg,
        var(--border-light) 0%,
        var(--border) 45%,
        var(--border-light) 90%
      );
      background-size: 200% 100%;
      animation: acq-skel-shimmer 1.1s ease-in-out infinite;
    }
    .inbox-lead-item.acq-swr-shell .acq-skel-line--email {
      width: 72%;
      max-width: 17rem;
    }
    .inbox-lead-item.acq-swr-shell .acq-skel-line--preview {
      width: 100%;
      max-width: 100%;
      margin-top: 0.12rem;
      opacity: 0.88;
      height: 0.5rem;
    }
    .inbox-lead-item.acq-swr-shell .acq-skel-line--meta {
      width: 55%;
      max-width: 12rem;
      height: 0.42rem;
      margin-top: 0.18rem;
      opacity: 0.75;
    }
    .inbox-lead-item.acq-swr-shell .acq-skel-line--preview-short {
      width: 78%;
      opacity: 0.72;
    }
    .inbox-lead-item.acq-swr-shell .acq-skel-preview-second {
      margin-top: 0.28rem;
    }
    .inbox-lead-item.acq-swr-shell .acq-skel-tags {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      margin-top: 0.42rem;
      margin-bottom: 0.08rem;
    }
    .inbox-lead-item.acq-swr-shell .acq-skel-pill {
      display: block;
      height: 1.05rem;
      width: 4.75rem;
      border-radius: 999px;
      background: linear-gradient(
        90deg,
        var(--border-light) 0%,
        var(--border) 45%,
        var(--border-light) 90%
      );
      background-size: 200% 100%;
      animation: acq-skel-shimmer 1.1s ease-in-out infinite;
    }
    .inbox-lead-item.acq-swr-shell .acq-skel-pill--sm {
      width: 3.35rem;
      opacity: 0.82;
    }
    .inbox-lead-item.acq-swr-shell .lead-card-meta {
      min-height: 0.45rem;
    }
    @keyframes acq-skel-shimmer {
      0% { background-position: 100% 0; }
      100% { background-position: -100% 0; }
    }
    [data-theme="dark"] .inbox-lead-item.acq-swr-shell .acq-skel-line {
      background: linear-gradient(90deg, #21262d 0%, #30363d 45%, #21262d 90%);
      background-size: 200% 100%;
    }
    [data-theme="dark"] .inbox-lead-item.acq-swr-shell .acq-skel-pill {
      background: linear-gradient(90deg, #21262d 0%, #30363d 45%, #21262d 90%);
      background-size: 200% 100%;
    }
    @media (prefers-reduced-motion: reduce) {
      .inbox-lead-item.acq-swr-shell .acq-skel-line {
        animation: none;
        background: var(--border);
        background-size: auto;
      }
      [data-theme="dark"] .inbox-lead-item.acq-swr-shell .acq-skel-line {
        background: #30363d;
      }
    }
    :root {
      --acquirely-blue: #1d9bf0;
      --acquirely-blue-deep: #0061ff;
      --acquirely-blue-soft: #e0f2ff;
      --bg: #fafafa;
      --bg-alt: #f6f9fc;
      --bg-card: #ffffff;
      --sidebar: #020617;
      --sidebar-hover: rgba(255,255,255,0.06);
      --accent: var(--acquirely-blue);
      --accent-hover: var(--acquirely-blue-deep);
      --accent-light: var(--acquirely-blue-soft);
      --text: #0a2540;
      --text-muted: #697386;
      --border: #e3e8ee;
      --border-light: #f0f4f8;
      --shadow-sm: 0 1px 2px rgba(10,37,64,0.04);
      --shadow: 0 2px 8px rgba(10,37,64,0.06);
      --shadow-lg: 0 4px 24px rgba(10,37,64,0.08);
      --radius: 8px;
      --radius-lg: 12px;
      --platform-shell-header-x: 1.35rem;
      --platform-shell-content-x: 0.75rem;
      --platform-shell-title-inset: 0.35rem;
      --inbox-leads-width-user: 320px;
    }

    /* ─── Dark mode (toggle: header · localStorage acquirely-theme) ───────── */
    [data-theme="dark"] {
      color-scheme: dark;
      --acquirely-blue-soft: rgba(255, 255, 255, 0.06);
      --bg: #161618;
      --bg-alt: #1e1e21;
      --bg-card: #1c1c1f;
      --text: #f4f4f5;
      --text-muted: #a1a1aa;
      --border: rgba(255, 255, 255, 0.09);
      --border-light: rgba(255, 255, 255, 0.06);
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
      --shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
      --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.55);
      --accent: #fafafa;
      --accent-hover: #e4e4e7;
      --accent-light: rgba(255, 255, 255, 0.05);
    }
    [data-theme="dark"] .sidebar {
      background: #161618;
      color: #f4f4f5;
      box-shadow: inset -1px 0 0 var(--border);
    }
    html:not([data-theme="dark"]) .sidebar-logo-img--light {
      display: block !important;
      visibility: visible !important;
      z-index: 1;
    }
    html:not([data-theme="dark"]) .sidebar-logo-img--dark {
      display: none !important;
      visibility: hidden !important;
      z-index: 0;
    }
    [data-theme="dark"] .sidebar-logo-img--light {
      display: none !important;
      visibility: hidden !important;
      z-index: 0;
    }
    [data-theme="dark"] .sidebar-logo-img--dark {
      display: block !important;
      visibility: visible !important;
      z-index: 1;
    }
    [data-theme="dark"] .sidebar-workspace {
      border-bottom-color: var(--border);
    }
    [data-theme="dark"] .sidebar-workspace-pill {
      background: var(--bg-card);
      border-color: var(--border);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    }
    [data-theme="dark"] .sidebar-workspace-pill:hover {
      background: #1c2128;
      border-color: #484f58;
      box-shadow: 0 3px 12px rgba(0, 0, 0, 0.38);
    }
    [data-theme="dark"] .sidebar-workspace-pill:active {
      background: #171b21;
      border-color: #484f58;
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
      transform: translateY(0.5px);
    }
    [data-theme="dark"] .sidebar-workspace-pill .sidebar-workspace-name {
      color: var(--text);
    }
    [data-theme="dark"] .sidebar-account-email {
      color: var(--text-muted);
    }
    [data-theme="dark"] .sidebar-workspace-menu {
      background: var(--bg-card);
      border-color: var(--border);
      box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
    }
    [data-theme="dark"] .workspace-search {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text);
    }
    [data-theme="dark"] .sidebar-workspace-option {
      color: var(--text);
    }
    [data-theme="dark"] .sidebar-workspace-option:hover {
      background: #21262d;
      color: var(--text);
    }
    [data-theme="dark"] .nav-item {
      color: #a8b4c0;
    }
    [data-theme="dark"] .nav-item:hover {
      background: rgba(110, 118, 129, 0.18);
      color: var(--text);
    }
    [data-theme="dark"] .nav-item:active {
      background: rgba(110, 118, 129, 0.28);
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
      transform: translateY(0.5px);
    }
    [data-theme="dark"] .nav-item.active {
      background: rgba(255, 255, 255, 0.08);
      color: #fafafa;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    [data-theme="dark"] .sidebar-footer {
      border-top-color: var(--border);
    }
    [data-theme="dark"] .sidebar-footer .nav-item {
      color: var(--text-muted);
    }
    [data-theme="dark"] .notification-sound-toggle,
    [data-theme="dark"] .theme-mode-toggle {
      border-color: var(--border);
      background: var(--bg-card);
      color: var(--text-muted);
    }
    [data-theme="dark"] .notification-sound-toggle:hover,
    [data-theme="dark"] .theme-mode-toggle:hover {
      background: var(--bg-alt);
      border-color: #484f58;
      color: var(--text);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    }
    [data-theme="dark"] .notification-sound-toggle[data-enabled="false"] {
      background: var(--bg-alt);
      border-color: var(--border-light);
      color: #6e7681;
    }
    [data-theme="dark"] .workspace-select {
      background: var(--bg-card);
      border-color: var(--border);
      color: var(--text);
    }
    [data-theme="dark"] .form-input,
    [data-theme="dark"] textarea,
    [data-theme="dark"] select,
    [data-theme="dark"] .integrations-config input:not([type="checkbox"]):not([type="radio"]) {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text);
    }
    [data-theme="dark"] .form-input::placeholder,
    [data-theme="dark"] textarea::placeholder {
      color: #6e7681;
    }
    /* :focus / :hover on .form-input set light-theme background later in the file: override for dark */
    [data-theme="dark"] .form-input:hover,
    [data-theme="dark"] textarea:hover,
    [data-theme="dark"] select:hover {
      border-color: #484f58;
      box-shadow: 0 0 0 1px rgba(72, 79, 88, 0.35);
    }
    [data-theme="dark"] .form-input:focus,
    [data-theme="dark"] textarea:focus,
    [data-theme="dark"] select:focus,
    [data-theme="dark"] .integrations-config input:not([type="checkbox"]):not([type="radio"]):focus {
      outline: none;
      background: var(--bg-alt);
      border-color: #58a6ff;
      box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45), 0 0 0 4px rgba(56, 189, 248, 0.12);
    }
    [data-theme="dark"] .btn-secondary {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text);
    }
    [data-theme="dark"] .btn-secondary:hover {
      background: #21262d;
    }
    [data-theme="dark"] .btn-secondary:active {
      background: #1c2128;
      border-color: #484f58;
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
      transform: translateY(0.5px);
    }
    [data-theme="dark"] .btn-ghost {
      border-color: var(--border);
      color: var(--text);
    }
    [data-theme="dark"] .btn-ghost:hover {
      background: var(--bg-alt);
    }
    [data-theme="dark"] .btn-danger-outline {
      background: transparent;
      border-color: #f85149;
      color: #ff7b72;
    }
    [data-theme="dark"] .tab.active {
      background: rgba(29, 155, 240, 0.2);
      color: #58a6ff;
    }
    [data-theme="dark"] .profile-avatar {
      background: var(--bg-alt);
    }
    [data-theme="dark"] .inbox-loading-shell {
      background: linear-gradient(180deg, #161b22 0%, #0d1b2a 100%);
      border-color: var(--border);
      box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
    }
    [data-theme="dark"] .inbox-loading-state[data-state="idle"] .inbox-loading-shell {
      background: linear-gradient(180deg, #161b22 0%, #0f1419 100%);
    }
    [data-theme="dark"] .inbox-loading-title {
      color: var(--text);
    }
    [data-theme="dark"] .inbox-loading-subtitle {
      color: var(--text-muted);
    }
    [data-theme="dark"] .reply-origin-pill.ai {
      background: rgba(37, 99, 235, 0.2);
      color: #79b8ff;
    }
    [data-theme="dark"] .reply-origin-pill.inbound {
      background: rgba(51, 65, 85, 0.65);
      color: #e2e8f0;
    }
    [data-theme="dark"] .reply-origin-pill.ai-followup {
      background: rgba(139, 92, 246, 0.22);
      color: #c4b5fd;
    }
    [data-theme="dark"] .reply-origin-pill.manual {
      background: rgba(16, 185, 129, 0.18);
      color: #6ee7b7;
    }
    [data-theme="dark"] .reply-origin-pill.booked {
      background: rgba(245, 158, 11, 0.22);
      color: #fcd34d;
    }
    [data-theme="dark"] .scheduled-draft-editor {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text);
      max-height: min(52vh, 22rem);
      overflow-y: auto;
    }
    [data-theme="dark"] .model-selector-popover,
    [data-theme="dark"] .model-selector-dropdown {
      background: var(--bg-card);
      border-color: var(--border);
      box-shadow: var(--shadow-lg);
    }
    [data-theme="dark"] .model-selector-option:hover {
      background: var(--bg-alt);
    }
    [data-theme="dark"] .integration-card,
    [data-theme="dark"] .settings-subcard {
      background: var(--bg-card);
      border-color: var(--border);
    }
    [data-theme="dark"] .kanban-board-wrap,
    [data-theme="dark"] .agent-kanban,
    [data-theme="dark"] .roadmap-hero {
      background: linear-gradient(160deg, #161b22 0%, #0f1419 55%, #0d1117 100%);
    }
    [data-theme="dark"] .toast {
      background: #21262d;
      border-color: var(--border);
      color: var(--text);
      box-shadow: var(--shadow-lg);
    }
    [data-theme="dark"] .modal-overlay {
      background: rgba(0, 0, 0, 0.62);
    }
    [data-theme="dark"] .modal-overlay.modal-overlay--acq-polished {
      background: rgba(0, 0, 0, 0.76);
    }
    [data-theme="dark"] .modal {
      background: var(--bg-card);
      color: var(--text);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-lg);
    }
    [data-theme="dark"] .modal-box {
      background: var(--bg-card);
      color: var(--text);
      border: 1px solid var(--border);
    }
    /* Stacked / dynamic modals (showConfirm, KB entry): beat any late generic rules */
    [data-theme="dark"] .modal-box h3 {
      color: var(--text) !important;
    }
    [data-theme="dark"] .modal-box .modal-box-message {
      color: var(--text-muted) !important;
    }
    [data-theme="dark"] .modal-box .form-label {
      color: var(--text);
    }
    [data-theme="dark"] .modal-box .form-hint-inline {
      color: var(--text-muted) !important;
    }
    [data-theme="dark"] .modal-box .btn-ghost {
      color: var(--text) !important;
      border-color: var(--border) !important;
    }
    [data-theme="dark"] .modal-box .btn-ghost:hover {
      background: var(--bg-alt) !important;
      color: var(--text) !important;
    }
    [data-theme="dark"] .modal-box .form-input::placeholder,
    [data-theme="dark"] .modal-box textarea::placeholder {
      color: #9da7b3 !important;
    }
    [data-theme="dark"] .detail-action-btn {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text-muted);
    }
    [data-theme="dark"] .detail-action-btn:hover {
      background: #21262d;
      color: var(--text);
    }
    [data-theme="dark"] .detail-action-btn[data-variant="primary"] {
      background: rgba(56, 189, 248, 0.12);
      border-color: rgba(56, 189, 248, 0.35);
      color: #58a6ff;
    }
    [data-theme="dark"] .detail-action-btn[data-variant="primary"]:hover {
      background: rgba(56, 189, 248, 0.2);
      border-color: #58a6ff;
      color: #79b8ff;
    }
    [data-theme="dark"] .status-badge.new {
      background: rgba(37, 99, 235, 0.25);
      color: #79b8ff;
    }
    [data-theme="dark"] .status-badge.interested {
      background: rgba(22, 163, 74, 0.22);
      color: #86efac;
    }
    [data-theme="dark"] .status-badge.not-interested {
      background: rgba(217, 119, 6, 0.22);
      color: #fcd34d;
    }
    [data-theme="dark"] .status-badge.out-of-office {
      background: rgba(59, 130, 246, 0.2);
      color: #93c5fd;
    }
    [data-theme="dark"] .status-badge.instantly-native {
      background: rgba(148, 163, 184, 0.2);
      color: #cbd5e1;
    }
    [data-theme="dark"] .status-badge.booked {
      background: rgba(124, 58, 237, 0.22);
      color: #d8b4fe;
    }
    [data-theme="dark"] .status-badge.dnc {
      background: rgba(220, 38, 38, 0.22);
      color: #fca5a5;
    }
    [data-theme="dark"] .status-badge.battle-test {
      background: rgba(59, 130, 246, 0.2);
      color: #79b8ff;
      border-color: rgba(59, 130, 246, 0.38);
    }

    /* Inbox leads: search, All/New pills, status dropdown */
    [data-theme="dark"] .search-leads input {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text);
    }
    [data-theme="dark"] .search-leads input::placeholder {
      color: #6e7681;
    }
    [data-theme="dark"] .search-leads input:hover {
      border-color: #484f58;
    }
    [data-theme="dark"] .search-leads input:focus,
    [data-theme="dark"] .search-leads input:focus-visible {
      border-color: #484f58;
      background: #1c2128;
      box-shadow: 0 0 0 2px rgba(110, 118, 129, 0.28);
    }
    [data-theme="dark"] .inbox-filter-pills {
      background: #161b22;
      border-color: var(--border);
    }
    [data-theme="dark"] .inbox-tab-slide {
      background: #1f2a36;
      border: 1px solid #58a6ff;
      box-shadow: none;
    }
    [data-theme="dark"] .inbox-lead-tab {
      color: var(--text-muted);
      background: transparent;
    }
    [data-theme="dark"] .inbox-lead-tab:hover {
      color: var(--text);
    }
    [data-theme="dark"] .inbox-lead-tab.active {
      color: #79c0ff;
      background: transparent;
    }
    [data-theme="dark"] .integrations-filter-pills {
      background: #161b22;
      border-color: var(--border);
    }
    [data-theme="dark"] .integrations-tab-slide {
      background: rgba(56, 189, 248, 0.1);
      border: 1px solid rgba(56, 189, 248, 0.28);
      box-shadow: none;
    }
    [data-theme="dark"] .integrations-cat-tab {
      color: var(--text-muted);
      background: transparent;
    }
    [data-theme="dark"] .integrations-cat-tab:hover {
      color: var(--text);
    }
    [data-theme="dark"] .integrations-cat-tab.active {
      color: #79c0ff;
      background: transparent;
    }
    [data-theme="dark"] .page-tabs-pills {
      background: #161b22;
      border-color: var(--border);
    }
    [data-theme="dark"] .page-tabs-slide {
      background: rgba(56, 189, 248, 0.1);
      border: 1px solid rgba(56, 189, 248, 0.28);
      box-shadow: none;
    }
    [data-theme="dark"] .page-tabs-tab {
      color: var(--text-muted);
      background: transparent;
    }
    [data-theme="dark"] .page-tabs-tab:hover {
      color: var(--text);
    }
    [data-theme="dark"] .page-tabs-tab.active {
      color: #79c0ff;
      background: transparent;
    }
    [data-theme="dark"] .integration-logo-slot--svgicon {
      background: #f8fafc;
      border-color: var(--border);
    }
    [data-theme="dark"] .integration-logo-slot.integration-logo-slot--svgicon.integration-logo-slot--gemini {
      background: #0f172a;
      border-color: rgba(255, 255, 255, 0.1);
    }
    [data-theme="dark"] .integration-logo-slot.integration-logo-slot--svgicon.integration-logo-slot--meta {
      background: #0f172a;
      border-color: rgba(56, 189, 248, 0.22);
    }
    [data-theme="dark"] .integration-logo-slot.integration-logo-slot--svgicon.integration-logo-slot--ghl {
      background: #001d3d;
      border-color: rgba(88, 166, 255, 0.35);
    }
    [data-theme="dark"] .inbox-details-header {
      border-bottom-color: var(--border);
    }

    /* Model / status dropdowns (all pages) */
    [data-theme="dark"] .model-selector-trigger {
      background: var(--bg-alt);
      border-color: var(--border);
    }
    [data-theme="dark"] .model-selector-trigger:hover {
      border-color: #484f58;
      background: #21262d;
    }
    [data-theme="dark"] .model-selector-trigger:active {
      background: #1c2128;
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.28);
      transform: translateY(0.5px);
    }
    [data-theme="dark"] .model-selector.open .model-selector-trigger {
      border-color: #484f58;
      background: #1c2128;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
    }
    [data-theme="dark"] .model-selector-trigger svg {
      color: var(--text-muted);
    }
    [data-theme="dark"] .model-selector-name {
      color: var(--text);
    }
    [data-theme="dark"] .model-selector-desc {
      color: var(--text-muted);
    }
    [data-theme="dark"] .model-selector-menu {
      background: var(--bg-card);
      border-color: var(--border);
      box-shadow: var(--shadow-lg);
    }
    [data-theme="dark"] .model-group-label {
      color: var(--text-muted);
    }
    [data-theme="dark"] .model-option:hover:not(.disabled) {
      background: rgba(255, 255, 255, 0.055);
    }
    [data-theme="dark"] .model-option:active:not(.disabled) {
      background: rgba(255, 255, 255, 0.08);
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
      transform: translateY(0.5px);
    }
    [data-theme="dark"] .model-option.selected {
      background: rgba(56, 189, 248, 0.12);
      border-color: rgba(56, 189, 248, 0.4);
    }
    [data-theme="dark"] .model-option-name {
      color: var(--text);
    }
    [data-theme="dark"] .model-option.disabled .model-option-name {
      color: var(--text-muted);
    }
    [data-theme="dark"] .model-option-meta {
      color: var(--text-muted);
    }

    /* Inbox list rows */
    [data-theme="dark"] .inbox-lead-item.selected {
      background: #21262d;
      border-left-color: #8b949e;
      box-shadow: inset 0 0 0 1px var(--border);
    }
    [data-theme="dark"] .inbox-lead-item.selected:hover {
      background: #2d333b;
    }
    [data-theme="dark"] .inbox-lead-item.selected .name {
      color: var(--text);
    }
    [data-theme="dark"] .inbox-lead-item.selected .subject,
    [data-theme="dark"] .inbox-lead-item.selected .snippet,
    [data-theme="dark"] .inbox-lead-item.selected .meta {
      color: var(--text-muted);
    }
    [data-theme="dark"] .inbox-lead-item.unread {
      background: rgba(56, 189, 248, 0.1);
      border-left-color: #58a6ff;
    }
    [data-theme="dark"] .inbox-lead-item.unread:hover {
      background: rgba(56, 189, 248, 0.16);
    }
    [data-theme="dark"] .inbox-lead-item.unread .name {
      color: var(--text);
    }
    [data-theme="dark"] .inbox-lead-item.unread .subject,
    [data-theme="dark"] .inbox-lead-item.unread .snippet,
    [data-theme="dark"] .inbox-lead-item.unread .meta {
      color: var(--text-muted);
    }
    [data-theme="dark"] .inbox-lead-item.unread.selected {
      background: #1c2128;
      border-left-color: #79b8ff;
    }
    [data-theme="dark"] .inbox-lead-item.unread.selected:hover {
      background: #252b33;
    }
    [data-theme="dark"] .inbox-bulk-link {
      color: var(--text-muted);
    }
    [data-theme="dark"] .inbox-bulk-link:hover {
      color: var(--text);
    }
    [data-theme="dark"] .inbox-bulk-link[disabled] {
      color: #484f58;
    }

    /* Inbox list: stronger secondary text in dark mode */
    [data-theme="dark"] .inbox-lead-item .subject,
    [data-theme="dark"] .inbox-lead-item .snippet,
    [data-theme="dark"] .inbox-lead-item .meta {
      color: #aeb8c3;
    }
    [data-theme="dark"] .inbox-lead-item.selected .subject,
    [data-theme="dark"] .inbox-lead-item.selected .snippet,
    [data-theme="dark"] .inbox-lead-item.selected .meta {
      color: #b7c0ca;
    }
    [data-theme="dark"] .inbox-lead-item.unread.selected .subject,
    [data-theme="dark"] .inbox-lead-item.unread.selected .snippet,
    [data-theme="dark"] .inbox-lead-item.unread.selected .meta {
      color: #c4ccd4;
    }

    /* Inbox row: subject/snippet vs timestamp (clear hierarchy) */
    [data-theme="dark"] .inbox-lead-item .lead-card-preview {
      color: #aeb8c3;
      font-weight: 500;
    }
    [data-theme="dark"] .inbox-lead-item .lead-card-meta {
      color: #636c76;
      font-size: 0.68rem;
      letter-spacing: 0.04em;
      font-variant-numeric: tabular-nums;
    }
    [data-theme="dark"] .inbox-lead-item.selected .lead-card-preview {
      color: #c4cdd6;
    }
    [data-theme="dark"] .inbox-lead-item.selected .lead-card-meta {
      color: #6e7681;
    }
    [data-theme="dark"] .inbox-lead-item.unread .lead-card-preview {
      color: #b6c0ca;
    }
    [data-theme="dark"] .inbox-lead-item.unread .lead-card-meta {
      color: #6a737d;
    }
    [data-theme="dark"] .inbox-lead-item.unread.selected .lead-card-preview {
      color: #d0d7de;
    }
    [data-theme="dark"] .inbox-lead-item.unread.selected .lead-card-meta {
      color: #768390;
    }

    /* Thread pane: readable bodies + history */
    [data-theme="dark"] .email-visible,
    [data-theme="dark"] .email-visible p {
      color: var(--text);
    }
    [data-theme="dark"] .inbox-message .body {
      color: var(--text);
    }
    [data-theme="dark"] .quoted-history-meta-line {
      color: var(--text);
    }
    [data-theme="dark"] .quoted-history-body {
      color: #c9d1d9;
    }
    [data-theme="dark"] .quoted-history-block {
      border-left-color: var(--border);
    }
    [data-theme="dark"] .quoted-toggle {
      background: rgba(56, 189, 248, 0.12);
      color: #79b8ff;
    }
    [data-theme="dark"] .quoted-toggle:hover {
      background: rgba(56, 189, 248, 0.22);
      color: #a5d6ff;
    }
    [data-theme="dark"] .thread-history-toggle {
      border-color: var(--border);
      background: var(--bg-card);
      color: var(--text-muted);
    }
    [data-theme="dark"] .thread-history-toggle:hover {
      background: #21262d;
      border-color: #484f58;
      color: var(--text);
    }

    /* Bulk-select checkboxes: no stark white squares */
    [data-theme="dark"] .thread-select-btn {
      background: var(--bg-alt);
      border-color: var(--border);
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
    }
    [data-theme="dark"] .thread-select-btn:hover {
      border-color: #58a6ff;
      background: rgba(56, 189, 248, 0.1);
    }
    [data-theme="dark"] .thread-select-btn.is-selected {
      background: #1f6feb;
      border-color: #388bfd;
      color: #f0f6fc;
      box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.35);
    }
    [data-theme="dark"] .thread-star-btn {
      color: #484f58;
    }
    [data-theme="dark"] .inbox-lead-item.bulk-selected:not(.selected) {
      background: rgba(56, 189, 248, 0.08);
      border-left-color: #388bfd;
    }
    [data-theme="dark"] .inbox-lead-item.bulk-selected.unread:not(.selected) {
      background: rgba(56, 189, 248, 0.14);
      border-left-color: #58a6ff;
    }

    /* Inbox layout polish (dark): leads column soft-card island; thread flat */
    [data-theme="dark"] .inbox-leads {
      background: var(--bg-card);
      border-color: var(--border);
      box-shadow: var(--shadow-sm);
    }
    [data-theme="dark"] .inbox-leads-controls {
      background: var(--bg-card);
      border-bottom: none;
      box-shadow: none;
    }
    [data-theme="dark"] .inbox-leads-status-foot {
      background: var(--bg-card);
      border-top-color: var(--border);
    }
    [data-theme="dark"] .inbox-lead-item {
      border-color: var(--border);
      box-shadow: none;
    }
    [data-theme="dark"] .inbox-lead-item:hover {
      border-color: #484f58;
      box-shadow: none;
    }
    [data-theme="dark"] .inbox-lead-item.selected {
      background: #21262d;
      border-color: #484f58;
      border-left-color: #8b949e;
      box-shadow: none;
    }
    [data-theme="dark"] .inbox-lead-item.selected:hover {
      background: #262c36;
    }
    [data-theme="dark"] .inbox-lead-item.unread {
      background: rgba(56, 189, 248, 0.12);
      border-color: rgba(56, 189, 248, 0.35);
    }
    [data-theme="dark"] .inbox-lead-item.unread:hover {
      background: rgba(56, 189, 248, 0.16);
    }
    [data-theme="dark"] .inbox-lead-item.unread.selected {
      background: #1a2332;
      border-color: rgba(121, 184, 255, 0.35);
      border-left-color: #79b8ff;
      box-shadow: none;
    }
    [data-theme="dark"] .inbox-lead-item.unread.selected:hover {
      background: #1f2a3a;
    }
    [data-theme="dark"] .inbox-thread {
      background: var(--bg);
      box-shadow: none;
    }
    [data-theme="dark"] .inbox-thread .inbox-loading-state {
      background: transparent;
      border-color: transparent;
      box-shadow: none;
    }
    [data-theme="dark"] .inbox-loading-title {
      color: var(--text);
    }
    [data-theme="dark"] .inbox-loading-subtitle {
      color: var(--text-muted);
    }
    [data-theme="dark"] .inbox-loading-state[data-state="idle"] .inbox-loading-shell,
    [data-theme="dark"] .inbox-loading-state[data-state="empty"] .inbox-loading-shell,
    [data-theme="dark"] .inbox-loading-state[data-state="error"] .inbox-loading-shell,
    [data-theme="dark"] .inbox-loading-state[data-state="selection"] .inbox-loading-shell {
      background: var(--bg-alt);
      box-shadow: none;
      border: 1px solid var(--border);
    }
    [data-theme="dark"] .inbox-details {
      background: var(--bg-card);
      box-shadow: none;
    }

    /* Contact: Notes / Extra info accordions */
    [data-theme="dark"] .detail-section {
      background: var(--bg-card);
      border-color: var(--border);
    }
    [data-theme="dark"] .detail-section-toggle {
      color: var(--text);
    }
    [data-theme="dark"] .detail-section-toggle:hover {
      background: var(--bg-alt);
    }
    [data-theme="dark"] .detail-section-toggle svg {
      color: var(--text-muted);
    }
    [data-theme="dark"] .detail-value,
    [data-theme="dark"] .detail-value-title {
      color: var(--text);
    }
    [data-theme="dark"] .detail-value-muted {
      color: var(--text-muted);
    }
    [data-theme="dark"] .detail-platform-text {
      color: var(--text);
    }
    [data-theme="dark"] .detail-platform-logo {
      background: var(--bg-alt);
    }
    [data-theme="dark"] .lead-control-title {
      color: var(--text);
    }
    [data-theme="dark"] .notes-item {
      background: var(--bg-alt);
      border-color: var(--border);
    }
    [data-theme="dark"] .notes-item:hover {
      border-color: #484f58;
      background: #21262d;
    }
    [data-theme="dark"] .notes-item-time {
      color: var(--text-muted);
    }
    [data-theme="dark"] .notes-item-body {
      color: var(--text);
    }
    [data-theme="dark"] .notes-empty {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text-muted);
    }

    /* Auto-reply / Idle pill: no white capsule */
    [data-theme="dark"] .auto-reply-live,
    [data-theme="dark"] .scheduled-thread-toolbar {
      background: var(--bg-card);
      border-color: var(--border);
    }
    [data-theme="dark"] .auto-reply-live.auto-reply-live--agent-off {
      background: var(--bg-alt);
      border-color: var(--border);
    }
    [data-theme="dark"] .auto-reply-live-title {
      color: var(--text);
    }
    [data-theme="dark"] .auto-reply-live-subtitle {
      color: var(--text-muted);
    }
    [data-theme="dark"] .auto-reply-live-countdown {
      background: var(--bg-alt);
      border-color: var(--border);
      color: #79b8ff;
    }
    [data-theme="dark"] .auto-reply-live-countdown[data-mode="status"] {
      color: var(--text-muted);
      background: #21262d;
      border-color: var(--border);
    }
    [data-theme="dark"] .auto-reply-live-countdown[data-state="active"] {
      color: #3fb950;
      border-color: rgba(63, 185, 80, 0.4);
      background: rgba(63, 185, 80, 0.12);
    }
    [data-theme="dark"] .auto-reply-live-countdown[data-state="sending"] {
      color: #3fb950;
      border-color: rgba(63, 185, 80, 0.5);
      background: rgba(63, 185, 80, 0.14);
    }
    [data-theme="dark"] .auto-reply-live-countdown[data-state="sending"] .auto-reply-live-status-dot {
      box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.45);
    }
    [data-theme="dark"] .auto-reply-live-countdown[data-state="paused"] {
      color: #d29922;
      border-color: rgba(210, 153, 34, 0.45);
      background: rgba(210, 153, 34, 0.14);
    }
    [data-theme="dark"] .auto-reply-live-countdown[data-state="disabled"] {
      color: #ff7b72;
      border-color: rgba(248, 81, 73, 0.45);
      background: rgba(248, 81, 73, 0.12);
    }
    [data-theme="dark"] .inbox-manual-compose-label {
      color: var(--text-muted);
    }
    [data-theme="dark"] .inbox-ai-debug-pre {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text-muted);
    }
    [data-theme="dark"] .inbox-message.inbox-message--scheduled-pending {
      background: var(--bg-alt) !important;
      border-color: var(--border) !important;
      border-left-color: #58a6ff !important;
      box-shadow: none;
    }
    [data-theme="dark"] .scheduled-draft-label {
      background: rgba(56, 189, 248, 0.12);
      border-color: rgba(56, 189, 248, 0.32);
      color: #79b8ff;
    }
    [data-theme="dark"] .scheduled-draft-label.ai-followup {
      background: rgba(139, 92, 246, 0.18);
      border-color: rgba(167, 139, 250, 0.35);
      color: #c4b5fd;
    }
    [data-theme="dark"] .scheduled-draft-empty {
      color: var(--text-muted);
    }
    [data-theme="dark"] .scheduled-draft-generating {
      background: rgba(88, 166, 255, 0.08);
      border-color: rgba(88, 166, 255, 0.28);
    }
    [data-theme="dark"] .scheduled-draft-generating strong {
      color: var(--text);
    }
    [data-theme="dark"] .scheduled-draft-generating-hint {
      color: var(--text-muted);
    }
    [data-theme="dark"] .scheduled-draft-card {
      background: var(--bg-card);
      border-color: var(--border);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }
    /* Toggles (Auto AI, etc.) */
    [data-theme="dark"] .toggle-switch {
      background: #30363d;
      border-color: var(--border);
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
    }
    [data-theme="dark"] .toggle-switch::after {
      background: #c9d1d9;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    }
    [data-theme="dark"] .toggle-switch.on {
      background: #1f6feb;
      border-color: #1f6feb;
    }
    [data-theme="dark"] .toggle-switch.on::after {
      background: #f0f6fc;
    }

    [data-theme="dark"] .top-nav {
      background: var(--bg-card);
      border-bottom-color: var(--border);
    }
    [data-theme="dark"] .search-bar select {
      background: var(--bg-alt);
      color: var(--text);
      border-color: var(--border);
    }
    [data-theme="dark"] .search-bar input {
      background: var(--bg-alt);
      color: var(--text);
    }

    /* Knowledge base cards (later block uses #fff / dark title text) */
    [data-theme="dark"] .kb-card {
      background: var(--bg-card) !important;
      border-color: var(--border) !important;
    }
    [data-theme="dark"] .kb-card:hover {
      box-shadow: var(--shadow);
    }
    [data-theme="dark"] .kb-card-title {
      color: var(--text) !important;
    }
    [data-theme="dark"] .kb-card-body {
      color: var(--text-muted) !important;
    }
    [data-theme="dark"] .kb-tag {
      background: var(--bg-alt) !important;
      color: var(--text-muted) !important;
      border: 1px solid var(--border);
    }
    [data-theme="dark"] .kb-card-actions .instruction-icon-btn.danger:hover {
      color: #fca5a5 !important;
      background: rgba(220, 38, 38, 0.12) !important;
      border-color: rgba(220, 38, 38, 0.35) !important;
    }

    [data-theme="dark"] .training-card {
      background: var(--bg-card) !important;
      border-color: var(--border) !important;
    }
    [data-theme="dark"] .training-card:hover {
      box-shadow: var(--shadow);
    }
    [data-theme="dark"] .training-card-header {
      border-bottom-color: var(--border);
    }
    [data-theme="dark"] .training-card-status-pill.is-active {
      color: #86efac;
      background: rgba(34, 197, 94, 0.14);
      border-color: rgba(74, 222, 128, 0.42);
    }
    [data-theme="dark"] .training-card-status-pill.is-inactive {
      color: #fca5a5;
      background: rgba(220, 38, 38, 0.14);
      border-color: rgba(248, 113, 113, 0.45);
    }
    [data-theme="dark"] .agent-refresh-btn {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text);
    }
    [data-theme="dark"] .agent-refresh-btn:hover {
      background: #21262d;
      border-color: #484f58;
      color: #f0f6fc;
    }
    [data-theme="dark"] .agent-refresh-btn:active {
      background: #2d333b;
    }
    [data-theme="dark"] .agent-filter-label {
      color: var(--text-muted);
    }

    /* Easy mode / KB+Instructions AI import modal */
    [data-theme="dark"] .kb-ai-overlay {
      background: rgba(0, 0, 0, 0.72);
    }
    [data-theme="dark"] .kb-ai-panel {
      background: linear-gradient(165deg, #161b22 0%, #0f1419 50%, #0d1117 100%) !important;
      border: 1px solid var(--border);
      box-shadow: var(--shadow-lg);
    }
    [data-theme="dark"] .kb-ai-panel--import {
      background: linear-gradient(180deg, #1a222d 0%, #161b22 45%, #0f1419 100%) !important;
      box-shadow: var(--shadow-lg);
      border: 1px solid var(--border);
    }
    [data-theme="dark"] .kb-ai-panel h3,
    [data-theme="dark"] .kb-ai-panel--import h3 {
      color: var(--text) !important;
    }
    [data-theme="dark"] .kb-ai-desc,
    [data-theme="dark"] .kb-ai-panel--import .kb-ai-desc {
      color: var(--text-muted) !important;
    }
    [data-theme="dark"] .kb-import-mode {
      background: var(--bg-alt) !important;
      border-color: var(--border) !important;
      color: #b1bac4 !important;
    }
    [data-theme="dark"] .kb-import-mode:hover {
      background: #21262d !important;
      border-color: #484f58 !important;
      color: var(--text) !important;
    }
    [data-theme="dark"] .kb-import-mode--active {
      background: var(--bg-card) !important;
      border-color: #58a6ff !important;
      color: var(--text) !important;
    }
    [data-theme="dark"] .kb-ai-panel--import .kb-import-mode--active {
      background: rgba(56, 189, 248, 0.1) !important;
      border-color: #58a6ff !important;
      color: #e6edf3 !important;
    }
    [data-theme="dark"] .kb-ai-panel textarea.kb-ai-paste,
    [data-theme="dark"] .kb-ai-panel--import textarea.kb-ai-paste {
      background: var(--bg-alt) !important;
      border-color: var(--border) !important;
      color: var(--text) !important;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
    }
    [data-theme="dark"] .kb-ai-panel textarea.kb-ai-paste::placeholder,
    [data-theme="dark"] .kb-ai-panel--import textarea.kb-ai-paste::placeholder {
      color: #9da7b3 !important;
    }
    [data-theme="dark"] .kb-ai-panel textarea.kb-ai-paste:focus,
    [data-theme="dark"] .kb-ai-panel--import textarea.kb-ai-paste:focus {
      border-color: #58a6ff !important;
      box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15) !important;
    }
    [data-theme="dark"] .kb-ai-panel--manual .kb-ai-manual-hint {
      color: var(--text-muted) !important;
    }
    [data-theme="dark"] .kb-ai-panel--manual .kb-ai-manual-label {
      color: #8b949e !important;
    }
    [data-theme="dark"] .kb-ai-panel--manual .kb-ai-manual-label-note {
      color: #8b949e !important;
    }
    [data-theme="dark"] .kb-ai-panel--manual .kb-ai-manual-input,
    [data-theme="dark"] .kb-ai-panel--manual .kb-ai-manual-textarea {
      background: var(--bg-alt) !important;
      border-color: var(--border) !important;
      color: var(--text) !important;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
    }
    [data-theme="dark"] .kb-ai-panel--manual .kb-ai-manual-input::placeholder,
    [data-theme="dark"] .kb-ai-panel--manual .kb-ai-manual-textarea::placeholder {
      color: #9da7b3 !important;
    }
    [data-theme="dark"] .kb-ai-panel--manual .kb-ai-manual-input:focus,
    [data-theme="dark"] .kb-ai-panel--manual .kb-ai-manual-textarea:focus {
      border-color: #58a6ff !important;
      box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15) !important;
    }
    [data-theme="dark"] .kb-ai-panel--manual .kb-ai-manual-col-title {
      color: var(--text) !important;
    }
    [data-theme="dark"] .kb-ai-panel--manual .kb-ai-manual-actions .btn-primary {
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    }
    [data-theme="dark"] .kb-ai-modal-close {
      color: var(--text-muted);
    }
    [data-theme="dark"] .kb-ai-modal-close:hover {
      background: var(--bg-alt);
      color: var(--text);
    }
    [data-theme="dark"] .kb-ai-progress-track {
      background: var(--border);
    }
    [data-theme="dark"] .kb-ai-status-line,
    [data-theme="dark"] .kb-ai-sub {
      color: var(--text-muted);
    }
    [data-theme="dark"] .kb-ai-err-banner {
      background: rgba(220, 38, 38, 0.12);
      border: 1px solid rgba(248, 113, 113, 0.35);
      color: #fca5a5;
    }
    [data-theme="dark"] .kb-ai-status-line.kb-ai-error-line,
    [data-theme="dark"] .kb-ai-sub.kb-ai-error-line {
      color: #fca5a5 !important;
    }
    [data-theme="dark"] .kb-ai-panel--import .modal-actions .btn-primary {
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    }
    [data-theme="dark"] .kb-ai-panel--import .modal-actions.kb-ai-actions-running .btn-danger-outline {
      box-shadow: none;
    }
    [data-theme="dark"] .kb-ai-panel--import .kb-easy-mode-help-panel .help-popover-inner {
      background: var(--bg-card);
      border-color: var(--border);
    }
    [data-theme="dark"] .kb-ai-panel--import .kb-easy-mode-help-panel .help-popover-inner::before {
      border-bottom-color: var(--border);
    }
    [data-theme="dark"] .kb-ai-panel--import .kb-easy-mode-help-panel .help-popover-inner::after {
      border-bottom-color: var(--bg-card);
    }

    /* Thread expand / quoted */
    [data-theme="dark"] .thread-history-toggle {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text-muted);
    }
    [data-theme="dark"] .thread-history-toggle:hover {
      background: #21262d;
      color: var(--text);
    }
    [data-theme="dark"] .quoted-history {
      border-color: var(--border);
      background: var(--bg-alt);
    }
    [data-theme="dark"] .quoted-history-meta-line {
      color: var(--text-muted);
    }

    /* Agent pills / chips */
    [data-theme="dark"] .skill-icon.blue {
      background: rgba(37, 99, 235, 0.22);
      color: #79b8ff;
    }
    [data-theme="dark"] .badge-red {
      background: rgba(220, 38, 38, 0.2);
      color: #fca5a5;
    }

    /* AI Agent: later .skill-card block uses #fff: force dark surfaces */
    [data-theme="dark"] .skill-card {
      background: var(--bg-card) !important;
      border-color: var(--border) !important;
      color: var(--text);
    }
    [data-theme="dark"] .skill-title {
      color: var(--text) !important;
    }
    [data-theme="dark"] .skill-desc {
      color: var(--text-muted) !important;
    }
    [data-theme="dark"] .skill-icon.blue {
      background: rgba(37, 99, 235, 0.22);
      color: #93c5fd;
    }
    [data-theme="dark"] .skill-icon.green {
      background: rgba(22, 163, 74, 0.2);
      color: #86efac;
    }
    [data-theme="dark"] .skill-icon.orange {
      background: rgba(234, 88, 12, 0.2);
      color: #fdba74;
    }
    [data-theme="dark"] .skill-icon.purple {
      background: rgba(124, 58, 237, 0.22);
      color: #d8b4fe;
    }

    [data-theme="dark"] .platform-settings-card {
      background: var(--bg-card);
      border-color: var(--border);
      box-shadow: var(--shadow-lg);
    }
    [data-theme="dark"] .platform-settings-title {
      color: var(--text);
    }
    [data-theme="dark"] .platform-tab {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text-muted);
    }
    [data-theme="dark"] .platform-tab:hover {
      border-color: #484f58;
      box-shadow: var(--shadow);
    }
    [data-theme="dark"] .platform-tab.active {
      border-color: #58a6ff;
      background: rgba(56, 189, 248, 0.12);
      color: #79b8ff;
    }
    [data-theme="dark"] .platform-tab.disabled {
      color: var(--text-muted);
      opacity: 0.8;
    }
    [data-theme="dark"] .platform-tab.disabled:hover {
      border-color: var(--border);
      box-shadow: none;
    }
    [data-theme="dark"] .platform-tab-logo-placeholder {
      background: var(--border);
      color: var(--text-muted);
    }
    [data-theme="dark"] .platform-tab-placeholder {
      color: var(--text-muted);
    }
    [data-theme="dark"] .platform-tab-badge {
      color: var(--text-muted);
    }

    [data-theme="dark"] .integration-card-coming-soon .form-input[disabled] {
      background: var(--bg-alt) !important;
      color: var(--text-muted) !important;
      border-color: var(--border) !important;
    }
    [data-theme="dark"] .integration-card-coming-soon .integration-status {
      background: var(--bg-alt) !important;
      color: var(--text-muted) !important;
      border: 1px solid var(--border) !important;
    }

    [data-theme="dark"] .tab.active {
      background: rgba(56, 189, 248, 0.16);
      color: var(--text);
      box-shadow: none;
    }

    [data-theme="dark"] .integration-logo {
      background: var(--bg-alt);
    }
    [data-theme="dark"] .integration-logo.integration-logo--calcom {
      background: #2b2b2b;
    }
    [data-theme="dark"] .integration-logo-slot--openai .integration-logo--light {
      display: none !important;
    }
    [data-theme="dark"] .integration-logo-slot--openai .integration-logo--dark {
      display: block !important;
    }
    [data-theme="dark"] .integration-logo-slot--openai .integration-logo {
      background: transparent;
    }
    [data-theme="dark"] .integration-status.connected {
      background: rgba(34, 197, 94, 0.14);
      border-color: rgba(52, 211, 153, 0.45);
      color: #6ee7b7;
    }
    [data-theme="dark"] .integration-status.pending {
      background: rgba(110, 118, 129, 0.2);
      border-color: var(--border);
      color: var(--text-muted);
    }
    [data-theme="dark"] .integration-status.coming-soon {
      background: rgba(110, 118, 129, 0.18);
      border-color: var(--border);
      color: var(--text-muted);
    }
    [data-theme="dark"] .integration-status.coming-soon::before {
      opacity: 0.7;
    }

    [data-theme="dark"] .btn-primary {
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    }
    [data-theme="dark"] .btn-primary:hover {
      background-color: #153a75;
      border-color: #58a6ff;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 0 0 1px rgba(88, 166, 255, 0.4);
    }
    [data-theme="dark"] .btn-primary:active {
      background-color: #0f2d5c;
      border-color: rgba(88, 166, 255, 0.55);
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
      transform: translateY(0.5px);
    }

    [data-theme="dark"] .agent-setter-search {
      background: var(--bg-alt);
      border-color: var(--border);
      color: var(--text);
    }
    [data-theme="dark"] .agent-setter-search:focus {
      border-color: #58a6ff;
      box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    }
    [data-theme="dark"] .agent-setter-bulk-bar {
      background: var(--bg-alt);
      border: 1px solid var(--border);
    }
    [data-theme="dark"] .agent-setter-list {
      border-color: var(--border);
      background: var(--bg-card);
    }
    [data-theme="dark"] .agent-setter-row {
      border-bottom-color: var(--border);
    }
    [data-theme="dark"] .agent-setter-row:hover {
      background: rgba(56, 189, 248, 0.06);
    }
    [data-theme="dark"] .agent-setter-row.bulk-selected {
      background: rgba(56, 189, 248, 0.14);
    }
    [data-theme="dark"] .agent-setter-label {
      color: var(--text);
    }
    [data-theme="dark"] .agent-setter-badge {
      color: var(--text-muted);
    }
    [data-theme="dark"] .agent-setter-move:hover {
      background: var(--border);
      color: var(--text);
    }
    [data-theme="dark"] .agent-setter-meta {
      color: var(--text-muted);
    }
    [data-theme="dark"] .agent-setter-api-eye:hover {
      background: var(--border);
      color: var(--text);
    }
    [data-theme="dark"] .agent-setter-api-popover {
      background: var(--bg-card);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-lg);
    }
    [data-theme="dark"] .agent-setter-api-popover .api-popover-row {
      border-bottom-color: var(--border);
    }
    [data-theme="dark"] .agent-setter-api-popover .api-popover-label {
      color: var(--text-muted);
    }
    [data-theme="dark"] .agent-setter-api-popover .api-value {
      color: var(--text);
    }

    [data-theme="dark"] .agent-column-box {
      border-color: var(--border);
      background: var(--bg-card);
    }
    [data-theme="dark"] .agent-column-box.inactive {
      border-color: var(--border);
    }
    [data-theme="dark"] .agent-column-header {
      border-bottom-color: var(--border);
    }
    [data-theme="dark"] .agent-column-header.active {
      background: rgba(34, 197, 94, 0.12);
      color: #6ee7b7;
    }
    [data-theme="dark"] .agent-column-header.inactive {
      background: var(--bg-alt);
      color: var(--text-muted);
    }
    [data-theme="dark"] .agent-column-status.updating {
      color: var(--text-muted);
    }
    [data-theme="dark"] .agent-column-status.updating::before {
      border-color: var(--border);
      background: var(--bg-alt);
    }

    [data-theme="dark"] .roadmap-card {
      background: var(--bg-card);
      border-color: var(--border);
    }
    [data-theme="dark"] .roadmap-card:hover {
      border-color: #484f58;
      box-shadow: var(--shadow);
    }
    [data-theme="dark"] .roadmap-card-title {
      color: var(--text);
    }
    [data-theme="dark"] .roadmap-card-desc {
      color: var(--text-muted);
    }
    [data-theme="dark"] .roadmap-card-kicker {
      color: var(--text-muted);
    }

    [data-theme="dark"] .instruction-item {
      background: var(--bg-card);
      border-color: var(--border);
    }
    [data-theme="dark"] .instruction-item:hover {
      box-shadow: var(--shadow-sm);
    }
    [data-theme="dark"] .instruction-content {
      color: var(--text);
    }
    [data-theme="dark"] .instruction-number {
      background: rgba(56, 189, 248, 0.12);
      color: #79b8ff;
    }
    [data-theme="dark"] .instruction-item--template .instruction-number {
      background: rgba(217, 70, 239, 0.18);
      color: #f0abfc;
    }
    [data-theme="dark"] .instruction-item--template .toggle-switch {
      background: #30363d;
      border-color: rgba(217, 70, 239, 0.35);
    }
    [data-theme="dark"] .instruction-item--template .toggle-switch.on {
      background: #a855f7;
      border-color: #9333ea;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(168, 85, 247, 0.2);
    }
    [data-theme="dark"] .instruction-badge--manual { background: rgba(99, 102, 241, 0.2); color: #c7d2fe; }
    [data-theme="dark"] .instruction-badge--easy { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
    [data-theme="dark"] .instruction-badge--template { background: rgba(217, 70, 239, 0.15); color: #f0abfc; }
    [data-theme="dark"] .instruction-badge--edited { background: rgba(251, 146, 60, 0.18); color: #fdba74; }
    [data-theme="dark"] .instruction-template-panel {
      background: rgba(88, 28, 135, 0.2);
      border-color: rgba(217, 70, 239, 0.35);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    [data-theme="dark"] .instruction-template-panel > summary {
      color: #e9d5ff;
      background: linear-gradient(180deg, rgba(107, 33, 168, 0.45) 0%, rgba(91, 33, 125, 0.4) 100%);
    }
    [data-theme="dark"] .instruction-template-panel > summary:hover {
      background: linear-gradient(180deg, rgba(126, 34, 206, 0.5) 0%, rgba(107, 33, 168, 0.48) 100%);
      color: #f5e6ff;
    }
    [data-theme="dark"] .instruction-template-panel > summary::after {
      color: #d8b4fe;
      opacity: 0.95;
    }
    [data-theme="dark"] .instruction-template-panel[open] > summary {
      border-bottom-color: rgba(217, 70, 239, 0.28);
    }
    [data-theme="dark"] .instruction-template-panel .instruction-template-inner {
      background: var(--bg-card);
    }
    [data-theme="dark"] .instruction-revert {
      background: var(--bg-card);
      border-color: var(--border);
      color: var(--text-muted);
    }
    [data-theme="dark"] .instruction-revert:hover {
      background: var(--bg-alt);
      color: var(--text);
    }
    [data-theme="dark"] .help-pop-btn:hover {
      background: rgba(255, 255, 255, 0.06);
    }
    [data-theme="dark"] .help-popover-inner {
      box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 2px 12px rgba(0, 0, 0, 0.25);
    }
    [data-theme="dark"] .instruction-templates-section--premium {
      border-color: var(--border);
      background: rgba(22, 27, 34, 0.55);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }
    [data-theme="dark"] .instruction-templates-label {
      color: var(--text-muted);
    }
    [data-theme="dark"] .instruction-templates-hint {
      color: var(--text-muted);
    }
    [data-theme="dark"] .instruction-template-picker--premium .instruction-template-trigger {
      border-color: var(--border);
      background: var(--bg-alt);
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    [data-theme="dark"] .instruction-template-picker--premium .instruction-template-trigger:hover {
      border-color: rgba(148, 163, 184, 0.45);
    }
    [data-theme="dark"] .instruction-template-option .model-option-meta {
      color: var(--text-muted);
    }
    [data-theme="dark"] .instruction-revert--locked {
      color: var(--text-muted);
      opacity: 0.4;
    }
    [data-theme="dark"] .instruction-icon-btn {
      background: linear-gradient(180deg, rgba(51, 65, 85, 0.5) 0%, rgba(30, 41, 59, 0.85) 100%);
      border-color: var(--border);
      color: var(--text-muted);
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    [data-theme="dark"] .instruction-icon-btn:not(.danger):hover {
      color: #58a6ff !important;
      border-color: rgba(88, 166, 255, 0.5) !important;
      background: rgba(56, 139, 253, 0.14) !important;
    }
    [data-theme="dark"] .instruction-icon-btn.danger:hover {
      color: #fca5a5;
      background: rgba(220, 38, 38, 0.12);
      border-color: rgba(220, 38, 38, 0.35);
    }

    /* Theme toggle: cross-fade the whole UI (Chrome / Edge / Safari 18+) */
    @media (prefers-reduced-motion: no-preference) {
      ::view-transition-old(root),
      ::view-transition-new(root) {
        animation-duration: 0.42s;
        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      }
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html, body {
      height: 100%;
      overflow: hidden;
    }
    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg);
      color: var(--text);
      height: 100vh;
      min-height: 100vh;
      display: flex;
      -webkit-font-smoothing: antialiased;
    }
    @media (prefers-reduced-motion: no-preference) {
      body {
        transition: background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1), color 0.38s ease;
      }
      .main-header {
        transition: background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1), color 0.38s ease, border-color 0.42s ease;
      }
      .sidebar,
      .main {
        transition: background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1), color 0.38s ease, border-color 0.42s ease,
          width 0.36s cubic-bezier(0.22, 1, 0.36, 1), margin-left 0.36s cubic-bezier(0.22, 1, 0.36, 1),
          min-width 0.36s cubic-bezier(0.22, 1, 0.36, 1);
      }
      .acq-app-sidebar-resize {
        transition: left 0.36s cubic-bezier(0.22, 1, 0.36, 1);
      }
      #inboxLayout .inbox-leads,
      #inboxLayout .inbox-details {
        transition:
          flex-basis 0.36s cubic-bezier(0.22, 1, 0.36, 1),
          width 0.36s cubic-bezier(0.22, 1, 0.36, 1),
          max-width 0.36s cubic-bezier(0.22, 1, 0.36, 1);
      }
    }
    @media (prefers-reduced-motion: reduce) {
      #inboxLayout .inbox-leads,
      #inboxLayout .inbox-details {
        transition: none;
      }
    }
    a { color: inherit; text-decoration: none; }

    /* Outlook-style vertical splitters (sidebar, inbox, agent chat list) */
    .acq-vsplit-handle {
      flex: 0 0 8px;
      width: 8px;
      min-width: 8px;
      align-self: stretch;
      position: relative;
      z-index: 5;
      cursor: col-resize;
      touch-action: none;
      background: transparent;
      flex-shrink: 0;
      transition: background 0.15s ease;
    }
    .acq-vsplit-handle::before {
      content: '';
      position: absolute;
      top: 0;
      bottom: 0;
      left: 50%;
      width: 1px;
      transform: translateX(-50%);
      background: var(--border-light);
      opacity: 0.55;
      transition:
        opacity 0.15s ease,
        width 0.12s ease,
        background 0.15s ease;
    }
    [data-theme='dark'] .acq-vsplit-handle::before {
      background: rgba(255, 255, 255, 0.14);
    }
    .acq-vsplit-handle:hover::before,
    .acq-vsplit-handle:focus-visible::before,
    .acq-vsplit-handle.is-dragging::before {
      opacity: 1;
      width: 2px;
      background: rgba(59, 130, 246, 0.65);
    }
    [data-theme='dark'] .acq-vsplit-handle:hover::before,
    [data-theme='dark'] .acq-vsplit-handle:focus-visible::before,
    [data-theme='dark'] .acq-vsplit-handle.is-dragging::before {
      background: rgba(96, 165, 250, 0.75);
    }
    .acq-vsplit-handle:focus-visible {
      outline: none;
    }
    .acq-vsplit-handle:focus-visible::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 4px;
      box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
      pointer-events: none;
    }
    .acq-app-sidebar-resize {
      position: fixed;
      top: 0;
      left: calc(var(--sidebar-width) - 5px);
      width: 10px;
      height: 100vh;
      height: 100dvh;
      z-index: 45;
      flex: none !important;
    }
    body.sidebar-rail .acq-app-sidebar-resize {
      display: none !important;
    }
    body.acq-is-resizing {
      cursor: col-resize !important;
      user-select: none !important;
    }
    body.acq-is-resizing * {
      cursor: col-resize !important;
    }
    body.acq-is-resizing .sidebar,
    body.acq-is-resizing .main,
    body.acq-is-resizing .acq-app-sidebar-resize,
    body.acq-is-resizing #inboxLayout .inbox-leads,
    body.acq-is-resizing #inboxLayout .inbox-details,
    body.acq-is-resizing #page-agent-settings #agent-quick-fix .qf-history-drawer {
      transition: none !important;
    }

    /** Toggle with classList.add/remove('hidden'): must apply to any element (e.g. profile buttons). */
    .hidden {
      display: none !important;
    }

    /* Sidebar */
    :root {
      --sidebar-width: 260px;
      --sidebar-rail-width: 72px;
    }
    .sidebar {
      width: var(--sidebar-width);
      min-height: 100vh;
      background: #f5f8ff;
      color: #0f172a;
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      position: fixed;
      inset-block: 0;
      inset-inline-start: 0;
      box-shadow: 0 0 0 rgba(0,0,0,0);
      z-index: 40;
    }
    .sidebar-logo-row {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      padding: 1.25rem 0.65rem 1rem 0.85rem;
    }
    .sidebar-logo {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }
    .sidebar-logo-favicon {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      object-fit: contain;
      display: none;
      flex-shrink: 0;
    }
    /* logo-light.png + logo-dark.png share the same canvas size: identical output */
    .sidebar-logo-img {
      width: calc(26px * 255 / 52);
      height: 26px;
      object-fit: contain;
      object-position: center;
      display: block;
    }
    .sidebar-logo-img--dark {
      display: none;
    }
    .sidebar-workspace {
      padding: 0 1.5rem 1.5rem;
      border-bottom: 1px solid rgba(15,23,42,0.06);
      position: relative;
    }
    .sidebar-workspace-label {
      display: none;
    }
    .sidebar-workspace-pill {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.5rem 0.8rem;
      border-radius: 999px;
      background: #ffffff;
      border: 1px solid rgba(148,163,184,0.7);
      box-shadow: 0 3px 10px rgba(15,23,42,0.08);
      font-size: 0.85rem;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
      transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
    }
    .sidebar-workspace-pill:hover {
      background: #f8fafc;
      border-color: rgba(148,163,184,0.95);
      box-shadow: 0 4px 14px rgba(15,23,42,0.1);
    }
    .sidebar-workspace-pill:active {
      background: #f1f5f9;
      border-color: rgba(148,163,184,0.85);
      box-shadow: inset 0 1px 3px rgba(15,23,42,0.1);
      transform: translateY(0.5px);
    }
    .sidebar-workspace-text {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.05rem;
      min-width: 0;
      flex: 1;
    }
    .sidebar-workspace-pill .sidebar-workspace-name {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      color: #111827;
      font-weight: 500;
      max-width: 100%;
    }
    .sidebar-account-email {
      display: block;
      font-size: 0.68rem;
      font-weight: 500;
      color: #64748b;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    /* Reserve a line so the workspace pill height does not jump when email hydrates */
    .sidebar-account-email:empty {
      display: block;
      min-height: 0.75rem;
      visibility: hidden;
    }
    .sidebar-workspace-pill svg {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
      opacity: 0.85;
    }
    .sidebar-workspace-menu {
      position: absolute;
      top: calc(100% + 0.4rem);
      left: 1.5rem;
      right: 1.5rem;
      background: #ffffff;
      border-radius: 14px;
      border: 1px solid rgba(203,213,225,0.9);
      box-shadow: 0 18px 45px rgba(15,23,42,0.18);
      padding: 0.5rem;
      display: none;
      z-index: 20;
    }
    .workspace-search {
      width: 100%;
      padding: 0.45rem 0.75rem;
      border-radius: 8px;
      border: 1px solid rgba(203,213,225,0.9);
      background: #ffffff;
      color: #111827;
      font-size: 0.8rem;
      margin-bottom: 0.3rem;
    }
    .workspace-search::placeholder {
      color: #9ca3af;
    }
    .sidebar-workspace-menu.open {
      display: block;
    }
    .sidebar-workspace-option {
      width: 100%;
      text-align: left;
      border: none;
      background: transparent;
      color: #111827;
      font-size: 0.82rem;
      padding: 0.55rem 0.85rem;
      border-radius: 8px;
      cursor: pointer;
      font-family: inherit;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      transition: background 0.12s, color 0.12s;
    }
    .sidebar-workspace-option span {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }
    .sidebar-workspace-option small {
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-size: 0.68rem;
      color: #9ca3af;
    }
    .sidebar-workspace-option + .sidebar-workspace-option {
      margin-top: 0.15rem;
    }
    .sidebar-workspace-option:hover {
      background: #f3f4f6;
      color: #111827;
    }
    .sidebar-workspace-option.active {
      background: rgba(59,130,246,0.95);
      color: #f9fafb;
    }
    .sidebar-nav { padding: 1.25rem 0; flex: 1; }
    .nav-item {
      display: flex; align-items: center; gap: 0.75rem;
      margin: 0 0.9rem 0.65rem;
      padding: 0.7rem 1.3rem;
      color: #334155; font-size: 0.9375rem; cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
      transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
      border-radius: var(--radius);
    }
    .nav-item:hover {
      background: rgba(148,163,184,0.18);
      color: #0f172a;
      box-shadow: none;
    }
    .nav-item:active {
      background: rgba(148,163,184,0.28);
      box-shadow: inset 0 1px 2px rgba(15,23,42,0.08);
      transform: translateY(0.5px);
    }
    .nav-item.active {
      background: #d0ebff;
      color: #0c7cd5;
      font-weight: 500;
      box-shadow: none;
    }
    .nav-item svg { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.8; }
    /** Author `display:flex` on .nav-item overrides UA [hidden]; keep sidebar gates effective. */
    .nav-item[hidden],
    .sidebar-footer .nav-item[hidden] {
      display: none !important;
    }
    .nav-item--agent .nav-icon-agent {
      opacity: 0.92;
    }
    .nav-item.active.nav-item--agent .nav-icon-agent {
      opacity: 1;
    }
    .nav-section { margin-bottom: 0.5rem; }
    .nav-section-title {
      padding: 0.5rem 1.5rem 0.35rem; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
      color: rgba(226,232,240,0.7);
    }
    .nav-sub { padding-left: 2.5rem; }
    .sidebar-footer .nav-item[data-page="roadmap"] {
      display: none !important;
    }
    body.acquirely-feature-roadmap-on .sidebar-footer .nav-item[data-page="roadmap"] {
      display: flex !important;
    }
    /** [hidden] must win over roadmap flex, when internal portal is gated off. */
    body.acquirely-feature-roadmap-on .sidebar-footer .nav-item[data-page="roadmap"][hidden] {
      display: none !important;
    }
    body:not(.acquirely-feature-activity-on) .sidebar-nav .nav-item[data-page="activity"] {
      display: none !important;
    }
    /** Hide internal portal pages until admin enables clientPortalInternalControls (see applyAcquirelyFeatureControls). */
    body:not(.acquirely-feature-client-portal-internal-on) #page-settings,
    body:not(.acquirely-feature-client-portal-internal-on) #page-roadmap {
      display: none !important;
    }
    body:not(.acquirely-feature-client-portal-internal-on):not(.acq-page-appointment-setter) #page-agent-settings {
      display: none !important;
    }
    body:not(.acquirely-feature-client-portal-internal-on) .nav-item[data-page="agent-settings"],
    body:not(.acquirely-feature-client-portal-internal-on) .nav-item[data-page="settings"] {
      display: none !important;
    }
    body:not(.acquirely-feature-client-portal-internal-on) #leadAutoAiToggle,
    body:not(.acquirely-feature-client-portal-internal-on) #leadAutoAiToggle ~ *,
    body:not(.acquirely-feature-client-portal-internal-on) .lead-control-row:has(#leadAutoAiToggle) {
      display: none !important;
    }
    body:not(.acquirely-feature-client-portal-internal-on) #page-inbox a[href^="#settings"],
    body:not(.acquirely-feature-client-portal-internal-on) #page-inbox a[href^="#agent-settings"] {
      display: none !important;
    }
    body:not(.acquirely-internal-presentation) #btnInboxSignalDeck,
    body:not(.acquirely-internal-presentation) #btnDetailSignalDeck,
    body:not(.acquirely-internal-presentation) .detail-section:has(#activitySection) {
      display: none !important;
    }
    #notificationSoundToggle {
      display: none !important;
    }
    body.acquirely-feature-sounds-on #notificationSoundToggle {
      display: inline-flex !important;
    }
    .sidebar-footer {
      padding: 1.25rem 1.5rem 1.5rem;
      border-top: 1px solid rgba(15,23,42,0.35);
      margin-top: auto;
    }
    .sidebar-footer .nav-item {
      padding: 0.35rem 0.9rem;
      margin: 0 0.9rem 0.15rem;
      box-shadow: none;
      justify-content: flex-start;
      border-radius: 8px;
      background: transparent;
      color: #6b7280;
      font-size: 0.9rem;
      gap: 0.55rem;
    }
    .sidebar-footer .nav-item svg {
      width: 18px;
      height: 18px;
    }
    .sidebar-footer .nav-item:hover {
      background: transparent;
      color: var(--acquirely-blue);
    }
    .sidebar-footer .nav-item:active {
      color: #0f6aa8;
      transform: translateY(0.5px);
    }
    .sidebar-footer .nav-item.active {
      background: transparent;
      color: var(--acquirely-blue);
      font-weight: 500;
    }
    .sidebar-workspace-icon-rail {
      display: none;
      width: 20px;
      height: 20px;
      flex-shrink: 0;
      opacity: 0.85;
    }
    .sidebar-rail-toggle {
      display: flex;
      align-items: center;
      justify-content: center;
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      z-index: 2;
      width: 28px;
      height: 28px;
      padding: 0;
      margin: 0;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: #64748b;
      cursor: pointer;
      font-family: inherit;
      opacity: 0;
      pointer-events: auto;
      transition: opacity 0.22s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    }
    .sidebar-logo:hover .sidebar-rail-toggle {
      opacity: 0.72;
    }
    .sidebar-rail-toggle:hover {
      opacity: 1;
      color: #0f172a;
      background: rgba(148, 163, 184, 0.2);
    }
    .sidebar-rail-toggle:focus-visible {
      outline: 2px solid var(--acquirely-blue);
      outline-offset: 2px;
      opacity: 1;
    }
    .sidebar-rail-toggle-icon {
      display: block;
    }
    .sidebar-rail-toggle-icon--expand {
      display: none;
    }
    body.sidebar-rail .sidebar {
      width: var(--sidebar-rail-width);
    }
    body.sidebar-rail .main {
      margin-left: var(--sidebar-rail-width);
    }
    body.sidebar-rail .sidebar-logo-row {
      justify-content: center;
      align-items: center;
      padding: 0.65rem 0 0.55rem;
    }
    body.sidebar-rail .sidebar-logo {
      flex: 0 0 auto;
      width: 40px;
      height: 40px;
      justify-content: center;
    }
    body.sidebar-rail .sidebar-logo-favicon {
      display: block !important;
      transition: opacity 0.2s ease;
    }
    body.sidebar-rail .sidebar-logo-img--light,
    body.sidebar-rail .sidebar-logo-img--dark {
      display: none !important;
      visibility: hidden !important;
    }
    body.sidebar-rail .sidebar-rail-toggle {
      left: 50%;
      right: auto;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 30px;
      height: 30px;
      border-radius: 8px;
      opacity: 0;
      z-index: 2;
      color: #334155;
      background: rgba(255, 255, 255, 0.94);
      box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 2px 10px rgba(15, 23, 42, 0.1);
    }
    html:not([data-theme="dark"]) body.sidebar-rail .sidebar-rail-toggle:hover {
      background: #fff;
      color: #0f172a;
    }
    body.sidebar-rail .sidebar-logo:hover .sidebar-logo-favicon {
      opacity: 0.22;
    }
    html:not([data-theme="dark"]) body.sidebar-rail .sidebar-logo:hover .sidebar-logo-favicon {
      opacity: 0.2;
    }
    body.sidebar-rail .sidebar-logo:hover .sidebar-rail-toggle {
      opacity: 1;
    }
    body.sidebar-rail .sidebar-rail-toggle:hover {
      opacity: 1;
    }
    [data-theme="dark"] body.sidebar-rail .sidebar-logo-favicon {
      filter: brightness(0) invert(1);
    }
    [data-theme="dark"] body.sidebar-rail .sidebar-rail-toggle {
      color: #f0f6fc;
      background: rgba(1, 4, 9, 0.72);
      box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
    }
    [data-theme="dark"] body.sidebar-rail .sidebar-rail-toggle:hover {
      background: rgba(22, 27, 34, 0.95);
      color: #fff;
    }
    body.sidebar-rail .sidebar-rail-toggle-icon--collapse {
      display: none;
    }
    body.sidebar-rail .sidebar-rail-toggle-icon--expand {
      display: block;
    }
    body.sidebar-rail .sidebar-workspace {
      display: none !important;
    }
    body.sidebar-rail .sidebar-logo-row {
      border-bottom: 1px solid rgba(15, 23, 42, 0.06);
      margin-bottom: 0.15rem;
    }
    [data-theme="dark"] body.sidebar-rail .sidebar-logo-row {
      border-bottom-color: var(--border);
    }
    body.sidebar-rail .sidebar {
      overflow: visible;
    }
    body.sidebar-rail .sidebar-nav {
      padding: 0.65rem 0;
      overflow: visible;
    }
    body.sidebar-rail .sidebar-nav .nav-item,
    body.sidebar-rail .sidebar-footer .nav-item {
      position: relative;
      justify-content: center;
      padding: 0.65rem 0.45rem;
      margin: 0 0.45rem 0.4rem;
      gap: 0;
      overflow: visible;
    }
    body.sidebar-rail .nav-item-label {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
    body.sidebar-rail .sidebar-footer {
      padding: 0.75rem 0.5rem 1rem;
      overflow: visible;
    }
    body.sidebar-rail .sidebar-nav .nav-item[data-acq-nav-tip]::after,
    body.sidebar-rail .sidebar-footer .nav-item[data-acq-nav-tip]::after {
      content: attr(data-acq-nav-tip);
      position: absolute;
      left: calc(100% + 11px);
      top: 50%;
      transform: translate3d(-4px, -50%, 0) scale(0.97);
      padding: 0.4rem 0.62rem;
      border-radius: 8px;
      font-size: 0.8125rem;
      font-weight: 600;
      letter-spacing: 0.01em;
      line-height: 1.2;
      white-space: nowrap;
      color: #f8fafc;
      background: #1e293b;
      border: 1px solid rgba(148, 163, 184, 0.28);
      box-shadow:
        0 8px 22px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition:
        opacity 0.09s ease,
        transform 0.09s ease,
        visibility 0s linear 0.1s;
      z-index: 200;
    }
    body.sidebar-rail .sidebar-nav .nav-item[data-acq-nav-tip]::before,
    body.sidebar-rail .sidebar-footer .nav-item[data-acq-nav-tip]::before {
      content: '';
      position: absolute;
      left: calc(100% + 5px);
      top: 50%;
      width: 0;
      height: 0;
      transform: translateY(-50%);
      border-top: 5px solid transparent;
      border-bottom: 5px solid transparent;
      border-right: 6px solid #1e293b;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition:
        opacity 0.09s ease,
        visibility 0s linear 0.1s;
      z-index: 201;
    }
    body.sidebar-rail .sidebar-nav .nav-item[data-acq-nav-tip]:hover::after,
    body.sidebar-rail .sidebar-footer .nav-item[data-acq-nav-tip]:hover::after,
    body.sidebar-rail .sidebar-nav .nav-item[data-acq-nav-tip]:focus-visible::after,
    body.sidebar-rail .sidebar-footer .nav-item[data-acq-nav-tip]:focus-visible::after {
      opacity: 1;
      visibility: visible;
      transform: translate3d(0, -50%, 0) scale(1);
      transition-delay: 0s;
    }
    body.sidebar-rail .sidebar-nav .nav-item[data-acq-nav-tip]:hover::before,
    body.sidebar-rail .sidebar-footer .nav-item[data-acq-nav-tip]:hover::before,
    body.sidebar-rail .sidebar-nav .nav-item[data-acq-nav-tip]:focus-visible::before,
    body.sidebar-rail .sidebar-footer .nav-item[data-acq-nav-tip]:focus-visible::before {
      opacity: 1;
      visibility: visible;
      transition-delay: 0s;
    }
    [data-theme="dark"] body.sidebar-rail .sidebar-nav .nav-item[data-acq-nav-tip]::after,
    [data-theme="dark"] body.sidebar-rail .sidebar-footer .nav-item[data-acq-nav-tip]::after {
      color: var(--text);
      background: #21262d;
      border-color: #484f58;
      box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    }
    [data-theme="dark"] body.sidebar-rail .sidebar-nav .nav-item[data-acq-nav-tip]::before,
    [data-theme="dark"] body.sidebar-rail .sidebar-footer .nav-item[data-acq-nav-tip]::before {
      border-right-color: #21262d;
    }
    @media (prefers-reduced-motion: reduce) {
      body.sidebar-rail .sidebar-nav .nav-item[data-acq-nav-tip]::after,
      body.sidebar-rail .sidebar-footer .nav-item[data-acq-nav-tip]::after,
      body.sidebar-rail .sidebar-nav .nav-item[data-acq-nav-tip]::before,
      body.sidebar-rail .sidebar-footer .nav-item[data-acq-nav-tip]::before {
        transition: opacity 0.05s ease, visibility 0s linear 0.05s;
      }
    }
    [data-theme="dark"] .sidebar-rail-toggle {
      color: var(--text-muted);
      background: transparent;
    }
    [data-theme="dark"] .sidebar-logo:hover .sidebar-rail-toggle {
      color: var(--text);
    }
    [data-theme="dark"] .sidebar-rail-toggle:hover {
      color: var(--text);
      background: rgba(110, 118, 129, 0.22);
    }
    .agent-select {
      font-size: 0.75rem; color: #94a3b8; margin-bottom: 0.25rem;
    }
    .agent-value {
      display: flex; align-items: center; gap: 0.25rem; color: white; font-size: 0.9rem; cursor: pointer;
    }
    .agent-value svg { width: 14px; height: 14px; }

    /* Main - HotHawk style: light canvas, spacious */
    .main {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
      background: var(--bg);
      margin-left: var(--sidebar-width);
      min-height: 100vh;
      height: 100vh;
      overflow: hidden;
    }
    .main-header {
      background: var(--bg-card); border-bottom: 1px solid var(--border-light);
      padding: 1.05rem var(--platform-shell-header-x, 1.35rem);
      display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
      flex-shrink: 0;
      box-sizing: border-box;
    }
    .main-header > .main-header-title-wrap {
      padding-left: 0;
      margin: 0;
    }
    .main-header-title-wrap > div {
      min-height: 2.8125rem;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    .header-actions {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-left: auto;
    }
    .notification-sound-toggle {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.48rem 0.78rem;
      border-radius: 999px;
      border: 1px solid #dbe7f3;
      background: #ffffff;
      color: #475569;
      font: inherit;
      font-size: 0.84rem;
      font-weight: 600;
      cursor: pointer;
      transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    }
    .notification-sound-toggle:hover {
      background: #f8fbff;
      border-color: #cbdff3;
      color: #0f172a;
      box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    }
    .notification-sound-toggle svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.9;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex-shrink: 0;
    }
    .notification-sound-toggle .toggle-label-off {
      display: none;
    }
    .notification-sound-toggle[data-enabled="false"] {
      color: #94a3b8;
      border-color: #e2e8f0;
      background: #f8fafc;
    }
    .notification-sound-toggle[data-enabled="false"] .toggle-label-on {
      display: none;
    }
    .notification-sound-toggle[data-enabled="false"] .toggle-label-off {
      display: inline;
    }
    .theme-mode-toggle {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0;
      padding: 0.32rem;
      border-radius: 10px;
      border: 1px solid #dbe7f3;
      background: #ffffff;
      color: #475569;
      font: inherit;
      font-size: 0.84rem;
      font-weight: 600;
      cursor: pointer;
      transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    }
    .theme-mode-toggle:hover {
      background: #f8fbff;
      border-color: #cbdff3;
      color: #0f172a;
      box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    }
    body.acquirely-theme-toggle--labeled .theme-mode-toggle .theme-mode-toggle-icons {
      display: none !important;
    }
    body.acquirely-theme-toggle--labeled .theme-mode-toggle {
      padding: 0.38rem 0.85rem;
      min-width: 7.25rem;
    }
    .theme-mode-toggle-word {
      font-size: 0.8rem;
      font-weight: 600;
      letter-spacing: -0.015em;
      white-space: nowrap;
    }
    .theme-mode-toggle-icons {
      position: relative;
      width: 15px;
      height: 15px;
      display: grid;
      place-items: center;
      flex-shrink: 0;
    }
    .theme-mode-toggle-svg {
      grid-area: 1 / 1;
      width: 15px;
      height: 15px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.85;
      stroke-linecap: round;
      stroke-linejoin: round;
      transition:
        opacity 0.38s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.48s cubic-bezier(0.34, 1.15, 0.64, 1);
    }
    html:not([data-theme="dark"]) .theme-mode-toggle-svg--sun {
      opacity: 0;
      transform: rotate(72deg) scale(0.62);
      pointer-events: none;
    }
    html:not([data-theme="dark"]) .theme-mode-toggle-svg--moon {
      opacity: 1;
      transform: rotate(0deg) scale(1);
    }
    html[data-theme="dark"] .theme-mode-toggle-svg--moon {
      opacity: 0;
      transform: rotate(-72deg) scale(0.62);
      pointer-events: none;
    }
    html[data-theme="dark"] .theme-mode-toggle-svg--sun {
      opacity: 1;
      transform: rotate(0deg) scale(1);
    }
    @media (prefers-reduced-motion: reduce) {
      .theme-mode-toggle-svg {
        transition: opacity 0.12s ease;
      }
      html:not([data-theme="dark"]) .theme-mode-toggle-svg--sun,
      html[data-theme="dark"] .theme-mode-toggle-svg--moon {
        transform: none;
      }
    }
    .theme-mode-toggle::after {
      content: attr(data-tooltip);
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      padding: 0.4rem 0.55rem;
      border-radius: 8px;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.012em;
      line-height: 1.25;
      white-space: nowrap;
      color: #0f172a;
      background: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.1);
      box-shadow:
        0 4px 14px rgba(15, 23, 42, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
      opacity: 0;
      pointer-events: none;
      transform: translate3d(0, -5px, 0) scale(0.97);
      transition:
        opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.24s cubic-bezier(0.34, 1.2, 0.64, 1);
      z-index: 50;
    }
    .theme-mode-toggle:hover::after,
    .theme-mode-toggle:focus-visible::after {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }
    .theme-mode-toggle:focus-visible {
      outline: 2px solid rgba(37, 99, 235, 0.55);
      outline-offset: 2px;
    }
    [data-theme="dark"] .theme-mode-toggle::after {
      color: var(--text);
      background: var(--bg-card);
      border-color: var(--border);
      box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    }
    [data-theme="dark"] .theme-mode-toggle-word {
      color: var(--text);
    }
    @media (prefers-reduced-motion: reduce) {
      .theme-mode-toggle::after {
        transition: opacity 0.12s ease;
        transform: none;
      }
      .theme-mode-toggle:hover::after,
      .theme-mode-toggle:focus-visible::after {
        transform: none;
      }
    }
    .main-title { font-size: 1.28rem; font-weight: 600; letter-spacing: -0.025em; color: var(--text); line-height: 1.2; }
    .main-header-title-row {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      flex-wrap: wrap;
    }
    .header-inbox-sync-signal {
      display: none;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: wrap;
      max-width: min(100%, 28rem);
      font-size: 0.8125rem;
      line-height: 1.35;
      font-weight: 500;
    }
    .header-inbox-sync-signal:not([hidden]) {
      display: flex;
    }
    .header-inbox-sync-dot {
      flex-shrink: 0;
      width: 0.5rem;
      height: 0.5rem;
      border-radius: 50%;
      background: rgba(148, 163, 184, 0.55);
    }
    .header-inbox-sync-signal--importing .header-inbox-sync-dot {
      background: var(--warning, #f59e0b);
      animation: acq-header-sync-ripple-ring-warn 2.65s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
    }
    .header-inbox-sync-signal--ok .header-inbox-sync-dot {
      background: var(--success, #22c55e);
      animation: acq-header-sync-ripple-ring-ok 2.65s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
    }
    /* Core stays fixed; outer shadow spreads and fades (sonar), rim shadow holds steady. */
    @keyframes acq-header-sync-ripple-ring-ok {
      0% {
        box-shadow:
          0 0 0 0 rgba(34, 197, 94, 0.42),
          0 0 0 2px rgba(34, 197, 94, 0.22);
      }
      48% {
        box-shadow:
          0 0 0 11px rgba(34, 197, 94, 0),
          0 0 0 2px rgba(34, 197, 94, 0.22);
      }
      100% {
        box-shadow:
          0 0 0 11px rgba(34, 197, 94, 0),
          0 0 0 2px rgba(34, 197, 94, 0.22);
      }
    }
    @keyframes acq-header-sync-ripple-ring-warn {
      0% {
        box-shadow:
          0 0 0 0 rgba(245, 158, 11, 0.45),
          0 0 0 2px rgba(245, 158, 11, 0.25);
      }
      48% {
        box-shadow:
          0 0 0 11px rgba(245, 158, 11, 0),
          0 0 0 2px rgba(245, 158, 11, 0.25);
      }
      100% {
        box-shadow:
          0 0 0 11px rgba(245, 158, 11, 0),
          0 0 0 2px rgba(245, 158, 11, 0.25);
      }
    }
    @media (prefers-reduced-motion: reduce) {
      .header-inbox-sync-signal--importing .header-inbox-sync-dot {
        animation: none;
        box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
      }
      .header-inbox-sync-signal--ok .header-inbox-sync-dot {
        animation: none;
        box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.22);
      }
    }
    .header-inbox-sync-text {
      display: flex;
      flex-direction: row;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 0.35rem;
      min-width: 0;
    }
    .header-inbox-sync-signal .inbox-import-progress-label {
      color: var(--warning, #d97706);
      font-weight: 600;
      font-size: 0.8125rem;
      flex-shrink: 0;
    }
    .header-inbox-sync-signal .inbox-import-progress-count {
      color: rgba(180, 83, 9, 0.92);
      font-size: 0.8125rem;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      min-width: 0;
    }
    .header-inbox-sync-signal--ok .inbox-import-progress-label {
      color: var(--success, #16a34a);
    }
    .header-inbox-sync-signal--ok .inbox-import-progress-count {
      display: none;
    }
    .main-subtitle {
      font-size: 0.875rem;
      color: var(--text-muted);
      margin-top: 0.12rem;
      min-height: 1.3125rem;
      line-height: 1.5;
    }
    .main-content { padding: 0; flex: 1; overflow: hidden; min-height: 0; }
    #page-inbox.page.active {
      box-sizing: border-box;
      height: 100%;
      min-height: 0;
      padding: 0.65rem var(--platform-shell-content-x, 0.75rem) 0.7rem;
    }
    #page-inbox.page.active ~ .page,
    .main-content > .page:not(#page-inbox) {
      padding: 2rem;
      box-sizing: border-box;
    }
    .workspace-switcher { display: flex; flex-direction: column; gap: 0.25rem; }
    .workspace-switcher-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 600; }
    .workspace-select {
      min-width: 180px; padding: 0.4rem 0.6rem; border-radius: 999px; border: 1px solid var(--border);
      font-size: 0.85rem; background: #fff; color: var(--text);
    }
    .workspace-select:focus { outline: none; border-color: var(--stripe-purple); box-shadow: 0 0 0 2px rgba(99,91,255,0.15); }
    /* Mode toggle: Human SDR | AI Agent | Auto AI Agent */
    .mode-pills { display: none; }
    .mode-pill { padding: 0.4rem 0.9rem; font-size: 0.8125rem; font-weight: 500; border-radius: 8px; cursor: pointer; color: var(--text-muted); transition: all 0.15s; }
    .mode-pill:hover { color: var(--text); }
    .mode-pill.active {
      background: var(--acquirely-blue);
      color: #f9fafb;
      box-shadow: 0 1px 3px rgba(15,23,42,0.18);
    }

    /* Pages - hide by default */
    .page { display: none; height: 100%; min-height: 0; }
    .page.active { display: block; height: 100%; overflow-y: auto; }
    #page-inbox.page.active { overflow: hidden; }
    #page-inbox-setup.page.active {
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    #page-inbox-setup .inbox-setup-embed {
      flex: 1 1 auto;
      width: 100%;
      min-height: 0;
      border: 0;
      background: #030712;
    }

    /* Cards */
    .card {
      background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
      box-shadow: var(--shadow-sm); padding: 1.5rem; margin-bottom: 1.5rem; transition: box-shadow 0.2s;
    }
    .card:hover { box-shadow: var(--shadow); }
    .card-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
    #page-agent-settings .card > .card-title,
    #page-agent-settings .card-title-row--with-help > .card-title {
      font-size: 1.22rem;
      font-weight: 600;
      letter-spacing: -0.02em;
      line-height: 1.25;
    }
    #page-agent-settings #agent-general .agent-general-compact-card {
      /* Top/sides match .card (Knowledge Base / Instructions) so block headings align */
      padding: 1.5rem 1.5rem 1.2rem;
      margin-bottom: 1rem;
      height: 100%;
      display: flex;
      flex-direction: column;
      min-height: 0;
      box-sizing: border-box;
    }
    /* Match Knowledge Base / Instructions / Training .card-title (tab block headings) */
    #page-agent-settings #agent-general .agent-compact-title {
      font-size: 1.22rem;
      font-weight: 600;
      margin: 0 0 0.2rem;
      letter-spacing: -0.02em;
      color: var(--text);
      line-height: 1.25;
    }
    #page-agent-settings #agent-general .agent-compact-kicker {
      margin: 0 0 0.85rem;
      font-size: 0.78rem;
      font-weight: 500;
      line-height: 1.4;
      color: var(--text-muted);
    }
    #page-agent-settings #agent-general .agent-general-card-fill {
      flex: 1 1 auto;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }
    #page-agent-settings {
      padding-bottom: 2.25rem;
      box-sizing: border-box;
      background: var(--bg);
      min-height: 100%;
    }
    #page-agent-settings.page.active.page-agent-settings--agent-fullbleed {
      display: flex;
      flex-direction: column;
      overflow: hidden;
      height: 100%;
      min-height: 0;
      width: calc(100% + 4rem);
      max-width: none;
      margin-left: -2rem;
      margin-right: -2rem;
      padding-left: 2rem;
      padding-right: 2rem;
      padding-bottom: 0.35rem;
      box-sizing: border-box;
    }
    #page-agent-settings.page-agent-settings--agent-fullbleed .page-tabs-pills {
      max-width: none;
    }
    #page-agent-settings #agent-general .agent-general-layout {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      width: 100%;
      max-width: 100%;
      align-items: stretch;
      box-sizing: border-box;
    }
    #page-agent-settings #agent-general .agent-general-four-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.75rem 1rem;
      align-items: stretch;
      width: 100%;
    }
    @media (max-width: 900px) {
      #page-agent-settings #agent-general .agent-general-four-grid {
        grid-template-columns: 1fr;
      }
    }
    /* Full-width platform block (matches grid above; removes 1200px cap / stray centering). */
    #page-agent-settings #agent-general .platform-settings-card.platform-settings-block {
      width: 100%;
      max-width: none;
      margin-left: 0;
      margin-right: 0;
      box-sizing: border-box;
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-sm);
      padding: 1.5rem;
    }
    #page-agent-settings #agent-general .platform-settings-block .platform-settings-title {
      font-size: 1.22rem;
      font-weight: 600;
      letter-spacing: -0.02em;
      line-height: 1.25;
      color: var(--text);
    }
    #page-agent-settings #agent-general .agent-setter-global-options {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.65rem 0.85rem;
      margin-bottom: 1rem;
    }
    #page-agent-settings #agent-general .agent-setter-global-options .form-group {
      flex: 1 1 12.5rem;
      min-width: 0;
    }
    #page-agent-settings #agent-general .agent-setter-global-options .agent-setter-search-group {
      flex: 2 1 min(100%, 22rem);
    }
    #page-agent-settings #agent-general .agent-column-list {
      min-height: 200px;
      max-height: min(52vh, 440px);
    }
    /* Training: 3-column desktop avoids a lone fifth card (3+2 instead of 4+1). */
    #page-agent-settings #agent-training .training-list-grid {
      grid-template-columns: 1fr;
      gap: 1.1rem;
    }
    @media (min-width: 700px) {
      #page-agent-settings #agent-training .training-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }
    @media (min-width: 1100px) {
      #page-agent-settings #agent-training .training-list-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }
    #page-agent-settings #agent-training .training-card {
      padding: 1.05rem 1.2rem 1.15rem;
    }
    #page-agent-settings #agent-general .agent-compact-field .form-label {
      font-size: 0.7rem;
      font-weight: 600;
      margin-bottom: 0.3rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    #page-agent-settings #agent-general #modelSelector.model-selector,
    #page-agent-settings #agent-general .agent-auto-send-delay-wrap.model-selector {
      max-width: min(100%, 20rem);
      width: 100%;
    }
    #page-agent-settings #agent-general #schedulerProviderSelector.model-selector {
      max-width: min(100%, 21.5rem);
      width: 100%;
    }
    #page-agent-settings #agent-general #calendlyEventSelector.model-selector {
      max-width: none;
    }
    #page-agent-settings #agent-general .agent-compact-selector .model-selector-trigger,
    #page-agent-settings #agent-general #calendlyEventSelector .model-selector-trigger {
      padding: 0.65rem 0.9rem;
      min-height: 3.55rem;
      box-sizing: border-box;
    }
    #page-agent-settings #agent-general .agent-auto-send-delay-wrap .model-selector-trigger {
      padding: 0.65rem 0.9rem;
      border-radius: 11px;
      min-height: 3.55rem;
      box-sizing: border-box;
    }
    #page-agent-settings #agent-general .agent-compact-selector .model-selector-name,
    #page-agent-settings #agent-general #calendlyEventSelector .model-selector-name {
      font-size: 0.84rem;
    }
    #page-agent-settings #agent-general .agent-auto-send-delay-wrap .model-selector-name {
      font-size: 0.92rem;
      font-weight: 600;
    }
    #page-agent-settings #agent-general .agent-compact-selector .model-selector-desc,
    #page-agent-settings #agent-general #calendlyEventSelector .model-selector-desc {
      font-size: 0.7rem;
    }
    #page-agent-settings #agent-general .agent-auto-send-delay-wrap .model-selector-desc {
      font-size: 0.76rem;
      line-height: 1.35;
    }
    #page-agent-settings #agent-general .agent-auto-send-delay-wrap .model-selector-trigger svg {
      width: 18px;
      height: 18px;
    }
    #page-agent-settings #agent-general .agent-calendly-refresh-row {
      display: flex;
      align-items: stretch;
      gap: 0.45rem;
    }
    #page-agent-settings #agent-general .agent-calendly-refresh-row #calendlyEventSelector {
      flex: 1;
      min-width: 0;
    }
    #page-agent-settings #agent-general .agent-calendly-refresh-row .agent-refresh-btn {
      flex-shrink: 0;
      align-self: center;
    }
    #page-agent-settings #agent-general .agent-general-footnote {
      margin: 0;
      margin-top: auto;
      padding-top: 0.75rem;
      font-size: 0.72rem;
      color: var(--text-muted);
      line-height: 1.35;
    }
    #page-agent-settings #agent-general .agent-general-footnote a {
      color: var(--acquirely-blue);
    }
    #page-agent-settings #agent-general .agent-scheduler-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 0.75rem 1rem;
      flex-wrap: wrap;
      margin-top: auto;
      padding-top: 0.75rem;
    }
    #page-agent-settings #agent-general .agent-scheduler-card-footer .agent-general-footnote {
      margin: 0;
      padding-top: 0;
      flex: 1 1 12rem;
    }
    #page-agent-settings #agent-general .calendly-connection-status {
      font-size: 0.72rem;
      font-weight: 600;
      line-height: 1.35;
      text-align: right;
      flex-shrink: 0;
      min-height: 1.2em;
      letter-spacing: 0.01em;
    }
    #page-agent-settings #agent-general .calendly-connection-status.is-checking {
      color: var(--text-muted);
      font-weight: 500;
    }
    #page-agent-settings #agent-general .calendly-connection-status.is-connected {
      color: #15803d;
    }
    #page-agent-settings #agent-general .calendly-connection-status.is-disconnected {
      color: #a16207;
    }
    [data-theme="dark"] #page-agent-settings #agent-general .calendly-connection-status.is-connected {
      color: #4ade80;
    }
    [data-theme="dark"] #page-agent-settings #agent-general .calendly-connection-status.is-disconnected {
      color: #fcd34d;
    }
    #page-agent-settings #agent-general .agent-mini-skill {
      padding: 0.55rem 0.7rem;
      border-radius: 10px;
      border: 1px solid var(--border-light);
      background: var(--bg-card);
      box-shadow: var(--shadow-sm);
    }
    #page-agent-settings #agent-general .agent-mini-skill-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      margin-bottom: 0.35rem;
    }
    #page-agent-settings #agent-general .agent-mini-skill-title {
      font-size: 0.8125rem;
      font-weight: 600;
    }
    #page-agent-settings #agent-general .agent-mini-skill [data-skill-label] {
      display: block;
      font-size: 0.72rem;
      color: var(--text-muted);
      margin-bottom: 0.45rem;
      line-height: 1.2;
    }
    #page-agent-settings #agent-general .agent-feature-card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem 1rem;
      margin-bottom: 0.25rem;
    }
    #page-agent-settings #agent-general .agent-feature-card-head-main {
      flex: 1;
      min-width: 0;
    }
    #page-agent-settings #agent-general .agent-feature-card .agent-compact-title {
      margin: 0;
    }
    #page-agent-settings #agent-general .agent-feature-card-kicker {
      margin-top: 0;
      margin-bottom: 0.85rem;
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-general-compact-card.agent-feature-card {
      background: var(--bg-card);
      box-shadow: var(--shadow-sm);
    }
    #page-agent-settings #agent-general .skill-card.agent-skill-toggle-host {
      padding: 0;
      margin: 0;
      border: none;
      background: transparent;
      box-shadow: none;
      flex-shrink: 0;
    }
    #page-agent-settings #agent-general .agent-skill-toggle-host .toggle {
      display: flex;
      align-items: center;
    }
    #page-agent-settings #agent-general .agent-skill-toggle-host .toggle-switch {
      width: 48px;
      height: 28px;
      border-radius: 999px;
    }
    #page-agent-settings #agent-general .agent-skill-toggle-host .toggle-switch::after {
      width: 22px;
      height: 22px;
      top: 2px;
      left: 2px;
    }
    #page-agent-settings #agent-general .agent-skill-toggle-host .toggle-switch.on::after {
      transform: translateX(20px);
    }
    #page-agent-settings #agent-general [data-skill-label].agent-skill-status-line {
      display: block;
      margin: 0 0 0.7rem;
      font-size: 0.8125rem;
      line-height: 1.45;
      font-weight: 500;
      letter-spacing: -0.015em;
      transition: color 0.15s ease;
    }
    #page-agent-settings #agent-general [data-skill-label].agent-skill-status-line.agent-skill-status-line--on {
      color: var(--text);
    }
    #page-agent-settings #agent-general [data-skill-label].agent-skill-status-line.agent-skill-status-line--off {
      color: var(--text-muted);
    }
    [data-theme="dark"] #page-agent-settings #agent-general [data-skill-label].agent-skill-status-line.agent-skill-status-line--on {
      color: #e6edf3;
    }
    #page-agent-settings #agent-general .agent-skill-panel-footer {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      margin-top: auto;
      padding: 0.55rem 0 0;
      min-height: 2.35rem;
      box-sizing: border-box;
      border-top: 1px solid var(--border-light);
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-skill-panel-footer {
      border-top-color: var(--border);
    }
    #page-agent-settings #agent-general .agent-auto-send-panel.agent-auto-send-compact {
      flex: 1;
      min-height: 0;
    }
    #page-agent-settings #agent-general .agent-skill-status-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      padding: 0.3rem 0.78rem;
      border-radius: 999px;
      font-size: 0.72rem;
      font-weight: 600;
      line-height: 1.25;
      letter-spacing: 0.02em;
      text-transform: none;
      user-select: none;
      border: 1px solid transparent;
    }
    #page-agent-settings #agent-general .agent-skill-status-pill-text {
      line-height: 1.2;
    }
    #page-agent-settings #agent-general .agent-skill-status-pill-dot {
      width: 7px;
      height: 7px;
      border-radius: 999px;
      flex-shrink: 0;
    }
    #page-agent-settings #agent-general .agent-skill-status-pill.is-disabled {
      color: #e11d48;
      background: rgba(254, 205, 211, 0.35);
      border-color: rgba(244, 63, 94, 0.45);
    }
    #page-agent-settings #agent-general .agent-skill-status-pill.is-disabled .agent-skill-status-pill-dot {
      background: #e11d48;
      opacity: 1;
    }
    #page-agent-settings #agent-general .agent-skill-status-pill.is-active {
      color: #166534;
      background: rgba(34, 197, 94, 0.14);
      border-color: rgba(22, 163, 74, 0.45);
    }
    #page-agent-settings #agent-general .agent-skill-status-pill.is-active .agent-skill-status-pill-dot {
      background: #16a34a;
      opacity: 1;
      animation: agent-skill-dot-pulse 2s ease-in-out infinite;
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-skill-status-pill.is-disabled {
      color: #fca5a5;
      background: rgba(248, 113, 113, 0.12);
      border-color: rgba(252, 165, 165, 0.42);
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-skill-status-pill.is-disabled .agent-skill-status-pill-dot {
      background: #fca5a5;
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-skill-status-pill.is-active {
      color: #86efac;
      background: rgba(34, 197, 94, 0.14);
      border-color: rgba(74, 222, 128, 0.42);
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-skill-status-pill.is-active .agent-skill-status-pill-dot {
      background: #4ade80;
    }
    @keyframes agent-skill-dot-pulse {
      0%,
      100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4);
      }
      50% {
        opacity: 0.9;
        box-shadow: 0 0 0 5px rgba(52, 211, 153, 0);
      }
    }
    #page-agent-settings #agent-general .agent-feature-micro-list {
      margin: 0 0 0.85rem;
      padding: 0.55rem 0 0.55rem 1.15rem;
      font-size: 0.74rem;
      line-height: 1.5;
      color: var(--text-muted);
      border-radius: 10px;
      border: 1px solid var(--border-light);
      background: var(--bg-alt);
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-feature-micro-list {
      background: rgba(255, 255, 255, 0.03);
      border-color: var(--border);
    }
    #page-agent-settings #agent-general .agent-feature-micro-list li {
      margin: 0.2rem 0;
    }
    #page-agent-settings #agent-general .agent-feature-micro-list li::marker {
      color: rgba(59, 130, 246, 0.75);
    }
    #page-agent-settings #agent-general .agent-auto-send-panel {
      padding: 0.75rem 0.85rem;
      border-radius: 12px;
      border: 1px solid var(--border-light);
      background: var(--bg-alt);
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
      width: 100%;
      box-sizing: border-box;
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-auto-send-panel {
      background: var(--bg-alt);
      border-color: var(--border);
    }
    #page-agent-settings #agent-general .agent-auto-send-compact .auto-send-config {
      margin-top: 0;
      gap: 0.55rem;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      flex: 1 1 auto;
      min-height: 0;
    }
    #page-agent-settings #agent-general .agent-auto-send-compact .auto-send-delay-note {
      font-size: 0.72rem;
      line-height: 1.35;
      max-width: min(100%, 22rem);
    }
    #page-agent-settings #agent-general .agent-auto-send-compact .form-label {
      font-size: 0.72rem;
    }
    #page-agent-settings #agent-general .auto-send-range .form-label {
      text-transform: none;
      letter-spacing: 0.02em;
      font-weight: 600;
      color: var(--text-muted);
    }
    #page-agent-settings #agent-general .auto-send-range {
      display: grid;
      grid-template-columns: auto auto;
      gap: 0.4rem;
      width: auto;
      max-width: 100%;
      justify-items: start;
    }
    #page-agent-settings #agent-general .auto-send-range[hidden] {
      display: none !important;
    }
    #page-agent-settings #agent-general .agent-auto-send-save-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.55rem 0.85rem;
      margin-top: 0.35rem;
      width: 100%;
    }
    #page-agent-settings #agent-general .agent-auto-send-save-status {
      font-size: 0.78rem;
      font-weight: 600;
      min-height: 1.2em;
      color: var(--text-muted);
    }
    #page-agent-settings #agent-general .agent-auto-send-save-status.is-saving {
      color: var(--text-muted);
    }
    #page-agent-settings #agent-general .agent-auto-send-save-status.is-saved {
      color: #15803d;
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-auto-send-save-status.is-saved {
      color: #4ade80;
    }
    #page-agent-settings #agent-general .agent-number-stepper,
    .modal-box .agent-number-stepper {
      display: flex;
      align-items: stretch;
      border-radius: 10px;
      border: 1px solid var(--border-light);
      background: var(--bg-card);
      overflow: hidden;
      min-height: 3.5rem;
    }
    #page-agent-settings #agent-general .agent-number-stepper:focus-within,
    .modal-box .agent-number-stepper:focus-within {
      border-color: rgba(59, 130, 246, 0.55);
      box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
    }
    #page-agent-settings #agent-general .auto-send-range .agent-number-stepper {
      width: 100%;
      max-width: 6.35rem;
      min-height: 3.65rem;
    }
    .modal-box .followup-timing-grid .agent-number-stepper {
      width: 100%;
      max-width: none;
    }
    .modal-box .followup-timing-grid .agent-number-stepper-input {
      min-width: 3.35rem;
      flex: 1 1 auto;
    }
    #page-agent-settings #agent-general .agent-number-stepper-input,
    .modal-box .agent-number-stepper-input {
      flex: 1;
      min-width: 0;
      border: none !important;
      border-radius: 0 !important;
      text-align: center;
      font-size: 1.12rem;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      padding: 0.62rem 0.35rem !important;
      background: transparent !important;
      box-shadow: none !important;
    }
    #page-agent-settings #agent-general .agent-number-stepper-input::-webkit-outer-spin-button,
    #page-agent-settings #agent-general .agent-number-stepper-input::-webkit-inner-spin-button,
    .modal-box .agent-number-stepper-input::-webkit-outer-spin-button,
    .modal-box .agent-number-stepper-input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    #page-agent-settings #agent-general .agent-number-stepper-input[type='number'],
    .modal-box .agent-number-stepper-input[type='number'] {
      -moz-appearance: textfield;
      appearance: textfield;
    }
    #page-agent-settings #agent-general .agent-number-stepper-btns,
    .modal-box .agent-number-stepper-btns {
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      border-left: 1px solid var(--border-light);
      width: 2.65rem;
      min-width: 2.65rem;
    }
    #page-agent-settings #agent-general .agent-stepper-btn,
    .modal-box .agent-stepper-btn {
      flex: 1;
      margin: 0;
      padding: 0;
      border: none;
      background: var(--bg-alt);
      color: var(--text-muted);
      cursor: pointer;
      font-size: 0.68rem;
      line-height: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 1.35rem;
      transition: background 0.12s, color 0.12s;
    }
    #page-agent-settings #agent-general .agent-stepper-btn:hover,
    .modal-box .agent-stepper-btn:hover {
      background: rgba(59, 130, 246, 0.12);
      color: var(--acquirely-blue);
    }
    #page-agent-settings #agent-general .agent-stepper-btn:active,
    .modal-box .agent-stepper-btn:active {
      background: rgba(59, 130, 246, 0.2);
    }
    #page-agent-settings #agent-general .agent-stepper-btn + .agent-stepper-btn,
    .modal-box .agent-stepper-btn + .agent-stepper-btn {
      border-top: 1px solid var(--border-light);
    }
    #page-agent-settings #agent-general .agent-followups-body {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
      min-height: 0;
    }
    #page-agent-settings #agent-general .agent-followups-lead {
      margin: 0;
      font-size: 0.8rem;
      line-height: 1.45;
      color: var(--text-muted);
    }
    #page-agent-settings #agent-general .agent-followups-cta {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 0.75rem;
      text-align: left;
      padding: 0.75rem 0.95rem;
      min-height: 3.85rem;
      border-radius: 12px;
      border: 1px solid var(--border-light);
      background: var(--bg-card);
      color: var(--text);
      cursor: pointer;
      transition: border-color 0.15s, background 0.15s, transform 0.1s;
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-followups-cta {
      border-color: var(--border);
      background: var(--bg-alt);
      box-shadow: none;
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-followups-cta:hover {
      border-color: #484f58;
      background: #21262d;
    }
    #page-agent-settings #agent-general .agent-followups-cta:hover {
      border-color: rgba(148, 163, 184, 0.45);
      background: var(--bg-alt);
      transform: translateY(-1px);
    }
    #page-agent-settings #agent-general .agent-followups-cta:active {
      transform: translateY(0);
    }
    #page-agent-settings #agent-general .agent-followups-cta-thumb {
      width: 2.65rem;
      height: 2.65rem;
      border-radius: 10px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-alt);
      border: 1px solid var(--border-light);
      color: var(--text-muted);
    }
    [data-theme="dark"] #page-agent-settings #agent-general .agent-followups-cta-thumb {
      background: var(--bg-card);
      border-color: var(--border);
      color: #8b949e;
    }
    #page-agent-settings #agent-general .agent-followups-cta-thumb svg {
      width: 1.35rem;
      height: 1.35rem;
      opacity: 0.95;
    }
    #page-agent-settings #agent-general .agent-followups-cta-copy {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
    }
    #page-agent-settings #agent-general .agent-followups-cta-title {
      font-size: 0.92rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      line-height: 1.25;
    }
    #page-agent-settings #agent-general .agent-followups-cta-sub {
      font-size: 0.74rem;
      font-weight: 500;
      color: var(--text-muted);
      line-height: 1.35;
    }
    #page-agent-settings #agent-general .agent-followups-cta-chevron {
      width: 1.1rem;
      height: 1.1rem;
      flex-shrink: 0;
      color: var(--text-muted);
      opacity: 0.75;
      transition: transform 0.18s, opacity 0.18s;
    }
    #page-agent-settings #agent-general .agent-followups-cta:hover .agent-followups-cta-chevron {
      opacity: 1;
      transform: translateX(2px);
      color: var(--text);
    }
    #page-agent-settings #agent-general .agent-test-row .agent-test-status {
      min-height: 32px;
      padding: 0.32rem 0.65rem;
      font-size: 0.78rem;
    }
    .card-title-row--with-help {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: wrap;
      margin-bottom: 0.65rem;
    }
    .card-title-row--with-help .card-title {
      margin-bottom: 0;
    }
    .help-popover-anchor {
      position: relative;
      display: inline-flex;
      align-items: center;
    }
    .help-pop-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.42rem;
      height: 1.42rem;
      padding: 0;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
    }
    .help-pop-i {
      display: block;
      font-size: 0.72rem;
      font-weight: 700;
      font-style: italic;
      font-family: Georgia, 'Times New Roman', ui-serif, serif;
      line-height: 1;
      margin-top: 0.04em;
    }
    .help-pop-btn:hover {
      color: var(--text);
      border-color: #94a3b8;
      background: rgba(15, 23, 42, 0.035);
    }
    .help-pop-btn[aria-expanded="true"] {
      color: var(--acquirely-blue);
      border-color: rgba(29, 155, 240, 0.38);
      background: rgba(29, 155, 240, 0.1);
    }
    .help-popover-panel {
      position: absolute;
      z-index: 90;
      top: calc(100% + 12px);
      left: 0;
      width: min(21rem, calc(100vw - 2.5rem));
      padding: 0;
      margin: 0;
      border: none;
      background: transparent;
      pointer-events: none;
    }
    .help-popover-panel.help-popover-panel--wide {
      width: min(23.5rem, calc(100vw - 2.5rem));
    }
    .help-popover-panel[hidden] {
      display: none !important;
    }
    .help-popover-panel:not([hidden]) {
      pointer-events: auto;
    }
    .help-popover-inner {
      position: relative;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 0.9rem 1.05rem;
      box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1), 0 2px 10px rgba(15, 23, 42, 0.06);
    }
    .help-popover-inner::before {
      content: '';
      position: absolute;
      bottom: 100%;
      left: 13px;
      margin-bottom: -1px;
      border: 8px solid transparent;
      border-bottom-color: var(--border);
    }
    .help-popover-inner::after {
      content: '';
      position: absolute;
      bottom: 100%;
      left: 14px;
      border: 7px solid transparent;
      border-bottom-color: var(--bg-card);
    }
    .help-popover-text {
      margin: 0;
      font-size: 0.8125rem;
      line-height: 1.55;
      color: var(--text-muted);
    }
    .help-popover-text strong {
      color: var(--text);
      font-weight: 600;
    }
    .help-popover-inner--structured {
      padding: 0.85rem 1rem 0.95rem;
    }
    .help-popover-h {
      font-size: 0.68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text);
      margin: 0 0 0.4rem 0;
    }
    .help-popover-section + .help-popover-section {
      margin-top: 0.8rem;
      padding-top: 0.75rem;
      border-top: 1px solid var(--border-light);
    }
    .help-popover-ul {
      margin: 0;
      padding-left: 1.05rem;
      font-size: 0.8125rem;
      line-height: 1.5;
      color: var(--text-muted);
    }
    .help-popover-ul li {
      margin-bottom: 0.35rem;
    }
    .help-popover-ul li:last-child {
      margin-bottom: 0;
    }
    .agent-help-popover-panel.help-popover-panel--training {
      width: min(26rem, calc(100vw - 2rem));
    }
    /* Agent (i) help bubbles: smooth bubble in/out */
    @keyframes agent-help-popover-enter {
      from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
      }
      to {
        opacity: 1;
        transform: scale(1) translateY(0);
      }
    }
    @keyframes agent-help-popover-exit {
      from {
        opacity: 1;
        transform: scale(1) translateY(0);
      }
      to {
        opacity: 0;
        transform: scale(0.94) translateY(10px);
      }
    }
    .agent-help-popover-panel:not([hidden]):not(.help-popover-panel--is-closing) .help-popover-inner {
      animation: agent-help-popover-enter 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .agent-help-popover-panel.help-popover-panel--is-closing .help-popover-inner {
      animation: agent-help-popover-exit 0.3s cubic-bezier(0.4, 0, 1, 1) forwards !important;
      pointer-events: none;
    }
    .agent-help-popover-panel .help-popover-inner {
      transform-origin: top left;
    }
    @media (prefers-reduced-motion: reduce) {
      .agent-help-popover-panel:not([hidden]):not(.help-popover-panel--is-closing) .help-popover-inner {
        animation: none;
      }
      .agent-help-popover-panel.help-popover-panel--is-closing .help-popover-inner {
        animation: none !important;
      }
    }
    #page-agent-settings #agent-quick-fix .qf-help-popover-inner .help-popover-text {
      margin: 0;
      font-size: 0.84rem;
      line-height: 1.58;
      color: var(--text-muted);
    }
    #page-agent-settings #agent-quick-fix .qf-help-popover-inner .help-popover-h {
      color: var(--text);
      letter-spacing: 0.08em;
      margin-bottom: 0.45rem;
    }
    #page-agent-settings #agent-quick-fix .qf-help-popover-inner .help-popover-section:first-child .help-popover-h {
      margin-top: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-help-popover-inner .qf-help-popover-gap {
      margin-top: 0.7rem;
    }
    .card-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
    .profile-settings-card .card-title { margin-bottom: 0.35rem; }
    .profile-header-row {
      display: flex;
      align-items: center;
      gap: 1rem;
      margin-bottom: 1rem;
    }
    .profile-avatar {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      object-fit: cover;
      border: 1px solid var(--border);
      flex-shrink: 0;
      background: #f1f5f9;
    }
    .profile-name-title { margin-bottom: 0.15rem !important; }
    .profile-primary-email {
      font-size: 0.9rem;
      font-weight: 500;
      color: var(--text);
      word-break: break-all;
    }
    .profile-header-email-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 0.75rem;
    }
    .btn-text-link {
      background: none;
      border: none;
      padding: 0;
      font: inherit;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--acquirely-blue, #1d9bf0);
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    .btn-text-link:hover {
      color: #0284c7;
    }
    /* Profile sign-in: stacked column; cap width ~50% on desktop so status isn’t miles from the label */
    .integrations-grid.profile-signin-grid {
      margin-top: 1rem;
      grid-template-columns: 1fr;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    @media (min-width: 768px) {
      .integrations-grid.profile-signin-grid {
        max-width: 50%;
      }
    }
    .profile-signin-logo {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .profile-signin-logo svg {
      width: 26px;
      height: 26px;
      display: block;
    }
    .profile-signin-logo-email svg {
      width: 22px;
      height: 22px;
    }
    .profile-signin-actions {
      flex-wrap: wrap;
    }
    .profile-section {
      margin-top: 1.35rem;
      padding-top: 1.25rem;
      border-top: 1px solid var(--border-light);
    }
    .profile-section-label {
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      font-weight: 700;
      color: var(--text-muted);
      margin-bottom: 0.65rem;
    }
    .profile-inline-error {
      margin-top: 0.75rem;
      font-size: 0.85rem;
      color: #b91c1c;
    }
    .profile-settings-card.hidden { display: none !important; }
    /* Sections inside the profile card use .hidden without .profile-settings-card */
    .profile-section.hidden { display: none !important; }
    #profileSignInCardPassword .btn {
      width: auto;
      min-width: 9rem;
    }
    .profile-pwd-otp-row {
      display: flex;
      flex-wrap: nowrap;
      gap: 0.45rem;
      justify-content: center;
      margin: 0.35rem 0 0.15rem;
    }
    .profile-pwd-otp-cell {
      width: 2.35rem;
      height: 2.65rem;
      border-radius: 10px;
      border: 1.5px solid var(--border, #e2e8f0);
      background: var(--bg-card, #fff);
      font-size: 1.2rem;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      text-align: center;
      padding: 0;
      color: var(--text, #0f172a);
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .profile-pwd-otp-cell:focus {
      outline: none;
      border-color: var(--acquirely-blue, #1d9bf0);
      box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.2);
    }
    .profile-pwd-otp-cell::placeholder {
      color: #cbd5e1;
    }
    @media (max-width: 420px) {
      .profile-pwd-otp-row {
        gap: 0.3rem;
      }
      .profile-pwd-otp-cell {
        width: 2rem;
        height: 2.4rem;
        font-size: 1.05rem;
      }
    }
    .profile-pwd-modal-step.hidden {
      display: none !important;
    }

    /* KPI Cards */
    .kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
    .kpi-card {
      background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
      padding: 1.5rem; box-shadow: var(--shadow-sm); transition: all 0.2s;
    }
    .kpi-card:hover { box-shadow: var(--shadow); border-color: var(--border); }
    .kpi-value { font-size: 1.75rem; font-weight: 700; }
    .kpi-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
    .kpi-card .info { float: right; color: var(--text-muted); cursor: help; font-size: 0.8rem; }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      padding: 0.5rem 1.1rem;
      font-size: 0.9rem;
      font-weight: 500;
      border-radius: 999px;
      cursor: pointer;
      border: 1px solid transparent;
      user-select: none;
      -webkit-user-select: none;
      transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
      font-family: inherit;
      white-space: nowrap;
    }
    .btn-primary {
      background-color: var(--acquirely-blue);
      color: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.06);
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
    }
    .btn-primary:hover {
      background-color: #1278c4;
      border-color: rgba(56, 189, 248, 0.75);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 0 0 1px rgba(125, 211, 252, 0.35);
    }
    .btn-primary:active {
      background-color: #0f6aa8;
      border-color: rgba(56, 189, 248, 0.45);
      box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.22);
      transform: translateY(0.5px);
    }
    .btn-secondary {
      background: #ffffff;
      color: #0f172a;
      border-color: var(--border);
      box-shadow: 0 1px 1px rgba(15,23,42,0.04);
    }
    .btn-secondary:hover {
      background: #f8fafc;
      border-color: #cbd5e1;
      box-shadow: 0 2px 4px rgba(15,23,42,0.10);
    }
    .btn-secondary:active {
      background: #f1f5f9;
      border-color: #cbd5e1;
      box-shadow: inset 0 1px 3px rgba(15,23,42,0.12);
      transform: translateY(0.5px);
    }
    .btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
    .agent-test-row {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex-wrap: wrap;
      justify-content: flex-start;
    }
    .agent-test-status {
      display: inline-flex;
      align-items: center;
      gap: 0.55rem;
      min-height: 40px;
      padding: 0.45rem 0.85rem;
      border-radius: 999px;
      border: 1px solid transparent;
      background: #f8fafc;
      color: #64748b;
      font-size: 0.84rem;
      font-weight: 500;
      line-height: 1;
      opacity: 0;
      transform: translateY(2px);
      transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
      pointer-events: none;
    }
    .agent-test-status[data-state="idle"] {
      opacity: 0;
    }
    .agent-test-status[data-state="testing"],
    .agent-test-status[data-state="success"],
    .agent-test-status[data-state="error"] {
      opacity: 1;
      transform: translateY(0);
    }
    .agent-test-status[data-state="testing"] {
      background: #eff6ff;
      border-color: #bfdbfe;
      color: #2563eb;
    }
    .agent-test-status[data-state="success"] {
      background: #ecfdf5;
      border-color: #bbf7d0;
      color: #15803d;
    }
    .agent-test-status[data-state="error"] {
      background: #fff7ed;
      border-color: #fed7aa;
      color: #c2410c;
    }
    .agent-test-indicator {
      position: relative;
      width: 10px;
      height: 10px;
      border-radius: 999px;
      background: currentColor;
      flex-shrink: 0;
    }
    .agent-test-indicator::after {
      content: '';
      position: absolute;
      inset: -6px;
      border-radius: 999px;
      border: 1px solid currentColor;
      opacity: 0;
      transform: scale(0.65);
    }
    .agent-test-status[data-state="testing"] .agent-test-indicator::after {
      animation: agent-test-ping 1.25s ease-out infinite;
    }
    .agent-test-status[data-state="success"] .agent-test-indicator::after {
      animation: agent-test-ping 1.8s ease-out infinite;
    }
    .agent-test-status[data-state="success"] .agent-test-indicator {
      box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
    }
    .agent-test-status[data-state="error"] .agent-test-indicator {
      box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
    }
    @keyframes agent-test-ping {
      0% {
        opacity: 0.85;
        transform: scale(0.7);
      }
      70% {
        opacity: 0;
        transform: scale(1.8);
      }
      100% {
        opacity: 0;
        transform: scale(2);
      }
    }

    .toggle {
      display: inline-flex;
      align-items: center;
      cursor: pointer;
      user-select: none;
    }
    .toggle-switch {
      width: 42px;
      height: 24px;
      border-radius: 999px;
      background: #dbe4f0;
      border: 1px solid #cbd5e1;
      position: relative;
      transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
      box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
      display: inline-block;
      flex-shrink: 0;
    }
    .toggle-switch::after {
      content: '';
      position: absolute;
      top: 2px;
      left: 2px;
      width: 18px;
      height: 18px;
      border-radius: 999px;
      background: #ffffff;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
      transition: transform 0.18s ease;
    }
    .toggle-switch.on {
      background: #1d9bf0;
      border-color: #1d9bf0;
      box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04), 0 0 0 3px rgba(29, 155, 240, 0.12);
    }
    .toggle-switch.on::after {
      transform: translateX(18px);
    }

    /* Agent Cards (Select Agent) */
    .agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
    .agent-card {
      background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
      padding: 1.25rem; cursor: pointer; transition: all 0.15s; position: relative;
    }
    .agent-card:hover { border-color: var(--stripe-purple); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
    .agent-card-icon { width: 48px; height: 48px; background: var(--stripe-purple-light); border-radius: var(--radius); margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
    .agent-card-name { font-weight: 600; font-size: 1rem; }
    .agent-card-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
    .agent-card-tags { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
    .tag { font-size: 0.75rem; color: var(--text-muted); background: var(--bg-alt); padding: 0.2rem 0.5rem; border-radius: 4px; }
    .agent-card-actions { position: absolute; top: 1rem; right: 1rem; display: flex; gap: 0.5rem; }
    .agent-card-actions button { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0.25rem; }

    /* Tabs (legacy pill style; prefer .page-tabs-pills for top nav) */
    .tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
    .tab {
      padding: 0.45rem 0.95rem; font-size: 0.9rem; border-radius: 999px; cursor: pointer;
      color: var(--text-muted); transition: all 0.15s;
    }
    .tab:hover { color: var(--text); background: var(--border-light); }
    .tab.active {
      background: #e5f3ff;
      color: #0f172a;
      font-weight: 500;
      box-shadow: 0 1px 2px rgba(15,23,42,0.08);
    }

    .page-tabs-pills {
      position: relative;
      display: flex;
      align-items: stretch;
      flex-wrap: wrap;
      width: fit-content;
      max-width: 100%;
      padding: 4px;
      gap: 2px;
      margin-bottom: 1.25rem;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: #eef2f7;
      box-sizing: border-box;
    }
    #page-settings .page-tabs-pills {
      max-width: 100%;
    }
    #page-agent-settings .page-tabs-pills {
      max-width: min(1400px, 100%);
    }
    /* Agent workbench: wide, flat, minimal chrome */
    #page-agent-settings #agent-quick-fix.qf-root {
      width: 100%;
      max-width: min(1420px, calc(100vw - 1.5rem));
      margin: 0 auto;
      padding: 0 0.25rem 1rem;
      box-sizing: border-box;
    }
    #page-agent-settings.page-agent-settings--agent-fullbleed #agent-quick-fix.qf-root {
      flex: 1 1 0;
      min-height: 0;
      max-width: none;
      width: 100%;
      margin: 0;
      padding: 0 0 0.35rem;
    }
    #page-agent-settings #agent-quick-fix .qf-workbench {
      position: relative;
    }
    #page-agent-settings.page-agent-settings--agent-fullbleed #agent-quick-fix .qf-workbench {
      flex: 1 1 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }
    #page-agent-settings #agent-quick-fix .qf-agent-shell {
      --qf-history-drawer-width: 280px;
      display: flex;
      flex-direction: row;
      align-items: stretch;
      position: relative;
      flex: 1 1 0;
      min-height: min(720px, calc(100vh - 140px));
      max-height: calc(100vh - 112px);
      border-radius: 22px;
      border: 1px solid var(--border-light);
      background: var(--bg-card);
      box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
      overflow: hidden;
    }
    #page-agent-settings.page-agent-settings--agent-fullbleed #agent-quick-fix .qf-agent-shell {
      min-height: calc(100dvh - 9.25rem);
      max-height: calc(100dvh - 4.75rem);
      border-radius: 16px;
      border-left: none;
      border-right: none;
    }
    #page-agent-settings #agent-quick-fix .qf-agent-main {
      flex: 1 1 0;
      min-width: 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-agent-shell {
      border-color: rgba(255, 255, 255, 0.1);
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-agent-header {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0.65rem;
      padding: 0.85rem 1.1rem 0.75rem;
      border-bottom: 1px solid var(--border-light);
      background: var(--bg-card);
      flex-shrink: 0;
      border-radius: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-agent-header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.85rem;
      min-width: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-agent-header-left {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex-wrap: nowrap;
      min-width: 0;
      flex: 1 1 auto;
    }
    #page-agent-settings #agent-quick-fix .qf-model-picker-sr {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-chat-header-tools {
      display: flex;
      align-items: center;
      flex-shrink: 0;
      gap: 0;
      padding: 3px;
      border-radius: 10px;
      border: 1px solid var(--border-light);
      background: var(--bg-muted);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-chat-header-tools {
      background: rgba(255, 255, 255, 0.04);
      border-color: rgba(255, 255, 255, 0.12);
    }
    #page-agent-settings #agent-quick-fix .qf-header-tools-divider {
      width: 1px;
      height: 18px;
      align-self: center;
      background: var(--border-light);
      margin: 0 1px;
      flex-shrink: 0;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-header-tools-divider {
      background: rgba(255, 255, 255, 0.12);
    }
    #page-agent-settings #agent-quick-fix .qf-header-icon-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 30px;
      padding: 0;
      margin: 0;
      border: none;
      border-radius: 8px;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s ease, color 0.15s ease;
    }
    #page-agent-settings #agent-quick-fix .qf-header-icon-btn:hover {
      background: var(--bg-input);
      color: var(--text);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-header-icon-btn:hover {
      background: rgba(255, 255, 255, 0.08);
    }
    #page-agent-settings #agent-quick-fix .qf-header-icon-btn:focus-visible {
      outline: 2px solid rgba(59, 130, 246, 0.55);
      outline-offset: 1px;
    }
    #page-agent-settings #agent-quick-fix .qf-header-icon-btn.is-active {
      color: var(--acquirely-blue, #1d9bf0);
      background: rgba(59, 130, 246, 0.12);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-header-icon-btn.is-active {
      color: #93c5fd;
      background: rgba(59, 130, 246, 0.18);
    }
    #page-agent-settings #agent-quick-fix .qf-planner-model-field {
      position: relative;
      flex: 0 1 min(340px, 100%);
      min-width: min(260px, 100%);
      max-width: min(340px, 100%);
      margin: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-drawer-planner-field.qf-planner-model-field {
      flex: none;
      min-width: 0;
      max-width: none;
      width: 100%;
    }
    #page-agent-settings #agent-quick-fix .qf-planner-model-field .form-label {
      margin-bottom: 0.2rem;
    }
    #page-agent-settings #agent-quick-fix .qf-planner-model-label {
      font-size: 0.65rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
    }
    #page-agent-settings #agent-quick-fix .qf-planner-model-selector.model-selector {
      max-width: none;
    }
    #page-agent-settings #agent-quick-fix .qf-planner-model-selector .model-selector-trigger {
      padding: 0.42rem 0.65rem;
      border-radius: 10px;
    }
    #page-agent-settings #agent-quick-fix .qf-planner-model-selector .model-selector-name {
      font-size: 0.8rem;
    }
    #page-agent-settings #agent-quick-fix .qf-planner-model-selector .model-selector-desc {
      font-size: 0.68rem;
    }
    #page-agent-settings #agent-quick-fix .qf-planner-model-selector .model-selector-menu {
      left: 0;
      right: auto;
      min-width: min(340px, calc(100vw - 2.5rem));
      max-width: min(400px, calc(100vw - 2rem));
      max-height: min(360px, 52vh);
      z-index: 50;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-agent-header {
      background: var(--bg-card);
    }
    #page-agent-settings #agent-quick-fix .qf-agent-title-block {
      display: flex;
      align-items: baseline;
      gap: 0.65rem;
      flex-wrap: wrap;
    }
    #page-agent-settings #agent-quick-fix .qf-agent-title {
      font-size: 1.05rem;
      font-weight: 650;
      letter-spacing: -0.03em;
      color: var(--text);
    }
    #page-agent-settings #agent-quick-fix .qf-agent-badge {
      font-size: 0.65rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      padding: 0.2rem 0.55rem;
      border-radius: 999px;
      border: 1px solid var(--border-light);
      background: transparent;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-agent-badge {
      background: transparent;
      border-color: rgba(255, 255, 255, 0.12);
    }
    #page-agent-settings #agent-quick-fix .qf-agent-actions {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-wrap: nowrap;
      flex-shrink: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-email-fix-link {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.3rem 0.5rem;
      margin: 0;
      border: none;
      border-radius: 8px;
      background: transparent;
      color: var(--text-muted);
      font: inherit;
      font-size: 0.78rem;
      font-weight: 500;
      letter-spacing: -0.01em;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease;
      white-space: nowrap;
    }
    #page-agent-settings #agent-quick-fix .qf-email-fix-link:hover {
      color: var(--text);
      background: var(--bg-input);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-email-fix-link:hover {
      background: rgba(255, 255, 255, 0.08);
    }
    #page-agent-settings #agent-quick-fix .qf-email-fix-link:focus-visible {
      outline: 2px solid rgba(59, 130, 246, 0.55);
      outline-offset: 1px;
    }
    #page-agent-settings #agent-quick-fix .qf-email-fix-link-ic {
      flex-shrink: 0;
      display: block;
      color: var(--acquirely-blue, #1d9bf0);
      opacity: 0.95;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-email-fix-link-ic {
      color: #93c5fd;
    }
    #page-agent-settings #agent-quick-fix .qf-msg-stop-actions {
      display: flex;
      justify-content: flex-end;
      margin-top: 0.35rem;
    }
    #page-agent-settings #agent-quick-fix .qf-msg-edit-btn {
      font-size: 0.72rem;
      font-weight: 500;
      padding: 0.22rem 0.55rem;
      border-radius: 6px;
      border: 1px solid var(--border-light);
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }
    #page-agent-settings #agent-quick-fix .qf-msg-edit-btn:hover {
      color: var(--text);
      background: var(--bg-input);
      border-color: rgba(148, 163, 184, 0.45);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-msg-edit-btn:hover {
      background: rgba(255, 255, 255, 0.06);
    }
    #page-agent-settings #agent-quick-fix .qf-pill-btn {
      font-size: 0.78rem;
      font-weight: 500;
      padding: 0.45rem 0.85rem;
      border-radius: 999px;
      border: 1px solid var(--border-light);
      background: var(--bg);
      color: var(--text);
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    }
    #page-agent-settings #agent-quick-fix .qf-pill-btn:hover {
      background: var(--bg-muted);
      border-color: rgba(148, 163, 184, 0.45);
    }
    #page-agent-settings #agent-quick-fix .qf-pill-btn:active {
      transform: scale(0.98);
    }
    #page-agent-settings #agent-quick-fix .qf-pill-btn--accent {
      border-color: var(--border-light);
      background: var(--bg-muted);
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-pill-btn--accent:hover {
      border-color: rgba(148, 163, 184, 0.45);
      background: var(--bg-input);
    }
    #page-agent-settings #agent-quick-fix .qf-history-drawer {
      flex-shrink: 0;
      align-self: stretch;
      display: flex;
      flex-direction: column;
      min-height: 0;
      width: 0;
      min-width: 0;
      overflow: hidden;
      background: var(--bg-muted);
      border-right: 1px solid transparent;
      opacity: 0;
      pointer-events: none;
      transition:
        width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.22s ease,
        border-color 0.2s ease;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-drawer {
      background: rgba(255, 255, 255, 0.03);
    }
    #page-agent-settings #agent-quick-fix .qf-history-drawer.is-open {
      width: min(max(var(--qf-history-drawer-width), 220px), 520px);
      border-right-color: transparent;
      opacity: 1;
      pointer-events: auto;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-drawer.is-open {
      border-right-color: transparent;
    }
    #page-agent-settings #agent-quick-fix .acq-qf-history-resize {
      flex: 0 0 0;
      width: 0;
      min-width: 0;
      margin: 0;
      padding: 0;
      opacity: 0;
      pointer-events: none;
      overflow: hidden;
    }
    #page-agent-settings #agent-quick-fix .qf-history-drawer.is-open ~ .acq-qf-history-resize {
      flex: 0 0 8px;
      width: 8px;
      min-width: 8px;
      opacity: 1;
      pointer-events: auto;
    }
    #page-agent-settings #agent-quick-fix .qf-agent-shell.acq-qf-shell--resizing .qf-history-drawer {
      transition: none !important;
    }
    #page-agent-settings #agent-quick-fix .qf-history-drawer-inner {
      display: flex;
      flex-direction: column;
      min-height: 0;
      flex: 1;
      padding: 0.6rem 0 0;
    }
    #page-agent-settings #agent-quick-fix .qf-history-search-wrap {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      margin: 0 0.55rem 0.55rem;
      padding: 0.42rem 0.6rem;
      border-radius: 10px;
      border: 1px solid var(--border-light);
      background: var(--bg);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-search-wrap {
      background: rgba(255, 255, 255, 0.04);
      border-color: rgba(255, 255, 255, 0.1);
    }
    #page-agent-settings #agent-quick-fix .qf-history-search-ic {
      flex-shrink: 0;
      color: var(--text-muted);
      opacity: 0.85;
    }
    #page-agent-settings #agent-quick-fix .qf-history-search {
      flex: 1 1 auto;
      min-width: 0;
      border: none;
      background: transparent;
      font: inherit;
      font-size: 0.8rem;
      color: var(--text);
      outline: none;
    }
    #page-agent-settings #agent-quick-fix .qf-history-search::placeholder {
      color: var(--text-muted);
    }
    #page-agent-settings #agent-quick-fix .qf-history-empty-state {
      flex: 0 0 auto;
      min-height: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 0.85rem 0.65rem 0.95rem;
      margin: 0.35rem 0.45rem 0.5rem;
      border-radius: 12px;
      border: 1px dashed var(--border-light);
      background: var(--bg);
      box-sizing: border-box;
    }
    /* [hidden] must win — without this, display:flex above overrides native hidden and the empty card stays visible above real rows */
    #page-agent-settings #agent-quick-fix .qf-history-empty-state[hidden] {
      display: none !important;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-empty-state {
      background: rgba(255, 255, 255, 0.03);
      border-color: rgba(255, 255, 255, 0.1);
    }
    #page-agent-settings #agent-quick-fix .qf-history-empty-icon {
      width: 36px;
      height: 36px;
      margin-bottom: 0.45rem;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-muted);
      color: var(--text-muted);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-empty-icon {
      background: rgba(255, 255, 255, 0.06);
    }
    #page-agent-settings #agent-quick-fix .qf-history-empty-icon svg {
      opacity: 0.85;
    }
    #page-agent-settings #agent-quick-fix .qf-history-empty-title {
      margin: 0 0 0.25rem;
      font-size: 0.8rem;
      font-weight: 600;
      letter-spacing: -0.02em;
      color: var(--text);
    }
    #page-agent-settings #agent-quick-fix .qf-history-empty-sub {
      margin: 0;
      max-width: 14rem;
      font-size: 0.7rem;
      line-height: 1.4;
      color: var(--text-muted);
    }
    #page-agent-settings #agent-quick-fix .qf-history-scroll {
      flex: 1 1 0;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 0.35rem 0.65rem 1rem;
      overscroll-behavior: contain;
    }
    #page-agent-settings #agent-quick-fix .qf-history-scroll--empty {
      overflow: hidden;
    }
    #page-agent-settings #agent-quick-fix .qf-history-list {
      list-style: none;
      margin: 0;
      padding: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-history-sentinel {
      height: 1px;
      margin: 0;
      padding: 0;
      list-style: none;
      pointer-events: none;
      visibility: hidden;
    }
    #page-agent-settings #agent-quick-fix .qf-history-card {
      margin-bottom: 0.4rem;
      list-style: none;
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-surface {
      position: relative;
      display: block;
      width: 100%;
      min-width: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-hit {
      display: block;
      width: 100%;
      box-sizing: border-box;
      text-align: left;
      padding: 0.65rem 0.75rem;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: var(--bg);
      color: var(--text);
      font-family: inherit;
      cursor: pointer;
      transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        padding-right 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-card-hit {
      background: rgba(255, 255, 255, 0.04);
      border-color: rgba(255, 255, 255, 0.1);
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-surface:hover .qf-history-card-hit,
    #page-agent-settings #agent-quick-fix .qf-history-card-hit:hover {
      border-color: rgba(148, 163, 184, 0.45);
      background: var(--bg-muted);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-card-surface:hover .qf-history-card-hit,
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-card-hit:hover {
      border-color: rgba(255, 255, 255, 0.16);
      background: rgba(255, 255, 255, 0.06);
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-surface:hover .qf-history-card-hit,
    #page-agent-settings #agent-quick-fix .qf-history-card-surface:focus-within .qf-history-card-hit {
      padding-right: 3.15rem;
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-row-actions {
      position: absolute;
      top: 0.42rem;
      right: 0.42rem;
      z-index: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.28rem;
      padding: 0.32rem;
      border-radius: 11px;
      background: rgba(255, 255, 255, 0.88);
      border: 1px solid rgba(15, 23, 42, 0.1);
      box-shadow: 0 6px 24px rgba(15, 23, 42, 0.1);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      opacity: 0;
      transform: translateY(-4px) scale(0.96);
      pointer-events: none;
      transition:
        opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-card-row-actions {
      background: rgba(22, 27, 34, 0.82);
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-surface:hover .qf-history-card-row-actions,
    #page-agent-settings #agent-quick-fix .qf-history-card-surface:focus-within .qf-history-card-row-actions {
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: auto;
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-action {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 34px;
      height: 34px;
      padding: 0;
      margin: 0;
      border-radius: 9px;
      border: 1px solid var(--border-light);
      background: rgba(15, 23, 42, 0.05);
      color: var(--text);
      font-family: inherit;
      cursor: pointer;
      transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.14s ease;
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-action .qf-history-card-ic {
      flex-shrink: 0;
      display: block;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-card-action {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.14);
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-action:hover {
      border-color: rgba(148, 163, 184, 0.5);
      background: var(--bg-input);
      transform: scale(1.04);
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-action:active {
      transform: scale(0.97);
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-action:focus-visible {
      outline: 2px solid rgba(59, 130, 246, 0.55);
      outline-offset: 2px;
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-action--danger {
      border-color: rgba(220, 38, 38, 0.35);
      color: #dc2626;
      background: rgba(220, 38, 38, 0.06);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-card-action--danger {
      border-color: rgba(248, 113, 113, 0.4);
      color: #f87171;
      background: rgba(248, 113, 113, 0.1);
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-action--danger:hover {
      background: rgba(220, 38, 38, 0.14);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-card-action--danger:hover {
      background: rgba(248, 113, 113, 0.18);
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-action[data-acq-tip]::after {
      content: attr(data-acq-tip);
      position: absolute;
      right: calc(100% + 8px);
      top: 50%;
      transform: translate(6px, -50%);
      padding: 0.38rem 0.62rem;
      border-radius: 8px;
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.01em;
      white-space: nowrap;
      color: var(--text);
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      box-shadow: var(--shadow-lg);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.14s ease, transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
      z-index: 5;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-card-action[data-acq-tip]::after {
      background: #21262d;
      border-color: rgba(255, 255, 255, 0.12);
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-action[data-acq-tip]:hover::after,
    #page-agent-settings #agent-quick-fix .qf-history-card-action[data-acq-tip]:focus-visible::after {
      opacity: 1;
      transform: translate(0, -50%);
    }
    @media (hover: none) {
      #page-agent-settings #agent-quick-fix .qf-history-card-row-actions {
        top: auto;
        bottom: 0.42rem;
        flex-direction: row;
        opacity: 1;
        transform: none;
        pointer-events: auto;
      }
      #page-agent-settings #agent-quick-fix .qf-history-card-hit {
        padding-bottom: 3.15rem;
      }
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-title {
      display: block;
      font-size: 0.84rem;
      font-weight: 600;
      letter-spacing: -0.015em;
      line-height: 1.35;
      word-break: break-word;
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-preview {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
      margin-top: 0.35rem;
      font-size: 0.76rem;
      line-height: 1.45;
      color: var(--text-muted);
    }
    #page-agent-settings #agent-quick-fix .qf-history-card-meta {
      display: block;
      margin-top: 0.4rem;
      font-size: 0.68rem;
      font-weight: 500;
      color: var(--text-muted);
      opacity: 0.9;
    }
    #page-agent-settings #agent-quick-fix .qf-history-lead-tabs {
      padding: 0 0.55rem 0.5rem;
      gap: 0.4rem;
    }
    #page-agent-settings #agent-quick-fix .qf-history-filter-pills.inbox-filter-pills .inbox-tab-slide {
      width: calc((100% - 8px) / 2) !important;
    }
    #page-agent-settings #agent-quick-fix .qf-history-filter-pills.inbox-filter-pills[data-active='recent'] .inbox-tab-slide {
      transform: translateX(0) !important;
    }
    #page-agent-settings #agent-quick-fix .qf-history-filter-pills.inbox-filter-pills[data-active='archived'] .inbox-tab-slide {
      transform: translateX(100%) !important;
    }
    #page-agent-settings #agent-quick-fix .qf-history-drawer-footer {
      flex-shrink: 0;
      margin-top: auto;
      padding: 0.65rem 0.55rem 0.75rem;
      border-top: 1px solid var(--border-light);
      background: var(--bg-muted);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-history-drawer-footer {
      border-top-color: rgba(255, 255, 255, 0.08);
      background: rgba(0, 0, 0, 0.2);
    }
    #page-agent-settings #agent-quick-fix .qf-drawer-planner-field {
      margin: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-drawer-planner-field .form-label {
      margin-bottom: 0.25rem;
    }
    #page-agent-settings #agent-quick-fix .qf-drawer-planner-field .qf-planner-model-selector .model-selector-menu {
      top: auto;
      bottom: calc(100% + 6px);
      max-height: min(280px, 40vh);
    }
    @media (prefers-reduced-motion: reduce) {
      #page-agent-settings #agent-quick-fix .qf-history-drawer {
        transition-duration: 0.01ms !important;
      }
    }
    #page-agent-settings #agent-quick-fix .qf-help-wrap .qf-help-btn {
      width: 32px;
      height: 32px;
      border-radius: 999px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    #page-agent-settings #agent-quick-fix .qf-help-wrap .help-pop-btn[aria-expanded='true'] {
      color: var(--text);
      border-color: var(--border-light);
      background: var(--bg-muted);
    }
    #page-agent-settings #agent-quick-fix .qf-help-wrap.help-popover-anchor .help-popover-panel {
      left: auto;
      right: 0;
      top: calc(100% + 8px);
      z-index: 400;
      width: min(28rem, calc(100vw - 1.25rem));
      max-height: none;
      overflow: visible;
    }
    #page-agent-settings #agent-quick-fix .qf-help-wrap .help-popover-inner {
      transform-origin: top right;
      border-radius: 16px;
      padding: 1.05rem 1.2rem 1.15rem;
      box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 16px 48px rgba(0, 0, 0, 0.14),
        0 4px 16px rgba(0, 0, 0, 0.08);
    }
    #page-agent-settings #agent-quick-fix .qf-help-wrap .help-popover-inner::before {
      left: auto;
      right: 13px;
    }
    #page-agent-settings #agent-quick-fix .qf-help-wrap .help-popover-inner::after {
      left: auto;
      right: 14px;
    }
    [data-theme='dark'] #page-agent-settings #agent-quick-fix .qf-help-wrap .help-popover-inner {
      box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 20px 56px rgba(0, 0, 0, 0.55),
        0 8px 24px rgba(0, 0, 0, 0.35);
    }
    #page-agent-settings #agent-quick-fix .qf-btn-sm {
      font-size: 0.78rem;
      padding: 0.4rem 0.65rem;
      border-radius: 10px;
      border: 1px solid var(--border-light);
      background: var(--bg-muted);
      color: var(--text);
      cursor: pointer;
      font-family: inherit;
    }
    #page-agent-settings #agent-quick-fix .qf-btn-sm:hover {
      background: var(--bg-input);
    }
    #page-agent-settings #agent-quick-fix .qf-agent-body {
      flex: 1 1 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior: contain;
      border-radius: 0 0 16px 16px;
      background: var(--bg-card);
    }
    #page-agent-settings.page-agent-settings--agent-fullbleed #agent-quick-fix .qf-agent-body {
      border-radius: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-chat-column {
      position: relative;
      flex: 1 1 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }
    #page-agent-settings #agent-quick-fix .qf-main-browse-empty {
      position: absolute;
      inset: 0;
      z-index: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 1.5rem 1.25rem;
      pointer-events: none;
      background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card) 70%, rgba(0, 0, 0, 0.02) 100%);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-main-browse-empty {
      background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card) 75%, transparent 100%);
    }
    #page-agent-settings #agent-quick-fix .qf-main-browse-empty[hidden] {
      display: none !important;
    }
    #page-agent-settings #agent-quick-fix .qf-main-browse-empty-ic {
      width: 48px;
      height: 48px;
      margin-bottom: 0.75rem;
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-muted);
      color: var(--text-muted);
      border: 1px solid var(--border-light);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-main-browse-empty-ic {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.1);
    }
    #page-agent-settings #agent-quick-fix .qf-main-browse-empty-title {
      margin: 0 0 0.35rem;
      font-size: 1rem;
      font-weight: 650;
      letter-spacing: -0.03em;
      color: var(--text);
      max-width: 18rem;
    }
    #page-agent-settings #agent-quick-fix .qf-main-browse-empty-sub {
      margin: 0;
      font-size: 0.82rem;
      line-height: 1.45;
      color: var(--text-muted);
      max-width: 17rem;
    }
    #page-agent-settings #agent-quick-fix .qf-chat-log {
      flex: 1 1 0;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 1rem 1.25rem 0.75rem;
      scroll-behavior: smooth;
    }
    #page-agent-settings #agent-quick-fix .qf-chat-log::-webkit-scrollbar {
      width: 8px;
    }
    #page-agent-settings #agent-quick-fix .qf-chat-log::-webkit-scrollbar-thumb {
      background: rgba(148, 163, 184, 0.35);
      border-radius: 8px;
    }
    #page-agent-settings #agent-quick-fix .qf-chat-log::-webkit-scrollbar-thumb:hover {
      background: rgba(148, 163, 184, 0.55);
    }
    #page-agent-settings #agent-quick-fix .qf-empty-hint {
      font-size: 0.9rem;
      line-height: 1.5;
      color: var(--text-muted);
      max-width: 20rem;
      margin: 3rem auto 2rem;
      padding: 0 1rem;
      text-align: center;
      border: none;
      background: none;
      box-shadow: none;
      opacity: 0.88;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-empty-hint {
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-msg {
      margin-bottom: 1.25rem;
    }
    #page-agent-settings #agent-quick-fix .qf-msg--user {
      margin-left: auto;
      max-width: min(92%, 560px);
    }
    #page-agent-settings #agent-quick-fix .qf-msg--assistant {
      margin-right: auto;
      max-width: min(100%, 720px);
    }
    #page-agent-settings #agent-quick-fix .qf-msg--thinking .qf-msg-bubble {
      display: block;
      width: fit-content;
      max-width: 100%;
      padding: 0;
      overflow: visible;
      border: none;
      background: transparent;
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-msg--thinking {
      max-width: min(100%, 560px);
      width: fit-content;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-bubble {
      position: relative;
      padding: 0;
      border-radius: 12px;
      border: 1px solid var(--border-light);
      background: var(--bg-muted);
      font-family: inherit;
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      overflow: hidden;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-bubble::before {
      display: none;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-bubble {
      border-color: rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.04);
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-bubble::before {
      display: none;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-card-inner {
      position: relative;
      z-index: 1;
      padding: 0.65rem 0.8rem 0.7rem;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-head {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      margin: 0 0 0.5rem;
      padding: 0;
      border-bottom: none;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-head {
      border-bottom: none;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-spinner-wrap {
      flex-shrink: 0;
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      background: var(--bg-input);
      border: 1px solid var(--border-light);
      box-shadow: none;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-spinner-wrap {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(255, 255, 255, 0.1);
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-spinner {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      border: 2px solid rgba(148, 163, 184, 0.35);
      border-top-color: var(--acquirely-blue, #1d9bf0);
      background: none;
      mask: none;
      -webkit-mask: none;
      animation: qf-thinking-spin 0.75s linear infinite;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-spinner {
      border-color: rgba(255, 255, 255, 0.15);
      border-top-color: #93c5fd;
      background: none;
    }
    @keyframes qf-thinking-spin {
      to {
        transform: rotate(360deg);
      }
    }
    #page-agent-settings #agent-quick-fix .qf-msg--thinking-finish .qf-thinking-spinner {
      animation-duration: 1.05s;
      opacity: 0.88;
    }
    #page-agent-settings #agent-quick-fix .qf-msg--thinking-finish .qf-thinking-pulse-ring {
      animation-duration: 1.5s;
      border-color: rgba(52, 211, 153, 0.42);
    }
    #page-agent-settings #agent-quick-fix .qf-msg--thinking-finish .qf-thinking-pulse-core {
      animation-duration: 1.5s;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-bubble--minimal {
      border-radius: 999px;
      width: fit-content;
      max-width: 100%;
      min-width: min(100%, 17.5rem);
      overflow: visible;
      border-color: rgba(16, 185, 129, 0.14);
      background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(16, 185, 129, 0.04) 45%,
        rgba(255, 255, 255, 0.03) 100%
      );
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-bubble--minimal {
      border-color: rgba(52, 211, 153, 0.12);
      background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.045) 0%,
        rgba(16, 185, 129, 0.07) 42%,
        rgba(255, 255, 255, 0.028) 100%
      );
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-minimal {
      display: flex;
      align-items: center;
      gap: 0.72rem;
      min-height: 2.45rem;
      padding: 0.42rem 1rem 0.44rem 0.78rem;
      box-sizing: border-box;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-minimal--compact {
      min-height: 2.15rem;
      padding: 0.34rem 0.78rem 0.36rem 0.62rem;
      gap: 0.55rem;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-pulse {
      position: relative;
      width: 34px;
      height: 34px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-pulse-ring {
      position: absolute;
      inset: 0;
      margin: auto;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      border: 1px solid rgba(16, 185, 129, 0.22);
      opacity: 0.45;
      animation: qf-thinking-ring-pulse 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
      box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.18);
      pointer-events: none;
      will-change: opacity, box-shadow;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-pulse-ring {
      border-color: rgba(52, 211, 153, 0.26);
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-pulse-core {
      position: relative;
      z-index: 1;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #10b981;
      opacity: 0.92;
      animation: qf-thinking-core-pulse 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
      box-shadow:
        0 0 6px rgba(16, 185, 129, 0.28),
        0 0 14px rgba(16, 185, 129, 0.12);
      pointer-events: none;
      will-change: opacity, box-shadow;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-pulse-core {
      background: #34d399;
      box-shadow:
        0 0 6px rgba(52, 211, 153, 0.22),
        0 0 14px rgba(16, 185, 129, 0.1);
    }
    @keyframes qf-thinking-ring-pulse {
      0%,
      100% {
        opacity: 0.32;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2);
      }
      50% {
        opacity: 0.72;
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
      }
    }
    @keyframes qf-thinking-core-pulse {
      0%,
      100% {
        opacity: 0.78;
        box-shadow:
          0 0 5px rgba(16, 185, 129, 0.2),
          0 0 12px rgba(16, 185, 129, 0.08);
      }
      50% {
        opacity: 1;
        box-shadow:
          0 0 8px rgba(16, 185, 129, 0.32),
          0 0 18px rgba(16, 185, 129, 0.14);
      }
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-minimal-text {
      margin: 0;
      font-size: 0.78rem;
      line-height: 1.42;
      letter-spacing: -0.015em;
      color: var(--text-muted);
      flex: 1;
      min-width: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-msg--thinking-finish .qf-thinking-minimal-text {
      color: var(--text);
      opacity: 0.92;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-head-text {
      flex: 1;
      min-width: 0;
      padding-top: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-htitle {
      margin: 0;
      font-size: 0.88rem;
      font-weight: 600;
      letter-spacing: -0.02em;
      line-height: 1.3;
      color: var(--text);
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-steps {
      position: relative;
      z-index: 1;
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 0;
      font-size: 0.75rem;
      line-height: 1.4;
      -webkit-font-smoothing: antialiased;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-line {
      position: relative;
      display: flex;
      align-items: flex-start;
      gap: 0.5rem;
      padding: 0.28rem 0;
      margin: 0;
      color: var(--text-muted);
      transition: color 0.2s ease, opacity 0.2s ease;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-line:not(:last-child)::after {
      display: none;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-line--done {
      color: var(--text-muted);
      opacity: 0.88;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-line--done .qf-thinking-line-copy {
      color: var(--text);
      opacity: 0.72;
      font-weight: 480;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-line--active {
      color: var(--text);
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-line--active .qf-thinking-line-copy {
      font-weight: 560;
      letter-spacing: -0.01em;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-line--pending {
      opacity: 0.38;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-line-copy {
      flex: 1;
      min-width: 0;
      padding-top: 0.12rem;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-node {
      flex-shrink: 0;
      width: 22px;
      height: 22px;
      margin-top: 0.05rem;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-node--done {
      background: transparent;
      border: 1px solid rgba(16, 185, 129, 0.45);
      color: rgb(5, 122, 85);
      box-shadow: none;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-node--done {
      background: transparent;
      border-color: rgba(52, 211, 153, 0.4);
      color: rgb(110, 231, 183);
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-node--done .qf-thinking-ic {
      display: block;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-node--active {
      border: 1px solid rgba(59, 130, 246, 0.5);
      background: rgba(59, 130, 246, 0.08);
      box-shadow: none;
      animation: none;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-node--active {
      border-color: rgba(96, 165, 250, 0.45);
      background: rgba(59, 130, 246, 0.1);
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-node--active::after {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--acquirely-blue, #1d9bf0);
      animation: none;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-node--active::after {
      background: #93c5fd;
    }
    #page-agent-settings #agent-quick-fix .qf-thinking-node--pending {
      border: 1.5px dashed rgba(148, 163, 184, 0.45);
      background: transparent;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-thinking-node--pending {
      border-color: rgba(255, 255, 255, 0.14);
    }
    @keyframes qf-assistant-reply-enter {
      from {
        opacity: 0.99;
        transform: translateY(10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    @keyframes qf-assistant-bubble-materialize {
      from {
        opacity: 0.97;
        transform: scale(0.985);
      }
      to {
        opacity: 1;
        transform: scale(1);
      }
    }
    #page-agent-settings #agent-quick-fix .qf-msg.qf-msg--assistant-enter .qf-msg-bubble {
      animation: qf-assistant-bubble-materialize 0.58s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    #page-agent-settings #agent-quick-fix .qf-msg.qf-msg--assistant-enter {
      animation: qf-assistant-reply-enter 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    @media (prefers-reduced-motion: reduce) {
      #page-agent-settings #agent-quick-fix .qf-thinking-spinner,
      #page-agent-settings #agent-quick-fix .qf-thinking-pulse-ring,
      #page-agent-settings #agent-quick-fix .qf-thinking-pulse-core,
      #page-agent-settings #agent-quick-fix .qf-thinking-node--active,
      #page-agent-settings #agent-quick-fix .qf-thinking-node--active::after,
      #acqSignalDeck .acq-sd-chat .qf-thinking-pulse-ring,
      #acqSignalDeck .acq-sd-chat .qf-thinking-pulse-core {
        animation: none !important;
      }
      #page-agent-settings #agent-quick-fix .qf-thinking-pulse-ring,
      #acqSignalDeck .acq-sd-chat .qf-thinking-pulse-ring {
        opacity: 0.48;
        box-shadow: none;
      }
      #page-agent-settings #agent-quick-fix .qf-thinking-pulse-core,
      #acqSignalDeck .acq-sd-chat .qf-thinking-pulse-core {
        opacity: 0.92;
        filter: none;
      }
      #page-agent-settings #agent-quick-fix .qf-msg.qf-msg--assistant-enter,
      #page-agent-settings #agent-quick-fix .qf-msg.qf-msg--assistant-enter .qf-msg-bubble {
        animation: none !important;
      }
    }
    #page-agent-settings #agent-quick-fix .qf-msg-role {
      font-size: 0.65rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--text-muted);
      margin-bottom: 0.35rem;
      padding-left: 0.15rem;
      opacity: 0.85;
    }
    #page-agent-settings #agent-quick-fix .qf-msg-bubble {
      border-radius: 14px;
      padding: 0.7rem 0.95rem;
      font-size: 0.9rem;
      line-height: 1.55;
      white-space: pre-wrap;
      word-break: break-word;
      border: 1px solid var(--border-light);
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-msg--user .qf-msg-bubble {
      background: var(--bg-muted);
      border-color: var(--border-light);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-msg--user .qf-msg-bubble {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(255, 255, 255, 0.1);
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-msg--assistant .qf-msg-bubble {
      background: var(--bg);
      border-color: var(--border-light);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-msg--assistant .qf-msg-bubble {
      background: rgba(0, 0, 0, 0.2);
      border-color: rgba(255, 255, 255, 0.08);
    }
    #page-agent-settings #agent-quick-fix .qf-msg-attachments {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-bottom: 0.5rem;
    }
    #page-agent-settings #agent-quick-fix .qf-att-thumb {
      max-width: min(280px, 78vw);
      max-height: 200px;
      border-radius: 12px;
      border: 1px solid var(--border-light);
      object-fit: contain;
      background: var(--bg-muted);
      box-shadow: none;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-att-thumb {
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-att-file {
      font-size: 0.78rem;
      font-weight: 500;
      padding: 0.45rem 0.65rem;
      border-radius: 10px;
      border: 1px solid var(--border-light);
      color: var(--text-muted);
      background: var(--bg-muted);
    }
    #page-agent-settings #agent-quick-fix .qf-composer-outer {
      flex-shrink: 0;
      padding: 0.7rem 1.2rem 1rem;
      padding-bottom: max(1rem, calc(0.85rem + env(safe-area-inset-bottom, 0px)));
      border-top: 1px solid var(--border-light);
      background: var(--bg-card);
    }
    #page-agent-settings.page-agent-settings--agent-fullbleed #agent-quick-fix .qf-composer-outer {
      padding-left: max(1.2rem, 1rem);
      padding-right: max(1.2rem, 1rem);
      padding-bottom: max(1.15rem, calc(1rem + env(safe-area-inset-bottom, 0px)));
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-composer-outer {
      background: var(--bg-card);
    }
    #page-agent-settings #agent-quick-fix .qf-composer-wrap {
      position: relative;
      border: 1px solid var(--border-light);
      border-radius: 26px;
      background: var(--bg);
      padding: 0.45rem 0.6rem 0.5rem 0.85rem;
      transition: border-color 0.22s ease;
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-composer-wrap:hover {
      border-color: #cbd5e1;
    }
    #page-agent-settings #agent-quick-fix .qf-composer-wrap:focus-within {
      border-color: #94a3b8;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-composer-wrap {
      background: rgba(255, 255, 255, 0.035);
      border-color: rgba(255, 255, 255, 0.1);
      box-shadow: none;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-composer-wrap:hover {
      border-color: rgba(255, 255, 255, 0.16);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-composer-wrap:focus-within {
      border-color: rgba(255, 255, 255, 0.22);
    }
    #page-agent-settings #agent-quick-fix .qf-composer-wrap.qf-composer-drag {
      border-color: rgba(148, 163, 184, 0.5);
      box-shadow: none;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-composer-wrap.qf-composer-drag {
      border-color: rgba(255, 255, 255, 0.24);
    }
    #page-agent-settings #agent-quick-fix .qf-composer-wrap *:focus,
    #page-agent-settings #agent-quick-fix .qf-composer-wrap *:focus-visible {
      outline: none !important;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-att-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      margin-bottom: 0.35rem;
      min-height: 0;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-att-chip {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      padding: 0.25rem 0.4rem 0.25rem 0.3rem;
      border-radius: 999px;
      background: var(--bg-muted);
      border: 1px solid var(--border-light);
      font-size: 0.74rem;
      max-width: 100%;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-att-chip img {
      width: 28px;
      height: 28px;
      object-fit: cover;
      border-radius: 4px;
      flex-shrink: 0;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-att-chip span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 160px;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-att-remove {
      border: none;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      padding: 0 0.15rem;
      font-size: 1rem;
      line-height: 1;
      border-radius: 4px;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-att-remove:hover {
      color: #dc2626;
    }
    #page-agent-settings #agent-quick-fix .qf-composer-row {
      display: flex;
      align-items: flex-end;
      gap: 0.5rem;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-input {
      flex: 1;
      min-height: 44px;
      max-height: 200px;
      resize: none;
      display: block;
      box-sizing: border-box;
      overflow-y: hidden;
      font-size: 0.9375rem;
      line-height: 1.5;
      padding: 0.55rem 0.35rem 0.5rem 0.15rem;
      border: none;
      border-radius: 0;
      background: transparent;
      color: var(--text);
      font-family: inherit;
      width: 100%;
      vertical-align: top;
      -webkit-appearance: none;
      appearance: none;
      -webkit-tap-highlight-color: transparent;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-input:focus,
    #page-agent-settings #agent-quick-fix .quick-fix-input:focus-visible {
      outline: none !important;
      box-shadow: none !important;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-input::placeholder {
      color: var(--text-muted);
      opacity: 0.75;
    }
    /* Block global dark-theme textarea:hover / :focus (border + glow) so the field stays borderless inside the shell */
    #page-agent-settings #agent-quick-fix .quick-fix-input:hover,
    #page-agent-settings #agent-quick-fix .quick-fix-input:focus,
    #page-agent-settings #agent-quick-fix .quick-fix-input:focus-visible {
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
      outline: none !important;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .quick-fix-input,
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .quick-fix-input:hover,
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .quick-fix-input:focus,
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .quick-fix-input:focus-visible {
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
      outline: none !important;
    }
    #page-agent-settings #agent-quick-fix .qf-composer-actions {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 0.35rem;
      flex-shrink: 0;
      padding-bottom: 0.15rem;
    }
    #page-agent-settings #agent-quick-fix .qf-icon-btn {
      width: 40px;
      height: 40px;
      border-radius: 999px;
      border: none;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s ease, color 0.15s ease;
      outline: none !important;
      box-shadow: none !important;
    }
    #page-agent-settings #agent-quick-fix .qf-icon-btn:hover {
      background: var(--bg-muted);
      color: var(--text);
    }
    #page-agent-settings #agent-quick-fix .qf-icon-btn:focus,
    #page-agent-settings #agent-quick-fix .qf-icon-btn:focus-visible {
      outline: none !important;
      box-shadow: none !important;
    }
    #page-agent-settings #agent-quick-fix .qf-send-btn {
      width: 40px;
      height: 40px;
      border-radius: 999px;
      border: none;
      background: var(--text);
      color: var(--bg-card);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.12s ease, opacity 0.15s ease;
      box-shadow: none;
      outline: none !important;
    }
    #page-agent-settings #agent-quick-fix .qf-send-btn:focus,
    #page-agent-settings #agent-quick-fix .qf-send-btn:focus-visible {
      outline: none !important;
      box-shadow: none !important;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-send-btn {
      background: #f4f4f5;
      color: #18181b;
      box-shadow: none;
    }
    #page-agent-settings #agent-quick-fix .qf-send-btn:hover:not(:disabled) {
      transform: scale(1.04);
      opacity: 0.95;
    }
    #page-agent-settings #agent-quick-fix .qf-send-btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      transform: none;
    }
    #page-agent-settings #agent-quick-fix .qf-send-btn.qf-send-btn--stop {
      background: #b91c1c;
      color: #fff;
    }
    #page-agent-settings #agent-quick-fix .qf-send-btn.qf-send-btn--stop:hover:not(:disabled) {
      background: #991b1b;
      opacity: 1;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-send-btn.qf-send-btn--stop {
      background: #dc2626;
      color: #fff;
    }
    #page-agent-settings #agent-quick-fix .qf-composer-hint {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
    #page-agent-settings #agent-quick-fix .qf-kbd {
      display: inline-block;
      font-size: 0.62rem;
      font-family: ui-monospace, monospace;
      padding: 0.1rem 0.35rem;
      border-radius: 4px;
      border: 1px solid var(--border-light);
      background: var(--bg-muted);
      margin: 0 0.1rem;
    }
    #page-agent-settings #agent-quick-fix .qf-plan-dock {
      flex-shrink: 0;
      padding: 0.85rem 1.15rem 1rem;
      border-top: 1px solid var(--border-light);
      background: rgba(0, 0, 0, 0.02);
    }
    #page-agent-settings #agent-quick-fix .qf-agent-body > .quick-fix-status {
      flex-shrink: 0;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-plan-dock {
      background: rgba(0, 0, 0, 0.25);
    }
    #page-agent-settings #agent-quick-fix .quick-fix-plan-wrap {
      margin-top: 0;
      padding-top: 0;
      border-top: none;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-plan-title {
      font-size: 0.82rem;
      font-weight: 650;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      margin: 0 0 0.5rem;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-plan-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-top: 1rem;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-plan-item {
      display: flex;
      gap: 0.65rem;
      align-items: flex-start;
      padding: 0.75rem 0.85rem;
      border-radius: 14px;
      border: 1px solid var(--border-light);
      background: var(--bg-card);
      margin-bottom: 0.5rem;
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .quick-fix-plan-item {
      background: rgba(255, 255, 255, 0.03);
    }
    #page-agent-settings #agent-quick-fix .quick-fix-plan-item:hover {
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    }
    #page-agent-settings #agent-quick-fix .quick-fix-plan-item.op-kb {
      border-left: 3px solid #3b82f6;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-plan-item.op-ins {
      border-left: 3px solid #a855f7;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-plan-item.op-train {
      border-left: 3px solid #f59e0b;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-plan-item label {
      flex: 1;
      cursor: pointer;
      font-size: 0.82rem;
      line-height: 1.35;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-plan-item code {
      font-size: 0.72rem;
      display: block;
      margin-top: 0.35rem;
      white-space: pre-wrap;
      word-break: break-word;
      opacity: 0.88;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-status {
      padding: 0 1.2rem 0.5rem;
      font-size: 0.8rem;
      color: var(--text-muted);
      min-height: 1.2em;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-status:empty {
      display: none;
      min-height: 0;
      padding: 0;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-status.is-error {
      color: #dc2626;
    }
    #page-agent-settings #agent-quick-fix.qf-root--planning .qf-agent-body > .quick-fix-status {
      display: none;
    }
    #page-agent-settings #agent-quick-fix.qf-root--planning .qf-preview-details {
      opacity: 0.4;
      pointer-events: none;
      margin-top: 0.15rem;
      margin-bottom: 0.5rem;
      transition: opacity 0.2s ease;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix.qf-root--planning .qf-preview-details {
      opacity: 0.32;
    }

    /* Setter Coach (compact panel): floating coach; persists for the browser session */
    #acqSignalDeck {
      position: fixed;
      z-index: 8500;
      right: max(1rem, env(safe-area-inset-right));
      bottom: max(1rem, env(safe-area-inset-bottom));
      font-family: inherit;
      max-width: calc(100vw - 2rem);
    }
    #acqSignalDeck[hidden] {
      display: none !important;
    }
    #acqSignalDeck .acq-sd-fab {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      padding: 0.55rem 0.95rem;
      border-radius: 999px;
      border: 1px solid var(--border-light);
      background: var(--bg-card);
      color: var(--text);
      font-size: 0.8rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      cursor: pointer;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
      transition: transform 0.12s ease, border-color 0.15s ease;
    }
    [data-theme="dark"] #acqSignalDeck .acq-sd-fab {
      background: rgba(22, 24, 28, 0.92);
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(59, 130, 246, 0.15) inset;
    }
    #acqSignalDeck .acq-sd-fab:hover {
      transform: translateY(-1px);
      border-color: rgba(59, 130, 246, 0.45);
    }
    #acqSignalDeck .acq-sd-fab-badge {
      min-width: 1.35rem;
      height: 1.35rem;
      padding: 0 0.35rem;
      border-radius: 999px;
      background: rgba(59, 130, 246, 0.22);
      color: var(--text);
      font-size: 0.68rem;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    #acqSignalDeck .acq-sd-fab-badge[hidden] {
      display: none !important;
    }
    #acqSignalDeck.is-open .acq-sd-fab {
      display: none;
    }
    #acqSignalDeck .acq-sd-panel {
      display: none;
      flex-direction: column;
      width: min(400px, calc(100vw - 2rem));
      max-height: min(72vh, 640px);
      border-radius: 18px;
      border: 1px solid var(--border-light);
      background: var(--bg-card);
      box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
      overflow: hidden;
    }
    [data-theme="dark"] #acqSignalDeck .acq-sd-panel {
      background: rgba(22, 24, 28, 0.96);
      border-color: rgba(255, 255, 255, 0.1);
      box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(59, 130, 246, 0.12) inset;
    }
    #acqSignalDeck.is-open .acq-sd-panel {
      display: flex;
    }
    #acqSignalDeck .acq-sd-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.65rem 0.85rem;
      border-bottom: 1px solid var(--border-light);
      flex-shrink: 0;
    }
    #acqSignalDeck .acq-sd-title {
      font-size: 0.82rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--text);
    }
    #acqSignalDeck .acq-sd-sub {
      font-size: 0.68rem;
      color: var(--text-muted);
      margin-top: 0.1rem;
      max-width: 220px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    #acqSignalDeck .acq-sd-head-actions {
      display: flex;
      align-items: center;
      gap: 0.2rem;
      flex-shrink: 0;
    }
    #acqSignalDeck .acq-sd-icon-btn {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      border-radius: 10px;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s ease, color 0.15s ease;
    }
    #acqSignalDeck .acq-sd-icon-btn:hover {
      background: var(--bg-muted);
      color: var(--text);
    }
    [data-theme="dark"] #acqSignalDeck .acq-sd-icon-btn:hover {
      background: rgba(255, 255, 255, 0.08);
    }
    #acqSignalDeck .acq-sd-icon-btn:focus-visible {
      outline: 2px solid rgba(59, 130, 246, 0.55);
      outline-offset: 1px;
    }
    #acqSignalDeck .acq-sd-icon-btn--close:hover {
      background: rgba(239, 68, 68, 0.12);
      color: #ef4444;
    }
    [data-theme="dark"] #acqSignalDeck .acq-sd-icon-btn--close:hover {
      background: rgba(239, 68, 68, 0.18);
      color: #f87171;
    }
    #acqSignalDeck .acq-sd-chat {
      flex: 1;
      min-height: 140px;
      max-height: 38vh;
      overflow-y: auto;
      padding: 0.65rem 0.85rem;
      font-size: 0.8rem;
      border-bottom: 1px solid var(--border-light);
    }
    #acqSignalDeck .acq-sd-chat .qf-empty-hint {
      font-size: 0.78rem;
      line-height: 1.45;
      color: var(--text-muted);
    }
    #acqSignalDeck .acq-sd-chat .qf-msg {
      margin-bottom: 0.65rem;
    }
    #acqSignalDeck .acq-sd-chat .qf-msg-role {
      font-size: 0.62rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      margin-bottom: 0.2rem;
    }
    #acqSignalDeck .acq-sd-chat .qf-msg-bubble {
      padding: 0.45rem 0.6rem;
      border-radius: 12px;
      line-height: 1.45;
      white-space: pre-wrap;
      word-break: break-word;
    }
    #acqSignalDeck .acq-sd-chat .qf-msg-stop-actions {
      margin-top: 0.28rem;
    }
    #acqSignalDeck .acq-sd-chat .qf-msg-edit-btn {
      font-size: 0.68rem;
      padding: 0.18rem 0.45rem;
    }
    #acqSignalDeck .acq-sd-chat .qf-msg--user .qf-msg-bubble {
      background: rgba(59, 130, 246, 0.12);
      border: 1px solid rgba(59, 130, 246, 0.2);
    }
    #acqSignalDeck .acq-sd-chat .qf-msg--assistant .qf-msg-bubble {
      background: var(--bg-muted);
      border: 1px solid var(--border-light);
    }
    #acqSignalDeck .acq-sd-chat .qf-msg--thinking {
      max-width: 100%;
      width: fit-content;
    }
    #acqSignalDeck .acq-sd-chat .qf-msg--thinking .qf-msg-bubble {
      display: block;
      width: fit-content;
      max-width: 100%;
      padding: 0;
      overflow: visible;
      border: none;
      background: transparent;
      box-shadow: none;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-bubble {
      position: relative;
      padding: 0;
      border-radius: 12px;
      border: 1px solid var(--border-light);
      background: var(--bg-muted);
      font-family: inherit;
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      overflow: hidden;
    }
    [data-theme="dark"] #acqSignalDeck .acq-sd-chat .qf-thinking-bubble {
      border-color: rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.04);
    }
    #acqSignalDeck .acq-sd-chat .qf-msg--thinking-finish .qf-thinking-pulse-ring {
      animation-duration: 1.5s;
      border-color: rgba(52, 211, 153, 0.42);
    }
    #acqSignalDeck .acq-sd-chat .qf-msg--thinking-finish .qf-thinking-pulse-core {
      animation-duration: 1.5s;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-bubble--minimal {
      border-radius: 999px;
      width: fit-content;
      max-width: 100%;
      min-width: min(100%, 17.5rem);
      overflow: visible;
      border-color: rgba(16, 185, 129, 0.14);
      background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(16, 185, 129, 0.04) 45%,
        rgba(255, 255, 255, 0.03) 100%
      );
    }
    [data-theme="dark"] #acqSignalDeck .acq-sd-chat .qf-thinking-bubble--minimal {
      border-color: rgba(52, 211, 153, 0.12);
      background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.045) 0%,
        rgba(16, 185, 129, 0.07) 42%,
        rgba(255, 255, 255, 0.028) 100%
      );
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-minimal {
      display: flex;
      align-items: center;
      gap: 0.72rem;
      min-height: 2.45rem;
      padding: 0.42rem 1rem 0.44rem 0.78rem;
      box-sizing: border-box;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-minimal--compact {
      min-height: 2.15rem;
      padding: 0.34rem 0.78rem 0.36rem 0.62rem;
      gap: 0.55rem;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-card-inner {
      padding: 0.6rem 0.75rem 0.65rem;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-head {
      margin-bottom: 0.45rem;
      padding-bottom: 0;
      gap: 0.55rem;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-spinner-wrap {
      width: 30px;
      height: 30px;
      border-radius: 8px;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-spinner {
      width: 16px;
      height: 16px;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-htitle {
      font-size: 0.85rem;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-steps {
      font-size: 0.72rem;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-node {
      width: 22px;
      height: 22px;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-line--active {
      font-weight: 500;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-compact-msg {
      margin-bottom: 0.45rem;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-minimal-text {
      margin: 0;
      font-size: 0.7rem;
      line-height: 1.42;
      letter-spacing: -0.015em;
      color: var(--text-muted);
      flex: 1;
      min-width: 0;
    }
    #acqSignalDeck .acq-sd-chat .qf-msg--thinking-finish .qf-thinking-minimal-text {
      color: var(--text);
      opacity: 0.92;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-pulse {
      position: relative;
      width: 28px;
      height: 28px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-pulse-ring {
      position: absolute;
      inset: 0;
      margin: auto;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 1px solid rgba(16, 185, 129, 0.22);
      opacity: 0.45;
      animation: qf-thinking-ring-pulse 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
      box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.18);
      pointer-events: none;
      will-change: opacity, box-shadow;
    }
    [data-theme="dark"] #acqSignalDeck .acq-sd-chat .qf-thinking-pulse-ring {
      border-color: rgba(52, 211, 153, 0.26);
    }
    #acqSignalDeck .acq-sd-chat .qf-thinking-pulse-core {
      position: relative;
      z-index: 1;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #10b981;
      opacity: 0.92;
      animation: qf-thinking-core-pulse 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
      box-shadow:
        0 0 6px rgba(16, 185, 129, 0.28),
        0 0 14px rgba(16, 185, 129, 0.12);
      pointer-events: none;
      will-change: opacity, box-shadow;
    }
    [data-theme="dark"] #acqSignalDeck .acq-sd-chat .qf-thinking-pulse-core {
      background: #34d399;
      box-shadow:
        0 0 6px rgba(52, 211, 153, 0.22),
        0 0 14px rgba(16, 185, 129, 0.1);
    }
    #acqSignalDeck .acq-sd-chat .qf-msg--assistant-enter {
      animation: qf-assistant-reply-enter 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    #acqSignalDeck .acq-sd-chat .qf-msg--assistant-enter .qf-msg-bubble {
      animation: qf-assistant-bubble-materialize 0.58s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    #acqSignalDeck .acq-sd-foot {
      padding: 0.65rem 0.85rem 0.75rem;
      flex-shrink: 0;
    }
    #acqSignalDeck .acq-sd-foot-hint {
      font-size: 0.65rem;
      color: var(--text-muted);
      margin: 0 0 0.45rem;
      line-height: 1.35;
    }
    #acqSignalDeck .acq-sd-row {
      display: flex;
      align-items: flex-end;
      gap: 0.4rem;
    }
    #acqSignalDeck .acq-sd-input {
      flex: 1;
      min-height: 44px;
      max-height: 120px;
      resize: none;
      display: block;
      box-sizing: border-box;
      overflow-y: hidden;
      border-radius: 12px;
      border: 1px solid var(--border-light);
      background: var(--bg);
      color: var(--text);
      font-family: inherit;
      font-size: 0.82rem;
      line-height: 1.45;
      padding: 0.45rem 0.55rem;
      -webkit-appearance: none;
      appearance: none;
      outline: none;
    }
    #acqSignalDeck .acq-sd-input:focus,
    #acqSignalDeck .acq-sd-input:focus-visible {
      outline: none !important;
      box-shadow: none !important;
    }
    #acqSignalDeck .acq-sd-send {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      border: none;
      background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
      color: #fff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    #acqSignalDeck .acq-sd-send:hover {
      filter: brightness(1.06);
    }
    #acqSignalDeck .acq-sd-send:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    #acqSignalDeck .acq-sd-send.acq-sd-send--stop {
      background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    }
    #acqSignalDeck .acq-sd-send.acq-sd-send--stop:hover:not(:disabled) {
      filter: brightness(1.08);
    }

    #page-agent-settings #agent-quick-fix .qf-preview-details {
      flex-shrink: 0;
      margin: 0 1.2rem max(1.1rem, calc(0.35rem + env(safe-area-inset-bottom, 0px)));
      border-radius: 26px;
      border: 1px solid var(--border-light);
      background: var(--bg);
      overflow: hidden;
      transition: border-color 0.22s ease;
    }
    #page-agent-settings #agent-quick-fix .qf-preview-details:hover {
      border-color: #cbd5e1;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-preview-details {
      background: rgba(255, 255, 255, 0.035);
      border-color: rgba(255, 255, 255, 0.1);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-preview-details:hover {
      border-color: rgba(255, 255, 255, 0.16);
    }
    #page-agent-settings #agent-quick-fix .qf-preview-details > summary {
      cursor: pointer;
      font-size: 0.84rem;
      font-weight: 600;
      letter-spacing: -0.01em;
      padding: 0.85rem 1.3rem;
      list-style: none;
      user-select: none;
      transition: background 0.15s ease;
    }
    #page-agent-settings #agent-quick-fix .qf-preview-details > summary:hover {
      background: var(--bg-muted);
    }
    #page-agent-settings #agent-quick-fix .qf-preview-details > summary::-webkit-details-marker {
      display: none;
    }
    #page-agent-settings #agent-quick-fix .qf-preview-details > summary::before {
      content: '▸';
      display: inline-block;
      width: 1rem;
      margin-right: 0.35rem;
      opacity: 0.55;
      transition: transform 0.2s ease;
    }
    #page-agent-settings #agent-quick-fix .qf-preview-details[open] > summary::before {
      transform: rotate(90deg);
    }
    #page-agent-settings #agent-quick-fix .qf-preview-inner {
      padding: 0;
      border-top: 1px solid var(--border-light);
    }
    #page-agent-settings #agent-quick-fix .qf-preview-inner.qf-test-reply-inner {
      padding: 0 1rem 1.05rem;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-loop-card {
      margin-top: 0;
      padding: 0.65rem 0 0;
      border-radius: 0;
      border: none;
      background: transparent;
    }
    #page-agent-settings #agent-quick-fix .qf-test-reply-card {
      padding-top: 0.35rem;
    }
    #page-agent-settings #agent-quick-fix .qf-test-reply-lead {
      margin: 0 0 0.75rem;
      font-size: 0.8rem;
      line-height: 1.45;
      color: var(--text-muted);
    }
    #page-agent-settings #agent-quick-fix .qf-test-fill {
      display: inline-flex;
      align-items: center;
      margin: 0 0 0.85rem;
      padding: 0;
      border: none;
      background: none;
      font-family: inherit;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--acquirely-blue, #1d9bf0);
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 3px;
      text-decoration-thickness: 1px;
    }
    #page-agent-settings #agent-quick-fix .qf-test-fill:hover {
      color: var(--text);
    }
    #page-agent-settings #agent-quick-fix .qf-test-inbound-shell {
      border: 1px solid var(--border-light);
      border-radius: 16px;
      background: var(--bg);
      padding: 0.55rem 0.85rem 0.6rem;
      margin-bottom: 0.65rem;
      transition: border-color 0.2s ease;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-inbound-shell {
      background: rgba(255, 255, 255, 0.03);
      border-color: rgba(255, 255, 255, 0.1);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-inbound-shell:hover {
      border-color: rgba(255, 255, 255, 0.14);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-inbound-shell:focus-within {
      border-color: rgba(255, 255, 255, 0.2);
    }
    #page-agent-settings #agent-quick-fix .qf-test-inbound-shell:hover {
      border-color: #cbd5e1;
    }
    #page-agent-settings #agent-quick-fix .qf-test-inbound-shell:focus-within {
      border-color: #94a3b8;
    }
    #page-agent-settings #agent-quick-fix .qf-test-inbound {
      display: block;
      width: 100%;
      min-height: 140px;
      max-height: min(320px, 42vh);
      resize: vertical;
      margin: 0;
      padding: 0;
      border: none;
      border-radius: 0;
      background: transparent;
      color: var(--text);
      font-family: inherit;
      font-size: 0.875rem;
      line-height: 1.55;
      box-sizing: border-box;
      -webkit-appearance: none;
      appearance: none;
    }
    #page-agent-settings #agent-quick-fix .qf-test-inbound::placeholder {
      color: var(--text-muted);
      opacity: 0.8;
    }
    #page-agent-settings #agent-quick-fix .qf-test-inbound:hover,
    #page-agent-settings #agent-quick-fix .qf-test-inbound:focus,
    #page-agent-settings #agent-quick-fix .qf-test-inbound:focus-visible {
      outline: none !important;
      box-shadow: none !important;
      border: none !important;
      background: transparent !important;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-inbound,
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-inbound:hover,
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-inbound:focus,
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-inbound:focus-visible {
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
    }
    #page-agent-settings #agent-quick-fix .qf-test-meta-shell {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: stretch;
      gap: 0;
      border: 1px solid var(--border-light);
      border-radius: 14px;
      overflow: hidden;
      margin-bottom: 1rem;
      transition: border-color 0.2s ease;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-meta-shell {
      border-color: rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.02);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-meta-shell:hover {
      border-color: rgba(255, 255, 255, 0.14);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-meta-shell:focus-within {
      border-color: rgba(255, 255, 255, 0.18);
    }
    #page-agent-settings #agent-quick-fix .qf-test-meta-shell:hover {
      border-color: #cbd5e1;
    }
    #page-agent-settings #agent-quick-fix .qf-test-meta-shell:focus-within {
      border-color: #94a3b8;
    }
    #page-agent-settings #agent-quick-fix .qf-test-meta-divider {
      width: 1px;
      background: var(--border-light);
      align-self: stretch;
      min-height: 2.25rem;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-meta-divider {
      background: rgba(255, 255, 255, 0.1);
    }
    #page-agent-settings #agent-quick-fix .qf-test-input {
      margin: 0;
      padding: 0.5rem 0.75rem;
      border: none;
      border-radius: 0;
      background: transparent;
      color: var(--text);
      font-family: inherit;
      font-size: 0.8rem;
      min-width: 0;
      box-sizing: border-box;
      transition: none;
    }
    #page-agent-settings #agent-quick-fix .qf-test-input::placeholder {
      color: var(--text-muted);
      opacity: 0.75;
    }
    #page-agent-settings #agent-quick-fix .qf-test-input:hover,
    #page-agent-settings #agent-quick-fix .qf-test-input:focus,
    #page-agent-settings #agent-quick-fix .qf-test-input:focus-visible {
      outline: none !important;
      box-shadow: none !important;
      border: none !important;
      background: transparent !important;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-input,
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-input:hover,
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-input:focus {
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
    }
    @media (max-width: 520px) {
      #page-agent-settings #agent-quick-fix .qf-test-meta-shell {
        grid-template-columns: 1fr;
      }
      #page-agent-settings #agent-quick-fix .qf-test-meta-divider {
        display: none;
      }
    }
    #page-agent-settings #agent-quick-fix .qf-test-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem;
    }
    #page-agent-settings #agent-quick-fix .qf-test-primary {
      padding: 0.5rem 1.15rem;
      border-radius: 999px;
      border: none;
      background: var(--acquirely-blue, #1d9bf0);
      color: #fff;
      font-family: inherit;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      transition: filter 0.15s ease, transform 0.12s ease;
    }
    #page-agent-settings #agent-quick-fix .qf-test-primary:hover:not(:disabled) {
      filter: brightness(1.06);
    }
    #page-agent-settings #agent-quick-fix .qf-test-primary:active:not(:disabled) {
      transform: scale(0.98);
    }
    #page-agent-settings #agent-quick-fix .qf-test-primary:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    #page-agent-settings #agent-quick-fix .qf-test-secondary {
      padding: 0.45rem 0.9rem;
      border-radius: 999px;
      border: 1px solid var(--border-light);
      background: transparent;
      color: var(--text);
      font-family: inherit;
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-test-secondary {
      border-color: rgba(255, 255, 255, 0.14);
    }
    #page-agent-settings #agent-quick-fix .qf-test-secondary:hover {
      background: var(--bg-muted);
    }
    #page-agent-settings #agent-quick-fix .qf-test-linkish {
      padding: 0.45rem 0.5rem;
      border: none;
      border-radius: 8px;
      background: transparent;
      color: var(--text-muted);
      font-family: inherit;
      font-size: 0.78rem;
      font-weight: 600;
      cursor: pointer;
      transition: color 0.15s ease, background 0.15s ease;
    }
    #page-agent-settings #agent-quick-fix .qf-test-linkish:hover {
      color: var(--text);
      background: var(--bg-muted);
    }
    #page-agent-settings #agent-quick-fix .qf-test-hint {
      margin: 0.45rem 0 0;
      font-size: 0.72rem;
      color: var(--text-muted);
      opacity: 0.85;
    }
    #page-agent-settings #agent-quick-fix .qf-test-err {
      margin-top: 0.65rem;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-loop-card.quick-fix-loop-card--pulse {
      animation: quickFixLoopPulse 1.35s ease;
    }
    @keyframes quickFixLoopPulse {
      0%, 100% { box-shadow: 0 0 0 0 transparent; }
      35% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28); }
    }
    #page-agent-settings #agent-quick-fix .quick-fix-loop-title {
      font-size: 0.92rem;
      font-weight: 600;
      margin: 0 0 0.35rem;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-loop-kicker {
      font-size: 0.78rem;
      color: var(--text-muted);
      line-height: 1.4;
      margin: 0 0 0.65rem;
    }
    #page-agent-settings #agent-quick-fix .quick-fix-loop-grid {
      display: grid;
      gap: 0.5rem;
    }
    @media (min-width: 640px) {
      #page-agent-settings #agent-quick-fix .quick-fix-loop-grid--2 {
        grid-template-columns: 1fr 1fr;
      }
    }
    #page-agent-settings #agent-quick-fix .quick-fix-test-out {
      margin-top: 0.75rem;
      padding: 0.9rem 1rem;
      border-radius: 16px;
      border: 1px solid var(--border-light);
      background: var(--bg-card);
      font-size: 0.84rem;
      line-height: 1.55;
      white-space: pre-wrap;
      word-break: break-word;
      max-height: min(300px, 45vh);
      overflow-y: auto;
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .quick-fix-test-out {
      background: rgba(255, 255, 255, 0.04);
      border-color: rgba(255, 255, 255, 0.1);
    }
    #page-agent-settings #agent-quick-fix .quick-fix-loop-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      margin-top: 0.55rem;
      align-items: center;
    }
    #page-agent-settings #agent-quick-fix .qf-modal[hidden] {
      display: none !important;
    }
    #page-agent-settings #agent-quick-fix .qf-modal {
      position: fixed;
      inset: 0;
      z-index: 10060;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      box-sizing: border-box;
    }
    #page-agent-settings #agent-quick-fix .qf-modal-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.5);
    }
    [data-theme="dark"] #page-agent-settings #agent-quick-fix .qf-modal-backdrop {
      background: rgba(0, 0, 0, 0.65);
    }
    #page-agent-settings #agent-quick-fix .qf-modal-panel {
      position: relative;
      max-width: 520px;
      width: 100%;
      max-height: min(92vh, 720px);
      overflow-y: auto;
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 20px;
      padding: 1.35rem 1.4rem 1.4rem;
      box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 32px 80px -12px rgba(0, 0, 0, 0.45);
    }
    #page-agent-settings #agent-quick-fix .qf-modal-panel h3 {
      margin: 0 0 0.4rem;
      font-size: 1.15rem;
      font-weight: 650;
      letter-spacing: -0.02em;
    }
    #page-agent-settings #agent-quick-fix .qf-modal-panel .qf-modal-lead {
      font-size: 0.82rem;
      color: var(--text-muted);
      line-height: 1.45;
      margin: 0 0 1rem;
    }
    #page-agent-settings #agent-quick-fix .qf-modal-field {
      margin-bottom: 0.85rem;
    }
    #page-agent-settings #agent-quick-fix .qf-modal-field label {
      display: block;
      font-size: 0.72rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--text-muted);
      margin-bottom: 0.35rem;
    }
    #page-agent-settings #agent-quick-fix .qf-modal-field textarea {
      width: 100%;
      box-sizing: border-box;
      font-size: 0.85rem;
      line-height: 1.45;
      padding: 0.55rem 0.65rem;
      border-radius: 10px;
      border: 1px solid var(--border-light);
      background: var(--bg-input, var(--bg));
      color: var(--text);
      font-family: inherit;
      resize: vertical;
    }
    #page-agent-settings #agent-quick-fix .qf-modal-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      justify-content: flex-end;
      margin-top: 1rem;
      padding-top: 0.75rem;
      border-top: 1px solid var(--border-light);
    }
    #page-agent-settings #agent-quick-fix .qf-modal-copy-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      align-items: center;
      margin: -0.35rem 0 0.5rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-card {
      /* No .card padding: hero + sections set insets (avoids double 1.5rem top vs Knowledge Base). */
      padding: 0 0 1.5rem;
      overflow: hidden;
      border-radius: 14px;
      border: 1px solid var(--border-light);
      box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    }
    [data-theme="dark"] #page-agent-settings #agent-test-harness .battle-tester-card {
      box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 12px 40px rgba(0, 0, 0, 0.35);
    }
    #page-agent-settings #agent-test-harness .battle-tester-hero {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      /* Match Knowledge Base: one 1.5rem band from card edge to heading (same as .card padding-top). */
      padding: 1.5rem 1.5rem 0.5rem;
      margin: -1px -1px 0 -1px;
      border-radius: 13px 13px 0 0;
      background: var(--bg-card);
      border-bottom: 1px solid var(--border-light);
    }
    #page-agent-settings #agent-test-harness .battle-tester-card-title-row {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: wrap;
      /* Space below title row matches .card-title-row--with-help globally */
      margin: 0 0 0.65rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-title {
      margin: 0;
    }
    #page-agent-settings #agent-test-harness .battle-tester-scenario-picker.model-selector {
      position: relative;
      max-width: 22rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-dir-label {
      font-size: 0.72rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      margin: 0;
      padding-top: 0.35rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-dir-toggle {
      display: flex;
      gap: 0.35rem;
      flex-wrap: wrap;
    }
    #page-agent-settings #agent-test-harness .battle-tester-dir-btn {
      flex: 1;
      min-width: 6.5rem;
      padding: 0.42rem 0.6rem;
      font-size: 0.78rem;
      font-weight: 600;
      font-family: inherit;
      border-radius: 8px;
      border: 1px solid var(--border-light);
      background: var(--bg);
      color: var(--text-muted);
      cursor: pointer;
      transition: background 0.12s, border-color 0.12s, color 0.12s;
    }
    #page-agent-settings #agent-test-harness .battle-tester-dir-btn:hover {
      color: var(--text);
      border-color: rgba(59, 130, 246, 0.35);
    }
    #page-agent-settings #agent-test-harness .battle-tester-dir-btn.selected {
      background: rgba(59, 130, 246, 0.16);
      border-color: rgba(59, 130, 246, 0.45);
      color: var(--text);
    }
    #page-agent-settings #agent-test-harness .battle-tester-section {
      padding: 1.15rem 1.5rem;
      border-bottom: 1px solid var(--border-light);
    }
    #page-agent-settings #agent-test-harness .battle-tester-section--highlight {
      padding-top: 1rem;
      padding-bottom: 0.95rem;
      background: var(--bg);
    }
    [data-theme="dark"] #page-agent-settings #agent-test-harness .battle-tester-section--highlight {
      background: var(--bg);
    }
    #page-agent-settings #agent-test-harness .battle-tester-section:last-of-type {
      border-bottom: none;
    }
    #page-agent-settings #agent-test-harness .battle-tester-section--saved {
      background: var(--bg-alt);
    }
    #page-agent-settings #agent-test-harness .battle-tester-template-picker.model-selector {
      max-width: 20rem;
      min-width: 17rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-template-picker .model-selector-trigger {
      padding: 0.82rem 1.05rem;
      min-height: 3.05rem;
      align-items: center;
      border-radius: 12px;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    }
    [data-theme="dark"] #page-agent-settings #agent-test-harness .battle-tester-template-picker .model-selector-trigger {
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    }
    #page-agent-settings #agent-test-harness .battle-tester-template-picker .model-selector-menu {
      padding: 0.45rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-template-picker .model-selector-menu .battle-tester-tpl-option {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.55rem 0.55rem 0.55rem 0.75rem;
      min-height: 2.65rem;
      border-radius: 8px;
      transition: background 0.1s;
    }
    #page-agent-settings #agent-test-harness .battle-tester-template-picker .model-selector-menu .battle-tester-tpl-option + .battle-tester-tpl-option {
      margin-top: 0.2rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-template-picker .model-selector-menu .battle-tester-tpl-option:hover {
      background: var(--bg-alt);
    }
    #page-agent-settings #agent-test-harness .battle-tester-tpl-option-main {
      flex: 1;
      min-width: 0;
      text-align: left;
      font: inherit;
      font-size: 0.88rem;
      font-weight: 500;
      color: var(--text);
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 0.45rem 0.35rem;
      border-radius: 6px;
    }
    #page-agent-settings #agent-test-harness .battle-tester-tpl-option-main:hover {
      background: var(--bg-alt);
    }
    #page-agent-settings #agent-test-harness .battle-tester-tpl-kebab {
      flex-shrink: 0;
      width: 2rem;
      height: 2rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      border: 1px solid transparent;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      font-size: 1.1rem;
      line-height: 1;
      padding: 0;
    }
    #page-agent-settings #agent-test-harness .battle-tester-tpl-kebab:hover {
      background: var(--bg-alt);
      border-color: var(--border-light);
      color: var(--text);
    }
    .battle-tester-kebab-menu {
      position: fixed;
      z-index: 12000;
      min-width: 7.75rem;
      padding: 0.35rem;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--bg-card);
      box-shadow: var(--shadow-lg);
    }
    .battle-tester-kebab-menu button {
      display: block;
      width: 100%;
      text-align: left;
      padding: 0.45rem 0.65rem;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--text);
      font: inherit;
      font-size: 0.84rem;
      cursor: pointer;
    }
    .battle-tester-kebab-menu button:hover {
      background: var(--bg-alt);
    }
    .battle-tester-kebab-menu button.battle-tester-kebab-danger {
      color: #dc2626;
    }
    [data-theme="dark"] .battle-tester-kebab-menu button.battle-tester-kebab-danger {
      color: #f87171;
    }
    #page-agent-settings #agent-test-harness .battle-tester-section-head-row {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      justify-content: space-between;
      gap: 1rem 1.5rem;
      margin-bottom: 1.2rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-section-head-left {
      flex: 1 1 12rem;
      min-width: 0;
    }
    #page-agent-settings #agent-test-harness .battle-tester-section-head-left .battle-tester-section-title {
      margin-bottom: 0.35rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-section-head-left .battle-tester-section-hint {
      margin: 0;
    }
    /* Stack: symmetric vertical rhythm (matches section horizontal 1.5rem) */
    #page-agent-settings #agent-test-harness .battle-tester-form-layout {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-form-layout .form-group {
      margin-bottom: 0;
    }
    #page-agent-settings #agent-test-harness .battle-tester-top-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(17rem, 20rem);
      gap: 1.25rem;
      align-items: start;
    }
    #page-agent-settings #agent-test-harness .battle-tester-template-group {
      justify-self: end;
      width: 100%;
      max-width: 20rem;
      display: flex;
      flex-direction: column;
      align-items: stretch;
    }
    #page-agent-settings #agent-test-harness .battle-tester-template-group .battle-tester-template-label {
      text-align: right;
      width: 100%;
      margin-bottom: 0.35rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-template-group .battle-tester-template-picker.model-selector {
      width: 100%;
      max-width: 20rem;
      min-width: 0;
    }
    @media (max-width: 720px) {
      #page-agent-settings #agent-test-harness .battle-tester-top-row {
        grid-template-columns: 1fr;
      }
      #page-agent-settings #agent-test-harness .battle-tester-template-group {
        justify-self: stretch;
        max-width: none;
      }
      #page-agent-settings #agent-test-harness .battle-tester-template-group .battle-tester-template-label {
        text-align: left;
      }
    }
    #page-agent-settings #agent-test-harness .battle-tester-subject-row {
      width: 100%;
    }
    #page-agent-settings #agent-test-harness .battle-tester-form-layout .form-input:not(textarea) {
      padding: 0.88rem 1.05rem;
      font-size: 0.97rem;
      font-weight: 500;
      min-height: 3.05rem;
      border-radius: 12px;
      box-sizing: border-box;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }
    #page-agent-settings #agent-test-harness .battle-tester-form-layout .form-input:not(textarea):focus {
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12), 0 1px 2px rgba(15, 23, 42, 0.06);
    }
    [data-theme="dark"] #page-agent-settings #agent-test-harness .battle-tester-form-layout .form-input:not(textarea) {
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    }
    [data-theme="dark"] #page-agent-settings #agent-test-harness .battle-tester-form-layout .form-input:not(textarea):focus {
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 1px 2px rgba(0, 0, 0, 0.35);
    }
    #page-agent-settings #agent-test-harness textarea.battle-tester-body-input {
      width: 100%;
      resize: none;
      min-height: min(280px, 42vh);
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
      font-size: 1.0625rem;
      line-height: 1.65;
      font-weight: 500;
      letter-spacing: -0.01em;
      border-radius: 14px;
      border: 1px solid rgba(148, 163, 184, 0.45);
      padding: 1.1rem 1.2rem;
      background: #faf9f6;
      color: #1e293b;
      box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.85);
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }
    #page-agent-settings #agent-test-harness textarea.battle-tester-body-input::placeholder {
      color: rgba(30, 41, 59, 0.45);
      font-weight: 400;
    }
    #page-agent-settings #agent-test-harness textarea.battle-tester-body-input:focus {
      outline: none;
      border-color: rgba(15, 23, 42, 0.22);
      box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
    }
    [data-theme="dark"] #page-agent-settings #agent-test-harness textarea.battle-tester-body-input {
      border-color: rgba(148, 163, 184, 0.28);
      background: rgba(15, 23, 42, 0.55);
      color: var(--text);
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
    }
    [data-theme="dark"] #page-agent-settings #agent-test-harness textarea.battle-tester-body-input::placeholder {
      color: rgba(226, 232, 240, 0.38);
    }
    [data-theme="dark"] #page-agent-settings #agent-test-harness textarea.battle-tester-body-input:focus {
      border-color: rgba(148, 163, 184, 0.45);
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    }
    #page-agent-settings #agent-test-harness .battle-tester-body-after-grid {
      margin-top: 0;
    }
    #page-agent-settings #agent-test-harness .battle-tester-bottom-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem 1rem;
      margin-top: 1.5rem;
      padding-top: 1.25rem;
      border-top: 1px solid var(--border-light);
    }
    #page-agent-settings #agent-test-harness .battle-tester-bottom-primary-cluster {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem;
      flex: 1 1 auto;
      min-width: 0;
    }
    #page-agent-settings #agent-test-harness .battle-tester-bottom-primary-cluster .btn {
      white-space: nowrap;
    }
    #page-agent-settings #agent-test-harness .battle-tester-bottom-bar .battle-tester-bottom-right {
      flex: 0 0 auto;
      margin-left: auto;
    }
    #page-agent-settings #agent-test-harness .battle-tester-section--output {
      background: var(--bg-alt);
      padding-bottom: 1.35rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-section-title {
      margin: 0 0 0.35rem;
      font-size: 0.82rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-wrap: wrap;
    }
    #page-agent-settings #agent-test-harness .battle-tester-section-hint {
      margin: 0 0 0.85rem;
      font-size: 0.78rem;
      line-height: 1.45;
      color: var(--text-muted);
    }
    #page-agent-settings #agent-test-harness .battle-tester-badge {
      font-size: 0.62rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 0.15rem 0.45rem;
      border-radius: 999px;
      background: rgba(59, 130, 246, 0.18);
      color: var(--acquirely-blue, #2563eb);
      border: 1px solid rgba(59, 130, 246, 0.28);
    }
    #page-agent-settings #agent-test-harness .battle-tester-scenario-row {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.75rem 1rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-scenario-row .form-group {
      margin-bottom: 0;
      min-width: 11rem;
      flex: 1 1 14rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-scenario-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem;
      align-items: center;
      margin-bottom: 0.1rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-grid-2 {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 1rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-grid-2 .form-group {
      margin-bottom: 0;
    }
    #page-agent-settings #agent-test-harness .battle-tester-history-head {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem;
      margin-bottom: 0.45rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-history-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-prior-hint {
      font-size: 0.78rem;
      line-height: 1.45;
      color: var(--text-muted);
      margin: 0 0 0.75rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-history-row {
      display: grid;
      grid-template-columns: 6.5rem 1fr;
      gap: 0.55rem 0.85rem;
      padding: 0.85rem 1rem;
      margin-bottom: 0.65rem;
      border: 1px solid var(--border-light);
      border-radius: 10px;
      background: var(--bg);
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
      align-items: start;
    }
    [data-theme="dark"] #page-agent-settings #agent-test-harness .battle-tester-history-row {
      box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    }
    @media (max-width: 640px) {
      #page-agent-settings #agent-test-harness .battle-tester-history-row {
        grid-template-columns: 1fr;
      }
    }
    #page-agent-settings #agent-test-harness .battle-tester-history-row-fields {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-row-actions {
      display: flex;
      justify-content: flex-end;
      grid-column: 1 / -1;
      padding-top: 0.15rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.55rem;
      padding: 1rem 1.25rem;
      border-bottom: 1px solid var(--border-light);
      background: var(--bg);
    }
    #page-agent-settings #agent-test-harness .battle-tester-status {
      font-size: 0.8rem;
      color: var(--text-muted);
      padding: 0.35rem 1.25rem 0;
      min-height: 1.35rem;
    }
    #page-agent-settings #agent-test-harness .battle-tester-status.is-error {
      color: #dc2626;
    }
    [data-theme="dark"] #page-agent-settings #agent-test-harness .battle-tester-status.is-error {
      color: #f87171;
    }
    #page-agent-settings #agent-test-harness .battle-tester-status.is-ok {
      color: #16a34a;
    }
    [data-theme="dark"] #page-agent-settings #agent-test-harness .battle-tester-status.is-ok {
      color: #4ade80;
    }
    #page-agent-settings #agent-test-harness .battle-tester-output {
      min-height: 11rem;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 0.8rem;
      line-height: 1.5;
      border-radius: 10px;
      resize: vertical;
    }
    #page-agent-settings #agent-test-harness .battle-tester-section .form-group:last-child {
      margin-bottom: 0;
    }
    .page-tabs-slide {
      position: absolute;
      top: 4px;
      bottom: 4px;
      left: 0;
      width: 0;
      border-radius: 9px;
      z-index: 0;
      pointer-events: none;
      background: #e5f3ff;
      border: 1px solid rgba(59, 130, 246, 0.22);
      box-shadow: none;
      transition: left 0.34s cubic-bezier(0.34, 1.2, 0.64, 1), width 0.34s cubic-bezier(0.34, 1.2, 0.64, 1);
      will-change: left, width;
    }
    @media (prefers-reduced-motion: reduce) {
      .page-tabs-slide {
        transition: none;
      }
    }
    /* Skip slide animation on first paint after load/refresh (see acquirelyTabSlideAnimationsEnabled). */
    .page-tabs-slide.tab-slide--instant,
    .integrations-tab-slide.tab-slide--instant {
      transition: none !important;
    }
    .page-tabs-tab {
      position: relative;
      z-index: 1;
      flex: 0 1 auto;
      min-width: 0;
      margin: 0;
      padding: 0.5rem 0.75rem;
      font-size: 0.8rem;
      font-family: inherit;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      color: var(--text-muted);
      font-weight: 600;
      line-height: 1.25;
      background: transparent;
      transition: color 0.22s ease;
      -webkit-tap-highlight-color: transparent;
    }
    .page-tabs-tab:hover {
      color: var(--text);
    }
    .page-tabs-tab:focus-visible {
      outline: 2px solid var(--acquirely-blue);
      outline-offset: 2px;
    }
    .page-tabs-tab.active {
      color: #1e40af;
    }

    .inbox-reset-card {
      margin-top: 1.25rem;
      border-color: rgba(239, 68, 68, 0.28);
    }
    [data-theme="dark"] .inbox-reset-card {
      border-color: rgba(248, 113, 113, 0.35);
    }

    /* Settings */
    .form-group { margin-bottom: 1.25rem; }
    .form-label {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.9rem;
      font-weight: 500;
      margin-bottom: 0.35rem;
    }
    .integration-status {
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      border-radius: 999px;
      padding: 0.12rem 0.6rem;
      border: 1px solid transparent;
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      white-space: nowrap;
    }
    .integration-status::before {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 999px;
      background: transparent;
    }
    .integration-status.connected {
      background: rgba(22, 163, 74, 0.08);
      border-color: rgba(34, 197, 94, 0.6);
      color: #15803d;
    }
    .integration-status.connected::before {
      background: #22c55e;
    }
    .integration-status.pending {
      background: rgba(148, 163, 184, 0.1);
      border-color: rgba(148, 163, 184, 0.4);
      color: #64748b;
    }
    .integration-status.pending::before {
      background: #94a3b8;
    }
    .integration-status.coming-soon {
      background: rgba(148, 163, 184, 0.14);
      border-color: rgba(148, 163, 184, 0.42);
      color: #64748b;
    }
    .integration-status.coming-soon::before {
      background: #94a3b8;
      opacity: 0.55;
    }

    .integrations-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 0.75rem;
    }
    .integrations-grid .card.integration-card {
      margin-bottom: 0;
      display: flex;
      flex-direction: column;
    }
    .integrations-page {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }
    .integrations-filter-pills-wrap {
      display: flex;
      justify-content: center;
      width: 100%;
    }
    .integration-category-title {
      font-size: 0.8125rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      margin: 0 0 0.65rem;
      padding-bottom: 0.35rem;
      border-bottom: 1px solid var(--border-subtle);
    }
    .integration-soon-note {
      font-size: 0.75rem;
      color: var(--text-muted);
    }
    .integrations-section-head {
      margin-bottom: 0;
    }
    .integrations-section-head .card-title {
      margin-bottom: 0;
    }
    #settings-integrations .integrations-hub-card {
      margin-bottom: 0;
    }
    #settings-integrations .integrations-hub-toolbar {
      margin-top: -0.1rem;
      padding-bottom: 0.85rem;
      margin-bottom: 0.55rem;
      border-bottom: 1px solid var(--border-light);
    }
    #settings-integrations .integrations-filter-pills-wrap {
      justify-content: flex-start;
    }
    #settings-integrations .integrations-section-dynamic-title--in-card {
      font-size: 1.0625rem;
      font-weight: 700;
      margin: 0 0 0.65rem;
      letter-spacing: -0.02em;
      line-height: 1.25;
    }
    .integrations-filter-pills {
      position: relative;
      display: flex;
      align-items: stretch;
      flex-wrap: wrap;
      width: fit-content;
      max-width: 100%;
      padding: 4px;
      gap: 2px;
      justify-content: center;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: #eef2f7;
      box-shadow: none;
    }
    .integrations-tab-slide {
      position: absolute;
      top: 4px;
      bottom: 4px;
      left: 0;
      width: 0;
      border-radius: 9px;
      z-index: 0;
      pointer-events: none;
      background: #e5f3ff;
      border: 1px solid rgba(59, 130, 246, 0.22);
      box-shadow: none;
      transition: left 0.34s cubic-bezier(0.34, 1.2, 0.64, 1), width 0.34s cubic-bezier(0.34, 1.2, 0.64, 1);
      will-change: left, width;
    }
    @media (prefers-reduced-motion: reduce) {
      .integrations-tab-slide {
        transition: none;
      }
    }
    .integrations-cat-tab {
      position: relative;
      z-index: 1;
      flex: 0 1 auto;
      min-width: 0;
      margin: 0;
      padding: 0.52rem 0.7rem;
      font-size: 0.78rem;
      font-family: inherit;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      color: var(--text-muted);
      font-weight: 600;
      line-height: 1.25;
      background: transparent;
      transition: color 0.22s ease;
      -webkit-tap-highlight-color: transparent;
    }
    .integrations-cat-tab:hover {
      color: var(--text);
    }
    .integrations-cat-tab:focus-visible {
      outline: 2px solid var(--acquirely-blue);
      outline-offset: 2px;
    }
    .integrations-cat-tab.active {
      color: #1e40af;
    }
    .integrations-section-dynamic-title {
      font-size: 1.35rem;
      font-weight: 800;
      margin: 1rem 0 0.55rem;
      letter-spacing: -0.03em;
      color: var(--text);
      line-height: 1.2;
    }
    #integrationsUnifiedGrid .integration-card.integration-card--filtered-out {
      display: none !important;
    }
    #settings-integrations .integrations-page .integration-card-top {
      flex-direction: column;
      align-items: stretch;
      gap: 0.7rem;
      margin-bottom: 1rem;
    }
    #settings-integrations .integrations-page .integration-card-top .integration-status {
      align-self: flex-start;
      margin-top: 0.1rem;
    }
    #settings-integrations #integrationsUnifiedGrid .integration-card .form-group {
      margin-bottom: 0.7rem;
    }
    #settings-integrations #integrationsUnifiedGrid .integration-card-actions {
      margin-top: 0.5rem;
      padding-top: 0.15rem;
    }
    #settings-integrations #integrationsUnifiedGrid.integrations-grid {
      grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
      gap: 1.15rem 1.35rem;
    }
    #settings-integrations #integrationsUnifiedGrid .card.integration-card {
      padding: 1.2rem 1.3rem;
    }
    .integration-logo-slot--svgicon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      flex-shrink: 0;
      border-radius: 999px;
      background: #fff;
      border: 1px solid var(--border-light);
      padding: 7px;
      box-sizing: border-box;
    }
    .integration-logo-slot--svgicon .integration-logo-svg {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
    .integration-logo-slot--letter {
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      font-weight: 800;
      font-size: 0.82rem;
      color: #fff;
      width: 44px;
      height: 44px;
      flex-shrink: 0;
      letter-spacing: -0.02em;
    }
    .integration-logo-slot--anthropic {
      background: linear-gradient(145deg, #d97757 0%, #b4532a 100%);
    }
    /* Dark icon backplates: combined selectors beat .integration-logo-slot--svgicon (#fff). */
    .integration-logo-slot.integration-logo-slot--svgicon.integration-logo-slot--gemini {
      background: #fafafa;
      border-color: rgba(0, 0, 0, 0.08);
      padding: 7px;
    }
    .integration-logo-slot.integration-logo-slot--svgicon.integration-logo-slot--gemini .integration-logo-svg {
      object-fit: contain;
    }
    .integration-logo-slot.integration-logo-slot--svgicon.integration-logo-slot--meta {
      background: #eef3ff;
      border-color: rgba(6, 104, 225, 0.18);
      padding: 7px;
    }
    .integration-logo-slot.integration-logo-slot--svgicon.integration-logo-slot--meta .integration-logo-svg {
      object-fit: contain;
    }
    .integration-logo-slot.integration-logo-slot--svgicon.integration-logo-slot--ghl {
      background: #001d3d;
      border-color: rgba(0, 29, 61, 0.55);
      padding: 0;
      overflow: hidden;
    }
    .integration-logo-slot.integration-logo-slot--svgicon.integration-logo-slot--ghl .integration-logo-svg {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: 50% 50%;
      transform: scale(1.18);
    }
    @media (prefers-reduced-motion: reduce) {
      .integration-logo-slot.integration-logo-slot--svgicon.integration-logo-slot--ghl .integration-logo-svg {
        transform: none;
      }
    }
    .integration-logo {
      width: 44px;
      height: 44px;
      border-radius: 999px;
      object-fit: contain;
      flex-shrink: 0;
      background: #f1f5f9;
      padding: 4px;
    }
    /* Cal.com: circular mark on transparent square; contain + matching backplate so corners blend. */
    .integration-logo.integration-logo--calcom {
      padding: 0;
      object-fit: contain;
      object-position: 50% 50%;
      background: #2b2b2b;
      border: none;
      box-sizing: border-box;
    }
    .integration-logo-slot {
      position: relative;
      width: 44px;
      height: 44px;
      flex-shrink: 0;
    }
    .integration-logo-slot .integration-logo {
      position: absolute;
      left: 0;
      top: 0;
    }
    .integration-logo-slot .integration-logo--dark {
      display: none;
    }
    .integration-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 0.75rem;
      margin-bottom: 1rem;
    }
    .integration-card-top .integration-status {
      flex-shrink: 0;
      align-self: flex-start;
    }
    .integration-card-brand {
      display: flex;
      align-items: center;
      gap: 0.85rem;
      flex: 1;
      min-width: 0;
    }
    .integration-card-text {
      min-width: 0;
      flex: 1;
    }
    .integration-card-brand .card-title {
      margin-bottom: 0;
      line-height: 1.3;
    }
    .integration-card-brand .card-desc {
      margin-bottom: 0;
      font-size: 0.8rem;
    }
    .integration-card-text:has(.card-desc) .card-title {
      margin-bottom: 0.1rem;
    }
    .model-selector-trigger.disabled {
      cursor: default;
      background: #f8fafc;
      color: #94a3b8;
    }
    .model-selector-trigger.disabled .model-selector-name {
      color: #94a3b8;
    }
    .model-selector-trigger.disabled .model-selector-desc {
      color: #cbd5f5;
    }
    [data-theme="dark"] .model-selector-trigger.disabled {
      background: var(--bg-alt);
      border-color: var(--border);
    }
    .integration-card-actions {
      display: flex;
      gap: 0.5rem;
      align-items: center;
      margin-top: auto;
      padding-top: 0.25rem;
    }
    .btn-danger {
      background: #dc2626;
      color: #fff;
      border: none;
      padding: 0.5rem 1.1rem;
      border-radius: 8px;
      cursor: pointer;
      font-size: 0.85rem;
      font-weight: 500;
      transition: background 0.15s;
    }
    .btn-danger:hover { background: #b91c1c; }
    .btn-danger-outline {
      background: none;
      border: 1px solid #fca5a5;
      color: #dc2626;
      padding: 0.4rem 0.9rem;
      border-radius: 8px;
      cursor: pointer;
      font-size: 0.82rem;
      font-weight: 500;
      transition: background 0.15s, border-color 0.15s;
    }
    .btn-danger-outline:hover {
      background: #fef2f2;
      border-color: #f87171;
    }
    .btn-danger-outline:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    /* no animation - keep badges clean and modern */
    .form-input {
      width: 100%;
      padding: 0.6rem 0.75rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 0.9rem;
      font-family: inherit;
      background: #ffffff;
      transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
    }
    .form-input:hover {
      border-color: #cbd5e1;
      box-shadow: 0 0 0 1px rgba(148,163,184,0.3);
    }
    .form-input:focus {
      outline: none;
      border-color: var(--acquirely-blue);
      box-shadow: 0 0 0 1px rgba(29,155,240,0.35), 0 0 0 4px rgba(29,155,240,0.12);
      background: #ffffff;
    }
    .form-group small { display: block; margin-top: 0.35rem; font-size: 0.8125rem; color: var(--text-muted); }
    .form-group small a { color: var(--stripe-purple); }
    .form-group small a:hover { text-decoration: underline; }
    textarea.form-input { min-height: 100px; resize: vertical; }

    /* Toggle */
    .toggle {
      display: inline-flex;
      align-items: center;
      cursor: pointer;
      user-select: none;
    }
    .toggle-switch {
      width: 42px;
      height: 24px;
      border-radius: 999px;
      background: #dbe4f0;
      border: 1px solid #cbd5e1;
      position: relative;
      transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
      box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
      display: inline-block;
      flex-shrink: 0;
    }
    .toggle-switch::after {
      content: '';
      position: absolute;
      top: 2px;
      left: 2px;
      width: 18px;
      height: 18px;
      border-radius: 999px;
      background: #ffffff;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
      transition: transform 0.18s ease;
    }
    .toggle-switch.on {
      background: #1d9bf0;
      border-color: #1d9bf0;
      box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04), 0 0 0 3px rgba(29, 155, 240, 0.12);
    }
    .toggle-switch.on::after {
      transform: translateX(18px);
    }

    /* Inbox Layout (resizable columns, Outlook-style) */
    #inboxLayout {
      --inbox-leads-width: var(--inbox-leads-width-user, 320px);
      --inbox-details-width: 280px;
    }

    body.acquirely-inbox-preset-wide-list #inboxLayout {
      --inbox-leads-width: 420px;
      --inbox-details-width: 260px;
    }
    body.acquirely-inbox-preset-reading-focus #inboxLayout {
      --inbox-leads-width: 260px;
      --inbox-details-width: 340px;
    }

    body.acq-layout-preview-chrome-min .sidebar,
    body.acq-layout-preview-chrome-min .acq-app-sidebar-resize {
      display: none !important;
    }
    body.acq-layout-preview-chrome-min .main-header {
      display: none !important;
    }
    .inbox-layout {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      height: 100%;
      max-height: 100%;
      min-height: 0;
      padding-block: 0.35rem;
      box-sizing: border-box;
    }
    .inbox-layout.no-details .inbox-details,
    .inbox-layout.no-details .inbox-resize-details {
      display: none !important;
    }
    /* Inbox panes: no permanent vertical hairlines (avoid “floating” dividers); show on resize hover */
    #inboxLayout .inbox-resize-leads::before,
    #inboxLayout .inbox-resize-details::before {
      opacity: 0 !important;
    }
    #inboxLayout .inbox-resize-leads:hover::before,
    #inboxLayout .inbox-resize-leads:focus-visible::before,
    #inboxLayout .inbox-resize-leads.is-dragging::before,
    #inboxLayout .inbox-resize-details:hover::before,
    #inboxLayout .inbox-resize-details:focus-visible::before,
    #inboxLayout .inbox-resize-details.is-dragging::before {
      opacity: 0.5 !important;
    }
    .inbox-leads {
      flex: 0 0 var(--inbox-leads-width);
      width: var(--inbox-leads-width);
      min-width: 200px;
      max-width: min(560px, 52vw);
      margin-inline-end: 0.5rem;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      box-shadow: var(--shadow-sm);
      overflow: hidden;
      overscroll-behavior: contain;
      background: var(--bg-card);
      min-height: 0;
      display: flex;
      flex-direction: column;
      align-items: stretch;
    }
    .inbox-leads-list-scroll {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
    }
    #inboxLeadList {
      border-top: none;
      margin: 0;
      padding: 0.5rem 0.75rem;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      box-sizing: border-box;
    }
    /* Feature visibility (admin feature-controls): hide unless body.acquirely-feature-*-on */
    #inboxMailboxTabs,
    #page-inbox #inboxLeadList .thread-star-btn,
    #btnBulkArchive,
    #btnArchiveThread {
      display: none !important;
    }
    body.acquirely-feature-archive-on #inboxMailboxTabs {
      display: flex !important;
    }
    body.acquirely-feature-archive-on #btnBulkArchive,
    body.acquirely-feature-archive-on #btnArchiveThread {
      display: inline-block !important;
    }
    body.acquirely-feature-starred-on #page-inbox #inboxLeadList .thread-star-btn {
      display: inline-flex !important;
    }
    body:not(.acquirely-feature-multiselect-on) #inboxBulkActions,
    body:not(.acquirely-feature-multiselect-on) .inbox-lead-item .thread-select-btn {
      display: none !important;
    }
    body:not(.acquirely-feature-theme-mode-toggle-on) #themeModeToggle {
      display: none !important;
    }
    body:not(.acquirely-feature-workspace-selector-on) .sidebar-workspace-label,
    body:not(.acquirely-feature-workspace-selector-on) .sidebar-workspace-pill > svg:last-of-type,
    body:not(.acquirely-feature-workspace-selector-on) .sidebar-workspace-icon-rail,
    body:not(.acquirely-feature-workspace-selector-on) .sidebar-workspace-menu {
      display: none !important;
    }
    body:not(.acquirely-feature-workspace-selector-on) .sidebar-workspace-pill {
      pointer-events: none;
      cursor: default;
    }
    body:not(.acquirely-feature-agent-coach-on) #acqSignalDeck,
    body:not(.acquirely-feature-agent-coach-on) #btnInboxSignalDeck,
    body:not(.acquirely-feature-agent-coach-on) #btnDetailSignalDeck,
    body:not(.acquirely-feature-agent-coach-on) #agent-tab-quick-fix,
    body:not(.acquirely-feature-agent-coach-on) #agent-quick-fix {
      display: none !important;
    }
    body:not(.acquirely-feature-agent-knowledge-on) #agent-tab-knowledge,
    body:not(.acquirely-feature-agent-knowledge-on) #agent-knowledge {
      display: none !important;
    }
    body:not(.acquirely-feature-agent-instructions-on) #agent-tab-instructions,
    body:not(.acquirely-feature-agent-instructions-on) #agent-instructions {
      display: none !important;
    }
    body:not(.acquirely-feature-agent-training-on) #agent-tab-training,
    body:not(.acquirely-feature-agent-training-on) #agent-training {
      display: none !important;
    }
    body:not(.acquirely-feature-agent-battle-on) #agent-tab-test-harness,
    body:not(.acquirely-feature-agent-battle-on) #agent-test-harness {
      display: none !important;
    }
    .inbox-lazy-load-sentinel {
      min-height: 0;
      height: 0;
      flex-shrink: 0;
      pointer-events: none;
      overflow: hidden;
    }
    .inbox-leads-list-scroll.inbox-lazy-page-fetch-active .inbox-lazy-load-sentinel {
      min-height: 0;
      height: 0;
    }
    .inbox-leads-status-foot {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      min-height: 2.5rem;
      padding: 0.5rem 0.75rem;
      border-top: 1px solid var(--border-light);
      background: var(--bg-card);
      box-sizing: border-box;
    }
    .inbox-leads-status-foot .header-inbox-sync-signal[hidden] {
      visibility: hidden;
      pointer-events: none;
    }
    .inbox-leads-status-foot .header-inbox-sync-signal:not([hidden]) {
      width: auto;
      max-width: 100%;
      justify-content: flex-start;
      text-align: left;
    }
    .inbox-leads-status-foot .header-inbox-sync-text {
      justify-content: flex-start;
      text-align: left;
    }
    .inbox-leads-controls {
      position: sticky;
      top: 0;
      z-index: 4;
      background: var(--bg-card);
      border-bottom: none;
      box-shadow: none;
      flex: 0 0 auto;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      padding: 0.5rem 0.75rem 0;
      box-sizing: border-box;
    }
    .inbox-lead-tabs {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0.5rem;
      padding: 0;
      width: 100%;
      flex: 0 0 auto;
    }
    .inbox-filter-pills {
      position: relative;
      display: flex;
      align-items: stretch;
      width: 100%;
      max-width: 100%;
      padding: 4px;
      gap: 0;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: #eef2f7;
      box-shadow: none;
    }
    .inbox-tab-slide {
      position: absolute;
      top: 4px;
      bottom: 4px;
      left: 4px;
      width: calc((100% - 8px) / 3);
      border-radius: 9px;
      z-index: 0;
      pointer-events: none;
      background: #dbeafe;
      border: 1px solid rgba(37, 99, 235, 0.45);
      box-shadow: none;
      transition: transform 0.34s cubic-bezier(0.34, 1.2, 0.64, 1);
      will-change: transform;
    }
    .inbox-filter-pills[data-active="new"] .inbox-tab-slide {
      transform: translateX(calc(100%));
    }
    .inbox-filter-pills[data-active="archived"] .inbox-tab-slide {
      transform: translateX(calc(200%));
    }
    @media (prefers-reduced-motion: reduce) {
      .inbox-tab-slide {
        transition: none;
      }
    }
    .inbox-filter-pills.inbox-filter-pills--instant-slide .inbox-tab-slide {
      transition: none !important;
    }
    .inbox-lead-tab {
      position: relative;
      z-index: 1;
      flex: 1 1 0;
      min-width: 0;
      margin: 0;
      padding: 0.52rem 0.55rem;
      font-size: 0.8rem;
      font-family: inherit;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      color: var(--text-muted);
      font-weight: 600;
      line-height: 1.25;
      background: transparent;
      transition: color 0.22s ease;
      -webkit-tap-highlight-color: transparent;
    }
    .inbox-lead-tab:hover {
      color: var(--text);
    }
    .inbox-lead-tab:focus-visible {
      outline: 2px solid var(--acquirely-blue);
      outline-offset: 2px;
    }
    .inbox-lead-tab.active {
      color: #1d4ed8;
    }
    .inbox-filter-status {
      flex: 1 1 200px;
      min-width: 180px;
      max-width: none;
    }
    /* Column layout: do not let the status row grow and create dead space above the thread list */
    .inbox-lead-tabs .inbox-filter-status {
      flex: 0 0 auto;
      align-self: stretch;
      max-width: none;
    }
    .inbox-filter-status .model-selector-trigger {
      min-height: 40px;
      padding: 0.4rem 0.65rem;
      border-radius: 11px;
      gap: 0.45rem;
    }
    .inbox-filter-status .model-selector-value {
      min-width: 0;
      gap: 0.05rem;
    }
    /* Single-line label; full “Filter by status” lives in title via JS */
    .inbox-filter-status .model-selector-name {
      font-size: 0.78rem;
      font-weight: 600;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .inbox-filter-status .model-selector-desc {
      display: none;
    }
    .inbox-filter-status .model-selector-trigger svg {
      width: 14px;
      height: 14px;
    }
    .inbox-filter-status .model-selector-menu {
      padding: 0.35rem;
      border-radius: 12px;
    }
    .inbox-filter-status .model-option + .model-option {
      margin-top: 0.2rem;
    }
    .inbox-bulk-actions {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.55rem;
      flex-wrap: wrap;
      padding-top: 0.2rem;
    }
    .inbox-bulk-actions[hidden] {
      display: none;
    }
    .inbox-bulk-buttons {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: wrap;
      justify-content: center;
    }
    .inbox-bulk-link {
      border: 0;
      background: transparent;
      padding: 0.2rem 0.15rem;
      color: #64748b;
      font: inherit;
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      transition: color 0.12s ease;
    }
    .inbox-bulk-link:hover {
      color: #0f172a;
    }
    .inbox-bulk-link[disabled] {
      color: #cbd5e1;
      cursor: default;
    }
    .inbox-lead-item {
      min-height: 6.1rem;
      box-sizing: border-box;
      padding: 0.75rem calc(0.75rem + 3px) 0.7rem 0.75rem;
      border: 1px solid var(--border-light);
      border-radius: 8px;
      border-left: 3px solid transparent;
      box-shadow: none;
      cursor: pointer;
      transition: background 0.12s ease, border-color 0.12s ease, border-left-color 0.12s ease;
      display: flex;
      flex-direction: column;
      gap: 0.34rem;
      justify-content: center;
      position: relative;
    }
    .inbox-lead-item:hover {
      background: var(--bg-alt);
      border-color: var(--border);
    }
    .inbox-lead-item.selected {
      background: #f1f5f9;
      border-left: 3px solid #64748b;
      border-color: #cbd5e1;
    }
    .inbox-lead-item.selected:hover {
      background: #e8edf2;
    }
    .inbox-lead-item.selected .name {
      color: #0f172a;
      font-weight: 700;
    }
    .inbox-lead-item.selected .subject,
    .inbox-lead-item.selected .snippet,
    .inbox-lead-item.selected .meta {
      color: #475569;
    }
    .inbox-lead-item.unread {
      background: #eff6ff;
      border-left-color: #3b82f6;
      border-color: #bfdbfe;
    }
    .inbox-lead-item.unread:hover {
      background: #e0f2fe;
      border-left-color: #2563eb;
    }
    .inbox-lead-item.unread .name {
      font-weight: 700;
      color: #0f172a;
    }
    .inbox-lead-item.unread .subject,
    .inbox-lead-item.unread .snippet,
    .inbox-lead-item.unread .meta {
      color: #475569;
    }
    .inbox-lead-item.unread.selected {
      background: #e2e8f0;
      border-left-color: #1e40af;
      border-color: #94a3b8;
    }
    .inbox-lead-item.unread.selected:hover {
      background: #dbe4ee;
      border-left-color: #334155;
    }
    .inbox-lead-item.bulk-selected {
      box-shadow: inset 0 0 0 1px rgba(29, 155, 240, 0.2);
    }
    .inbox-lead-item.bulk-selected:not(.selected) {
      background: #f3f9ff;
      border-left-color: #93c5fd;
    }
    .inbox-lead-item.bulk-selected.unread:not(.selected) {
      background: #d7ecff;
      border-left-color: #5fb5f2;
    }
    .lead-row-top {
      display: block;
      min-width: 0;
    }
    .lead-row-main {
      display: flex;
      align-items: flex-start;
      min-width: 0;
      flex: 1;
      gap: 0.55rem;
    }
    .lead-card-head {
      display: flex;
      align-items: flex-start;
      gap: 0.45rem;
      min-width: 0;
    }
    .lead-card-head .thread-select-btn {
      margin-top: 0.12rem;
      flex-shrink: 0;
    }
    .lead-card-head .thread-star-btn {
      margin-top: 0.1rem;
      flex-shrink: 0;
    }
    .lead-card-main {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 0.42rem;
    }
    .lead-card-title-row {
      display: block;
      min-width: 0;
    }
    .lead-card-title-row .lead-email-text {
      font-weight: 600;
      font-size: 0.9rem;
      line-height: 1.32;
      letter-spacing: -0.01em;
      display: block;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .lead-card-tags-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.32rem 0.4rem;
      min-width: 0;
      margin-top: 0.02rem;
    }
    .lead-card-tags-row .status-badge,
    .lead-card-tags-row .reply-origin-pill.preview {
      flex-shrink: 0;
      font-size: 0.72rem;
      padding: 0.18rem 0.52rem;
      line-height: 1.22;
      max-width: 100%;
    }
    .inbox-lead-item .lead-card-preview {
      font-size: 0.8rem;
      line-height: 1.38;
      font-weight: 500;
      color: #5c6b7a;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
      margin: 0;
    }
    .inbox-lead-item .lead-card-meta {
      font-size: 0.68rem;
      font-weight: 600;
      line-height: 1.4;
      letter-spacing: 0.02em;
      font-variant-numeric: tabular-nums;
      color: #8b97a8;
      margin: 0.18rem 0 0;
      padding: 0;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    .inbox-lead-item.selected .lead-card-preview {
      color: #475569;
    }
    .inbox-lead-item.selected .lead-card-meta {
      color: #7c8794;
    }
    .inbox-lead-item.unread .lead-card-preview {
      color: #5b6978;
    }
    .inbox-lead-item.unread .lead-card-meta {
      color: #8b96a3;
    }
    .inbox-lead-item.unread.selected .lead-card-preview {
      color: #3d4d5c;
    }
    .inbox-lead-item.unread.selected .lead-card-meta {
      color: #6f7a88;
    }
    .lead-email-block {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 0.28rem;
    }
    .lead-email-text {
      font-weight: 500;
      font-size: 0.86rem;
      line-height: 1.35;
      color: var(--text);
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    .lead-row-tags {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem 0.5rem;
      min-width: 0;
    }
    .inbox-lead-item .lead-card-tags-row .reply-origin-pill.preview {
      margin-left: 0;
    }
    .thread-select-btn {
      width: 18px;
      height: 18px;
      border-radius: 6px;
      border: 1px solid #cbd5e1;
      background: #ffffff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      flex-shrink: 0;
      cursor: pointer;
      transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, color 0.12s ease;
      color: transparent;
      box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.03);
    }
    .thread-select-btn:hover {
      border-color: #93c5fd;
      background: #f8fbff;
    }
    .thread-select-btn svg {
      width: 12px;
      height: 12px;
      stroke: currentColor;
      stroke-width: 2.2;
      fill: none;
    }
    .thread-select-btn.is-selected {
      background: #1d9bf0;
      border-color: #1d9bf0;
      color: #ffffff;
      box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.12);
    }
    .lead-row-bottom {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 0.5rem;
    }
    .thread-star-btn {
      width: 18px;
      height: 18px;
      padding: 0;
      border: 0;
      background: transparent;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #cbd5e1;
      cursor: pointer;
      flex-shrink: 0;
      transition: color 0.12s ease, transform 0.12s ease;
    }
    .thread-star-btn:hover {
      color: #f59e0b;
      transform: scale(1.05);
    }
    .thread-star-btn svg {
      width: 16px;
      height: 16px;
      display: block;
      stroke: currentColor;
      fill: transparent;
      stroke-width: 1.8;
    }
    .thread-star-btn.is-starred {
      color: #f59e0b;
    }
    .thread-star-btn.is-starred svg {
      fill: currentColor;
      stroke: currentColor;
    }
    .inbox-lead-item .subject {
      font-size: 0.84rem;
      color: var(--text-muted);
    }
    .inbox-lead-item .snippet {
      font-size: 0.8rem;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .inbox-lead-item .meta {
      font-size: 0.78rem;
      color: var(--text-muted);
      margin-top: 0.15rem;
      min-width: 0;
    }
    .status-badge {
      font-size: 0.75rem;
      padding: 0.2rem 0.5rem;
      border-radius: 999px;
      flex-shrink: 0;
      line-height: 1.2;
      max-width: 100%;
    }
    .status-badge.sent { background: var(--acquirely-blue-soft); color: var(--acquirely-blue); }
    .status-badge.new { background: #dbeafe; color: #2563eb; }
    .status-badge.interested { background: #dcfce7; color: #16a34a; }
    .status-badge.not-interested { background: #fef3c7; color: #d97706; }
    .status-badge.out-of-office { background: #dbeafe; color: #1d4ed8; }
    .status-badge.booked { background: #ede9fe; color: #7c3aed; }
    .status-badge.instantly-native { background: #f1f5f9; color: #475569; }
    .status-badge.dnc { background: #fee2e2; color: #dc2626; }
    .status-badge.instantly-off { background: #fee2e2; color: #b91c1c; border: 1px solid rgba(220, 38, 38, 0.35); }
    .status-badge.battle-test {
      background: rgba(59, 130, 246, 0.14);
      color: var(--acquirely-blue, #2563eb);
      border: 1px solid rgba(59, 130, 246, 0.28);
    }
    .inbox-message.inbox-message--system {
      background: linear-gradient(180deg, rgba(254, 226, 226, 0.35) 0%, var(--bg-alt) 100%);
      border: 1px solid rgba(220, 38, 38, 0.22);
      border-radius: 10px;
      padding: 0.75rem 1rem;
    }
    .inbox-message.inbox-message--system .from { color: #b91c1c; font-weight: 600; }
    .acquirely-system-notice p { margin: 0 0 0.5rem; font-size: 0.9rem; line-height: 1.45; color: var(--text); }
    .acquirely-system-notice p:last-child { margin-bottom: 0; }
    .acquirely-system-detail { font-size: 0.82rem !important; color: var(--text-muted) !important; word-break: break-word; }
    .inbox-instantly-banner {
      display: flex;
      align-items: flex-start;
      gap: 0.65rem;
      margin: 0 0 0.75rem;
      padding: 0.65rem 0.85rem;
      border-radius: 10px;
      background: rgba(254, 226, 226, 0.45);
      border: 1px solid rgba(220, 38, 38, 0.28);
      font-size: 0.84rem;
      line-height: 1.4;
      color: #7f1d1d;
    }
    .inbox-instantly-banner[hidden] { display: none !important; }
    .inbox-instantly-banner-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #dc2626;
      flex-shrink: 0;
      margin-top: 0.2rem;
      box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
      animation: inbox-conn-pulse 2s ease-in-out infinite;
    }
    @keyframes inbox-conn-pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.45; }
    }
    .header-instantly-conn {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.78rem;
      font-weight: 600;
      color: #b91c1c;
      margin-top: 0.25rem;
    }
    .header-instantly-conn[hidden] { display: none !important; }
    .header-instantly-conn-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #dc2626;
      box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
    }
    .inbox-thread {
      flex: 1 1 0;
      min-width: 240px;
      padding: 1rem 1.1rem;
      box-sizing: border-box;
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior: contain;
      border-right: none;
      box-shadow: none;
      background: var(--bg);
      min-height: 0;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: stretch;
    }
    .inbox-thread .inbox-instantly-banner {
      flex: 0 0 auto;
    }
    .inbox-catchup-banner {
      display: flex;
      align-items: flex-start;
      gap: 0.65rem;
      margin: 0 0 0.75rem;
      padding: 0.65rem 0.85rem;
      border-radius: 10px;
      background: rgba(59, 130, 246, 0.12);
      border: 1px solid rgba(37, 99, 235, 0.25);
      font-size: 0.84rem;
      line-height: 1.4;
      color: var(--text);
    }
    .inbox-catchup-banner[hidden] { display: none !important; }
    .inbox-catchup-banner-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #2563eb;
      flex-shrink: 0;
      margin-top: 0.2rem;
      animation: inbox-conn-pulse 2s ease-in-out infinite;
    }
    .inbox-thread .inbox-catchup-banner {
      flex: 0 0 auto;
    }
    .inbox-import-progress-label {
      font-weight: 600;
      line-height: 1.35;
      min-width: 0;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    .inbox-import-progress-count {
      font-variant-numeric: tabular-nums;
      line-height: 1.4;
      min-width: 0;
      white-space: pre-line;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    .inbox-thread .inbox-loading-state {
      flex: 1 1 auto;
      min-height: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 1rem;
      padding: 2rem 1.5rem;
      text-align: center;
      overflow-y: auto;
      border-radius: 0;
      margin: 0;
      background: transparent;
      border: none;
      box-shadow: none;
    }
    .inbox-loading-state {
      min-height: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.9rem;
      padding: 2.5rem 2rem;
      text-align: center;
    }
    .inbox-loading-state[hidden] {
      display: none;
    }
    .inbox-loading-shell {
      width: 112px;
      height: 112px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-alt);
      box-shadow: none;
      border: 1px solid var(--border-light);
    }
    .inbox-loading-logo {
      width: 58px;
      height: 58px;
      object-fit: contain;
      animation: inbox-logo-float 2.2s ease-in-out infinite;
    }
    .inbox-loading-state[data-state="idle"] .inbox-loading-logo,
    .inbox-loading-state[data-state="empty"] .inbox-loading-logo,
    .inbox-loading-state[data-state="error"] .inbox-loading-logo,
    .inbox-loading-state[data-state="selection"] .inbox-loading-logo {
      animation: none;
    }
    .inbox-loading-title {
      font-size: 1.12rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: #0f172a;
      max-width: 22rem;
      line-height: 1.28;
    }
    .inbox-loading-subtitle {
      max-width: 20rem;
      font-size: 0.875rem;
      line-height: 1.55;
      color: #64748b;
      opacity: 0.95;
    }
    .inbox-loading-dots {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      margin-top: 0.15rem;
    }
    .inbox-loading-dots span {
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: var(--acquirely-blue, #1d9bf0);
      animation: inbox-loading-bounce 1.05s ease-in-out infinite;
    }
    .inbox-loading-dots span:nth-child(2) {
      animation-delay: 0.12s;
    }
    .inbox-loading-dots span:nth-child(3) {
      animation-delay: 0.24s;
    }
    .inbox-loading-state[data-state="empty"] .inbox-loading-shell,
    .inbox-loading-state[data-state="error"] .inbox-loading-shell,
    .inbox-loading-state[data-state="idle"] .inbox-loading-shell,
    .inbox-loading-state[data-state="selection"] .inbox-loading-shell {
      width: 82px;
      height: 82px;
    }
    .inbox-loading-state[data-state="empty"] .inbox-loading-logo,
    .inbox-loading-state[data-state="error"] .inbox-loading-logo,
    .inbox-loading-state[data-state="idle"] .inbox-loading-logo,
    .inbox-loading-state[data-state="selection"] .inbox-loading-logo {
      width: 46px;
      height: 46px;
      opacity: 0.92;
    }
    .inbox-loading-state[data-state="empty"] .inbox-loading-dots,
    .inbox-loading-state[data-state="error"] .inbox-loading-dots,
    .inbox-loading-state[data-state="idle"] .inbox-loading-dots,
    .inbox-loading-state[data-state="selection"] .inbox-loading-dots {
      display: none;
    }
    .inbox-loading-state[data-state="idle"] .inbox-loading-shell {
      background: var(--bg-alt);
      box-shadow: none;
      border: 1px solid var(--border);
    }
    .inbox-loading-state[data-state="empty"] .inbox-loading-shell,
    .inbox-loading-state[data-state="error"] .inbox-loading-shell,
    .inbox-loading-state[data-state="selection"] .inbox-loading-shell {
      background: var(--bg-alt);
      box-shadow: none;
      border: 1px solid var(--border);
    }
    .inbox-loading-state[data-state="idle"] .inbox-loading-shell svg {
      width: 50px;
      height: 50px;
      stroke: #94a3b8;
      fill: none;
      stroke-width: 1.6;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    @keyframes inbox-loading-bounce {
      0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
      40% { transform: translateY(-4px); opacity: 1; }
    }
    @keyframes inbox-logo-float {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-3px); }
    }
    .inbox-message {
      background: var(--bg-card);
      border-radius: var(--radius);
      padding: 1rem;
      margin-bottom: 1rem;
      border: 1px solid var(--border-light);
      content-visibility: auto;
      contain-intrinsic-size: 96px;
    }
    .inbox-message-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 0.75rem;
      font-size: 0.85rem;
      color: var(--text-muted);
    }
    .inbox-message .from { font-size: 0.85rem; color: var(--text-muted); }
    .inbox-message-meta {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      min-width: 0;
    }
    .reply-origin-pill {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      padding: 0.22rem 0.55rem;
      border-radius: 999px;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.01em;
    }
    .reply-origin-pill.ai {
      background: #dbeafe;
      color: #2563eb;
    }
    .reply-origin-pill.inbound {
      background: rgba(71, 85, 105, 0.22);
      color: #64748b;
    }
    .reply-origin-pill.ai-followup {
      background: #f3e8ff;
      color: #7c3aed;
    }
    .reply-origin-pill.manual {
      background: #ecfdf5;
      color: #059669;
    }
    .reply-origin-pill.booked {
      background: #fef3c7;
      color: #b45309;
    }
    .reply-origin-pill.preview {
      margin-left: 0.45rem;
      font-size: 0.68rem;
      padding: 0.18rem 0.45rem;
      vertical-align: middle;
    }
    .reply-origin-pill.send-pending {
      background: #fff7ed;
      color: #ea580c;
      gap: 0.35rem;
    }
    .reply-origin-pill.send-pending::before {
      content: '';
      width: 0.45rem;
      height: 0.45rem;
      border-radius: 50%;
      background: #ea580c;
      animation: acq-send-blink 0.9s ease-in-out infinite;
    }
    @keyframes acq-send-blink {
      50% { opacity: 0.25; }
    }
    [data-theme="dark"] .reply-origin-pill.send-pending {
      background: rgba(234, 88, 12, 0.15);
      color: #fb923c;
    }
    [data-theme="dark"] .reply-origin-pill.send-pending::before {
      background: #fb923c;
    }
    .inbox-message .timestamp {
      font-size: 0.78rem;
      color: var(--text-muted);
      white-space: nowrap;
    }
    .inbox-message .body { margin-top: 0.35rem; font-size: 0.9rem; line-height: 1.5; }
    .email-visible {
      font-size: 0.9rem;
      line-height: 1.6;
      color: var(--text);
      word-break: break-word;
    }
    .email-visible p {
      margin: 0 0 1rem;
    }
    .email-visible p:last-child {
      margin-bottom: 0;
    }
    .thread-history-toggle-wrap {
      display: flex;
      justify-content: center;
      margin: 0 0 1rem;
      padding: 0.1rem 0 0.75rem;
      background: transparent;
    }
    .thread-history-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.45rem;
      padding: 0.52rem 0.95rem;
      border-radius: 999px;
      border: 1px solid #dbe7f3;
      background: #f8fbff;
      color: #4b5563;
      font: inherit;
      font-size: 0.84rem;
      font-weight: 600;
      cursor: pointer;
      transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
    }
    .thread-history-toggle:hover {
      background: #eef6ff;
      border-color: #c7dbf4;
      color: #1f2937;
      transform: translateY(-0.5px);
    }
    .thread-history-toggle svg {
      width: 14px;
      height: 14px;
      stroke: currentColor;
      stroke-width: 2;
      fill: none;
      transition: transform 0.16s ease;
    }
    .thread-history-toggle[aria-expanded="true"] svg {
      transform: rotate(180deg);
    }
    .thread-history-hidden[hidden] {
      display: none;
    }
    .quoted-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 1.32rem;
      height: 0.72rem;
      padding: 0 0.18rem;
      margin-top: 0;
      vertical-align: middle;
      border-radius: 0.22rem;
      background: #e8f1fb;
      color: #4b6b8f;
      font-size: 0.68rem;
      font-weight: 700;
      line-height: 0.8;
      letter-spacing: 0.02em;
      cursor: pointer;
      user-select: none;
    }
    .quoted-toggle:hover {
      background: #dce9f7;
      color: #36506e;
    }
    .quoted-history {
      margin-top: 0.8rem;
      padding-top: 0.8rem;
      border-top: 1px solid var(--border-light);
    }
    .quoted-history-block {
      margin-top: 0.8rem;
      padding-left: 0.95rem;
      border-left: 1px solid #d8e0ea;
    }
    .quoted-history-block:first-child {
      margin-top: 0;
    }
    .quoted-history-meta-line {
      font-size: 0.9rem;
      line-height: 1.45;
      color: #0f172a;
    }
    .quoted-history-meta-line strong {
      font-weight: 700;
    }
    .quoted-history-body {
      margin-top: 0.8rem;
      font-size: 0.9rem;
      line-height: 1.6;
      color: #1f2937;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .toast {
      position: fixed;
      top: 18px;
      left: 50%;
      transform: translateX(-50%) translateY(-16px);
      background: var(--acquirely-blue);
      color: #f9fafb;
      padding: 0.5rem 1.1rem;
      border-radius: 999px;
      font-size: 0.85rem;
      /* Neutral shadow only: no blue glow (easier to read on blurred modals) */
      box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.18s ease-out, transform 0.18s ease-out;
      /* Above .kb-ai-overlay (8000) and other modals; below showConfirm when z-index 10001 */
      z-index: 9000;
    }
    .toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    .toast.toast-error {
      background: #b91c1c;
      color: #fff;
      box-shadow: 0 2px 10px rgba(15, 23, 42, 0.2);
      max-width: min(92vw, 440px);
      white-space: normal;
      line-height: 1.35;
      text-align: center;
      padding: 0.65rem 1.15rem;
    }
    .btn-loading {
      position: relative;
      pointer-events: none;
    }
    .btn-loading::after {
      content: '';
      display: inline-block;
      width: 16px;
      height: 4px;
      border-radius: 999px;
      background:
        radial-gradient(circle,currentColor 55%,transparent 60%) 0% 50%/4px 4px no-repeat,
        radial-gradient(circle,currentColor 55%,transparent 60%) 50% 50%/4px 4px no-repeat,
        radial-gradient(circle,currentColor 55%,transparent 60%) 100% 50%/4px 4px no-repeat;
      margin-left: 0.35rem;
      animation: btn-dots 0.8s infinite linear;
    }
    @keyframes btn-dots {
      0% { transform: translateX(0); opacity: 0.2; }
      25% { transform: translateX(0); opacity: 1; }
      50% { transform: translateX(1px); opacity: 1; }
      75% { transform: translateX(0); opacity: 0.8; }
      100% { transform: translateX(0); opacity: 0.2; }
    }
    .inbox-reply { padding: 1rem; }
    .auto-reply-live {
      margin-bottom: 0.8rem;
      border: 1px solid #d9e8f7;
      background: #f8fbff;
      border-radius: 14px;
      padding: 0.85rem 0.9rem;
      display: flex;
      flex-direction: column;
      gap: 0.7rem;
    }
    .auto-reply-live.scheduled-as-thread {
      padding: 0;
      gap: 0;
      overflow: hidden;
    }
    .scheduled-thread-toolbar {
      padding: 0.85rem 0.9rem;
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
      background: #f8fbff;
      border-bottom: 1px solid #d9e8f7;
    }
    .inbox-message.inbox-message--scheduled-pending {
      margin: 0;
      margin-bottom: 0;
      border: 1px solid var(--border-light);
      border-left: 3px solid #3b82f6;
      border-radius: 0 0 13px 13px;
      padding: 1rem 1rem 1.1rem;
      background: #f8fafc !important;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    }
    .inbox-message--scheduled-pending .scheduled-draft-preview-readonly {
      cursor: default;
      user-select: text;
    }
    .inbox-manual-compose {
      margin-top: 0.85rem;
    }
    .inbox-manual-compose-label {
      font-size: 0.72rem;
      font-weight: 600;
      color: #64748b;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-bottom: 0.4rem;
    }
    .auto-reply-live[hidden] {
      display: none;
    }
    .auto-reply-live-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 0.75rem;
      flex-wrap: wrap;
    }
    .auto-reply-live-timing {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      flex-wrap: nowrap;
      justify-content: flex-end;
      margin-left: auto;
      flex-shrink: 0;
    }
    .auto-reply-live-copy {
      flex: 1 1 240px;
      min-width: 0;
    }
    .auto-reply-live-title {
      font-size: 0.87rem;
      font-weight: 700;
      color: #0f172a;
    }
    .auto-reply-live-subtitle {
      font-size: 0.78rem;
      color: #64748b;
      line-height: 1.45;
      margin-top: 0.15rem;
    }
    .inbox-ai-debug-pre {
      margin: 0.5rem 0 0;
      padding: 0.45rem 0.55rem;
      max-height: 9rem;
      overflow: auto;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 0.65rem;
      line-height: 1.35;
      color: #334155;
      background: #f1f5f9;
      border: 1px dashed #94a3b8;
      border-radius: 6px;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .auto-reply-live-countdown {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      min-height: 34px;
      padding: 0.34rem 0.68rem;
      border-radius: 999px;
      background: #ffffff;
      border: 1px solid #d9e8f7;
      font-size: 0.79rem;
      font-weight: 700;
      color: #2563eb;
      white-space: nowrap;
    }
    .auto-reply-live-countdown[data-mode="status"] {
      color: #475569;
    }
    .auto-reply-live-countdown[data-state="active"] {
      color: #0f9f6e;
    }
    .auto-reply-live-countdown[data-state="sending"] {
      color: #0f9f6e;
      border-color: rgba(15, 159, 110, 0.4);
      background: rgba(15, 159, 110, 0.1);
    }
    .auto-reply-live-countdown[data-state="paused"] {
      color: #c2410c;
    }
    .auto-reply-live-countdown[data-state="disabled"] {
      color: #b91c1c;
      border-color: #fecaca;
      background: #fef2f2;
    }
    .auto-reply-live-countdown[data-state="disabled"] .auto-reply-live-status-dot {
      animation: none;
      opacity: 0.9;
    }
    .auto-reply-live.auto-reply-live--agent-off {
      border-color: #e2e8f0;
      background: #f8fafc;
    }
    .auto-reply-live-countdown svg {
      width: 14px;
      height: 14px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
    }
    .auto-reply-live-countdown[data-mode="status"] svg {
      display: none;
    }
    .auto-reply-live-status-dot {
      width: 9px;
      height: 9px;
      border-radius: 999px;
      background: currentColor;
      box-shadow: 0 0 0 0 rgba(71, 85, 105, 0.4);
      animation: ai-status-pulse 1.6s ease-in-out infinite;
      display: none;
      flex: 0 0 auto;
    }
    .auto-reply-live-countdown[data-mode="status"] .auto-reply-live-status-dot {
      display: inline-flex;
    }
    .auto-reply-live-countdown[data-state="active"] .auto-reply-live-status-dot {
      box-shadow: 0 0 0 0 rgba(15, 159, 110, 0.35);
    }
    .auto-reply-live-countdown[data-state="sending"] .auto-reply-live-status-dot {
      box-shadow: 0 0 0 0 rgba(15, 159, 110, 0.4);
    }
    .auto-reply-live-countdown[data-state="paused"] .auto-reply-live-status-dot {
      box-shadow: 0 0 0 0 rgba(194, 65, 12, 0.28);
    }
    @keyframes ai-status-pulse {
      0% { transform: scale(0.92); box-shadow: 0 0 0 0 currentColor; opacity: 0.9; }
      70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); opacity: 1; }
      100% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); opacity: 0.9; }
    }
    @media (max-width: 720px) {
      .auto-reply-live-header {
        flex-direction: column;
        align-items: stretch;
      }
      .auto-reply-live-timing {
        margin-left: 0;
        justify-content: flex-start;
      }
    }
    .auto-reply-live-actions {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: wrap;
    }
    .auto-reply-live-actions[hidden],
    .auto-reply-live-timing[hidden] {
      display: none !important;
    }
    .auto-reply-live-actions .btn {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
    }
    .auto-reply-live-actions .btn svg {
      width: 14px;
      height: 14px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
    }
    .scheduled-draft-card {
      margin: 0;
      background: #ffffff;
      border-color: #d9e8f7;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    }
    #scheduledDraftCard[hidden] {
      display: none !important;
    }
    .scheduled-draft-label {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.72rem;
      font-weight: 700;
      color: #2563eb;
      background: #eef6ff;
      border: 1px solid #d9e8f7;
      border-radius: 999px;
      padding: 0.18rem 0.5rem;
    }
    .scheduled-draft-label.ai-followup {
      background: #f3e8ff;
      border-color: #e9d5ff;
      color: #7c3aed;
    }
    .scheduled-draft-editor {
      width: 100%;
      min-height: 170px;
      max-height: min(52vh, 22rem);
      overflow-y: auto;
      padding: 0.9rem 1rem;
      border: 1px solid #d9e8f7;
      border-radius: 12px;
      font-family: inherit;
      font-size: 0.9rem;
      line-height: 1.55;
      resize: none;
      background: #fbfdff;
      color: #0f172a;
      margin-top: 0.55rem;
      box-sizing: border-box;
    }
    .scheduled-draft-editor[hidden] {
      display: none;
    }
    .scheduled-draft-body-wrap {
      margin-top: 0.35rem;
      min-height: 7.5rem;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .scheduled-draft-generating {
      display: flex;
      align-items: flex-start;
      gap: 0.65rem;
      padding: 0.85rem 1rem;
      border-radius: 12px;
      border: 1px solid #d9e8f7;
      background: #eef6ff;
      line-height: 1.45;
    }
    .scheduled-draft-generating[hidden] {
      display: none !important;
    }
    .scheduled-draft-generating-dot {
      width: 10px;
      height: 10px;
      border-radius: 999px;
      margin-top: 0.28rem;
      flex-shrink: 0;
      background: #2563eb;
      box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
      animation: scheduled-gen-pulse 1.2s ease-in-out infinite;
    }
    @keyframes scheduled-gen-pulse {
      0% { opacity: 0.75; transform: scale(0.96); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); }
      60% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
      100% { opacity: 0.75; transform: scale(0.96); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
    }
    .scheduled-draft-generating-text {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      font-size: 0.84rem;
      color: #334155;
    }
    .scheduled-draft-generating-text strong {
      font-size: 0.88rem;
      color: #0f172a;
    }
    .scheduled-draft-generating-hint {
      font-size: 0.78rem;
      color: #64748b;
    }
    .scheduled-draft-preview-readonly.body {
      margin-top: 0;
    }
    .scheduled-draft-empty {
      margin-top: 0.4rem;
      font-size: 0.85rem;
      color: #64748b;
      line-height: 1.5;
    }
    .inbox-reply textarea {
      width: 100%;
      min-height: 180px;
      padding: 0.9rem 1rem;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      font-family: inherit;
      line-height: 1.55;
      resize: none;
      overflow: hidden;
    }
    .inbox-reply-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
    .inbox-details {
      flex: 0 0 var(--inbox-details-width);
      width: var(--inbox-details-width);
      min-width: 220px;
      max-width: min(520px, 42vw);
      padding: 1.1rem 1.1rem 1.25rem;
      background: var(--bg-card);
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      min-height: 0;
      border-left: none;
      box-shadow: none;
    }
    .inbox-details h3 { font-size: 0.9rem; }
    .inbox-details-header {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem 1rem;
      margin-bottom: 1.1rem;
      padding-bottom: 1rem;
      border-bottom: 1px solid var(--border-light);
      text-align: left;
      min-width: 0;
      overflow-x: visible;
      overscroll-behavior-x: contain;
    }
    .detail-header-copy {
      flex: 0 1 auto;
      min-width: min-content;
      padding-top: 0;
    }
    .detail-header-copy h3 {
      margin: 0;
      font-size: 1.08rem;
      font-weight: 700;
      letter-spacing: 0.02em;
      color: var(--text);
      line-height: 1.2;
      white-space: nowrap;
    }
    .detail-header-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: nowrap;
      gap: 0.35rem;
      flex: 0 0 auto;
      flex-shrink: 0;
      margin-left: auto;
    }
    .detail-action-btn {
      min-height: 36px;
      border-radius: 999px;
      border: 1px solid #d7e2ee;
      background: #ffffff;
      color: #334155;
      padding: 0.45rem 0.72rem;
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      font: inherit;
      font-size: 0.76rem;
      font-weight: 600;
      line-height: 1;
      white-space: nowrap;
      cursor: pointer;
      transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    }
    .detail-action-btn:hover {
      background: #f8fbff;
      border-color: #bfdbfe;
      color: #0f172a;
      transform: translateY(-1px);
    }
    .detail-action-btn svg {
      width: 13px;
      height: 13px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      flex-shrink: 0;
    }
    .detail-action-btn[data-variant="primary"] {
      border-color: #cfe3f7;
      background: #f8fbff;
      color: #1d4ed8;
    }
    .detail-action-btn[data-variant="primary"]:hover {
      background: #eef6ff;
      border-color: #93c5fd;
      color: #1e40af;
    }
    .inbox-details .detail-action-btn {
      padding: 0.38rem 0.55rem;
      font-size: 0.72rem;
      min-height: 34px;
    }
    /* Manual read/unread UI hidden unless admin enables */
    #btnToggleReadStatus,
    #btnBulkToggleUnread {
      display: none !important;
    }
    body.acquirely-feature-read-unread-on #btnToggleReadStatus,
    body.acquirely-feature-read-unread-on #btnBulkToggleUnread {
      display: inline-flex !important;
    }
    body:not(.acquirely-feature-read-unread-on) #inboxMailboxTabs .inbox-lead-tab[data-filter="new"] {
      display: none !important;
    }
    #btnArchiveThreadIcon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .detail-action-btn--archive svg {
      fill: none;
      stroke: currentColor;
      stroke-width: 1.5;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .inbox-details .field { font-size: 0.85rem; margin-bottom: 0.75rem; }
    .inbox-details .field label { color: var(--text-muted); display: block; }
    .lead-control-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.75rem;
      margin-bottom: 0.75rem;
    }
    .inbox-details .lead-control-row[hidden] {
      display: none !important;
    }
    .lead-control-title {
      font-size: 0.85rem;
      font-weight: 600;
      color: #0f172a;
    }
    .lead-control-meta {
      font-size: 0.78rem;
      color: var(--text-muted);
    }
    .detail-status-row {
      margin-bottom: 0.85rem;
    }
    .detail-status-row .model-selector {
      max-width: 100%;
    }
    .detail-section {
      margin-top: 0.9rem;
      border: 1px solid var(--border-light);
      border-radius: 14px;
      background: #fbfdff;
      overflow: hidden;
    }
    .detail-section-toggle {
      width: 100%;
      border: 0;
      background: transparent;
      padding: 0.9rem 1rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      font: inherit;
      font-size: 0.88rem;
      font-weight: 600;
      color: #0f172a;
      cursor: pointer;
      text-align: left;
    }
    .detail-section-toggle:hover {
      background: #f8fafc;
    }
    .detail-section-toggle svg {
      width: 16px;
      height: 16px;
      color: #94a3b8;
      flex-shrink: 0;
      transition: transform 0.16s ease;
    }
    .detail-section-toggle[aria-expanded="true"] svg {
      transform: rotate(180deg);
    }
    .detail-section-content {
      padding: 0 1rem 1rem;
      border-top: 1px solid var(--border-light);
    }
    .detail-section-content[hidden] {
      display: none;
    }
    .detail-stack {
      display: grid;
      gap: 0.75rem;
      margin-top: 0.85rem;
    }
    .detail-value {
      font-size: 0.9rem;
      color: #0f172a;
      line-height: 1.4;
      word-break: break-word;
    }
    .detail-value.detail-value-multi {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
    }
    .detail-value-title {
      font-weight: 600;
      font-size: 0.95rem;
      color: #0f172a;
    }
    .detail-value-muted {
      font-size: 0.78rem;
      color: #64748b;
      letter-spacing: 0.01em;
    }
    .detail-platform {
      display: inline-flex;
      align-items: center;
      gap: 0.65rem;
      padding-top: 0.25rem;
    }
    .detail-platform-logo {
      width: 24px;
      height: 24px;
      object-fit: contain;
      border-radius: 999px;
      background: #f1f5f9;
      padding: 3px;
    }
    .detail-platform-text {
      font-weight: 500;
      font-size: 0.9rem;
      color: #0f172a;
    }
    .inbox-details .notes { margin-top: 1rem; }
    .lead-memory-signals {
      font-size: 0.8rem;
      line-height: 1.5;
      color: var(--text-muted);
      padding: 0.65rem 0.75rem;
      border-radius: 12px;
      border: 1px solid var(--border-light);
      background: var(--bg-subtle, #f8fafc);
      margin-bottom: 0.75rem;
    }
    .lead-memory-signals strong { color: var(--text-primary, #0f172a); font-weight: 600; }
    .memory-signal-line { margin-bottom: 0.28rem; }
    .memory-signal-line:last-child { margin-bottom: 0; }
    .lead-activity-timeline {
      max-height: 320px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
      padding-right: 0.15rem;
    }
    .lead-activity-row {
      padding: 0.65rem 0.75rem;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: var(--bg-card);
    }
    .lead-activity-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem 0.65rem;
      align-items: baseline;
      margin-bottom: 0.35rem;
    }
    .lead-activity-time { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }
    .lead-activity-type { font-size: 0.72rem; color: var(--acquirely-blue); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
    .lead-activity-actor { font-size: 0.7rem; color: var(--text-muted); }
    .lead-activity-summary { font-size: 0.85rem; color: var(--text-primary); line-height: 1.45; }
    .lead-activity-detail {
      font-size: 0.78rem;
      color: var(--text-muted);
      margin-top: 0.35rem;
      white-space: pre-wrap;
      max-height: 4.5rem;
      overflow: hidden;
    }
    .notes-list {
      max-height: 280px;
      overflow-y: auto;
      margin-top: 0.55rem;
      display: grid;
      gap: 0.65rem;
      padding-right: 0.15rem;
    }
    .notes-item {
      padding: 0.9rem 1rem;
      border: 1px solid #dbe5f0;
      border-radius: 14px;
      background: #ffffff;
      box-shadow: none;
      transition: border-color 0.14s ease, background-color 0.14s ease;
    }
    .notes-item:hover {
      border-color: #cbd5e1;
      background: #fcfdff;
    }
    .notes-item-time {
      font-size: 0.72rem;
      color: #94a3b8;
      margin-bottom: 0.45rem;
      font-weight: 600;
      letter-spacing: 0.02em;
    }
    .notes-item-body {
      font-size: 0.92rem;
      line-height: 1.58;
      color: #334155;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .notes-empty {
      padding: 0.9rem 1rem;
      border: 1px solid #e2e8f0;
      border-radius: 14px;
      background: #ffffff;
      color: #94a3b8;
      font-size: 0.86rem;
    }
    .search-leads { padding: 0; border-bottom: none; }
    .inbox-lead-search-form {
      margin: 0;
      width: 100%;
    }
    @keyframes acqInboxSearchAutofillStart { from {} to {} }
    #inboxLeadSearch:-webkit-autofill {
      animation-name: acqInboxSearchAutofillStart;
    }
    .search-leads input {
      width: 100%;
      box-sizing: border-box;
      padding: 0.62rem 0.75rem;
      min-height: 2.55rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 0.875rem;
      line-height: 1.35;
      background: var(--bg-card, #fff);
      color: var(--text);
      outline: none;
      transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
    }
    .search-leads input:hover {
      border-color: #94a3b8;
    }
    .search-leads input:focus,
    .search-leads input:focus-visible {
      outline: none;
      border-color: #94a3b8;
      background: #fafbfc;
      box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.22);
    }

    /* Lead Status Table */
    .table-wrap { overflow-x: auto; border: 1px solid var(--border-light); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
    table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
    th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
    th { background: var(--bg-alt); font-weight: 600; color: var(--text-muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.03em; }
    tr:hover { background: var(--bg-alt); }
    .search-bar { display: flex; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
    .search-bar input { flex: 1; min-width: 200px; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); }
    .search-bar select { padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: white; }

    /* Lazy View */
    .empty-state { text-align: center; padding: 4rem 2rem; }
    .empty-state .btn { margin-top: 1rem; }
    .empty-state-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }
    .empty-state h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
    .empty-state p { color: var(--text-muted); font-size: 0.95rem; }
    .lazy-filters { display: flex; gap: 0.5rem; margin-bottom: 1rem; align-items: center; flex-wrap: wrap; }

    /* AI Tasks */
    .ai-task-card {
      border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1rem;
      background: var(--bg-card); box-shadow: var(--shadow-sm); transition: all 0.2s;
    }
    .ai-task-card:hover { box-shadow: var(--shadow); }
    .ai-task-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
    .ai-task-avatar { width: 40px; height: 40px; background: var(--accent-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--accent); }
    .ai-task-meta { flex: 1; }
    .ai-task-name { font-weight: 600; }
    .ai-task-email { font-size: 0.85rem; color: var(--text-muted); }
    .ai-task-subject { font-size: 0.9rem; margin-top: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
    .badge { font-size: 0.7rem; padding: 0.2rem 0.5rem; border-radius: 4px; }
    .badge-red { background: #fee2e2; color: #dc2626; }
    .badge-green { background: var(--accent-light); color: var(--accent); }
    .ai-task-reply { background: var(--bg-alt); padding: 1rem; border-radius: var(--radius); font-size: 0.9rem; line-height: 1.6; margin-top: 0.75rem; }
    .ai-task-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; }

    /* Instructions */
    .instruction-item {
      display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border);
    }
    .instruction-item .num { font-weight: 600; color: var(--text-muted); min-width: 2rem; }
    .instruction-item .text { flex: 1; }
    .instruction-item .actions { display: flex; gap: 0.5rem; align-items: center; }
    .instruction-item .actions button:not(.instruction-icon-btn) { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0.25rem; }

    /* Agent training: same responsive grid as Knowledge Base; scroll inside preview; edit via pencil */
    .training-list-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 1rem;
      align-items: stretch;
    }
    .training-card {
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-lg);
      padding: 1rem 1.15rem 1.1rem;
      position: relative;
      width: 100%;
      height: 100%;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      transition: box-shadow 0.15s ease, border-color 0.15s ease;
    }
    .training-card:hover {
      box-shadow: var(--shadow);
    }
    .training-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin-bottom: 0.55rem;
      padding-bottom: 0.55rem;
      border-bottom: 1px solid var(--border-light);
      flex-shrink: 0;
    }
    .training-card-status-wrap {
      display: flex;
      align-items: center;
      min-width: 0;
    }
    .training-card-status-pill {
      font-size: 0.72rem;
      font-weight: 600;
      padding: 0.3rem 0.75rem;
      border-radius: 999px;
      line-height: 1.25;
      white-space: nowrap;
      border: 1px solid var(--border-light);
    }
    .training-card-status-pill.is-active {
      color: #166534;
      background: rgba(34, 197, 94, 0.14);
      border-color: rgba(22, 163, 74, 0.45);
    }
    .training-card-status-pill.is-inactive {
      color: #b91c1c;
      background: rgba(254, 226, 226, 0.85);
      border-color: rgba(220, 38, 38, 0.45);
    }
    .training-card-actions {
      display: flex;
      gap: 0.35rem;
      flex-shrink: 0;
      align-items: center;
    }
    .training-card-actions .toggle {
      margin: 0;
    }
    .training-card-actions .instruction-icon-btn {
      width: 2.2rem;
      height: 2.2rem;
      border-radius: 9px;
    }
    .training-card-body--dual {
      display: grid;
      grid-template-columns: 1fr;
      grid-template-rows: auto auto;
      gap: 0.55rem;
      border-radius: 10px;
      margin: 0;
      padding: 0.05rem 0 0;
      min-height: 0;
      flex: 1;
      align-content: start;
    }
    .training-card-col {
      min-width: 0;
      padding: 0.42rem 0.5rem 0.48rem;
      border-radius: 8px;
      border-left: 3px solid transparent;
      background: rgba(148, 163, 184, 0.06);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    [data-theme="dark"] .training-card-col {
      background: var(--bg-alt);
    }
    .training-card-col--avoid {
      border-left-color: #ea580c;
    }
    .training-card-col--prefer {
      border-left-color: #22c55e;
    }
    .training-card-col-head {
      font-size: 0.65rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      margin-bottom: 0.28rem;
    }
    .training-card-col--avoid .training-card-col-head {
      color: #fb923c;
    }
    .training-card-col--prefer .training-card-col-head {
      color: #4ade80;
    }
    .training-card-text {
      font-size: 0.875rem;
      line-height: 1.5;
      white-space: pre-wrap;
      word-break: break-word;
      color: var(--text);
      flex-shrink: 0;
      height: calc(1.5em * 6);
      min-height: calc(1.5em * 6);
      max-height: calc(1.5em * 6);
      overflow-y: auto;
      overflow-x: hidden;
      scrollbar-width: thin;
      scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
    }
    .training-card-text::-webkit-scrollbar {
      width: 6px;
    }
    .training-card-text::-webkit-scrollbar-thumb {
      background: rgba(148, 163, 184, 0.45);
      border-radius: 4px;
    }
    .training-card-text::-webkit-scrollbar-track {
      background: transparent;
    }
    .training-card-text--empty {
      color: var(--text-muted);
      font-style: italic;
    }

    /* Knowledge Base */
    .kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
    .kb-card {
      border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1.25rem; position: relative;
      background: var(--bg-card); transition: all 0.2s;
    }
    .kb-card:hover { box-shadow: var(--shadow); }
    .kb-card-title { font-weight: 600; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
    .kb-card-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
    .kb-card-tags { display: flex; gap: 0.35rem; margin-top: 0.75rem; flex-wrap: wrap; }
    .kb-card-actions { position: absolute; top: 1rem; right: 1rem; display: flex; gap: 0.3rem; align-items: center; }
    .kb-card-actions .instruction-icon-btn { width: 2.2rem; height: 2.2rem; border-radius: 9px; }

    /* Skills */
    .skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.25rem; }
    .skill-card { border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1.5rem; background: var(--bg-card); box-shadow: var(--shadow-sm); transition: all 0.2s; }
    .skill-card:hover { box-shadow: var(--shadow); }
    .skill-card-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
    .skill-icon { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
    .skill-icon.blue { background: #dbeafe; color: #2563eb; }
    .skill-icon.green { background: var(--acquirely-blue-soft); color: var(--acquirely-blue); }
    .skill-icon.orange { background: #ffedd5; color: #ea580c; }
    .skill-icon.purple { background: #ede9fe; color: #7c3aed; }
    .skill-title { font-weight: 600; }
    .skill-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
    .auto-send-config {
      display: grid;
      gap: 0.8rem;
      margin-top: 0.9rem;
    }
    .auto-send-config .model-selector {
      max-width: 100%;
    }
    .auto-send-range {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.75rem;
    }
    .auto-send-range[hidden] {
      display: none;
    }
    .auto-send-delay-note {
      font-size: 0.8rem;
      color: var(--text-muted);
      line-height: 1.45;
    }
    .platform-settings-card {
      width: min(1200px, 100%);
      max-width: 1200px;
      margin: 0;
      padding: 0;
      background: white;
      border-radius: 18px;
      border: 1px solid #e2e8f0;
      box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
      padding: 1.25rem 1.35rem 1.5rem;
    }
    .platform-settings-title {
      font-size: 1rem;
      font-weight: 600;
      color: #0f172a;
      margin: 0 0 0.25rem;
    }
    .platform-settings-desc {
      font-size: 0.85rem;
      color: var(--text-muted);
      margin: 0 0 1rem;
      line-height: 1.4;
    }
    .platform-settings-tabs {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0.75rem;
      margin-bottom: 1.35rem;
    }
    .platform-tab {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      min-height: 72px;
      padding: 0.75rem 1rem;
      border: 2px solid #dbe7f3;
      border-radius: 14px;
      background: #fff;
      font-size: 0.92rem;
      font-weight: 500;
      color: #334155;
      cursor: pointer;
      box-sizing: border-box;
      transition: border-color .16s, box-shadow .16s, transform .12s, background-color .16s;
    }
    .platform-tab:hover {
      border-color: #93c5fd;
      box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
      transform: translateY(-2px);
    }
    .platform-tab.active {
      border-color: var(--acquirely-blue);
      background: #eff6ff;
      color: #0c7cd5;
    }
    .platform-tab.disabled {
      opacity: 0.86;
      color: #94a3b8;
      cursor: default;
    }
    .platform-tab.disabled:hover {
      transform: none;
      box-shadow: none;
    }
    .platform-tab-logo {
      width: 30px;
      height: 30px;
      border-radius: 999px;
      object-fit: contain;
      background: transparent;
      padding: 0;
      flex-shrink: 0;
    }
    .platform-tab-logo-placeholder {
      width: 24px;
      height: 24px;
      border-radius: 6px;
      background: #e2e8f0;
      color: #94a3b8;
      font-size: 0.7rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .platform-tab-label {
      flex: 1;
      min-width: 0;
      text-align: left;
    }
    .platform-tab-placeholder { color: #64748b; }
    .platform-tab-trail {
      margin-left: auto;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      min-width: 4.5rem;
    }
    .platform-tab-badge {
      font-size: 0.7rem;
      color: #64748b;
      font-weight: 500;
      white-space: nowrap;
    }
    .platform-tab-dot {
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: #22c55e;
      box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
    }
    .integration-card-coming-soon .form-input[disabled] {
      background: #f8fafc;
      color: #94a3b8;
      border-color: #e2e8f0;
    }
    .integration-card-coming-soon .btn[disabled] {
      opacity: 0.65;
      cursor: not-allowed;
    }
    .agent-setter-section {
      margin-top: 1.25rem;
    }
    .agent-setter-section:first-of-type { margin-top: 0; }
    .agent-setter-header {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
    }
    .agent-default-row {
      display: flex;
      align-items: center;
      gap: 0.6rem;
    }
    .agent-setter-search {
      width: 100%;
      font-size: 0.95rem;
      padding: 0 0.9rem;
      height: 48px;
      line-height: 48px;
      border-radius: 12px;
      border: 1px solid #dbe7f3;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .agent-setter-search:focus {
      outline: none;
      border-color: #0c7cd5;
      box-shadow: 0 0 0 3px rgba(12, 124, 213, 0.12);
    }
    .agent-setter-bulk-bar {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-top: 0.5rem;
      padding: 0.5rem 0.75rem;
      background: #f1f5f9;
      border-radius: 8px;
      flex-wrap: wrap;
    }
    .agent-setter-select-all {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.8rem;
      cursor: pointer;
      font-weight: 500;
    }
    .agent-setter-select-all input { accent-color: var(--acquirely-blue); }
    .agent-setter-count {
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-left: auto;
    }
    .agent-setter-bulk-btns {
      display: flex;
      gap: 0.4rem;
    }
    .agent-setter-list {
      border: 1px solid #dbe7f3;
      border-radius: 10px;
      background: #ffffff;
      overflow-y: auto;
      max-height: 240px;
      margin-top: 0.5rem;
      border-bottom: none;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
    }
    .agent-setter-row {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.9rem 1rem;
      border-bottom: 1px solid #eef2f7;
      cursor: pointer;
      min-height: 4rem;
    }
    .agent-setter-row:last-child { border-bottom: none; }
    .agent-setter-row:hover { background: #f8fbff; }
    .agent-setter-row.bulk-selected { background: #e0f2fe; }
    .agent-setter-row input[type="checkbox"] {
      accent-color: var(--acquirely-blue);
      flex-shrink: 0;
      pointer-events: none;
    }
    .agent-setter-row-body {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
    }
    .agent-setter-label {
      font-size: 0.875rem;
      font-weight: 500;
      color: #0f172a;
      line-height: 1.3;
    }
    .agent-setter-badge {
      font-size: 0.65rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      color: #64748b;
      display: block;
      margin-bottom: 0.15rem;
    }
    .agent-setter-move {
      width: 26px;
      height: 26px;
      border: none;
      background: transparent;
      border-radius: 6px;
      color: #64748b;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
    }
    .agent-setter-move:hover {
      background: #e2e8f0;
      color: #0f172a;
    }
    .agent-setter-meta {
      font-size: 0.72rem;
      color: #94a3b8;
      font-family: ui-monospace, monospace;
    }
    .agent-setter-api-eye {
      width: 26px;
      height: 26px;
      border: none;
      background: transparent;
      border-radius: 6px;
      color: #94a3b8;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .agent-setter-api-eye:hover { background: #e2e8f0; color: #475569; }
    .agent-setter-api-eye svg { width: 14px; height: 14px; }
    .agent-setter-api-popover {
      position: fixed;
      z-index: 50;
      background: #fff;
      border-radius: 14px;
      box-shadow: 0 14px 30px rgba(15,23,42,0.15);
      padding: 0.85rem 1rem;
      min-width: 220px;
      max-width: 260px;
      font-size: 0.85rem;
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
    }
    .agent-setter-api-popover .api-popover-row {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 0.75rem;
      padding-bottom: 0.15rem;
      border-bottom: 1px solid #eef2f7;
    }
    .agent-setter-api-popover .api-popover-row:last-of-type { border-bottom: none; padding-bottom: 0; }
    .agent-setter-api-popover .api-popover-label {
      color: #64748b;
      font-size: 0.75rem;
      flex: 1;
    }
    .agent-setter-api-popover .api-value {
      font-family: ui-monospace, monospace;
      font-size: 0.78rem;
      text-align: right;
      word-break: break-all;
      color: #0f172a;
    }
    .agent-setter-api-popover .api-value { font-family: ui-monospace, monospace; font-size: 0.75rem; word-break: break-all; }
    .agent-setter-api-popover .api-copy-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
    .agent-setter-api-popover .api-copy-btn { font-size: 0.75rem; padding: 0.35rem 0.6rem; }
    .agent-setter-row-actions {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      flex-shrink: 0;
    }
    .agent-setter-copy-btn {
      width: 28px;
      height: 28px;
      border: none;
      background: transparent;
      border-radius: 6px;
      color: #64748b;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .agent-setter-copy-btn:hover {
      background: #e2e8f0;
      color: #0f172a;
    }
    .agent-setter-copy-btn svg { width: 14px; height: 14px; }
    .agent-setter-toggle {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.8rem;
      color: var(--text-muted);
      flex-shrink: 0;
    }
    .agent-setter-toggle .toggle-switch { flex-shrink: 0; }
    .agent-inline-empty {
      padding: 1rem 0.95rem;
      text-align: center;
      color: var(--text-muted);
      font-size: 0.82rem;
    }
    .agent-active-inactive-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.5rem;
      margin-top: 1.25rem;
    }
    .agent-column-box {
      border: 1px solid #dbe7f3;
      border-radius: 10px;
      overflow: hidden;
      background: #fff;
    }
    .agent-column-box.active { border-color: #22c55e; box-shadow: 0 0 0 1px rgba(34,197,94,0.2); }
    .agent-column-box.inactive { border-color: #e2e8f0; }
    .agent-column-header {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.9rem 1rem;
      font-size: 1rem;
      font-weight: 600;
      border-bottom: 1px solid #eef2f7;
    }
    .agent-column-header.active { background: #f0fdf4; color: #15803d; }
    .agent-column-header.inactive { background: #f8fafc; color: #64748b; }
    .agent-active-pulse {
      width: 8px; height: 8px;
      border-radius: 50%;
      background: #22c55e;
      animation: agent-pulse 1.5s ease-in-out infinite;
    }
    .agent-column-status {
      margin-left: auto;
      font-size: 0.8rem;
      font-weight: 500;
      opacity: 0.85;
      position: relative;
      min-width: 75px;
      text-align: right;
      padding-right: 18px;
    }
    .agent-column-status::before {
      content: '';
      position: absolute;
      left: 0;
      top: 50%;
      transform: translate(-110%, -50%);
      width: 10px;
      height: 10px;
      border-radius: 50%;
      border: 1px solid transparent;
      opacity: 0;
    }
    .agent-column-status.updating {
      color: #64748b;
    }
    .agent-column-status.updating::before {
      border-color: #cbd5e1;
      background: #f1f5f9;
      opacity: 1;
    }
    .agent-column-status.updated {
      color: #22c55e;
    }
    .agent-column-status.updated::before {
      border-color: rgba(34, 197, 94, 0.35);
      background: rgba(34, 197, 94, 0.35);
      opacity: 1;
    }
    @keyframes agent-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.6; transform: scale(1.1); }
    }
    .agent-column-list {
      min-height: 340px;
      max-height: 480px;
      overflow-y: auto;
    }
    .agent-setter-global-options {
      display: grid;
      grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(0, 1.4fr);
      column-gap: 0.7rem;
      row-gap: 0.85rem;
      margin-bottom: 1rem;
    }
    .agent-setter-global-options .form-group {
      margin-bottom: 0;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.35rem;
    }
    .agent-option-selector {
      max-width: none;
      width: 100%;
    }
    .agent-option-selector .model-selector-trigger {
      min-height: 48px;
      border-radius: 12px;
    }
    .agent-option-selector .model-selector-name {
      font-size: 0.96rem;
    }
    .agent-option-selector .model-selector-desc {
      font-size: 0.76rem;
    }
    .agent-settings-footer {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-top: 1.75rem;
      margin-bottom: 0.5rem;
      padding-top: 1.25rem;
      border-top: 1px solid #eef2f7;
    }
    .agent-settings-status {
      margin-left: 0.5rem;
      font-size: 0.9rem;
      min-width: 10ch;
      text-align: left;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      color: #64748b;
      opacity: 1;
    }
    .agent-settings-status .agent-status-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      border: 1px solid #cbd5e1;
      background: #f1f5f9;
      opacity: 0;
      transform: scale(1);
      transition: opacity 0.25s ease;
    }
    .agent-settings-status .agent-status-text {
      display: inline-block;
    }
    .agent-settings-status.unsaved {
      color: #64748b;
      opacity: 1;
    }
    .agent-settings-status.unsaved .agent-status-dot {
      border-color: #94a3b8;
      background: #f1f5f9;
      opacity: 1;
    }
    .agent-settings-status.unsaved .agent-status-text {
      font-weight: 600;
    }
    .agent-settings-status.saved .agent-status-dot {
      border-color: #22c55e;
      background: rgba(34, 197, 94, 0.15);
      animation: agent-status-pulse 1.8s ease-in-out infinite;
    }
    .agent-settings-status.blinking .agent-status-dot {
      border-color: #22c55e;
      background: rgba(34, 197, 94, 0.15);
      animation: agent-status-pulse 1.2s ease-in-out infinite;
    }
    .agent-settings-status.saved .agent-status-text {
      color: #22c55e;
      font-weight: 600;
    }

    @keyframes agent-status-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.6; transform: scale(0.98); }
    }
    .agent-setter-global-options .form-group label {
      display: block;
      font-weight: 600;
      color: #0f172a;
    }
    .agent-setter-search-group {
      width: 100%;
    }
    .agent-search-input-row {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    .agent-refresh-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      box-sizing: border-box;
      border-radius: 50%;
      border: 1px solid #e2e8f0;
      background: #f9fafb;
      color: #0f172a;
      padding: 0;
      cursor: pointer;
      transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
    }
    .agent-refresh-btn svg {
      width: 18px;
      height: 18px;
    }
    .agent-refresh-btn:hover {
      background: #f1f5f9;
      border-color: #cbd5e1;
      transform: translateY(-1px);
    }
    .agent-refresh-btn:active {
      transform: translateY(0);
      background: #e5e7eb;
      border-color: #cbd5e1;
    }
    .agent-refresh-btn.is-loading svg {
      animation: acquirely-spin 0.7s linear infinite;
    }
    @keyframes acquirely-spin {
      to { transform: rotate(360deg); }
    }
    .agent-filter-inline {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-wrap: nowrap;
    }
    .agent-filter-label {
      font-size: 0.8rem;
      font-weight: 500;
      color: #64748b;
    }
    .agent-filter-selector {
      min-width: 150px;
    }
    .agent-filter-selector .model-selector-desc {
      display: none;
    }
    .agent-popover-row {
      display: flex;
      justify-content: space-between;
      gap: 0.6rem;
      padding: 0.35rem 0;
      border-bottom: 1px solid #edf2f7;
    }
    .agent-popover-row:last-child {
      border-bottom: none;
    }
    .agent-popover-label {
      font-size: 0.78rem;
      color: #64748b;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }
    .agent-popover-value {
      font-size: 0.9rem;
      color: #0f172a;
      text-align: right;
      flex: 1;
      word-break: break-all;
    }

    /* Provider cards */
    .provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
    .provider-card {
      border: 2px solid var(--border); border-radius: var(--radius); padding: 1rem; cursor: pointer; text-align: center;
    }
    .provider-card:hover { border-color: var(--stripe-purple); }
    .provider-card.selected { border-color: var(--acquirely-blue); background: var(--acquirely-blue-soft); }
    .platform-card { border: 2px solid var(--border); border-radius: var(--radius); padding: 1rem; cursor: pointer; transition: all 0.15s; }
    .platform-card:hover:not(.disabled) { border-color: var(--acquirely-blue); }
    .platform-card.selected { border-color: var(--acquirely-blue); background: var(--acquirely-blue-soft); }
    .platform-card.disabled { opacity: 0.5; cursor: not-allowed; }
    .create-agent-steps { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
    .create-agent-step { width: 100%; height: 4px; background: var(--border); border-radius: 2px; }
    .create-agent-step.active { background: var(--acquirely-blue); }

    /* Workflow */
    .workflow-canvas { min-height: 400px; background: var(--bg-alt); border: 1px dashed var(--border); border-radius: var(--radius-lg); padding: 2rem; position: relative; }
    .workflow-node {
      background: white; border: 2px solid var(--border); border-radius: var(--radius); padding: 1rem;
      max-width: 200px; margin: 0 auto 1rem; text-align: center; position: relative;
    }
    .workflow-node.trigger { border-color: #93c5fd; }
    .workflow-node.ai { border-color: #c4b5fd; }
    .workflow-node.action { border-color: #fcd34d; }
    .workflow-node .title { font-weight: 600; font-size: 0.9rem; }
    .workflow-node .desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

    /* Modal */
    .modal-overlay { position: fixed; inset: 0; background: rgba(10,37,64,0.4); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
    .modal-overlay.hidden { display: none; }
    .modal { background: white; border-radius: var(--radius-lg); padding: 1.75rem; max-width: 480px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 48px rgba(10,37,64,0.2); }
    .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
    .modal-title { font-size: 1.1rem; font-weight: 600; }
    .modal-close { background: none; border: none; cursor: pointer; font-size: 1.25rem; color: var(--text-muted); }
    .modal-skill { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
    .modal-skill:last-child { border-bottom: none; }
    .modal-skill-info { display: flex; align-items: center; gap: 0.75rem; }
    .modal-skill-icon { width: 36px; height: 36px; background: var(--bg-alt); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
    .modal-done { margin-top: 1rem; display: flex; justify-content: flex-end; }

    /* Top bar variant (some pages) */
    .top-nav { display: flex; align-items: center; gap: 1.5rem; padding: 0.75rem 1.5rem; border-bottom: 1px solid var(--border); background: white; }
    .top-nav a { color: var(--text-muted); font-size: 0.9rem; }
    .top-nav a:hover { color: var(--text); }
    .top-nav a.active { color: var(--acquirely-blue); font-weight: 500; }

    /* Custom model selector */
    .model-selector {
      position: relative;
      max-width: 380px;
    }
    .model-selector-trigger {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      padding: 0.55rem 0.85rem;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #fff;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
      transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, transform 0.12s ease;
    }
    .model-selector-trigger:hover {
      border-color: #94a3b8;
      background: #fafbfc;
    }
    .model-selector-trigger:active {
      border-color: #94a3b8;
      background: #f1f5f9;
      box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.08);
      transform: translateY(0.5px);
    }
    .model-selector-trigger svg {
      flex-shrink: 0;
      color: #94a3b8;
      transition: transform 0.15s;
    }
    .model-selector.open .model-selector-trigger {
      border-color: #94a3b8;
      background: #f8fafc;
      box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
    }
    .model-selector.open .model-selector-trigger svg {
      transform: rotate(180deg);
    }
    .model-selector-value {
      display: flex;
      flex-direction: column;
      gap: 0.05rem;
    }
    .model-selector-name {
      font-size: 0.9rem;
      font-weight: 500;
      color: #0f172a;
    }
    .model-selector-desc {
      font-size: 0.75rem;
      color: #94a3b8;
    }
    .model-selector-menu {
      display: none;
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      right: 0;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 16px 48px rgba(15,23,42,0.14);
      padding: 0.4rem;
      z-index: 30;
      max-height: 340px;
      overflow-y: auto;
    }
    .model-selector.open .model-selector-menu {
      display: block;
    }
    .model-group-label {
      font-size: 0.68rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #94a3b8;
      padding: 0.5rem 0.7rem 0.25rem;
    }
    .model-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.5rem 0.7rem;
      border-radius: 9px;
      border: 1px solid transparent;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
      transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.12s ease;
      box-sizing: border-box;
    }
    .model-option + .model-option {
      margin-top: 0.35rem;
    }
    .model-option:hover:not(.disabled) {
      background: #f1f5f9;
    }
    .model-option:active:not(.disabled) {
      background: #e8edf2;
      box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
      transform: translateY(0.5px);
    }
    .model-option.selected {
      background: #e0f2fe;
      border-color: rgba(29, 155, 240, 0.35);
    }
    .model-option.disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    .model-option-left {
      display: flex;
      flex-direction: column;
      gap: 0.05rem;
    }
    .model-option-name {
      font-size: 0.85rem;
      font-weight: 500;
      color: #0f172a;
    }
    .model-option.disabled .model-option-name {
      color: #64748b;
    }
    .model-option-meta {
      font-size: 0.72rem;
      color: #94a3b8;
    }
    .model-option-badge {
      font-size: 0.65rem;
      font-weight: 500;
      padding: 0.15rem 0.5rem;
      border-radius: 999px;
      white-space: nowrap;
    }
    .model-option-badge.connected {
      background: rgba(22,163,74,0.08);
      color: #15803d;
      border: 1px solid rgba(34,197,94,0.4);
    }
    .model-option-badge.missing {
      background: rgba(234,179,8,0.08);
      color: #a16207;
      border: 1px solid rgba(234,179,8,0.3);
    }
    .model-option-badge.soon {
      background: rgba(148,163,184,0.1);
      color: #64748b;
      border: 1px solid rgba(148,163,184,0.3);
    }

    /* Active scheduler: brand logos + same ready / muted pattern as AI model menu */
    #schedulerProviderSelector.model-selector {
      max-width: min(100%, 21.5rem);
    }
    #schedulerProviderSelector .model-selector-trigger {
      gap: 0.45rem;
    }
    #schedulerProviderSelector .scheduler-trigger-leading {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      min-width: 0;
      flex: 1;
    }
    #schedulerProviderSelector .scheduler-provider-brand-mark-wrap {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    /* Match Integrations page: circular marks, same assets as scheduler cards (no squared “app icon” frames). */
    #schedulerProviderSelector .scheduler-provider-brand-mark {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      line-height: 0;
    }
    #schedulerProviderSelector .scheduler-provider-brand-mark .integration-logo.scheduler-integration-logo {
      width: 36px;
      height: 36px;
      border-radius: 999px;
      object-fit: contain;
      padding: 4px;
      box-sizing: border-box;
      background: #f1f5f9;
      border: none;
    }
    #schedulerProviderSelector .scheduler-provider-brand-mark .integration-logo.scheduler-integration-logo.integration-logo--calcom {
      padding: 0;
      background: #2b2b2b;
    }
    #schedulerProviderSelector .scheduler-provider-brand-mark .integration-logo-slot.integration-logo-slot--svgicon.integration-logo-slot--ghl {
      width: 36px;
      height: 36px;
      padding: 0;
      border-radius: 999px;
      overflow: hidden;
      box-sizing: border-box;
    }
    #schedulerProviderSelector .scheduler-provider-brand-mark .integration-logo-slot--ghl .integration-logo-svg {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: 50% 50%;
      transform: scale(1.18);
    }
    @media (prefers-reduced-motion: reduce) {
      #schedulerProviderSelector .scheduler-provider-brand-mark .integration-logo-slot--ghl .integration-logo-svg {
        transform: none;
      }
    }
    #schedulerProviderSelector .scheduler-provider-brand-mark--live .integration-logo.scheduler-integration-logo {
      box-shadow:
        0 0 0 1px rgba(29, 155, 240, 0.42),
        0 0 18px rgba(29, 155, 240, 0.2);
    }
    [data-theme="dark"] #schedulerProviderSelector .scheduler-provider-brand-mark .integration-logo.scheduler-integration-logo:not(.integration-logo--calcom) {
      background: var(--bg-alt);
    }
    [data-theme="dark"] #schedulerProviderSelector .scheduler-provider-brand-mark .integration-logo.scheduler-integration-logo.integration-logo--calcom {
      background: #2b2b2b;
    }
    [data-theme="dark"] #schedulerProviderSelector .scheduler-provider-brand-mark--live .integration-logo.scheduler-integration-logo {
      box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.48),
        0 0 20px rgba(56, 189, 248, 0.22);
    }
    /* Agent → General: flat scheduler mark (no halo behind logo) */
    #page-agent-settings #agent-general #schedulerProviderSelector .scheduler-provider-brand-mark--live .integration-logo.scheduler-integration-logo {
      box-shadow: 0 0 0 1px rgba(29, 155, 240, 0.38);
    }
    [data-theme="dark"] #page-agent-settings #agent-general #schedulerProviderSelector .scheduler-provider-brand-mark--live .integration-logo.scheduler-integration-logo {
      box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.42);
    }
    #schedulerProviderSelector .model-option.scheduler-provider-option {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      justify-content: flex-start;
    }
    #schedulerProviderSelector .model-option.scheduler-provider-option .integration-status {
      margin-left: auto;
      flex-shrink: 0;
      font-size: 0.62rem;
      padding: 0.1rem 0.48rem;
      letter-spacing: 0.07em;
    }
    #schedulerProviderSelector .scheduler-provider-option .model-option-left {
      flex: 1;
      min-width: 0;
    }
    #schedulerProviderSelector .model-option.scheduler-option-soon:not(.selected) .model-option-name,
    #schedulerProviderSelector .model-option.scheduler-option-soon:not(.selected) .model-option-meta {
      opacity: 0.55;
    }

    /* Agent sub-tabs */
    .agent-tab { animation: fadeIn 0.15s ease; }

    /* Knowledge Base grid */
    .kb-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 1rem;
    }
    .kb-card {
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 1.25rem;
      position: relative;
      transition: box-shadow 0.15s;
    }
    .kb-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
    .kb-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 0.5rem;
    }
    .kb-card-title {
      font-weight: 600;
      font-size: 0.95rem;
      color: #0f172a;
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }
    .kb-card-actions {
      display: flex;
      gap: 0.3rem;
      align-items: center;
    }
    .kb-card-actions .instruction-icon-btn {
      width: 2.2rem;
      height: 2.2rem;
      border-radius: 9px;
    }
    .kb-card-body {
      font-size: 0.85rem;
      color: #64748b;
      line-height: 1.5;
      margin-bottom: 0.75rem;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .kb-card-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
    }
    .kb-tag {
      font-size: 0.7rem;
      padding: 0.2rem 0.6rem;
      border-radius: 999px;
      background: #f1f5f9;
      color: #475569;
      font-weight: 500;
    }

    .kb-ai-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
    }
    .kb-ai-btn.kb-ai-btn--compact {
      font-size: 0.78rem;
      font-weight: 600;
      padding: 0.32rem 0.55rem 0.32rem 0.5rem;
      gap: 0.32rem;
      line-height: 1.2;
    }
    .kb-ai-btn.kb-ai-btn--compact .kb-ai-mark-svg {
      width: 19px;
      height: 19px;
    }
    /* Brand blue robot: larger + currentColor for contrast on white */
    .kb-ai-mark {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: var(--acquirely-blue);
    }
    .kb-ai-btn .kb-ai-mark {
      color: var(--acquirely-blue);
    }
    .kb-ai-mark-svg {
      width: 20px;
      height: 20px;
      display: block;
    }
    .kb-ai-mark--lg .kb-ai-mark-svg {
      width: 30px;
      height: 30px;
    }
    .kb-ai-mark .kb-ai-eye--l {
      animation: kb-ai-eye 2.6s ease-in-out infinite;
    }
    .kb-ai-mark .kb-ai-eye--r {
      animation: kb-ai-eye 2.6s ease-in-out infinite 0.32s;
    }
    @keyframes kb-ai-eye {
      0%, 100% { opacity: 0.4; }
      50% { opacity: 1; }
    }
    .kb-ai-overlay {
      position: fixed; inset: 0; z-index: 8000;
      background: rgba(15, 23, 42, 0.52);
      backdrop-filter: blur(8px);
      display: flex; align-items: center; justify-content: center;
      padding: 2rem 1.75rem;
      animation: kb-ai-fade-in 0.25s ease;
    }
    @keyframes kb-ai-fade-in { from { opacity: 0; } to { opacity: 1; } }
    .kb-ai-panel {
      width: min(820px, 100%);
      background: linear-gradient(160deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
      border-radius: 20px;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(148, 163, 184, 0.15);
      padding: 1.75rem 2rem;
      max-height: min(92vh, 900px);
      display: flex;
      flex-direction: column;
      gap: 1.15rem;
    }
    .kb-ai-desc {
      margin: 0;
      font-size: 1.02rem;
      line-height: 1.55;
      color: #475569;
      letter-spacing: -0.015em;
    }
    .kb-import-modes {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
      margin: 0.5rem 0 1rem;
    }
    .kb-import-mode {
      flex: 1;
      min-width: 148px;
      padding: 0.55rem 0.9rem;
      font-size: 0.875rem;
      font-weight: 500;
      font-family: inherit;
      color: #64748b;
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      cursor: pointer;
      text-align: center;
      transition: border-color 0.15s, background 0.15s, color 0.15s;
    }
    .kb-import-mode:hover {
      border-color: #cbd5e1;
      background: #f8fafc;
      color: #334155;
    }
    .kb-import-mode--active {
      color: #0f172a;
      border-color: #0f172a;
      background: #f8fafc;
      font-weight: 600;
    }
    .kb-ai-panel h3 {
      margin: 0;
      font-size: 1.35rem;
      font-weight: 700;
      color: #0f172a;
      letter-spacing: -0.02em;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    /* Easy Mode Import only: larger canvas, Notes-style type */
    .kb-ai-panel--import {
      width: min(960px, 100%);
      max-width: calc(100vw - 2.5rem);
      padding: 2.5rem 2.75rem 2.35rem;
      max-height: min(94vh, 960px);
      gap: 1.5rem;
      border-radius: 22px;
      background: linear-gradient(180deg, #fdfdfd 0%, #f7f8fa 55%, #f3f4f6 100%);
      /* Premium: neutral depth only: no blue tint */
      box-shadow:
        0 24px 56px -18px rgba(15, 23, 42, 0.14),
        0 0 0 1px rgba(15, 23, 42, 0.055);
    }
    .kb-ai-panel--import h3 {
      font-size: clamp(1.5rem, 2.8vw, 1.85rem);
      font-weight: 700;
      letter-spacing: -0.035em;
      line-height: 1.15;
      color: #0c0c0e;
    }
    .kb-ai-panel--import .kb-ai-mark--lg .kb-ai-mark-svg {
      width: 32px;
      height: 32px;
    }
    .kb-ai-panel--import .kb-ai-desc {
      font-size: clamp(1.05rem, 1.9vw, 1.2rem);
      line-height: 1.5;
      font-weight: 500;
      color: #3d3d42;
      letter-spacing: -0.02em;
    }
    .kb-ai-panel--import .kb-import-modes {
      margin: 0.65rem 0 1.5rem;
      gap: 0.65rem;
    }
    .kb-ai-panel--import .kb-import-mode {
      min-width: 0;
      padding: 0.85rem 1.15rem;
      font-size: clamp(0.98rem, 1.6vw, 1.08rem);
      font-weight: 600;
      border-radius: 14px;
      letter-spacing: -0.02em;
    }
    .kb-ai-panel--import .kb-import-mode--active {
      font-weight: 700;
      background: #fff;
      border-color: #0c0c0e;
      color: #0c0c0e;
    }
    .kb-ai-panel--import textarea.kb-ai-paste {
      min-height: min(480px, 58vh);
      font-size: clamp(1.08rem, 2vw, 1.22rem);
      line-height: 1.65;
      font-weight: 400;
      padding: 1.4rem 1.5rem;
      border-radius: 16px;
      border: 1px solid rgba(15, 23, 42, 0.1);
      background: #fafaf9;
      color: #111;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    .kb-ai-panel--import textarea.kb-ai-paste::placeholder {
      color: #8e8e93;
      font-weight: 400;
    }
    .kb-ai-panel--import textarea.kb-ai-paste:focus {
      outline: none;
      border-color: rgba(15, 23, 42, 0.22);
      box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
    }
    .kb-ai-panel--import .kb-ai-easy-form textarea.kb-ai-paste {
      margin-top: 0;
    }
    .kb-ai-panel--import .modal-actions {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      width: 100%;
      box-sizing: border-box;
      margin-top: 0.35rem;
      padding-top: 0.65rem;
      gap: 1rem;
      align-items: center;
      /* Primary CTA stays left: same after cancel / stop */
      justify-content: flex-start;
    }
    .kb-ai-panel--import .modal-actions.kb-ai-actions-running,
    .kb-ai-panel--import .modal-actions.kb-ai-actions-done {
      justify-content: center;
      flex-wrap: wrap;
    }
    .kb-ai-panel--import .modal-actions.kb-ai-actions-running .btn-danger-outline {
      min-width: 8.5rem;
      padding: 0.55rem 1.35rem;
      font-size: 0.92rem;
      font-weight: 600;
      letter-spacing: -0.02em;
      border-radius: 10px;
      box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
    }
    .kb-ai-panel--import .modal-actions.kb-ai-actions-done .btn-primary {
      min-width: 7.5rem;
      border-radius: 12px;
    }
    .kb-ai-panel--import .modal-actions .btn-ghost {
      font-size: 1.05rem;
      font-weight: 500;
      padding: 0.65rem 1.15rem;
    }
    .kb-ai-panel--import .modal-actions .btn-primary {
      font-size: clamp(1.02rem, 1.8vw, 1.12rem);
      font-weight: 600;
      padding: 0.75rem 1.5rem;
      border-radius: 14px;
      letter-spacing: -0.02em;
      border: 1px solid rgba(15, 23, 42, 0.06);
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
    }
    .kb-ai-panel--import .modal-actions .btn-primary:hover {
      border-color: rgba(56, 189, 248, 0.75);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 0 0 1px rgba(125, 211, 252, 0.35);
    }
    .kb-ai-panel--import .kb-ai-status-line {
      font-size: 1.05rem;
      font-weight: 600;
    }
    .kb-ai-panel--import .kb-ai-sub {
      font-size: 1rem;
      line-height: 1.5;
    }
    .kb-ai-panel--import .kb-ai-err-banner {
      font-size: 1.02rem;
      padding: 1rem 1.15rem;
      border-radius: 14px;
    }
    .kb-ai-panel--import .kb-ai-progress-track {
      height: 11px;
      border-radius: 999px;
    }
    .kb-ai-import-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 0.25rem;
    }
    .kb-ai-import-header-main {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: nowrap;
    }
    /* Title + (i) stay grouped on the left; do not grow h3 or the (i) drifts toward the close button */
    .kb-ai-import-header-main h3 {
      flex: 0 1 auto;
      min-width: 0;
      margin: 0;
    }
    .kb-ai-easy-help-anchor {
      position: relative;
      flex-shrink: 0;
      align-self: center;
    }
    .kb-ai-panel--import .kb-easy-mode-help-panel {
      top: calc(100% + 10px);
      left: 0;
      right: auto;
      width: min(24rem, calc(100vw - 2.5rem));
      z-index: 40;
    }
    .kb-easy-mode-help-panel .help-popover-inner::before {
      left: 13px;
      right: auto;
    }
    .kb-easy-mode-help-panel .help-popover-inner::after {
      left: 14px;
      right: auto;
    }
    .kb-ai-modal-close {
      flex-shrink: 0;
      width: 2.35rem;
      height: 2.35rem;
      border: none;
      border-radius: 10px;
      background: transparent;
      color: #64748b;
      font-size: 1.45rem;
      line-height: 1;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-weight: 300;
      transition: background 0.15s, color 0.15s;
    }
    .kb-ai-modal-close:hover {
      background: #f1f5f9;
      color: #0f172a;
    }

    /* Manual add/edit modals (KB, Instructions, Training): match Easy mode premium shell */
    .kb-ai-panel--manual {
      width: min(720px, 100%);
      max-width: calc(100vw - 2.5rem);
      overflow: visible;
    }
    .kb-ai-panel--manual.kb-ai-panel--manual-wide {
      width: min(960px, 100%);
    }
    .kb-ai-manual-form {
      display: flex;
      flex-direction: column;
      gap: 1.2rem;
    }
    .kb-ai-manual-hint {
      margin: 0.35rem 0 1rem;
      font-size: clamp(0.95rem, 1.5vw, 1.05rem);
      line-height: 1.5;
      font-weight: 500;
      color: #3d3d42;
      letter-spacing: -0.02em;
    }
    .kb-ai-manual-label {
      display: block;
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #64748b;
      margin-bottom: 0.45rem;
    }
    .kb-ai-manual-label-note {
      font-weight: 500;
      text-transform: none;
      letter-spacing: 0;
      color: #94a3b8;
    }
    .kb-ai-manual-input,
    .kb-ai-manual-textarea {
      width: 100%;
      box-sizing: border-box;
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
      font-size: clamp(1.02rem, 1.7vw, 1.12rem);
      line-height: 1.6;
      padding: 1rem 1.2rem;
      border-radius: 16px;
      border: 1px solid rgba(15, 23, 42, 0.1);
      background: #fafaf9;
      color: #111;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }
    .kb-ai-manual-textarea {
      min-height: min(220px, 38vh);
      resize: vertical;
    }
    .kb-ai-panel--manual .kb-ai-manual-textarea--tall {
      min-height: min(320px, 45vh);
    }
    /* Training Don’t do / Do: no per-field resize; heights stay matched (see bindTrainingPairTextareas) */
    .kb-ai-manual-textarea--sync-pair {
      resize: none;
      overflow-y: hidden;
      max-height: min(52vh, 520px);
    }
    .kb-ai-manual-input::placeholder,
    .kb-ai-manual-textarea::placeholder {
      color: #8e8e93;
      font-weight: 400;
    }
    .kb-ai-manual-input:focus,
    .kb-ai-manual-textarea:focus {
      outline: none;
      border-color: rgba(15, 23, 42, 0.22);
      box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
    }
    .kb-ai-manual-cols {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.15rem;
    }
    @media (max-width: 720px) {
      .kb-ai-manual-cols {
        grid-template-columns: 1fr;
      }
    }
    .kb-ai-manual-col-head {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      margin-bottom: 0.55rem;
    }
    .kb-ai-manual-col-title {
      font-weight: 700;
      font-size: clamp(0.95rem, 1.5vw, 1.05rem);
      letter-spacing: -0.02em;
      color: #0c0c0e;
    }
    .kb-ai-panel--manual .kb-ai-manual-actions {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      width: 100%;
      box-sizing: border-box;
      margin-top: 0.35rem;
      padding-top: 0.75rem;
      gap: 0.85rem;
      align-items: center;
      justify-content: flex-end;
    }
    .kb-ai-panel--manual .kb-ai-manual-actions .btn-ghost {
      font-size: 1.02rem;
      font-weight: 500;
      padding: 0.65rem 1.15rem;
      border-radius: 12px;
    }
    .kb-ai-panel--manual .kb-ai-manual-actions .btn-primary {
      font-size: clamp(1.02rem, 1.8vw, 1.12rem);
      font-weight: 600;
      padding: 0.75rem 1.5rem;
      border-radius: 14px;
      letter-spacing: -0.02em;
      border: 1px solid rgba(15, 23, 42, 0.06);
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
    }
    .kb-ai-panel--manual .kb-ai-manual-actions .btn-primary:hover {
      border-color: rgba(56, 189, 248, 0.75);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 0 0 1px rgba(125, 211, 252, 0.35);
    }

    .kb-ai-panel textarea.kb-ai-paste {
      width: 100%;
      min-height: min(360px, 52vh);
      resize: vertical;
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
      font-size: 1.0625rem;
      line-height: 1.6;
      border-radius: 14px;
      border: 1px solid rgba(148, 163, 184, 0.45);
      padding: 1.1rem 1.2rem;
      background: #faf9f6;
      color: #1e293b;
      box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.85);
    }
    .kb-ai-panel textarea.kb-ai-paste:focus {
      outline: none;
      border-color: rgba(15, 23, 42, 0.22);
      box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
    }
    .kb-ai-progress-wrap {
      display: none;
      flex-direction: column;
      gap: 0.65rem;
    }
    .kb-ai-progress-wrap.active { display: flex; }
    .kb-ai-progress-track {
      height: 10px;
      border-radius: 999px;
      background: #e2e8f0;
      overflow: hidden;
      position: relative;
    }
    .kb-ai-progress-fill {
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, #6366f1, #8b5cf6, #22d3ee, #6366f1);
      background-size: 200% 100%;
      animation: kb-ai-shimmer 1.8s linear infinite;
      transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    @keyframes kb-ai-shimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
    .kb-ai-status-line {
      font-size: 0.95rem;
      font-weight: 600;
      color: #334155;
      min-height: 1.45em;
      line-height: 1.45;
    }
    .kb-ai-status-line.kb-ai-error-line,
    .kb-ai-sub.kb-ai-error-line {
      color: #b91c1c;
      font-weight: 600;
    }
    .kb-ai-sub {
      font-size: 0.88rem;
      color: #64748b;
      line-height: 1.5;
      word-break: break-word;
    }
    .kb-ai-err-banner {
      display: none;
      padding: 0.85rem 1rem;
      border-radius: 12px;
      background: #fef2f2;
      border: 1px solid #fecaca;
      color: #991b1b;
      font-size: 0.95rem;
      line-height: 1.5;
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
      user-select: none;
      -webkit-user-select: none;
      cursor: default;
    }
    .kb-ai-err-banner.visible { display: block; }
    .kb-ai-pulse-dot {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #22c55e;
      margin-right: 0.5rem;
      animation: kb-ai-pulse 1.2s ease-in-out infinite;
    }
    @keyframes kb-ai-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.6; transform: scale(0.85); }
    }

    .instruction-templates-section--premium {
      margin-bottom: 1.1rem;
      padding: 0.85rem 1.1rem 1rem;
      border: 1px solid var(--border-light);
      border-radius: 12px;
      background: #f8fafc;
    }
    .instruction-templates-heading-row {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      margin-bottom: 0.7rem;
    }
    .instruction-templates-heading-row .instruction-templates-label {
      margin-bottom: 0;
    }
    .instruction-templates-label {
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      color: #64748b;
      margin-bottom: 0.35rem;
    }
    .instruction-templates-controls--premium {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem;
    }
    .instruction-template-picker--premium.model-selector {
      flex: 1 1 16rem;
      min-width: min(100%, 14rem);
    }
    .instruction-templates-actions-end {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.55rem;
      margin-left: auto;
    }
    .instruction-templates-toolbar-btn {
      border-radius: 10px !important;
      font-weight: 600 !important;
      font-size: 0.8rem !important;
    }
    .instruction-template-picker--premium .instruction-template-trigger .model-selector-desc {
      display: none;
    }
    .instruction-template-picker--premium .instruction-template-trigger {
      box-sizing: border-box;
      min-height: 3.25rem;
      padding: 0.55rem 1.05rem 0.55rem 1.05rem;
      border-radius: 12px;
      border-color: #cbd5e1;
      background: #fff;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
      gap: 0.5rem;
      align-items: center;
    }
    .instruction-template-picker--premium .instruction-template-trigger:hover {
      border-color: #94a3b8;
      box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
    }
    .instruction-template-picker--premium.model-selector.open .instruction-template-trigger {
      border-color: var(--acquirely-blue);
      box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.16), 0 4px 16px rgba(15, 23, 42, 0.08);
    }
    .instruction-template-trigger-text .model-selector-name {
      font-size: 0.9375rem;
      font-weight: 600;
      letter-spacing: -0.015em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .instruction-template-trigger-text .model-selector-desc {
      font-size: 0.72rem;
      line-height: 1.3;
      margin-top: 0.12rem;
      color: #64748b;
    }
    .instruction-template-picker--premium .instruction-template-trigger-text {
      flex: 1;
      min-width: 0;
      text-align: left;
    }
    .instruction-template-chevron {
      flex-shrink: 0;
      align-self: center;
      margin-left: 0.25rem;
      color: #64748b;
    }
    .instruction-template-menu {
      padding: 0.45rem;
      min-width: 100%;
    }
    .instruction-template-option .model-option-meta {
      display: none;
    }
    .instruction-template-option .model-option-left {
      gap: 0;
    }
    .instruction-template-option .model-option-name {
      font-size: 0.875rem;
      font-weight: 500;
    }
    .instruction-templates-apply-btn {
      flex-shrink: 0;
      font-weight: 600 !important;
      border-radius: 10px !important;
    }

    /* Instruction list */
    .instruction-item {
      display: flex;
      align-items: flex-start;
      gap: 0.75rem;
      padding: 1rem 1.25rem;
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      margin-bottom: 0.6rem;
      transition: box-shadow 0.15s;
    }
    .instruction-item:hover { box-shadow: 0 1px 8px rgba(0,0,0,0.04); }
    .instruction-number {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--acquirely-blue);
      min-width: 1.75rem;
      height: 1.75rem;
      background: rgba(12,124,213,0.08);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      margin-top: 0.1rem;
    }
    .instruction-item--template .instruction-number {
      color: #86198f;
      background: rgba(192, 38, 211, 0.12);
    }
    .instruction-item--template .toggle-switch {
      border-color: rgba(134, 25, 143, 0.28);
      background: rgba(250, 232, 255, 0.65);
    }
    .instruction-item--template .toggle-switch.on {
      background: #a21caf;
      border-color: #86198f;
      box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 3px rgba(192, 38, 211, 0.14);
    }
    .instruction-content {
      flex: 1;
      font-size: 0.88rem;
      color: #1e293b;
      line-height: 1.5;
    }
    .instruction-main { flex: 1; min-width: 0; }
    .instruction-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem;
      margin: 0 0.35rem 0 0;
      align-items: center;
      justify-content: flex-end;
      max-width: 15rem;
    }
    .instruction-actions--cluster {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 0.65rem;
      flex-shrink: 0;
    }
    .instruction-icon-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 2.35rem;
      height: 2.35rem;
      padding: 0;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
      color: #475569;
      cursor: pointer;
      transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    }
    .instruction-icon-btn:not(.danger):hover {
      color: #2563eb !important;
      border-color: rgba(37, 99, 235, 0.45) !important;
      background: rgba(37, 99, 235, 0.08) !important;
      box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
    }
    .instruction-icon-btn svg { display: block; }
    .instruction-icon-btn.danger:hover {
      color: #dc2626;
      background: #fef2f2;
      border-color: #fecaca;
    }
    .instruction-badge {
      font-size: 0.65rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      padding: 0.15rem 0.45rem;
      border-radius: 6px;
      line-height: 1.3;
    }
    .instruction-badge--manual { background: #e0e7ff; color: #3730a3; }
    .instruction-badge--easy { background: #dbeafe; color: #1d4ed8; }
    .instruction-badge--template,
    .instruction-badge--edited {
      text-transform: none;
      font-size: 0.68rem;
      letter-spacing: 0.02em;
    }
    .instruction-badge--template { background: #fae8ff; color: #86198f; }
    .instruction-badge--edited { background: #ffedd5; color: #9a3412; }
    .instruction-template-panel {
      margin-top: 0;
      margin-bottom: 1rem;
      border: 1px solid rgba(192, 38, 211, 0.28);
      border-radius: 12px;
      background: #fdf4ff;
      overflow: hidden;
      box-shadow: 0 1px 2px rgba(88, 28, 135, 0.06);
    }
    .instruction-template-panel > summary {
      list-style: none;
      cursor: pointer;
      padding: 0.95rem 1.15rem;
      min-height: 3.1rem;
      font-weight: 600;
      font-size: 0.94rem;
      letter-spacing: -0.01em;
      color: #581c87;
      background: linear-gradient(180deg, #fae8ff 0%, #f3e8ff 100%);
      display: flex;
      align-items: center;
      justify-content: space-between;
      user-select: none;
      box-sizing: border-box;
      transition: background 0.18s ease, color 0.18s ease;
    }
    .instruction-template-panel > summary:hover {
      background: linear-gradient(180deg, #f5e0ff 0%, #edd5f7 100%);
      color: #4a1572;
    }
    .instruction-template-panel > summary::-webkit-details-marker { display: none; }
    .instruction-template-panel > summary::after {
      content: '▶';
      font-size: 0.65rem;
      color: #86198f;
      opacity: 0.85;
      transition: transform 0.18s ease, opacity 0.18s ease;
    }
    .instruction-template-panel[open] > summary {
      border-bottom: 1px solid rgba(192, 38, 211, 0.2);
    }
    .instruction-template-panel[open] > summary::after {
      transform: rotate(90deg);
    }
    .instruction-template-panel .instruction-template-inner {
      padding: 0.75rem 0.85rem 0.85rem;
      background: #fefcff;
    }
    .instruction-revert {
      font-size: 0.72rem;
      font-weight: 600;
      padding: 0.25rem 0.5rem;
      border-radius: 6px;
      border: 1px solid #cbd5e1;
      background: #fff;
      color: #475569;
      cursor: pointer;
      margin-right: 0.25rem;
    }
    .instruction-revert:hover { background: #f1f5f9; color: #0f172a; }
    .instruction-revert--locked {
      font-size: 0.72rem;
      font-weight: 600;
      padding: 0.25rem 0.5rem;
      border-radius: 6px;
      border: 1px solid transparent;
      background: transparent;
      color: #94a3b8;
      opacity: 0.55;
      cursor: default;
      user-select: none;
      pointer-events: none;
      margin-right: 0.25rem;
    }
    .instruction-user-block { margin-bottom: 0.25rem; margin-top: 0; }

    /* Skills grid */
    .skills-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 1rem;
    }
    .skill-card {
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 1.25rem;
    }
    .skill-card-header {
      display: flex;
      gap: 0.75rem;
      align-items: flex-start;
      margin-bottom: 1rem;
    }
    .skill-icon {
      width: 2.5rem;
      height: 2.5rem;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      flex-shrink: 0;
    }
    .skill-icon.blue { background: #dbeafe; }
    .skill-icon.green { background: #dcfce7; }
    .skill-icon.orange { background: #ffedd5; }
    .skill-icon.purple { background: #ede9fe; }
    .skill-title {
      font-weight: 600;
      font-size: 0.95rem;
      color: #0f172a;
    }
    .skill-desc {
      font-size: 0.8rem;
      color: #64748b;
      margin-top: 0.15rem;
    }
    .roadmap-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 1rem;
      margin-bottom: 1.5rem;
    }
    .roadmap-card {
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 1rem 1.1rem;
      cursor: pointer;
      transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    }
    .roadmap-card:hover {
      border-color: #cbd5e1;
      box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
      transform: translateY(-1px);
    }
    .roadmap-card-kicker {
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #94a3b8;
      margin-bottom: 0.35rem;
    }
    .roadmap-card-title {
      font-size: 1rem;
      font-weight: 600;
      color: #0f172a;
      margin-bottom: 0.3rem;
    }
    .roadmap-card-desc {
      font-size: 0.82rem;
      color: #64748b;
      line-height: 1.45;
    }
    .roadmap-section {
      margin-bottom: 1.5rem;
    }
    .roadmap-overview {
      display: block;
    }
    .roadmap-feature-page {
      display: none;
    }
    .roadmap-feature-page.active {
      display: block;
    }
    .roadmap-feature-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 1rem;
    }
    .roadmap-back {
      color: var(--acquirely-blue);
      font-size: 0.85rem;
      cursor: pointer;
    }
    .roadmap-feature-kicker {
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #94a3b8;
      margin-bottom: 0.25rem;
    }

    /* KB Modal */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 5000;
      animation: fadeIn 0.12s ease;
    }
    .modal-box {
      background: #fff;
      border-radius: 14px;
      padding: 1.75rem;
      max-width: 520px;
      width: 95%;
      box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    }
    .modal-overlay.modal-overlay--acq-polished {
      background: rgba(0, 0, 0, 0.48);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      animation: acq-confirm-overlay-in 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .modal-box.modal-box--acq-polished {
      border-radius: 16px;
      box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.08);
      will-change: transform, opacity;
      animation: acq-confirm-dialog-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    @keyframes acq-confirm-overlay-in {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    @keyframes acq-confirm-dialog-in {
      from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }
    .modal-overlay.modal-overlay--acq-polished.modal-overlay--acq-leaving {
      animation: acq-confirm-overlay-out 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
      pointer-events: none;
    }
    .modal-overlay.modal-overlay--acq-polished.modal-overlay--acq-leaving .modal-box.modal-box--acq-polished {
      animation: acq-confirm-dialog-out 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
    }
    @keyframes acq-confirm-overlay-out {
      to { opacity: 0; }
    }
    @keyframes acq-confirm-dialog-out {
      to {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
      }
    }
    @media (prefers-reduced-motion: reduce) {
      .modal-overlay.modal-overlay--acq-polished,
      .modal-overlay.modal-overlay--acq-polished .modal-box.modal-box--acq-polished,
      .modal-overlay.modal-overlay--acq-polished.modal-overlay--acq-leaving,
      .modal-overlay.modal-overlay--acq-polished.modal-overlay--acq-leaving .modal-box.modal-box--acq-polished {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
      }
      .modal-overlay.modal-overlay--acq-polished {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
      }
    }
    .modal-box h3 {
      font-size: 1.1rem;
      font-weight: 600;
      margin: 0 0 1rem 0;
      color: var(--text);
    }
    .modal-box-message {
      font-size: 0.9rem;
      color: var(--text-muted);
      line-height: 1.55;
      margin: 0 0 1.5rem 0;
    }
    .form-hint-inline {
      color: var(--text-muted);
      font-weight: 400;
    }
    /* Follow-up schedule modal (dynamic): use vars, not inline #slate */
    .followup-modal-intro {
      font-size: 0.9rem;
      color: var(--text-muted);
      line-height: 1.5;
      margin-bottom: 1rem;
    }
    .followup-master-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1rem;
    }
    .followup-master-label {
      font-size: 0.9rem;
      color: var(--text-muted);
    }
    .followup-step-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin-bottom: 0.85rem;
    }
    .followup-step-title {
      font-size: 0.85rem;
      color: var(--text);
      min-width: 120px;
      padding-top: 0;
      align-self: center;
    }
    .followup-timing-grid {
      flex: 1;
      display: grid;
      grid-template-columns: repeat(3, minmax(6.75rem, 1fr));
      gap: 0.65rem;
    }
    .followup-field-label {
      display: block;
      font-size: 0.75rem;
      color: var(--text-muted);
      margin-bottom: 0.25rem;
    }
    .modal-box .form-group { margin-bottom: 0.9rem; }
    .modal-box .modal-actions {
      display: flex;
      justify-content: flex-end;
      gap: 0.5rem;
      margin-top: 1.25rem;
    }
    .btn-ghost {
      background: none;
      border: 1px solid #e2e8f0;
      color: #475569;
      padding: 0.5rem 1rem;
      border-radius: 8px;
      cursor: pointer;
      font-size: 0.85rem;
      transition: background 0.15s;
    }
    .btn-ghost:hover { background: #f8fafc; }

    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

    /* -------------------------------------------------------------------------
       Mobile-only chrome (hidden on desktop) — rules outside @media keep
       desktop layout untouched (display:none until max-width 768px block).
       ------------------------------------------------------------------------- */
    .acq-mobile-header-bar,
    .acq-mobile-nav-backdrop,
    .acq-mobile-contact-backdrop,
    .acq-mobile-contact-dock {
      display: none;
    }

    @media (max-width: 768px) {
      /* Nav drawer backdrop */
      .acq-mobile-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 38;
        background: rgba(15, 23, 42, 0.48);
        -webkit-tap-highlight-color: transparent;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
      }
      body.acq-mobile-nav-open .acq-mobile-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
      }

      /* Contact details: dimmed backdrop until bottom dock opens sheet */
      .acq-mobile-contact-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 54;
        background: rgba(15, 23, 42, 0.52);
        -webkit-tap-highlight-color: transparent;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.24s ease;
      }
      body.acq-mobile-contact-sheet-open .acq-mobile-contact-backdrop {
        opacity: 1;
        pointer-events: auto;
      }

      /* Floating lead-details dock (mobile thread only) */
      #page-inbox.page.active:has(#inboxLayout:not(.no-details)) .acq-mobile-contact-dock {
        display: flex;
      }
      #page-inbox.page.active .acq-mobile-contact-dock {
        position: fixed;
        z-index: 50;
        left: max(0.65rem, env(safe-area-inset-left, 0px));
        right: max(0.65rem, env(safe-area-inset-right, 0px));
        bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
        flex-direction: row;
        align-items: center;
        gap: 0;
        width: auto;
        max-width: 100%;
        margin: 0;
        padding: 0.5rem;
        border: 1px solid transparent;
        border-radius: 14px;
        cursor: pointer;
        font: inherit;
        text-align: left;
        -webkit-tap-highlight-color: transparent;
        transition:
          opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
          transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
          box-shadow 0.2s ease;
      }
      /* Match contact bottom sheet / .inbox-details card surface */
      html:not([data-theme='dark']) #page-inbox.page.active .acq-mobile-contact-dock {
        color: #0f172a;
        background: var(--bg-card);
        border-color: rgba(15, 23, 42, 0.08);
        box-shadow:
          0 8px 28px rgba(15, 23, 42, 0.08),
          0 1px 2px rgba(15, 23, 42, 0.04);
      }
      [data-theme='dark'] #page-inbox.page.active .acq-mobile-contact-dock {
        color: var(--text);
        background: var(--bg-card);
        border-color: var(--border);
        box-shadow:
          0 10px 40px rgba(0, 0, 0, 0.45),
          0 1px 0 rgba(255, 255, 255, 0.04);
      }
      #page-inbox.page.active .acq-mobile-contact-dock:active {
        transform: scale(0.993);
      }
      body.acq-mobile-contact-sheet-open #page-inbox.page.active .acq-mobile-contact-dock {
        opacity: 0;
        transform: translate3d(0, 14px, 0) scale(0.98);
        pointer-events: none;
        visibility: hidden;
      }
      #page-inbox.page.active .acq-mobile-contact-dock-row {
        display: grid;
        grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
        align-items: center;
        column-gap: 0.45rem;
        width: 100%;
        min-width: 0;
      }
      /* Equal-width side rails: icon + chevron centered for symmetrical insets */
      #page-inbox.page.active .acq-mobile-contact-dock-icon {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        justify-self: center;
        align-self: center;
        width: 2.6rem;
        height: 2.6rem;
        border-radius: 11px;
        background: rgba(29, 78, 216, 0.08);
        color: #1d4ed8;
      }
      /* Same blue emphasis as dark theme primary Edit control */
      [data-theme='dark'] #page-inbox.page.active .acq-mobile-contact-dock-icon {
        background: rgba(56, 189, 248, 0.14);
        color: #58a6ff;
      }
      #page-inbox.page.active .acq-mobile-contact-dock-chevron-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        justify-self: center;
        align-self: center;
        width: 100%;
        max-width: 2.75rem;
        margin: 0;
        padding: 0;
        line-height: 0;
        color: var(--text-muted);
      }
      #page-inbox.page.active .acq-mobile-contact-dock-chevron-wrap .acq-mobile-contact-dock-chevron {
        display: block;
        opacity: 0.55;
      }
      #page-inbox.page.active .acq-mobile-contact-dock-copy {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.08rem;
      }
      #page-inbox.page.active .acq-mobile-contact-dock-kicker {
        font-size: 0.8rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        text-transform: none;
        color: var(--text-muted);
      }
      html:not([data-theme='dark']) #page-inbox.page.active .acq-mobile-contact-dock-sub {
        color: #0f172a;
      }
      [data-theme='dark'] #page-inbox.page.active .acq-mobile-contact-dock-kicker {
        color: var(--text-muted);
      }
      [data-theme='dark'] #page-inbox.page.active .acq-mobile-contact-dock-sub {
        color: #ffffff;
      }
      #page-inbox.page.active .acq-mobile-contact-dock-sub {
        font-size: 0.95rem;
        font-weight: 600;
        letter-spacing: -0.02em;
        line-height: 1.2;
        color: inherit;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      @media (prefers-reduced-motion: reduce) {
        #page-inbox.page.active .acq-mobile-contact-dock,
        body.acq-mobile-contact-sheet-open #page-inbox.page.active .acq-mobile-contact-dock {
          transition: none;
        }
      }

      /* Sidebar: off-canvas drawer (desktop column layout removed) */
      .acq-app-sidebar-resize {
        display: none !important;
      }
      .main {
        margin-left: 0 !important;
        width: 100% !important;
        min-height: 100dvh;
        min-height: -webkit-fill-available;
        height: 100dvh;
        max-height: 100dvh;
      }
      .sidebar {
        width: min(88vw, 300px) !important;
        max-width: min(88vw, 300px);
        transform: translate3d(-100%, 0, 0);
        transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: none;
      }
      body.acq-mobile-nav-open .sidebar {
        transform: translate3d(0, 0, 0);
        box-shadow: 12px 0 40px rgba(15, 23, 42, 0.18);
      }
      body.sidebar-rail .sidebar {
        width: min(88vw, 300px) !important;
      }
      /* Drawer open: show full nav (override collapsed “rail” presentation). */
      body.acq-mobile-nav-open.sidebar-rail .sidebar-logo {
        flex: 1 1 auto;
        width: auto;
        height: auto;
        justify-content: flex-start;
      }
      body.acq-mobile-nav-open.sidebar-rail .sidebar-logo-favicon {
        display: none !important;
      }
      html:not([data-theme='dark']) body.acq-mobile-nav-open.sidebar-rail .sidebar-logo-img--light {
        display: block !important;
        visibility: visible !important;
      }
      html:not([data-theme='dark']) body.acq-mobile-nav-open.sidebar-rail .sidebar-logo-img--dark {
        display: none !important;
      }
      [data-theme='dark'] body.acq-mobile-nav-open.sidebar-rail .sidebar-logo-img--light {
        display: none !important;
      }
      [data-theme='dark'] body.acq-mobile-nav-open.sidebar-rail .sidebar-logo-img--dark {
        display: block !important;
        visibility: visible !important;
      }
      body.acq-mobile-nav-open.sidebar-rail .sidebar-workspace-text,
      body.acq-mobile-nav-open.sidebar-rail .sidebar-workspace-pill > svg:last-of-type {
        display: flex !important;
      }
      body.acq-mobile-nav-open.sidebar-rail .sidebar-nav .nav-item {
        justify-content: flex-start !important;
      }
      body.acq-mobile-nav-open.sidebar-rail .nav-item-label {
        display: inline !important;
      }

      /* Compact inbox header: mobile bar vs desktop blocks */
      /* 3-column grid so the logo stays optically centered (equal side gutters for back + menu). */
      .acq-mobile-header-bar {
        display: none;
        width: 100%;
        min-height: 2.75rem;
        box-sizing: border-box;
        padding-left: env(safe-area-inset-left, 0);
        padding-right: env(safe-area-inset-right, 0);
        align-items: center;
        grid-template-columns: 2.65rem minmax(0, 1fr) 2.65rem;
        column-gap: 0.35rem;
      }
      .main:has(#page-inbox.page.active) .acq-mobile-header-bar {
        display: grid;
      }
      .main:has(#page-inbox.page.active) .main-header-title-wrap,
      .main:has(#page-inbox.page.active) .header-actions {
        display: none !important;
      }
      .acq-mobile-back-btn {
        grid-column: 1;
        justify-self: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.65rem;
        height: 2.65rem;
        padding: 0;
        border-radius: 10px;
        border: 1px solid var(--border-light);
        background: var(--bg-card);
        color: var(--text);
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
        visibility: hidden;
        pointer-events: none;
      }
      .main:has(#page-inbox.page.active):has(#inboxLayout:not(.no-details)) .acq-mobile-back-btn {
        visibility: visible;
        pointer-events: auto;
      }
      .acq-mobile-header-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        gap: 0.45rem;
      }
      .acq-mobile-header-middle {
        grid-column: 2;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        justify-self: stretch;
      }
      .acq-mobile-header-logo .sidebar-logo-favicon {
        display: none;
      }
      .acq-mobile-header-logo .sidebar-logo-img {
        width: calc(26px * 255 / 52);
        height: 26px;
        object-fit: contain;
      }
      html:not([data-theme='dark']) .acq-mobile-header-logo .sidebar-logo-img--dark {
        display: none;
      }
      html:not([data-theme='dark']) .acq-mobile-header-logo .sidebar-logo-img--light {
        display: block;
      }
      [data-theme='dark'] .acq-mobile-header-logo .sidebar-logo-img--light {
        display: none;
      }
      [data-theme='dark'] .acq-mobile-header-logo .sidebar-logo-img--dark {
        display: block;
      }
      .acq-mobile-nav-toggle {
        grid-column: 3;
        justify-self: end;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.65rem;
        height: 2.65rem;
        padding: 0;
        border-radius: 10px;
        border: 1px solid var(--border-light);
        background: var(--bg-card);
        color: var(--text);
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
      }
      .main-header {
        flex-wrap: wrap;
        row-gap: 0.35rem;
        padding-top: calc(0.55rem + env(safe-area-inset-top, 0));
        padding-left: calc(0.75rem + env(safe-area-inset-left, 0));
        padding-right: calc(0.75rem + env(safe-area-inset-right, 0));
        padding-bottom: 0.55rem;
      }

      /* Inbox: fill viewport below header, fix scroll chain */
      .main:has(#page-inbox.page.active) {
        min-height: 100dvh;
        min-height: -webkit-fill-available;
        height: 100dvh;
        max-height: 100dvh;
      }
      .main:has(#page-inbox.page.active) .main-content {
        display: flex;
        flex-direction: column;
        flex: 1 1 0;
        min-height: 0;
        padding: 0.45rem 0.55rem 0.55rem;
        padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0));
      }
      .main:has(#page-inbox.page.active) #page-inbox.page.active {
        flex: 1 1 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      #page-inbox.page.active #inboxLayout {
        flex: 1 1 0;
        min-height: 0;
        max-height: 100%;
        padding-block: 0;
      }
      #page-inbox.page.active #inboxLayout.no-details {
        flex-direction: row;
        align-items: stretch;
      }
      #page-inbox.page.active #inboxLayout.no-details .inbox-leads {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin-inline: 0 !important;
        margin-inline-end: 0 !important;
        border-radius: 12px;
      }
      #page-inbox.page.active #inboxLayout.no-details .inbox-resize-leads,
      #page-inbox.page.active #inboxLayout.no-details .inbox-thread,
      #page-inbox.page.active #inboxLayout.no-details .inbox-resize-details,
      #page-inbox.page.active #inboxLayout.no-details .inbox-details {
        display: none !important;
      }
      #page-inbox.page.active #inboxLayout.no-details .inbox-leads-list-scroll {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
      }

      #page-inbox.page.active #inboxLayout:not(.no-details) {
        flex-direction: column;
        align-items: stretch;
        overflow: hidden;
      }
      #page-inbox.page.active #inboxLayout:not(.no-details) .inbox-leads,
      #page-inbox.page.active #inboxLayout:not(.no-details) .inbox-resize-leads,
      #page-inbox.page.active #inboxLayout:not(.no-details) .inbox-resize-details {
        display: none !important;
      }
      #page-inbox.page.active #inboxLayout:not(.no-details) .inbox-thread {
        display: flex !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        border-right: none !important;
        padding-top: 0.65rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-bottom: calc(4.85rem + env(safe-area-inset-bottom, 0px)) !important;
      }
      body.acq-mobile-contact-sheet-open #page-inbox.page.active #inboxLayout:not(.no-details) .inbox-thread {
        padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px)) !important;
      }
      #page-inbox.page.active #inboxLayout:not(.no-details) .inbox-details {
        display: block !important;
        position: fixed !important;
        left: env(safe-area-inset-left, 0) !important;
        right: env(safe-area-inset-right, 0) !important;
        bottom: 0 !important;
        top: auto !important;
        flex: none !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        max-height: min(88dvh, 620px) !important;
        margin: 0 !important;
        padding: 0.75rem 0.9rem calc(0.95rem + env(safe-area-inset-bottom, 0)) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        border: 1px solid var(--border-light) !important;
        border-bottom: none !important;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -12px 48px rgba(15, 23, 42, 0.22);
        z-index: 56;
        transform: translate3d(0, calc(100% + 24px), 0);
        visibility: hidden;
        pointer-events: none;
        transition:
          transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
          visibility 0.3s linear;
      }
      body.acq-mobile-contact-sheet-open #page-inbox.page.active #inboxLayout:not(.no-details) .inbox-details {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        pointer-events: auto;
      }
      @media (prefers-reduced-motion: reduce) {
        #page-inbox.page.active #inboxLayout:not(.no-details) .inbox-details {
          transition: none;
        }
      }
    }
/* Charcoal platform shell — matches inbox-setup visual language */

.acq-setter-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--bg, #161618);
}

.acq-setter-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0.85rem var(--platform-shell-content-x, 0.75rem) 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: #1e1e21;
  width: fit-content;
  max-width: calc(100% - 1.5rem);
  flex-shrink: 0;
}

.acq-setter-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #71717a;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.acq-setter-tab:hover {
  color: #d4d4d8;
}

.acq-setter-tab.is-active {
  background: #1c1c1f;
  color: #f4f4f5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.acq-setter-panels {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.acq-setter-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

.acq-setter-panel.is-active {
  display: flex;
}

.acq-setter-panel--inbox.active {
  display: flex;
}

.acq-setter-panel--activity .acq-setter-activity-embed {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #161618;
}

.acq-setter-panel--agent #page-agent-settings {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 0 var(--platform-shell-content-x, 0.75rem) 1rem;
  box-sizing: border-box;
}

.acq-setter-panel--agent #page-agent-settings:not(.active) {
  display: none;
}

body.acq-page-appointment-setter .acq-setter-panel--agent.is-active #page-agent-settings.active {
  display: flex !important;
}

#page-appointment-setter.page.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
  height: 100%;
}

#page-appointment-setter.page.active #page-inbox.active,
#page-appointment-setter.page.active #page-inbox.is-active {
  padding: 0 0.65rem var(--platform-shell-content-x, 0.75rem);
  box-sizing: border-box;
}

body.acq-page-inbox-setup .main-header,
body.acq-page-appointment-setter .main-header {
  background: #161618;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  justify-content: center;
}

body.acq-page-inbox-setup .main-header-title-wrap,
body.acq-page-appointment-setter .main-header-title-wrap {
  flex: 1;
  justify-content: center;
  text-align: center;
}

body.acq-page-inbox-setup .main-header-title-wrap > div,
body.acq-page-appointment-setter .main-header-title-wrap > div {
  align-items: center;
}

body.acq-page-inbox-setup .main-subtitle,
body.acq-page-inbox-setup .header-instantly-conn,
body.acq-page-appointment-setter .main-subtitle {
  display: none !important;
}

body.acq-page-inbox-setup .header-actions,
body.acq-page-appointment-setter .header-actions {
  position: absolute;
  right: var(--platform-shell-header-x, 1.35rem);
  top: 50%;
  transform: translateY(-50%);
}

body.acq-page-inbox-setup .main-header,
body.acq-page-appointment-setter .main-header {
  position: relative;
}

body.acq-page-inbox-setup #page-inbox-setup .inbox-setup-embed {
  background: #161618;
}

[data-theme="dark"] .card {
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .main {
  background: #161618;
}
