/* Global Tokens (Dynamic Theme) */
:root {
    --brand-bg: #FAF7ED;
    --brand-bg-login: #FDFBF7; /* Exact cream from Agency OS image */
    --brand-dark: #111827;
    --brand-muted: rgba(17, 24, 39, 0.7);
    --brand-border: rgba(17, 24, 39, 0.1);
    --brand-card-bg: #FFFFFF;
    --brand-cream: #FAF7ED;
    --brand-yellow: #FFD644; /* More vibrant Agency yellow */
}

/* Dark Mode Overrides - Midnight Navy Theme */
.dark {
    --brand-bg: #020617; /* Slate 950 */
    --brand-dark: #F8FAFC; /* Slate 50 */
    --brand-muted: #cbd5e1; /* Slate 300 — stronger muted-body contrast on navy */
    --brand-border: rgba(255, 255, 255, 0.1);
    --brand-card-bg: #0F172A; /* Slate 900 */
    --brand-cream: #1E293B; /* Slate 800 - Used for hovers/inputs */
}

body {
    background-color: var(--brand-bg);
    color: var(--brand-dark);
    font-family: 'Inter', ui-sans-serif, system-ui;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Manrope', sans-serif;
    color: var(--brand-dark);
}

/* Button Animations & Styles */
.btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(253, 224, 71, 0.35);
}

.btn-pill:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--brand-yellow);
    color: #111827;
}

.btn-primary:hover {
    background-color: color-mix(in srgb, var(--brand-yellow) 88%, #000);
}

/* Solid brand-yellow fills: always dark lettering. In .dark, text-brand-dark is a light token for body copy. Use exact class tokens so hover:bg-brand-yellow alone does not match. */
.dark .btn-primary,
.dark [class~="bg-brand-yellow"],
.dark [class~="dark:bg-brand-yellow"] {
    color: #111827;
}

.dark .btn-primary svg,
.dark [class~="bg-brand-yellow"] svg,
.dark [class~="dark:bg-brand-yellow"] svg {
    color: #111827;
    stroke: #111827;
}

/* Navigation Styles */
.nav-link {
    font-weight: 600;
    color: var(--brand-muted);
    transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-dark);
}

.dark .nav-link:hover,
.dark .nav-link.active {
    color: #fff;
}

/* Left sidebar app shell */
:root {
    --app-sidebar-width: 16.5rem;
    --ghl-sidebar-bg: #ffffff;
    --ghl-sidebar-border: #e5e7eb;
    --ghl-sidebar-text: #374151;
    --ghl-sidebar-text-strong: #111827;
    --ghl-sidebar-icon: #6b7280;
    --ghl-sidebar-hover: #f3f4f6;
    --ghl-sidebar-active: #f3f4f6;
}

/* Floating chat widgets (global assistant + CEO mobile bubble) */
.app-floating-layer {
    position: fixed;
    z-index: 155;
    bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    right: max(1.25rem, env(safe-area-inset-right, 0px));
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    pointer-events: none;
}

.app-floating-layer > * {
    pointer-events: auto;
}

/* Fixed overlays portaled to body (chat FAB, bulk bar) — excluded from sidebar grid crush */
.app-body-portal {
    pointer-events: none;
}

.app-body-portal > * {
    pointer-events: auto;
}

#bulkActionBar.app-body-portal.bulk-action-bar--visible,
#bulkActionBar.app-body-portal[data-visible='true'] {
    pointer-events: auto;
}

@media (min-width: 768px) {
    body.app-with-sidebar {
        display: grid;
        grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr);
        min-height: 100vh;
        transition: grid-template-columns 0.22s ease;
    }

    body.app-with-sidebar #appSidebar {
        grid-column: 1;
        grid-row: 1 / -1;
        align-self: start;
        display: flex !important;
        flex-direction: column;
        width: var(--app-sidebar-width);
        min-width: var(--app-sidebar-width);
        position: sticky;
        top: 0;
        height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        z-index: 40;
        transition: width 0.22s ease, min-width 0.22s ease, transform 0.22s ease, opacity 0.18s ease;
    }

    body.app-with-sidebar .app-shell-content {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
    }

    body.app-with-sidebar .app-shell-content > main {
        flex: 0 1 auto;
        width: 100%;
        min-width: 0;
    }

    body.app-with-sidebar .app-shell-content > footer {
        margin-top: auto;
        flex-shrink: 0;
    }

    /* Page scripts / dock after shell — must not consume layout height */
    body.app-with-sidebar > script {
        display: none !important;
    }

    body.app-with-sidebar > :not(#appSidebar):not(.app-shell-content):not(.app-body-portal) {
        grid-column: 2;
        grid-row: 1;
        height: 0;
        min-height: 0;
        overflow: visible;
        margin: 0;
        padding: 0;
        pointer-events: none;
    }

    body.app-with-sidebar > :not(#appSidebar):not(.app-shell-content):not(.app-body-portal) * {
        pointer-events: auto;
    }

    body.app-with-sidebar .app-shell-top {
        width: 100%;
        flex-shrink: 0;
    }

    .app-shell-content > script {
        display: none !important;
    }

    body.app-with-sidebar > .app-body-portal {
        grid-column: auto;
        grid-row: auto;
        height: auto;
        min-height: auto;
        width: auto;
        max-width: none;
    }

    body.app-with-sidebar #appTopbar {
        min-width: 0;
        width: 100%;
    }

    body.app-with-sidebar.sidebar-collapsed {
        --app-sidebar-width: 4.25rem;
    }

    body.app-with-sidebar.sidebar-hidden {
        --app-sidebar-width: 0px;
    }

    body.app-with-sidebar.sidebar-hidden #appSidebar {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-100%);
        border-right-width: 0;
    }

    body.app-with-sidebar.sidebar-hidden #sidebarOpenBtn {
        display: inline-flex !important;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-ws-text,
    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-ws-sub,
    body.app-with-sidebar.sidebar-collapsed #appSidebar .ws-switcher-chevron,
    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-nav-link > span,
    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-nav-group-label,
    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-settings-label,
    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-settings-chevron,
    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-leads-sub,
    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-leads-chevron {
        display: none !important;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-logo-row {
        padding-top: 0.75rem;
        padding-bottom: 0.25rem;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-brand-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-ws-btn {
        justify-content: center;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .ghl-ws-switcher > span:first-child {
        margin: 0 auto;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-collapse-row {
        justify-content: center;
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-nav-link {
        justify-content: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        gap: 0;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-nav-link.sidebar-nav-cta {
        font-size: 0;
        letter-spacing: 0;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-nav-link.sidebar-nav-cta svg {
        width: 1.125rem;
        height: 1.125rem;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-icon-collapse {
        display: none;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-icon-expand {
        display: block !important;
    }

    body.app-with-sidebar.sidebar-collapsed #appSidebar .sidebar-primary-nav {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }
}

/* GHL-inspired sidebar shell */
.ghl-sidebar {
    background: var(--ghl-sidebar-bg);
    border-right: 1px solid var(--ghl-sidebar-border);
}

.dark .ghl-sidebar {
    --ghl-sidebar-bg: #0f172a;
    --ghl-sidebar-border: rgba(255, 255, 255, 0.08);
    --ghl-sidebar-text: #cbd5e1;
    --ghl-sidebar-text-strong: #f8fafc;
    --ghl-sidebar-icon: #94a3b8;
    --ghl-sidebar-hover: rgba(255, 255, 255, 0.06);
    --ghl-sidebar-active: rgba(255, 255, 255, 0.08);
}

.ghl-ws-switcher {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.dark .ghl-ws-switcher {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.ghl-ws-switcher:hover {
    background: #eef0f3;
}

.dark .ghl-ws-switcher:hover {
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-nav-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    color: var(--ghl-sidebar-icon);
}

.sidebar-nav-link.active .sidebar-nav-icon,
.sidebar-nav-link:hover .sidebar-nav-icon {
    color: var(--ghl-sidebar-text-strong);
}

.dark .sidebar-nav-link.active .sidebar-nav-icon,
.dark .sidebar-nav-link:hover .sidebar-nav-icon {
    color: #f8fafc;
}

.sidebar-nav-link svg:not(.sidebar-nav-icon):not(.sidebar-leads-chevron):not(.sidebar-settings-chevron) {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    color: var(--ghl-sidebar-icon);
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ghl-sidebar-text);
    transition: background-color 0.12s ease, color 0.12s ease;
}

.sidebar-nav-group + .sidebar-nav-group {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.dark .sidebar-nav-group + .sidebar-nav-group {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.sidebar-nav-group-label {
    padding: 0 0.75rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-muted);
    opacity: 0.85;
}

.sidebar-nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.sidebar-nav-link:hover {
    background: var(--ghl-sidebar-hover);
    color: var(--ghl-sidebar-text-strong);
}

.sidebar-nav-link.active {
    background: var(--ghl-sidebar-active);
    color: var(--ghl-sidebar-text-strong);
    font-weight: 600;
}

.sidebar-nav-link.sidebar-nav-cta {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    background: var(--brand-yellow);
    color: #111827;
    font-weight: 800;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sidebar-nav-link.sidebar-nav-cta:hover {
    background: #facc15;
    color: #111827;
}

.sidebar-nav-link.sidebar-nav-cta.active {
    box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.45);
}

.sidebar-nav-link.sidebar-nav-sub {
    font-size: 0.8125rem;
    font-weight: 600;
    padding-left: 0.875rem;
}

.sidebar-leads-summary {
    border: none;
    background: transparent;
    font: inherit;
    text-align: left;
    width: 100%;
}

.sidebar-leads-sub .sidebar-nav-sub {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 500;
    padding-left: 2rem;
}

.sidebar-leads-sub {
    border-left: none;
}

.ws-nav-item-active {
    color: var(--brand-dark) !important;
}

.dark .ws-nav-item-active {
    color: #111827 !important;
}

.sidebar-settings-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

body.sidebar-settings-open .sidebar-settings-chevron {
    transform: rotate(180deg);
}

body.sidebar-settings-open .sidebar-settings-toggle {
    background: var(--ghl-sidebar-active);
    color: var(--ghl-sidebar-text-strong);
    font-weight: 600;
}

.dark body.sidebar-settings-open .sidebar-settings-toggle {
    color: #f8fafc;
}

@media (min-width: 768px) {
    body.app-with-sidebar.sidebar-collapsed .sidebar-settings-block {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }

    body.app-with-sidebar.sidebar-collapsed .sidebar-settings-toggle {
        justify-content: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    body.app-with-sidebar.sidebar-collapsed .sidebar-settings-menu:not(.hidden) {
        position: absolute;
        bottom: calc(100% + 0.25rem);
        left: 0.25rem;
        right: 0.25rem;
        min-width: 11.5rem;
        z-index: 130;
        margin-bottom: 0;
        padding: 0.375rem;
        border-radius: 0.75rem;
        border: 1px solid rgba(226, 232, 240, 0.8);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    }

    .dark body.app-with-sidebar.sidebar-collapsed .sidebar-settings-menu:not(.hidden) {
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(15, 23, 42, 0.98);
    }
}

/* Card Styles */
.brand-card {
    background: var(--brand-card-bg);
    border: 1px solid var(--brand-border);
    border-radius: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease, border-color 0.4s ease;
}

.brand-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* LMV outreach playbook (pipeline) */
.lmv-playbook__summary::-webkit-details-marker {
    display: none;
}

.lmv-playbook__summary:hover .lmv-playbook__chevron {
    border-color: rgba(255, 214, 68, 0.45);
    color: var(--brand-dark);
}

.lmv-method-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lmv-method-card:hover {
    border-color: rgba(255, 214, 68, 0.35);
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
}

.lmv-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
}

.lmv-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.lmv-icon--hot {
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.22);
    color: #e11d48;
}

.lmv-icon--warm {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
    color: #d97706;
}

.lmv-icon--cold {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.22);
    color: #0284c7;
}

.dark .lmv-icon--hot { color: #fb7185; }
.dark .lmv-icon--warm { color: #fbbf24; }
.dark .lmv-icon--cold { color: #38bdf8; }

.lmv-temp {
    display: inline-flex;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.lmv-temp--hot {
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.25);
    color: #be123c;
}

.lmv-temp--warm {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
    color: #b45309;
}

.lmv-temp--cold {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.22);
    color: #0369a1;
}

.dark .lmv-temp--hot { color: #fda4af; }
.dark .lmv-temp--warm { color: #fcd34d; }
.dark .lmv-temp--cold { color: #7dd3fc; }

.lmv-contact-hint {
    display: inline-flex;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(17, 24, 39, 0.12);
    background: rgba(255, 255, 255, 0.65);
    color: var(--brand-muted);
}

.dark .lmv-contact-hint {
    background: rgba(30, 41, 59, 0.65);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.lmv-method-btn {
    background: transparent;
    border-width: 1.5px;
    border-style: solid;
}

.lmv-method-btn--warm {
    color: var(--brand-dark);
    border-color: rgba(255, 214, 68, 0.85);
}

.lmv-method-btn--warm:hover {
    background: rgba(255, 214, 68, 0.12);
    border-color: var(--brand-yellow, #ffd644);
    box-shadow: 0 4px 14px rgba(253, 224, 71, 0.2);
}

.dark .lmv-method-btn--warm {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.5);
}

.dark .lmv-method-btn--warm:hover {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.75);
}

.lmv-method-btn--cold {
    color: var(--brand-dark);
    border-color: rgba(17, 24, 39, 0.22);
}

.lmv-method-btn--cold:hover {
    background: rgba(17, 24, 39, 0.04);
    border-color: rgba(17, 24, 39, 0.35);
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
}

.dark .lmv-method-btn--cold {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.18);
}

.dark .lmv-method-btn--cold:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.28);
}

.lmv-method-btn--cold:hover,
.lmv-method-card:hover .lmv-method-btn--cold {
  border-color: rgba(255, 214, 68, 0.45);
}

/* Arm's Reach scripts (sales/personas) */
.arms-reach-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
}

.arms-reach-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.arms-reach-icon--hot {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.22);
  color: #e11d48;
}

.arms-reach-icon--warm {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  color: #d97706;
}

.arms-reach-icon--cold {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.22);
  color: #0284c7;
}

.dark .arms-reach-icon--hot { color: #fb7185; }
.dark .arms-reach-icon--warm { color: #fbbf24; }
.dark .arms-reach-icon--cold { color: #38bdf8; }

.arms-reach-version:focus-within {
  border-color: rgba(255, 214, 68, 0.4);
  box-shadow: 0 0 0 2px rgba(255, 214, 68, 0.12);
}

.upwork-tab {
  margin-bottom: -1px;
}

.upwork-tab--active {
  color: var(--brand-dark);
  border-bottom-color: var(--brand-yellow, #ffd644) !important;
}

.dark .upwork-tab--active {
  color: #f8fafc;
}

.upwork-saved-item pre {
  display: none;
}

/* Detail panel slide-in */
.detail-panel {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease;
    background: var(--brand-card-bg);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
}

.detail-panel.open {
    transform: translateX(0);
}

/* Mobile Panel Animations & Sidebar */
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.animate-slide-up {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.lg\:animate-slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobilePanel {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 400;
}

#mobilePanel.open {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media (min-width: 1024px) {
    #mobilePanel.open {
        flex-direction: row;
        justify-content: flex-end;
        align-items: stretch;
    }
}

#mobilePanel > div {
    z-index: 101;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease;
    background-color: var(--brand-card-bg) !important;
}

/* Sidebar behavior on Desktop */
@media (min-width: 1024px) {
    #mobilePanel > div {
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        border-top-left-radius: 3rem !important;
        border-bottom-left-radius: 3rem !important;
    }
}

/* Table row selection & clickability */
.result-row {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 1rem;
}

table {
    border-collapse: separate;
    border-spacing: 0 4px;
}

.result-row:hover {
    background-color: var(--brand-cream) !important;
    transform: scale(1.002);
}

/* Bulk checkbox selection (search results, pipeline, inbound) */
.result-row.bulk-selected {
    background-color: rgba(253, 224, 71, 0.14) !important;
    box-shadow: inset 4px 0 0 var(--brand-yellow);
}

.result-row.bulk-selected > td {
    background-color: rgba(253, 224, 71, 0.14) !important;
}

.result-row.bulk-selected:hover {
    background-color: rgba(253, 224, 71, 0.22) !important;
}

.result-row.bulk-selected:hover > td {
    background-color: rgba(253, 224, 71, 0.22) !important;
}

tbody.bulk-select-all-active .result-row.bulk-selected,
table.bulk-select-all-active .result-row.bulk-selected {
    background-color: rgba(253, 224, 71, 0.1) !important;
}

html.dark .result-row.bulk-selected {
    background-color: rgba(253, 224, 71, 0.12) !important;
}

html.dark .result-row.bulk-selected > td {
    background-color: rgba(253, 224, 71, 0.12) !important;
}

html.dark tbody.bulk-select-all-active .result-row.bulk-selected,
html.dark table.bulk-select-all-active .result-row.bulk-selected {
    background-color: rgba(253, 224, 71, 0.08) !important;
}

.result-row.selected {
    background-color: var(--brand-cream) !important;
    position: relative;
}

.result-row.selected.bulk-selected {
    box-shadow: inset 4px 0 0 var(--brand-yellow);
}

.result-row.selected::after {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 4px;
    background: var(--brand-yellow);
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 0 10px rgba(253, 224, 71, 0.4);
}

.max-wide {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 640px) {
    main.max-wide,
    footer.max-wide {
        padding-left: max(0.75rem, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(0.75rem, env(safe-area-inset-right, 0px)) !important;
    }
}

.line-height-1 {
    line-height: 1;
}

/* Feature Section Styles */
.feature-icon-container {
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.25rem;
    margin-bottom: 2rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-card:hover .feature-icon-container {
    transform: scale(1.1) rotate(-5deg);
}

.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Custom scrollbar for sidebar */
#mobilePanel > div::-webkit-scrollbar {
    width: 6px;
}
#mobilePanel > div::-webkit-scrollbar-track {
    background: transparent;
}
#mobilePanel > div::-webkit-scrollbar-thumb {
    background: var(--brand-border);
    border-radius: 10px;
}
#mobilePanel > div::-webkit-scrollbar-thumb:hover {
    background: var(--brand-muted);
}

/* Bulk Selection Styles & Animations */
@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2) rotate(15deg); }
}
.animate-sparkle {
  animation: sparkle 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes magic {
  0% { filter: drop-shadow(0 0 5px rgba(253, 224, 71, 0.4)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 20px rgba(253, 224, 71, 0.8)); transform: scale(1.02); }
  100% { filter: drop-shadow(0 0 5px rgba(253, 224, 71, 0.4)); transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-magic {
  animation: magic 2s ease-in-out infinite, pulse-soft 2s ease-in-out infinite;
}

.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 214, 68, 0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

.js-bulk-enhance.loading {
    position: relative;
    overflow: hidden;
}

.js-bulk-enhance.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

.js-bulk-verify-phones.loading,
.js-bulk-reviews.loading {
    position: relative;
    overflow: hidden;
    opacity: 1;
    pointer-events: none;
    border-color: rgba(125, 211, 252, 0.55);
}

.js-bulk-verify-phones.loading::after,
.js-bulk-reviews.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.18), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

#deepEnhanceBtn.loading,
#pageSpeedAuditRunBtn.audit-active {
    position: relative;
    overflow: hidden;
}

@keyframes hunt-ring {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.45), 0 0 18px rgba(253, 224, 71, 0.12);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(253, 224, 71, 0.35), 0 0 28px rgba(253, 224, 71, 0.22);
  }
}

@keyframes btn-action-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(253, 224, 71, 0.35);
  }
  50% {
    transform: scale(1.018);
    box-shadow: 0 0 0 4px rgba(253, 224, 71, 0.2);
  }
}

#deepEnhanceBtn.hunt-active,
#deepEnhanceBtn[data-hunt-state="active"] {
  animation: btn-action-pulse 0.95s ease-in-out infinite, hunt-ring 1.1s ease-in-out infinite;
  border-color: rgba(253, 224, 71, 0.9) !important;
  background: linear-gradient(180deg, rgba(253, 224, 71, 0.22) 0%, rgba(255, 255, 255, 1) 52%);
  opacity: 1 !important;
}

.dark #deepEnhanceBtn[data-hunt-state="active"] {
  background: linear-gradient(180deg, rgba(253, 224, 71, 0.18) 0%, rgb(30 41 59) 52%);
}

#deepEnhanceBtn[data-hunt-state="done"] {
  border-color: rgba(16, 185, 129, 0.45) !important;
  background: rgba(16, 185, 129, 0.08);
  animation: none;
}

#deepEnhanceBtn[data-hunt-state="active"] .deep-enhance-main,
#deepEnhanceBtn[data-hunt-state="active"] .deep-enhance-idle {
  display: flex !important;
}

#deepEnhanceBtn[data-hunt-state="active"] .deep-enhance-progress-row {
  display: block !important;
}

#deepEnhanceBtn[data-hunt-state="done"] .deep-enhance-main,
#deepEnhanceBtn[data-hunt-state="done"] .deep-enhance-idle,
#deepEnhanceBtn[data-hunt-state="idle"] .deep-enhance-progress-row,
#deepEnhanceBtn[data-hunt-state="done"] .deep-enhance-progress-row {
  display: none !important;
}

#deepEnhanceBtn[data-hunt-state="done"] .deep-enhance-done:not(.hidden) {
  display: flex !important;
}

#deepEnhanceBtn[data-hunt-state="active"] .deep-enhance-done,
#deepEnhanceBtn[data-hunt-state="idle"] .deep-enhance-done {
  display: none !important;
}

#rapidapiWebsiteEnrichBtn[data-enrich-state="active"] .rapidapi-enrich-idle,
#rapidapiWebsiteEnrichBtn[data-enrich-state="active"] .rapidapi-enrich-done,
#rapidapiWebsiteEnrichBtn[data-enrich-state="done"] .rapidapi-enrich-idle,
#rapidapiWebsiteEnrichBtn[data-enrich-state="done"] .rapidapi-enrich-active,
#rapidapiWebsiteEnrichBtn[data-enrich-state="idle"] .rapidapi-enrich-active,
#rapidapiWebsiteEnrichBtn[data-enrich-state="idle"] .rapidapi-enrich-done {
  display: none !important;
}

#rapidapiWebsiteEnrichBtn[data-enrich-state="active"] .rapidapi-enrich-active,
#rapidapiWebsiteEnrichBtn[data-enrich-state="done"] .rapidapi-enrich-done {
  display: flex !important;
}

#rapidapiWebsiteEnrichBtn[data-enrich-state="active"] .rapidapi-enrich-progress-row {
  display: block !important;
}

#rapidapiWebsiteEnrichBtn[data-enrich-state="idle"] .rapidapi-enrich-progress-row,
#rapidapiWebsiteEnrichBtn[data-enrich-state="done"] .rapidapi-enrich-progress-row {
  display: none !important;
}

#rapidapiWebsiteEnrichBtn[data-enrich-state="active"] {
  border-color: rgba(234, 179, 8, 0.65) !important;
  animation: btn-action-pulse 0.95s ease-in-out infinite, hunt-ring 1.1s ease-in-out infinite;
}

#rapidapiWebsiteEnrichBtn[data-enrich-state="done"] {
  border-color: rgba(16, 185, 129, 0.45) !important;
  background: rgba(16, 185, 129, 0.08);
  animation: none;
}

/* Website audit button — same active/loading pattern as hunt */
#pageSpeedAuditRunBtn.audit-active,
#pageSpeedAuditRunBtn[data-audit-state="active"] {
  animation: btn-action-pulse 0.95s ease-in-out infinite, hunt-ring 1.1s ease-in-out infinite;
  border-color: rgba(253, 224, 71, 0.9) !important;
  background: linear-gradient(180deg, rgba(253, 224, 71, 0.22) 0%, rgba(255, 255, 255, 1) 52%);
  opacity: 1 !important;
}

.dark #pageSpeedAuditRunBtn[data-audit-state="active"] {
  background: linear-gradient(180deg, rgba(253, 224, 71, 0.18) 0%, rgb(30 41 59) 52%);
}

#pageSpeedAuditRunBtn[data-audit-state="active"] .page-speed-audit-main,
#pageSpeedAuditRunBtn[data-audit-state="active"] .page-speed-audit-idle {
  display: flex !important;
}

#pageSpeedAuditRunBtn[data-audit-state="active"] .page-speed-audit-progress-row {
  display: block !important;
}

#pageSpeedAuditRunBtn[data-audit-state="idle"] .page-speed-audit-progress-row {
  display: none !important;
}

.deep-enhance-progress-fill,
.page-speed-audit-progress-fill {
  min-width: 6%;
  transition: width 0.45s ease-out;
}

#reviewIntelGrid.review-intel-loading {
  opacity: 0.45;
  pointer-events: none;
}

@keyframes hunt-progress-slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}

.hunt-progress-indeterminate {
  animation: hunt-progress-slide 1.4s ease-in-out infinite;
}

.lead-run-progress-shimmer {
  animation: hunt-progress-slide 1.6s ease-in-out infinite;
}

/* Floating bulk bar — Apple-style frosted glass */
#bulkActionBar.bulk-action-bar--visible,
#dmBulkActionBar.bulk-action-bar--visible,
#bulkActionBar[data-visible='true'],
#dmBulkActionBar[data-visible='true'] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
  pointer-events: auto !important;
}

/* Nested controls (Move, + Folder, Call room) must stay clickable inside portaled bar */
#bulkActionBar.bulk-action-bar--visible *,
#bulkActionBar[data-visible='true'] *,
#dmBulkActionBar.bulk-action-bar--visible *,
#dmBulkActionBar[data-visible='true'] * {
  pointer-events: auto;
}

#bulkFolderNewRow:not(.hidden),
#bulkTagsRow:not(.hidden),
#dmBulkTagsRow:not(.hidden) {
  display: flex !important;
}

#bulkActionBar input.bulk-tag-color-input,
#bulkActionBar input[type="color"].bulk-tag-color-input {
  width: 2rem;
  height: 2rem;
  padding: 0.125rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  pointer-events: auto;
}

#bulkActionBar input.bulk-tag-color-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#focusLeadTagsSection input.focus-tag-color-input,
#focusLeadTagsSection input[type="color"].focus-tag-color-input {
  width: 2rem;
  height: 2rem;
  padding: 0.125rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  pointer-events: auto;
}

.dark #focusLeadTagsSection input.focus-tag-color-input,
.dark #focusLeadTagsSection input[type="color"].focus-tag-color-input {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.85);
}

.tags-manage-color {
  padding: 0.125rem;
  cursor: pointer;
  pointer-events: auto;
}

#bulkActionBar .bulk-bar-expand-row:not(.hidden) {
  animation: bulk-bar-expand-in 0.18s ease-out;
}

#bulkActionBar,
#dmBulkActionBar {
  z-index: 280;
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  width: min(calc(100vw - 1rem), 56rem);
  max-width: min(calc(100vw - 1rem), 56rem);
  height: auto;
  pointer-events: auto;
  background: rgba(32, 32, 36, 0.55) !important;
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.16) !important;
}

/* Compact bulk action bar controls */
#bulkActionBar .bulk-bar-btn,
#dmBulkActionBar .bulk-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease;
}

#bulkActionBar .bulk-bar-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#bulkActionBar .bulk-bar-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
}

#bulkActionBar .bulk-bar-btn--ghost.text-brand-yellow {
  color: var(--brand-yellow, #eab308) !important;
  border-color: rgba(234, 179, 8, 0.35);
  background: rgba(234, 179, 8, 0.1);
}

#bulkActionBar .bulk-bar-btn--ghost.text-sky-300 {
  color: #7dd3fc !important;
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(56, 189, 248, 0.1);
}

#bulkActionBar .bulk-bar-btn--ghost.text-violet-300 {
  color: #c4b5fd !important;
  border-color: rgba(196, 181, 253, 0.35);
  background: rgba(139, 92, 246, 0.12);
}

#bulkActionBar #bulkBookmarkBtn.bulk-bookmark-btn--saved {
  color: var(--brand-dark, #0f172a) !important;
  border-color: rgba(234, 179, 8, 0.7);
  background: var(--brand-yellow, #eab308);
}

#bulkActionBar #bulkBookmarkBtn.bulk-bookmark-btn--saved svg {
  fill: currentColor;
  color: var(--brand-dark, #0f172a);
}

#bulkActionBar .bulk-bar-btn--ghost.text-brand-yellow:hover:not(:disabled),
#bulkActionBar .bulk-bar-btn--ghost.text-sky-300:hover:not(:disabled),
#bulkActionBar .bulk-bar-btn--ghost.text-violet-300:hover:not(:disabled) {
  filter: brightness(1.08);
}

#bulkActionBar .bulk-bar-btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

#bulkActionBar .bulk-bar-btn--accent {
  background: var(--brand-yellow, #eab308);
  color: var(--brand-dark, #0f172a);
  border-color: rgba(234, 179, 8, 0.5);
}

#bulkActionBar .bulk-bar-btn--board {
  background: rgba(16, 185, 129, 0.88);
  color: #fff;
  border-color: rgba(52, 211, 153, 0.55);
}

#bulkActionBar .bulk-bar-btn--board:hover:not(:disabled) {
  filter: brightness(1.06);
}

#bulkActionBar .bulk-bar-btn--save {
  background: #059669;
  color: #fff;
  border-color: rgba(16, 185, 129, 0.45);
}

#bulkActionBar .bulk-bar-btn--primary-lg {
  padding: 0.65rem 1.35rem;
  min-height: 2.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  border-radius: 0.625rem;
  font-weight: 900;
  border-width: 1.5px;
}

#bulkActionBar .bulk-bar-btn--call.bulk-bar-btn--primary-lg {
  background: rgba(225, 29, 72, 0.88);
  border-color: rgba(251, 113, 133, 0.65);
  color: #fff;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.35);
}

#bulkActionBar .bulk-bar-btn--call.bulk-bar-btn--primary-lg:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.95);
  filter: brightness(1.05);
}

#bulkActionBar .bulk-bar-btn--focus.bulk-bar-btn--primary-lg {
  background: var(--brand-yellow, #eab308);
  border-color: rgba(252, 211, 77, 0.85);
  color: var(--brand-dark, #0f172a);
  box-shadow: 0 2px 10px rgba(234, 179, 8, 0.35);
}

#bulkActionBar .bulk-bar-btn--focus.bulk-bar-btn--primary-lg:hover:not(:disabled) {
  filter: brightness(1.06);
}

#bulkActionBar .bulk-bar-btn--mail.bulk-bar-btn--primary-lg {
  background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%);
  border-color: rgba(167, 139, 250, 0.85);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}

#bulkActionBar .bulk-bar-btn--mail.bulk-bar-btn--primary-lg:hover:not(:disabled) {
  background: linear-gradient(180deg, #c4b5fd 0%, #8b5cf6 100%);
  filter: brightness(1.04);
}

#bulkActionBar .bulk-bar-btn--email.bulk-bar-btn--primary-lg {
  background: #0ea5e9;
  border-color: rgba(56, 189, 248, 0.85);
  color: #fff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
}

#bulkActionBar .bulk-bar-btn--email.bulk-bar-btn--primary-lg:hover:not(:disabled) {
  filter: brightness(1.06);
}

#bulkActionBar .bulk-bar-btn--sms.bulk-bar-btn--primary-lg {
  background: #10b981;
  border-color: rgba(52, 211, 153, 0.85);
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

#bulkActionBar .bulk-bar-btn--sms.bulk-bar-btn--primary-lg:hover:not(:disabled) {
  filter: brightness(1.06);
}

#bulkActionBar .bulk-bar-btn--ghl {
  background: rgba(234, 88, 12, 0.28);
  border-color: rgba(251, 146, 60, 0.5);
  color: #ffedd5;
}

#bulkActionBar .bulk-bar-btn--ghl:hover:not(:disabled) {
  filter: brightness(1.08);
  background: rgba(234, 88, 12, 0.4);
}

#bulkActionBar .bulk-bar-btn--ghl.bulk-bar-btn--primary-lg {
  background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
  border-color: rgba(251, 146, 60, 0.55);
  color: #fff;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.28);
}

#bulkActionBar .bulk-bar-btn--ghl.bulk-bar-btn--primary-lg:hover:not(:disabled) {
  filter: brightness(1.06);
}

#bulkActionBar .bulk-bar-btn--subaccount {
  background: rgba(8, 145, 178, 0.28);
  border-color: rgba(34, 211, 238, 0.5);
  color: #a5f3fc;
}

#bulkActionBar .bulk-bar-btn--subaccount:hover:not(:disabled) {
  filter: brightness(1.08);
  background: rgba(8, 145, 178, 0.4);
}

#bulkActionBar .bulk-bar-btn--mail {
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(167, 139, 250, 0.45);
  color: #ede9fe;
  text-decoration: none;
}

#bulkActionBar .bulk-bar-btn--email {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #e0f2fe;
  text-decoration: none;
}

#bulkActionBar .bulk-bar-btn--call {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(251, 113, 133, 0.35);
  color: #ffe4e6;
}

#bulkActionBar .bulk-bar-btn--focus {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fef3c7;
  text-decoration: none;
}

/* Native folder/tag pickers on the frosted bar — light popup + dark text (white-on-white was invisible) */
#bulkActionBar .bulk-bar-select,
#dmBulkActionBar .bulk-bar-select {
  color-scheme: light;
}

#bulkActionBar .bulk-bar-select option,
#dmBulkActionBar .bulk-bar-select option {
  background-color: #ffffff;
  color: #0f172a;
}

#bulkActionBar .bulk-bar-folder-strip {
  flex: 0 1 auto;
}

#bulkActionBar .bulk-bar-tools-row {
  flex-shrink: 0;
  padding-top: 0.35rem;
  margin-top: 0.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#bulkActionBar .bulk-bar-tools-row::-webkit-scrollbar {
  display: none;
}

#bulkActionBar .bulk-bar-primary-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
  padding-top: 0.4rem;
  margin-top: 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#bulkActionBar .bulk-bar-primary-split {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.8rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

#bulkActionBar .bulk-bar-btn--ghl.is-busy,
#bulkActionBar .bulk-bar-btn--ghl[aria-busy='true'],
#bulkActionBar .bulk-bar-btn--subaccount.is-busy,
#bulkActionBar .bulk-bar-btn--subaccount[aria-busy='true'] {
  cursor: wait;
  opacity: 0.92;
  animation: bulk-ghl-push-pulse 1.1s ease-in-out infinite;
}

@keyframes bulk-ghl-push-pulse {
  0%,
  100% {
    filter: brightness(1);
    box-shadow: 0 2px 10px rgba(234, 88, 12, 0.28);
  }
  50% {
    filter: brightness(1.14);
    box-shadow: 0 2px 16px rgba(234, 88, 12, 0.45);
  }
}

#focus-btn-push-ghl.is-busy,
#focus-btn-push-ghl[aria-busy='true'] {
  cursor: wait;
  animation: bulk-ghl-push-pulse 1.1s ease-in-out infinite;
}

#bulkActionBar .bulk-bar-main,
#bulkActionBar .bulk-bar-expand-row:not(.hidden) {
  align-items: center;
}

#bulkActionBar .bulk-bar-secondary-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

@media (max-width: 639px) {
  #bulkActionBar .bulk-bar-primary-row {
    gap: 0.4rem;
  }

  #bulkActionBar .bulk-bar-primary-split {
    min-height: 2.65rem;
    padding: 0.7rem 0.65rem;
    font-size: 0.6875rem;
  }
}

.dark #bulkActionBar {
  background: rgba(22, 22, 26, 0.62) !important;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* In-app toasts — solid contrast on cream (do not rely on Tailwind JS className) */
#appToast.app-toast,
#appToast {
  position: fixed !important;
  left: 50% !important;
  top: 4.5rem !important;
  z-index: 520 !important;
  max-width: min(92vw, 26rem);
  width: max-content;
  padding: 0.875rem 1.25rem;
  border-radius: 1rem;
  border-width: 1px;
  border-style: solid;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.375;
  text-align: center;
  white-space: pre-line;
  pointer-events: none;
  transform: translateX(-50%) translateY(0.5rem);
  opacity: 0;
  transition:
    opacity 0.2s ease-out,
    transform 0.2s ease-out;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
#appToast.app-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#appToast.app-toast--enter {
  opacity: 0;
  transform: translateX(-50%) translateY(0.5rem);
}
#appToast.app-toast--dismissible {
  pointer-events: auto;
  cursor: pointer;
}
#appToast.app-toast--error {
  background: #fff1f2 !important;
  color: #9f1239 !important;
  border-color: #fb7185 !important;
  box-shadow: 0 10px 28px rgba(159, 18, 57, 0.16);
}
#appToast.app-toast--warning {
  background: #fffbeb !important;
  color: #92400e !important;
  border-color: #fbbf24 !important;
}
#appToast.app-toast--success {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border-color: #34d399 !important;
}
#appToast.app-toast--info {
  background: #111827 !important;
  color: #ffffff !important;
  border-color: rgba(234, 179, 8, 0.55) !important;
}
.dark #appToast.app-toast--error {
  background: #4c0519 !important;
  color: #fecdd3 !important;
  border-color: #fb7185 !important;
}
.dark #appToast.app-toast--warning {
  background: #451a03 !important;
  color: #fde68a !important;
  border-color: #f59e0b !important;
}
.dark #appToast.app-toast--success {
  background: #064e3b !important;
  color: #a7f3d0 !important;
  border-color: #34d399 !important;
}
.dark #appToast.app-toast--info {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-color: rgba(234, 179, 8, 0.55) !important;
}

#prospectToast {
  position: fixed !important;
  left: 50% !important;
  z-index: 520 !important;
  max-width: min(90vw, 20rem);
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(234, 179, 8, 0.5);
  background: #111827 !important;
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
  transition:
    opacity 0.2s ease-out,
    transform 0.2s ease-out;
}
.dark #prospectToast {
  background: #0f172a !important;
  color: #f8fafc !important;
}

#bulkSaveFeedback:not(.hidden) {
  animation: bulk-save-feedback-in 0.25s ease-out;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
}
#bulkSaveFeedback.text-rose-300,
#bulkSaveFeedback.app-bulk-feedback--error {
  color: #fecdd3 !important;
  background: rgba(127, 29, 29, 0.55);
}
#bulkSaveFeedback.text-emerald-300,
#bulkSaveFeedback.app-bulk-feedback--success {
  color: #a7f3d0 !important;
}
#bulkSaveFeedback.text-white\/80,
#bulkSaveFeedback.app-bulk-feedback--loading {
  color: rgba(255, 255, 255, 0.9) !important;
}

@keyframes bulk-save-feedback-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bulk-bar-expand-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bulk-save-btn.bulk-save-btn--success {
  background: #059669 !important;
  box-shadow: 0 0 0 2px rgba(110, 231, 183, 0.45);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #bulkActionBar {
    background: rgba(15, 23, 42, 0.94) !important;
  }
  .dark #bulkActionBar {
    background: rgba(15, 15, 18, 0.94) !important;
  }
}

/* Kanban: empty column drop hint + card hover lift */
.kanban-drop-zone:empty::after {
  content: 'Drag a lead here from another column to move its stage.';
  display: block;
  margin-top: auto;
  margin-bottom: auto;
  padding: 0.85rem 0.65rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--brand-muted);
  border-radius: 1.15rem;
  background: rgba(253, 214, 68, 0.14);
  border: 1px dashed var(--brand-border);
}

.dark .kanban-drop-zone:empty::after {
  background: rgba(253, 214, 68, 0.09);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.kanban-card--lift {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kanban-card--lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -10px rgba(0, 0, 0, 0.2);
}

.kanban-card-contact .kanban-card-socials .inline-flex.w-8 {
  width: 1.65rem;
  height: 1.65rem;
}

.kanban-card-contact .kanban-card-socials svg {
  width: 0.85rem;
  height: 0.85rem;
}

.dark .kanban-card--lift:hover {
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.55);
}

/* Task board cards — wrap long URLs/text inside the card */
.ceo-task-card,
.task-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.ceo-task-card > p,
.task-card > p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Prospecting: sortable column headers */
.prospect-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  text-align: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0.15rem 0.1rem;
  margin: -0.15rem -0.1rem;
  border: 0;
  background: transparent;
  border-radius: 0.35rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.prospect-sort-btn:hover {
  color: var(--brand-dark, #111827);
  background: rgba(253, 214, 68, 0.12);
}

.dark .prospect-sort-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.prospect-sort-btn--right {
  width: 100%;
  justify-content: flex-end;
}

.prospect-sort-indicator {
  font-size: 0.65em;
  opacity: 0.35;
  line-height: 1;
  font-weight: 900;
}

.prospect-sort-btn.prospect-sort-btn--active .prospect-sort-indicator {
  opacity: 1;
  color: var(--brand-yellow, #e8bc1a);
}

#prospectLeadsTable thead th[data-plc]:not([data-plc='check']) {
  cursor: pointer;
}

#prospectLeadsTable thead th[data-plc] .plc-col-resize {
  cursor: col-resize;
}

.prospect-leads-table tr.result-row {
  cursor: pointer;
}

#prospectLeadsTable td[data-plc="company"],
#prospectLeadsTable td[data-plc="company"] .lead-company-inline {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

/* Sticky checkbox cell paints above company (z-index 35 vs 34) and can cover the
   bookmark on the column seam. Let clicks pass through the empty cell. */
.prospect-leads-table td.lead-sticky-check {
  pointer-events: none;
}
.prospect-leads-table td.lead-sticky-check .lead-checkbox,
.prospect-leads-table td.lead-sticky-check button,
.prospect-leads-table td.lead-sticky-check a,
.prospect-leads-table th.lead-sticky-check .prospect-bookmark-top-btn {
  pointer-events: auto;
}

#prospectLeadsTable .pipeline-bookmark-btn {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 40;
  pointer-events: auto !important;
}

#prospectLeadsTable .pipeline-bookmark-btn:hover:not(.bookmark-btn--saved):not([data-saved='1']) {
  background-color: var(--brand-yellow);
  border-color: var(--brand-yellow);
  color: #111827;
}

.bookmark-btn[data-saved='1'],
.bookmark-btn.bookmark-btn--saved,
#prospectLeadsTable .pipeline-bookmark-btn.bookmark-btn--saved,
#prospectLeadsTable .pipeline-bookmark-btn[data-saved='1'],
#prospectLeadsTable .pipeline-bookmark-btn.bookmark-btn--saved:hover,
#prospectLeadsTable .pipeline-bookmark-btn[data-saved='1']:hover {
  background-color: var(--brand-yellow) !important;
  color: #111827 !important;
  border-color: var(--brand-yellow) !important;
}

.bookmark-btn[data-saved='1'] svg,
.bookmark-btn.bookmark-btn--saved svg,
#prospectLeadsTable .pipeline-bookmark-btn.bookmark-btn--saved svg,
#prospectLeadsTable .pipeline-bookmark-btn[data-saved='1'] svg {
  fill: currentColor !important;
}

a.website-link.website-link--holding {
  color: var(--brand-yellow, #f5c518) !important;
  border-bottom-color: rgb(245 197 24 / 0.45) !important;
}

#websitePreview {
  z-index: 10050;
}

.lead-category-input--suspect {
  border-color: rgb(251 191 36 / 0.75) !important;
  background: rgb(254 243 199 / 0.35);
}
.dark .lead-category-input--suspect {
  background: rgb(120 53 15 / 0.25);
  border-color: rgb(251 191 36 / 0.55) !important;
}

/* Prospecting pipeline table: sticky header + checkbox/company, row hover actions */
.prospect-leads-table thead th {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--brand-card-bg);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.08);
}

.dark .prospect-leads-table thead th {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Horizontal scroll: checkbox + company stay fixed; --plc-check-sticky-w set by JS to match real column width */
.prospect-leads-table th.lead-sticky-check,
.prospect-leads-table td.lead-sticky-check {
  position: sticky;
  left: 0;
  z-index: 35;
  box-shadow: 1px 0 0 rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 252, 245, 0.82) !important;
}

.prospect-leads-table th.lead-sticky-company,
.prospect-leads-table td.lead-sticky-company {
  position: sticky;
  left: var(--plc-check-sticky-w, 5.25rem);
  z-index: 34;
  box-shadow: 1px 0 0 rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 252, 245, 0.82) !important;
}

.dark .prospect-leads-table th.lead-sticky-check,
.dark .prospect-leads-table td.lead-sticky-check,
.dark .prospect-leads-table th.lead-sticky-company,
.dark .prospect-leads-table td.lead-sticky-company {
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.07);
  background: rgba(15, 23, 42, 0.78) !important;
}

.prospect-leads-table tbody tr:nth-child(odd) td.lead-sticky-check,
.prospect-leads-table tbody tr:nth-child(odd) td.lead-sticky-company {
  background: rgba(250, 247, 237, 0.45) !important;
}

.prospect-leads-table tbody tr:nth-child(even) td.lead-sticky-check,
.prospect-leads-table tbody tr:nth-child(even) td.lead-sticky-company {
  background: var(--brand-card-bg) !important;
}

.dark .prospect-leads-table tbody tr:nth-child(odd) td.lead-sticky-check,
.dark .prospect-leads-table tbody tr:nth-child(odd) td.lead-sticky-company {
  background: rgba(30, 41, 59, 0.55) !important;
}

.dark .prospect-leads-table tbody tr:nth-child(even) td.lead-sticky-check,
.dark .prospect-leads-table tbody tr:nth-child(even) td.lead-sticky-company {
  background: var(--brand-card-bg) !important;
}

.prospect-leads-table thead th.lead-sticky-check {
  z-index: 45;
  position: sticky;
  left: 0;
}

.prospect-leads-table thead th.lead-sticky-company {
  z-index: 44;
  position: sticky;
  left: var(--plc-check-sticky-w, 5.25rem);
}

.prospect-leads-table thead th.lead-sticky-check,
.prospect-leads-table thead th.lead-sticky-company {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 1px 0 0 rgba(17, 24, 39, 0.06);
  background: var(--brand-card-bg) !important;
}

.dark .prospect-leads-table thead th.lead-sticky-check,
.dark .prospect-leads-table thead th.lead-sticky-company {
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.07);
  background: var(--brand-card-bg) !important;
}

/* Pipeline "Columns" menu — portaled fixed dropdown (above sticky table header) */
.js-pipeline-columns-wrap {
  position: relative;
  z-index: 20;
}

.js-pipeline-columns-wrap--open {
  z-index: 10051;
}

.pipeline-columns-popover,
#pipelineColumnsPopover {
  z-index: 10050 !important;
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: var(--brand-dark);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: isolate;
  opacity: 1 !important;
  position: fixed;
  box-shadow:
    0 20px 40px -12px rgba(17, 24, 39, 0.18),
    0 8px 16px -8px rgba(17, 24, 39, 0.1);
}

.pipeline-columns-popover__header {
  background-color: var(--brand-cream, #faf7ed) !important;
}

.pipeline-columns-popover__body {
  background-color: inherit;
}

.dark .pipeline-columns-popover__header,
html.dark .pipeline-columns-popover__header {
  background-color: #1e293b !important;
}

#pipelineColumnsCheckboxes label {
  padding: 0.15rem 0;
}

#pipelineColumnsCheckboxes {
  background-color: inherit;
  padding-right: 0.25rem;
}

.dark .pipeline-columns-popover,
.dark #pipelineColumnsPopover,
html.dark .pipeline-columns-popover,
html.dark #pipelineColumnsPopover {
  background-color: #0f172a !important;
  background: #0f172a !important;
  color: #f8fafc;
  box-shadow:
    0 20px 40px -12px rgba(0, 0, 0, 0.55),
    0 8px 16px -8px rgba(0, 0, 0, 0.35);
}

/* Modals opened from lead panel (panel is z-index 400) */
.email-intel-modal {
  z-index: 500 !important;
}

#smsScriptModal {
  z-index: 520 !important;
  pointer-events: auto !important;
}

#smsScriptModal:not(.hidden) {
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
}

#leadPanelOutreachFeedback.lead-panel-outreach-feedback--info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.35);
  color: #1e40af;
}

.dark #leadPanelOutreachFeedback.lead-panel-outreach-feedback--info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(96, 165, 250, 0.35);
  color: #bfdbfe;
}

#leadPanelOutreachFeedback.lead-panel-outreach-feedback--success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #047857;
}

.dark #leadPanelOutreachFeedback.lead-panel-outreach-feedback--success {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

#leadPanelOutreachFeedback.lead-panel-outreach-feedback--error {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.35);
  color: #be123c;
}

.dark #leadPanelOutreachFeedback.lead-panel-outreach-feedback--error {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(251, 113, 133, 0.35);
  color: #fecdd3;
}

#leadPanelOutreachDrawer [aria-disabled='true'] {
  pointer-events: auto;
}

#prospectLeadsTable {
  border-collapse: separate !important;
}

/* Checkbox + bookmark sit in the sticky check column. */
.prospect-leads-table th.lead-sticky-check,
.prospect-leads-table td.lead-sticky-check {
  width: 5.25rem;
  min-width: 5.25rem;
  max-width: 5.25rem;
  box-sizing: border-box;
}

.prospect-leads-table tbody tr:nth-child(odd) td {
  background-color: rgba(250, 247, 237, 0.45);
}

.prospect-leads-table tbody tr:nth-child(even) td {
  background-color: var(--brand-card-bg);
}

.dark .prospect-leads-table tbody tr:nth-child(odd) td {
  background-color: rgba(30, 41, 59, 0.55);
}

.dark .prospect-leads-table tbody tr:nth-child(even) td {
  background-color: var(--brand-card-bg);
}

.prospect-leads-table--comfortable tbody td {
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
}

html[data-prospect-density="comfortable"] #prospectLeadsTable tbody td {
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
}

.prospect-leads-table--comfortable thead th {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

html[data-prospect-density="comfortable"] #prospectLeadsTable thead th {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.prospect-leads-table--compact tbody td {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.prospect-leads-table--compact thead th {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Split Phone / Email / Domain columns: rows stay single-line via inline flex in template */
.prospect-leads-table--compact .lead-company-inline {
  min-height: 2.6rem;
}

.prospect-leads-table--comfortable .lead-company-inline {
  min-height: 3rem;
}

html[data-prospect-density="comfortable"] #prospectLeadsTable .lead-company-inline {
  min-height: 3rem;
}

.prospect-leads-table .lead-row-address {
  max-width: 100%;
  white-space: normal;
}

.prospect-leads-table--compact .lead-row-address--detail {
  display: none;
}

.prospect-leads-table--comfortable .lead-row-address--compact {
  display: none;
}

html[data-prospect-density="comfortable"] #prospectLeadsTable .lead-row-address--compact {
  display: none;
}

.prospect-leads-table--comfortable .lead-row-address--detail,
html[data-prospect-density="comfortable"] #prospectLeadsTable .lead-row-address--detail {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.prospect-leads-table--comfortable .lead-col-contact-split {
  display: none;
}

html[data-prospect-density="comfortable"] #prospectLeadsTable .lead-col-contact-split {
  display: none;
}

.prospect-leads-table--compact .lead-col-contact-split {
  display: none;
}

html[data-prospect-density="compact"] #prospectLeadsTable .lead-col-contact-split {
  display: none;
}

/* Socials column — hide empty dash placeholder from renderLinks */
.prospect-leads-table .lead-cell-socials-content .text-brand-muted\/60 {
  display: none;
}

.prospect-leads-table th[data-plc="socials"],
.prospect-leads-table td[data-plc="socials"] {
  min-width: 5.5rem;
}

.prospect-leads-table--comfortable th[data-plc="socials"],
.prospect-leads-table--comfortable td[data-plc="socials"] {
  min-width: 7.5rem;
}

html[data-prospect-density="comfortable"] #prospectLeadsTable th[data-plc="socials"],
html[data-prospect-density="comfortable"] #prospectLeadsTable td[data-plc="socials"] {
  min-width: 7.5rem;
}

.prospect-leads-table--comfortable .lead-cell-socials-content {
  display: inline-flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

html[data-prospect-density="comfortable"] #prospectLeadsTable .lead-cell-socials-content {
  display: inline-flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.prospect-leads-table--comfortable .lead-cell-socials-content > a,
.prospect-leads-table--comfortable .lead-cell-socials-content > span {
  flex-shrink: 0;
}

html[data-prospect-density="comfortable"] #prospectLeadsTable .lead-cell-socials-content > a,
html[data-prospect-density="comfortable"] #prospectLeadsTable .lead-cell-socials-content > span {
  flex-shrink: 0;
}

.prospect-leads-table--comfortable .lead-contact-phone-slot.js-click-to-call-number {
  flex-wrap: nowrap;
}

html[data-prospect-density="comfortable"] #prospectLeadsTable .lead-contact-phone-slot.js-click-to-call-number {
  flex-wrap: nowrap;
}

.prospect-leads-table--compact .lead-col-tail-tight,
.prospect-leads-table--compact th.lead-col-tail-tight {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.prospect-leads-table--compact .lead-col-opportunity {
  min-width: 7.5rem;
  max-width: 15rem;
}

.opportunity-cell .lead-owner-signal {
  display: none !important;
}

.prospect-leads-table--compact .lead-actions-cell {
  padding-right: 0.65rem;
}

.lead-actions-cell {
  min-width: 6.75rem;
  overflow: visible;
  white-space: nowrap;
}

.lead-actions-cell .quick-outreach-btn,
.lead-actions-cell .ai-analysis-btn,
.lead-actions-cell .view-detail-btn {
  flex-shrink: 0;
}

.prospect-leads-table--compact .lead-col-pipeline .pipeline-inline-select {
  font-size: 0.625rem;
  line-height: 1.2;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.prospect-leads-table--comfortable .lead-col-tail-tight,
.prospect-leads-table--comfortable th.lead-col-tail-tight {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

html[data-prospect-density="comfortable"] #prospectLeadsTable .lead-col-tail-tight,
html[data-prospect-density="comfortable"] #prospectLeadsTable th.lead-col-tail-tight {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.prospect-leads-table--comfortable .lead-col-opportunity {
  max-width: 20rem;
}

html[data-prospect-density="comfortable"] #prospectLeadsTable .lead-col-opportunity {
  max-width: 20rem;
}

.result-row:focus-within .ai-analysis-btn,
.lead-actions-cell:focus-within .ai-analysis-btn {
  opacity: 1 !important;
  pointer-events: auto !important;
}

html[data-prospect-density="compact"] #tableView .lead-density-btn[data-density="compact"],
html[data-prospect-density="comfortable"] #tableView .lead-density-btn[data-density="comfortable"] {
  background-color: var(--brand-yellow);
  color: #111827;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

html[data-prospect-density="compact"] #tableView .lead-density-btn[data-density="comfortable"],
html[data-prospect-density="comfortable"] #tableView .lead-density-btn[data-density="compact"] {
  background-color: transparent;
  color: var(--brand-muted, #64748b);
  box-shadow: none;
}

.dark html[data-prospect-density="compact"] #tableView .lead-density-btn[data-density="comfortable"],
.dark html[data-prospect-density="comfortable"] #tableView .lead-density-btn[data-density="compact"] {
  color: rgb(148 163 184);
}

html.pipeline-prefs-pending #prospectPipelineTableScroll {
  visibility: hidden;
}

html[data-pipeline-prefs-ready="1"] #prospectPipelineTableScroll {
  visibility: visible;
}

.lead-checkbox:checked {
  background-color: var(--brand-yellow);
  border-color: var(--brand-yellow);
}

.bookmark-btn[data-saved='1'],
.bookmark-btn.bookmark-btn--saved {
  background-color: var(--brand-yellow) !important;
  color: #111827 !important;
  border-color: var(--brand-yellow) !important;
}

.bookmark-btn[data-saved='1'] svg,
.bookmark-btn.bookmark-btn--saved svg {
  fill: currentColor !important;
}

.prospect-leads-table tr.result-row.pipeline-row-page-hidden {
  display: none !important;
}

/* Search Container 2.0 Animations */
#searchContainer {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#scheduledSearchSettings {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s ease-out,
              padding-top 0.4s ease;
}

#searchBtn {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#searchBtn:active {
  transform: scale(0.95);
}

.search-input-focus:focus-within {
  background-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

@media (max-width: 1024px) {
  #searchContainer {
    border-radius: 2rem;
  }
}

/* Find Leads page — full-width, mobile-responsive layout */
body.find-leads-page {
  --find-leads-offset: 260px;
}

body.find-leads-page .app-shell-content > main.find-leads-main {
  flex: 1 1 auto;
  min-height: 0;
}

body.find-leads-page #searchContainer {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.find-leads-page .find-leads-card {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

body.find-leads-page #searchForm {
  flex: 1 1 auto;
  min-height: 0;
}

body.find-leads-page .find-leads-step-panel:not(.hidden) {
  flex: 1 1 auto;
  min-height: 0;
}

body.find-leads-page .find-leads-step1-panel {
  flex: 1 1 auto;
  min-height: 0;
}

@media (min-width: 768px) {
  body.find-leads-page .find-leads-step1-panel {
    min-height: calc(100dvh - var(--find-leads-offset));
  }
}

body.find-leads-page #findTypeTabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

body.find-leads-page #findTypeTabs::-webkit-scrollbar {
  display: none;
}

body.find-leads-page #findTypeTabs .find-type-tab {
  flex-shrink: 0;
}

@media (max-width: 639px) {
  body.find-leads-page .find-location-search-row {
    flex-direction: column;
    border-radius: 1.25rem;
  }

  body.find-leads-page .find-location-search-row input {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  body.find-leads-page .find-location-search-row #findLocationResolveBtn {
    width: 100%;
    margin: 0;
    border-radius: 0 0 1.125rem 1.125rem;
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
  }

  body.find-leads-page .find-leads-header-desc {
    display: none;
  }

  body.find-leads-page .find-leads-header h1 {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  body.find-leads-page .find-step-pill {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
  }
}

@media (max-width: 767px) {
  body.find-leads-page #findAreaMapCol {
    min-height: min(45vh, 420px);
  }
}

@media (min-width: 768px) {
  body.find-leads-page {
    --find-leads-offset: 300px;
  }
}

@media (min-width: 1024px) {
  body.find-leads-page {
    --find-leads-offset: 320px;
  }
}

/* Notification Bell & Processing Indicator */
.processing-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Monochrome sweep from workspace accent (--brand-yellow), not multi-hue */
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        color-mix(in srgb, var(--brand-yellow) 25%, transparent) 70deg,
        color-mix(in srgb, var(--brand-yellow) 70%, white) 160deg,
        var(--brand-yellow) 250deg,
        color-mix(in srgb, var(--brand-yellow) 35%, transparent) 320deg,
        transparent 360deg
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), black calc(100% - 2.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), black calc(100% - 2.5px));
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--brand-yellow) 45%, transparent));
}

.processing-active .processing-ring {
    opacity: 1;
    inset: -5px;
    animation: alexa-sweep 1.2s cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
    filter: drop-shadow(0 0 12px color-mix(in srgb, var(--brand-yellow) 55%, transparent));
}

.bell-icon-wrapper {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.processing-active .bell-icon-wrapper {
    transform: scale(1.1);
}

#processingIndicator:has(#bulkEnhanceBellBadge:not(.hidden)) > svg {
    opacity: 0.9;
}

.bell-icon-wrapper.has-notification::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: #EF4444; /* Red dot */
    border-radius: 50%;
    border: 2px solid var(--brand-card-bg);
}

.bell-shake {
    animation: bell-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes alexa-sweep {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bell-shake {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-15deg); }
    60% { transform: rotate(10deg); }
    80% { transform: rotate(-10deg); }
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Resources library: URL badge — full address after hover/focus dwell (~480ms, see resources.ejs) */
.res-url-reveal {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-top: 0.25rem;
    min-width: 0;
    max-width: 100%;
}

.res-url-reveal .res-url-tip {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 30;
    margin-top: 0.35rem;
    padding: 0.5rem 0.75rem;
    max-width: min(100%, 22rem);
    width: max-content;
    border-radius: 0.75rem;
    border: 1px solid var(--brand-border);
    background: var(--brand-card-bg);
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.12), 0 4px 12px -4px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.dark .res-url-reveal .res-url-tip {
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.45), 0 4px 12px -4px rgba(0, 0, 0, 0.25);
}

.res-url-reveal.res-url-open .res-url-tip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* ========= Lead panel map strip (tiles only; contact card is separate) ========= */
#leadPanelHeroBackdropTint {
    background: linear-gradient(145deg, var(--brand-cream) 0%, #ffffff 48%, var(--brand-cream) 100%);
}
.dark #leadPanelHeroBackdropTint {
    background: linear-gradient(145deg, rgb(15 23 42) 0%, rgb(30 41 59) 52%, rgb(15 23 42) 100%);
}

#leadPanelMapStripWrap.lead-panel-hero-map #leadPanelHeroBackdropTint {
    background: linear-gradient(145deg, rgb(71 85 105), rgb(51 65 85), rgb(30 41 59));
}
.dark #leadPanelMapStripWrap.lead-panel-hero-map #leadPanelHeroBackdropTint {
    background: linear-gradient(145deg, rgb(15 23 42), rgb(30 41 59), rgb(2 6 23));
}

.lead-panel-hero-backdrop-link {
    display: none !important;
}
#leadPanelMapStripWrap.lead-panel-hero-map .lead-panel-hero-backdrop-link {
    display: block !important;
}

.lead-panel-hero-backdrop-img {
    opacity: 0;
    transition: opacity 0.35s ease;
}
#leadPanelMapStripWrap.lead-panel-hero-map .lead-panel-hero-backdrop-img:not(.hidden) {
    opacity: 1;
}

#leadPanelHeroBackdropEmbed:not(.hidden) {
    opacity: 1;
}

/* Embedded iframe maps: don't paint a heavy slate wash on top of blank iframe chrome */
#leadPanelMapStripWrap.lead-panel-map-embed-mode.lead-panel-hero-map #leadPanelHeroBackdropTint {
    background: transparent !important;
}

.dark #leadPanelMapStripWrap.lead-panel-map-embed-mode.lead-panel-hero-map #leadPanelHeroBackdropTint {
    background: rgba(15, 23, 42, 0.28) !important;
}

.lead-panel-sticky-phone {
    font-variant-numeric: tabular-nums;
}

/* Lead panel: interactive Maps JS strip (scrolls with tab body) */
#leadPanelJsMapWrap:not(.hidden) {
    touch-action: pan-x pan-y pinch-zoom;
}
#leadPanelMapStripWrap.lead-panel-js-map-mode,
#leadPanelMapStripWrap.lead-panel-strip-map-mode {
    border-color: rgba(148, 163, 184, 0.22);
    overflow: visible;
}
#leadPanelMapStaticImg:not(.hidden),
#leadPanelMapEmbed:not(.hidden) {
    touch-action: pan-x pan-y pinch-zoom;
}
.dark #leadPanelMapStripWrap.lead-panel-js-map-mode,
.dark #leadPanelMapStripWrap.lead-panel-strip-map-mode {
    border-color: rgba(255, 255, 255, 0.08);
}
#leadPanelMapStripWrap.lead-panel-map-embed-mode #leadPanelHeroBackdrop,
#leadPanelMapStripWrap.lead-panel-hero-map:not(.lead-panel-strip-map-mode):not(.lead-panel-js-map-mode) #leadPanelHeroBackdrop {
    overflow: hidden;
    border-radius: 2rem 2rem 0 0;
}

/* Lead panel: bundled note inside quick log — always visible when quick log is open */
#leadPanelComposerDrawer.lead-panel-composer-drawer {
    max-height: none;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
}
#leadPanelComposerDrawer.lead-panel-composer-drawer.lead-panel-composer-drawer--open {
    max-height: none;
    opacity: 1;
    pointer-events: auto;
}

/* Lead panel: quick log + note — single open block */
#leadPanelQuickLogDrawer.lead-panel-quicklog-drawer {
    max-height: none;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
}
#leadPanelQuickLogDrawer.lead-panel-quicklog-drawer.lead-panel-quicklog-drawer--open {
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
}
#leadPanelQuickLogChevron {
    transform-origin: center;
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1);
}
#mobilePanel.open #leadPanelQuickLogDrawer.lead-panel-quicklog-drawer--open,
#mobilePanel.open #leadPanelQuickLogDrawer.lead-panel-quicklog-drawer--open * {
    pointer-events: auto;
}

/* Lead panel: send info drawer — collapsed by default */
#leadPanelOutreachDrawer.lead-panel-outreach-drawer {
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.34s cubic-bezier(0.33, 1, 0.68, 1),
        opacity 0.22s ease;
    overflow: hidden;
    pointer-events: none;
}
#leadPanelOutreachDrawer.lead-panel-outreach-drawer.lead-panel-outreach-drawer--open {
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
    padding-bottom: 0.75rem;
}
#mobilePanel.open #leadPanelNotepad,
#mobilePanel.open #leadPanelNotepad button,
#mobilePanel.open #leadPanelNotepad select,
#mobilePanel.open #leadPanelNotepad input,
#mobilePanel.open #leadPanelNotepad label,
#mobilePanel.open #leadPanelComposerDrawer.lead-panel-composer-drawer--open,
#mobilePanel.open #leadPanelComposerDrawer.lead-panel-composer-drawer--open *,
#mobilePanel.open #leadPanelOutreachDrawer.lead-panel-outreach-drawer--open,
#mobilePanel.open #leadPanelOutreachDrawer.lead-panel-outreach-drawer--open *,
#mobilePanel.open #leadPanelGlanceContent,
#mobilePanel.open #leadPanelGlanceContent *,
#mobilePanel.open #leadPanelCompanyTagsSection,
#mobilePanel.open #leadPanelCompanyTagsSection * {
    pointer-events: auto;
}
#leadPanelOutreachChevron {
    transform-origin: center;
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Lead panel: cadence playbook block — collapsed by default */
#leadPanelCadencePlaybookDrawer.lead-panel-cadence-playbook-drawer {
    max-height: 0;
    opacity: 0;
    margin-top: 0 !important;
    transition:
        max-height 0.34s cubic-bezier(0.33, 1, 0.68, 1),
        opacity 0.22s ease,
        margin-top 0.28s ease;
    overflow: hidden;
    pointer-events: none;
}
#leadPanelCadencePlaybookDrawer.lead-panel-cadence-playbook-drawer.lead-panel-cadence-playbook-drawer--open {
    max-height: min(56rem, 90vh);
    opacity: 1;
    margin-top: 0 !important;
    pointer-events: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
}
#leadPanelCadencePlaybookChevron {
    transform-origin: center;
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1);
}
#mobilePanel.open #leadPanelCadencePlaybookDrawer.lead-panel-cadence-playbook-drawer--open,
#mobilePanel.open #leadPanelCadencePlaybookDrawer.lead-panel-cadence-playbook-drawer--open * {
    pointer-events: auto;
}

/* Lead panel: AI tools assessment — collapsed by default */
#leadPanelAiToolsDrawer.lead-panel-ai-tools-drawer {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transition:
        max-height 0.34s cubic-bezier(0.33, 1, 0.68, 1),
        opacity 0.22s ease,
        padding 0.28s ease;
    overflow: hidden;
    pointer-events: none;
}
#leadPanelAiToolsDrawer.lead-panel-ai-tools-drawer.lead-panel-ai-tools-drawer--open {
    max-height: min(24rem, 75vh);
    opacity: 1;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    pointer-events: auto;
    overflow: visible;
}
#leadPanelAiToolsChevron {
    transform-origin: center;
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1);
}
#mobilePanel.open #leadPanelAiToolsDrawer.lead-panel-ai-tools-drawer--open,
#mobilePanel.open #leadPanelAiToolsDrawer.lead-panel-ai-tools-drawer--open * {
    pointer-events: auto;
}

/* Lead panel: quick log / outreach dock — collapsible as one unit */
#leadPanelNotepadBody.lead-panel-notepad-body {
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.38s cubic-bezier(0.33, 1, 0.68, 1),
        opacity 0.24s ease;
    overflow: hidden;
    pointer-events: none;
}
#leadPanelNotepadBody.lead-panel-notepad-body.lead-panel-notepad-body--open {
    max-height: min(78vh, 44rem);
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 0.5rem;
}
#leadPanelNotepadBody.lead-panel-notepad-body--open.lead-panel-notepad-body--send-expanded {
    max-height: min(92vh, 62rem);
}
#leadPanelSendInfoCard.lead-panel-send-info-card--open {
    overflow: visible;
}
#leadPanelOutreachDrawer.lead-panel-outreach-drawer.lead-panel-outreach-drawer--open .lead-send-info {
    overflow: visible;
}
#leadPanelOutreachDrawer.lead-panel-outreach-drawer.lead-panel-outreach-drawer--open .lead-send-info-pack-details[open] {
    max-height: none;
}
#leadPanelNotepadChevron {
    transform-origin: center;
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1);
}
#leadPanelNotepad.lead-panel-notepad--collapsed {
    padding-top: 0.35rem;
    box-shadow: 0 -6px 24px -12px rgba(15, 23, 42, 0.12);
}
/* Collapsed quick-log dock: Call + SMS only (Sync GHL when expanded) */
#leadPanelNotepad.lead-panel-notepad--collapsed #leadPanelOutreachCtaRow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
#leadPanelNotepad.lead-panel-notepad--collapsed #leadPanelPushGhlBtn {
    display: none !important;
}
#mobilePanel.open #leadPanelNotepad.lead-panel-notepad--collapsed #leadPanelOutreachCtaRow,
#mobilePanel.open #leadPanelNotepad.lead-panel-notepad--collapsed #leadPanelOutreachCtaRow button {
    pointer-events: auto;
}

/* Softphone keypad must stay scrollable to the top after wrap-up */
#softphoneTabKeypad {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
#mobilePanel.open #leadPanelNotepadBody.lead-panel-notepad-body--open,
#mobilePanel.open #leadPanelNotepadBody.lead-panel-notepad-body--open * {
    pointer-events: auto;
}

/* Lead panel scroll body: uniform vertical rhythm */
#leadPanelTabScroll {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#leadPanelTabScroll > #leadPanelCallerShell,
#leadPanelTabScroll > section,
#leadPanelTabScroll > .lead-tab-panel {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

#leadPanelTabScroll .lead-panel-tab-stack > section {
    margin-bottom: 0 !important;
}

#leadPanelSectionNav {
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

.lead-panel--non-agency .lead-panel-agency-only {
    display: none !important;
}

#leadPanelContactDetailsToggle[aria-expanded="true"] .lead-panel-contact-toggle-chevron {
    transform: rotate(180deg);
}

/* Lead panel history tab: consistent widget spacing */
.lead-panel-tab-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.lead-panel-widget {
    border-radius: 1.5rem;
    padding: 1.25rem 1.35rem;
}

.lead-panel-widget--callback {
    border: 1px solid rgba(14, 165, 233, 0.28);
    background: rgba(14, 165, 233, 0.06);
}

.dark .lead-panel-widget--callback {
    background: rgba(8, 47, 73, 0.35);
    border-color: rgba(56, 189, 248, 0.22);
}

.lead-panel-widget--ai-tools {
    border: 1px solid rgba(249, 115, 22, 0.28);
    background: rgba(249, 115, 22, 0.06);
    padding: 0;
    overflow: hidden;
}

.dark .lead-panel-widget--ai-tools {
    background: rgba(67, 20, 7, 0.42);
    border-color: rgba(251, 146, 60, 0.24);
}

.lead-panel-widget--cadence {
    border: 1px solid rgba(139, 92, 246, 0.32);
    background: rgba(139, 92, 246, 0.06);
    padding: 0;
    overflow: hidden;
}

.dark .lead-panel-widget--cadence {
    background: rgba(46, 16, 101, 0.45);
    border-color: rgba(139, 92, 246, 0.28);
}

.lead-panel-widget--plain {
    padding: 1.15rem 1.25rem 1.25rem;
}

.lead-panel-widget__block {
    padding: 1.25rem 1.35rem;
}

.lead-panel-widget__divider {
    height: 1px;
    margin: 0 1.35rem;
    background: rgba(139, 92, 246, 0.28);
}

.dark .lead-panel-widget__divider {
    background: rgba(139, 92, 246, 0.38);
}

.lead-panel-widget__inner {
    margin-top: 0.75rem;
    padding: 1.1rem 1.15rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(250, 248, 245, 0.55);
}

.dark .lead-panel-widget__inner {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.lead-panel-widget__title {
    margin: 0 0 0.65rem;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    line-height: 1.3;
}

.lead-panel-widget__title--sky {
    color: rgb(7, 89, 133);
}

.dark .lead-panel-widget__title--sky {
    color: rgb(186, 230, 253);
}

.lead-panel-widget__title--orange {
    color: rgb(194, 65, 12);
}

.dark .lead-panel-widget__title--orange {
    color: rgb(253, 186, 116);
}

.lead-panel-widget__title--violet {
    color: rgb(91, 33, 182);
}

.dark .lead-panel-widget__title--violet {
    color: rgb(221, 214, 254);
}

.lead-panel-widget__title--muted {
    color: var(--brand-muted, #64748b);
}

.dark .lead-panel-widget__title--muted {
    color: rgb(148, 163, 184);
}

.lead-panel-widget__lede {
    margin: 0 0 0.85rem;
    font-size: 11px;
    line-height: 1.55;
    color: var(--brand-muted, #64748b);
}

.dark .lead-panel-widget__lede {
    color: rgb(148, 163, 184);
}

.lead-panel-field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-muted, #64748b);
}

.lead-panel-field-label--violet {
    color: rgb(91, 33, 182);
}

.dark .lead-panel-field-label--violet {
    color: rgb(196, 181, 253);
}

/* Schedule callback — compact branded date picker */
.adhello-date-trigger__label--empty {
    color: var(--brand-muted, #64748b);
    font-weight: 600;
}

.dark .adhello-date-trigger__label--empty {
    color: rgb(148, 163, 184);
}

.adhello-mini-calendar {
    border-radius: 1rem;
    border: 1px solid rgba(14, 165, 233, 0.28);
    background-color: #fff !important;
    background: #fff !important;
    opacity: 1 !important;
    isolation: isolate;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow:
        0 16px 40px -16px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(15, 23, 42, 0.04);
    padding: 0;
    user-select: none;
    overflow: hidden;
}

.adhello-mini-calendar__surface {
    background-color: #fff !important;
    background: #fff !important;
    padding: 0.65rem 0.7rem 0.55rem;
}

.dark .adhello-mini-calendar {
    background-color: rgb(15, 23, 42) !important;
    background: rgb(15, 23, 42) !important;
    border-color: rgba(56, 189, 248, 0.24);
    box-shadow:
        0 18px 44px -14px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

.dark .adhello-mini-calendar__surface {
    background-color: rgb(15, 23, 42) !important;
    background: rgb(15, 23, 42) !important;
}

#leadCallbackDatePopover.adhello-mini-calendar {
    position: fixed;
    z-index: 10050 !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: var(--brand-dark);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    isolation: isolate;
    opacity: 1 !important;
    box-shadow:
        0 20px 40px -12px rgba(17, 24, 39, 0.18),
        0 8px 16px -8px rgba(17, 24, 39, 0.1);
}

.dark #leadCallbackDatePopover.adhello-mini-calendar,
html.dark #leadCallbackDatePopover.adhello-mini-calendar {
    background-color: #0f172a !important;
    background: #0f172a !important;
    color: #f8fafc;
}

.adhello-mini-calendar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    background-color: #fff !important;
    background: #fff !important;
}

.dark .adhello-mini-calendar__head {
    background-color: rgb(15, 23, 42) !important;
    background: rgb(15, 23, 42) !important;
}

.adhello-mini-calendar__month {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgb(7, 89, 133);
    text-align: center;
    flex: 1;
}

.dark .adhello-mini-calendar__month {
    color: rgb(186, 230, 253);
}

.adhello-mini-calendar__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(250, 247, 237, 0.65);
    color: rgb(51, 65, 85);
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.adhello-mini-calendar__nav:hover {
    border-color: rgba(14, 165, 233, 0.45);
    background: rgba(14, 165, 233, 0.08);
    color: rgb(7, 89, 133);
}

.dark .adhello-mini-calendar__nav {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgb(203, 213, 225);
}

.dark .adhello-mini-calendar__nav:hover {
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(14, 165, 233, 0.12);
    color: rgb(186, 230, 253);
}

.adhello-mini-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.15rem;
    background-color: #fff !important;
    background: #fff !important;
}

.dark .adhello-mini-calendar__grid {
    background-color: rgb(15, 23, 42) !important;
    background: rgb(15, 23, 42) !important;
}

.adhello-mini-calendar__dow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.35rem;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.85);
}

.dark .adhello-mini-calendar__dow {
    color: rgba(148, 163, 184, 0.85);
}

.adhello-mini-calendar__pad {
    display: block;
    height: 1.75rem;
}

.adhello-mini-calendar__day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 1.75rem;
    border: none;
    border-radius: 0.55rem;
    background: transparent;
    font-size: 11px;
    font-weight: 700;
    color: rgb(30, 41, 59);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.adhello-mini-calendar__day:hover {
    background: rgba(14, 165, 233, 0.1);
    color: rgb(7, 89, 133);
}

.adhello-mini-calendar__day.is-today:not(.is-selected) {
    box-shadow: inset 0 0 0 1.5px rgba(255, 214, 68, 0.85);
    color: rgb(7, 89, 133);
}

.adhello-mini-calendar__day.is-selected {
    background: rgb(14, 165, 233);
    color: #fff;
    box-shadow: 0 4px 12px -4px rgba(14, 165, 233, 0.65);
}

.adhello-mini-calendar__day.is-selected:hover {
    background: rgb(2, 132, 199);
    color: #fff;
}

.dark .adhello-mini-calendar__day {
    color: rgb(226, 232, 240);
}

.dark .adhello-mini-calendar__day:hover {
    background: rgba(14, 165, 233, 0.18);
    color: rgb(186, 230, 253);
}

.dark .adhello-mini-calendar__day.is-today:not(.is-selected) {
    color: rgb(186, 230, 253);
}

.adhello-mini-calendar__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    background-color: #fff !important;
    background: #fff !important;
}

.dark .adhello-mini-calendar__foot {
    border-top-color: rgba(255, 255, 255, 0.08);
    background-color: rgb(15, 23, 42) !important;
    background: rgb(15, 23, 42) !important;
}

.adhello-mini-calendar__link {
    border: none;
    background: transparent;
    padding: 0.15rem 0.25rem;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(100, 116, 139);
    cursor: pointer;
}

.adhello-mini-calendar__link:hover {
    color: rgb(7, 89, 133);
}

.adhello-mini-calendar__link--accent {
    color: rgb(14, 165, 233);
}

.adhello-mini-calendar__link--accent:hover {
    color: rgb(2, 132, 199);
}

.dark .adhello-mini-calendar__link {
    color: rgb(148, 163, 184);
}

.dark .adhello-mini-calendar__link:hover {
    color: rgb(186, 230, 253);
}

.dark .adhello-mini-calendar__link--accent {
    color: rgb(56, 189, 248);
}

#leadPanelCallbackSection .gcal-datetime {
    width: 100%;
}

#leadPanelCallbackSection .gcal-datetime-trigger {
    width: 100%;
    border-radius: 0.75rem;
    border-color: color-mix(in srgb, var(--brand-border, #d6d3d1) 50%, transparent);
    background: #fff;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.dark #leadPanelCallbackSection .gcal-datetime-trigger {
    background: rgb(15 23 42);
    border-color: rgba(255, 255, 255, 0.1);
}

#leadPanelCallbackSection .gcal-datetime-trigger:hover,
#leadPanelCallbackSection .gcal-datetime-trigger:focus-visible {
    border-color: color-mix(in srgb, rgb(14 165 233) 50%, transparent);
}

#leadPanelCallbackSection .gcal-datetime-popover.gcal-datetime-popover {
    width: 13.25rem;
}

.lead-callback-hint {
    min-height: 1rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.45;
}

.lead-callback-hint--success {
    color: rgb(4 120 87);
    background: rgb(209 250 229 / 0.65);
    border: 1px solid rgb(52 211 153 / 0.45);
}

.dark .lead-callback-hint--success {
    color: rgb(167 243 208);
    background: rgb(6 78 59 / 0.35);
    border-color: rgb(16 185 129 / 0.35);
}

.lead-callback-hint--error {
    color: rgb(185 28 28);
    background: rgb(254 226 226 / 0.75);
    border: 1px solid rgb(248 113 113 / 0.45);
}

.dark .lead-callback-hint--error {
    color: rgb(252 165 165);
    background: rgb(127 29 29 / 0.35);
    border-color: rgb(239 68 68 / 0.35);
}

.lead-callback-hint--pending {
    color: rgb(3 105 161);
    background: rgb(224 242 254 / 0.75);
    border: 1px solid rgb(56 189 248 / 0.45);
}

.dark .lead-callback-hint--pending {
    color: rgb(125 211 252);
    background: rgb(12 74 110 / 0.35);
    border-color: rgb(14 165 233 / 0.35);
}

/* Focus mode — send info drawer — collapsed by default */
#focusSendInfoDrawer.focus-send-info-drawer {
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.34s cubic-bezier(0.33, 1, 0.68, 1),
        opacity 0.22s ease;
    overflow: hidden;
    pointer-events: none;
}
#focusSendInfoDrawer.focus-send-info-drawer.focus-send-info-drawer--open {
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
    padding-bottom: 0.75rem;
}
#focusSendInfoDrawer.focus-send-info-drawer--open .lead-send-info {
    overflow: visible;
}

/* Focus mode — notes drawer — collapsed by default */
#focusNotesDrawer.focus-notes-drawer {
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.34s cubic-bezier(0.33, 1, 0.68, 1),
        opacity 0.22s ease;
    overflow: hidden;
    pointer-events: none;
}
#focusNotesDrawer.focus-notes-drawer.focus-notes-drawer--open {
    max-height: 12rem;
    opacity: 1;
    pointer-events: auto;
    overflow: auto;
}

/* Focus mode — contact details drawer — collapsed by default */
#focusContactDetailsDrawer.focus-contact-details-drawer {
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.34s cubic-bezier(0.33, 1, 0.68, 1),
        opacity 0.22s ease;
    overflow: hidden;
    pointer-events: none;
}
#focusContactDetailsDrawer.focus-contact-details-drawer.focus-contact-details-drawer--open {
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
    padding-top: 0.625rem;
    padding-bottom: 0.75rem;
}
#focusNotesChevron {
    transform-origin: center;
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1);
}

#focus-outcome-panel.focus-outcome-panel--send-customize #focus-outcome-details {
    overflow: visible;
}
#focusSendInfoChevron {
    transform-origin: center;
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Send info — hide quick fields when customize panel is open */
.lead-send-info--customize-open .lead-send-info-quick-fields {
    display: none;
}

/* Focus — focus panel on customize send (hide CTAs, quick log, notes) */
#focus-outcome-panel.focus-outcome-panel--send-customize #focus-outcome-actions,
#focus-outcome-panel.focus-outcome-panel--send-customize #focus-outcome-shortcuts {
    display: none;
}

/* Focus mode — wider layout on large screens */
@media (min-width: 1280px) {
    #focus-card-section .focus-primary-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    #focus-card-section #focus-body {
        min-height: 16rem;
    }
}

.focus-mail-list-btn.is-on-list {
    opacity: 0.72;
    cursor: default;
}

#dmListFilters .dm-select {
    min-height: 2rem;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.95);
    color: inherit;
}

.dark #dmListFilters .dm-select {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
}

#dmLeadsTable tr.dm-filter-hidden {
    display: none;
}

/* Focus mode — collapsible call outcome panel */
#focus-outcome-panel[data-collapsed="true"] {
    padding-top: 0.65rem;
    padding-bottom: 0.75rem;
}

#focus-outcome-panel[data-collapsed="true"] #focus-outcome-header {
    justify-content: flex-end;
    margin-bottom: 0.15rem;
}

#focus-outcome-panel[data-collapsed="true"] #focus-outcome-actions {
    padding-top: 0;
}

/* Focus mode — compact single-row action bar */
#focus-outcome-panel[data-compact="true"] {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    transition: padding 0.22s ease;
}

#focus-outcome-panel[data-compact="true"] #focus-outcome-header {
    order: 2;
    margin-bottom: 0;
    margin-left: auto;
    flex-shrink: 0;
}

#focus-outcome-panel[data-compact="true"]:has(#focus-sms-compose-section:not(.hidden)) #focus-outcome-compact-toggle {
    display: none;
}

#focus-outcome-panel[data-compact="true"] #focus-outcome-actions {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.375rem;
    padding-top: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#focus-outcome-panel[data-compact="true"] #focus-outcome-actions::-webkit-scrollbar {
    display: none;
}

#focus-outcome-panel[data-compact="true"] .focus-primary-actions,
#focus-outcome-panel[data-compact="true"] .focus-secondary-actions {
    display: contents;
}

#focus-outcome-panel[data-compact="true"] #focus-btn-open-dialer,
#focus-outcome-panel[data-compact="true"] #focus-btn-push-ghl,
#focus-outcome-panel[data-compact="true"] #focus-btn-back-secondary,
#focus-outcome-panel[data-compact="true"] #focus-quick-log-section,
#focus-outcome-panel[data-compact="true"] #focus-notes-section,
#focus-outcome-panel[data-compact="true"] #focus-followup-strip,
#focus-outcome-panel[data-compact="true"] #focus-quick-task-strip,
#focus-outcome-panel[data-compact="true"] #focus-outcome-feedback {
    display: none !important;
}

#focus-outcome-panel[data-compact="true"] #focus-outcome-actions .btn-pill {
    flex: 0 0 auto;
    width: auto;
    min-height: 2.25rem;
    padding: 0.45rem 0.7rem;
    font-size: 10px;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

#focus-outcome-panel[data-compact="true"] #focus-btn-call {
    order: 1;
}

#focus-outcome-panel[data-compact="true"] #focus-btn-sms {
    order: 2;
}

#focus-outcome-panel[data-compact="true"] #focus-btn-log {
    order: 3;
}

#focus-outcome-panel[data-compact="true"] #focus-btn-call-next {
    order: 4;
}

#focus-outcome-panel[data-compact="true"] #focus-btn-skip {
    order: 5;
}

#focus-outcome-panel[data-compact="true"] #focus-outcome-compact-toggle {
    border-color: color-mix(in srgb, var(--brand-yellow, #facc15) 55%, transparent);
    color: var(--brand-dark, #111827);
    background: color-mix(in srgb, var(--brand-yellow, #facc15) 12%, transparent);
}

/* Focus compact bar — SMS composer spans full width above action buttons */
#focus-outcome-panel[data-compact="true"]:has(#focus-sms-compose-section:not(.hidden)) {
    flex-wrap: wrap;
    align-items: stretch;
    padding: 0.5rem 0.65rem 0.55rem;
}

#focus-outcome-panel[data-compact="true"]:has(#focus-sms-compose-section:not(.hidden)) #focus-sms-compose-section {
    order: 0;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
}

#focus-outcome-panel[data-compact="true"]:has(#focus-sms-compose-section:not(.hidden)) #focus-outcome-actions {
    order: 1;
    flex: 1 1 100%;
    width: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
}

#focus-outcome-panel[data-compact="true"]:has(#focus-sms-compose-section:not(.hidden)) #focus-sms-compose-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    resize: vertical;
}

#focus-sms-compose-input.focus-sms-compose-input--expanded {
    min-height: min(32vh, 15rem);
    max-height: min(62vh, 26rem);
}

#focus-sms-compose-input {
    resize: vertical;
}

.dark #focus-outcome-panel[data-compact="true"] #focus-outcome-compact-toggle {
    color: var(--brand-yellow, #facc15);
}

@media (max-width: 767px) {
    #focus-outcome-panel[data-compact="true"] {
        flex-wrap: wrap;
    }

    #focus-outcome-panel[data-compact="true"] #focus-outcome-actions {
        flex-wrap: wrap;
        overflow-x: visible;
        order: 1;
        flex-basis: 100%;
    }

    #focus-outcome-panel[data-compact="true"] #focus-outcome-header {
        order: 0;
        flex-basis: 100%;
        justify-content: flex-end;
    }
}

.focus-quick-outcome[data-active="true"],
.lead-notepad-tag[data-active="true"] {
    border-color: var(--brand-yellow, #ca8a04) !important;
    background: color-mix(in srgb, var(--brand-yellow, #facc15) 20%, transparent) !important;
    color: var(--brand-dark, #111827);
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--brand-yellow, #facc15) 35%, transparent),
        inset 0 0 0 1px color-mix(in srgb, var(--brand-yellow, #facc15) 25%, transparent);
}

.dark .focus-quick-outcome[data-active="true"],
.dark .lead-notepad-tag[data-active="true"] {
    color: var(--brand-yellow, #facc15);
}

/* Brand-aligned datetime picker (Focus follow-up) */
.gcal-datetime {
  position: relative;
  width: 100%;
}

.gcal-datetime-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.7rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--brand-border, #d6d3d1) 70%, transparent);
  background: #fff;
  color: var(--brand-dark, #111827);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.dark .gcal-datetime-trigger {
  background: rgb(15 23 42);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}

.gcal-datetime-trigger:hover,
.gcal-datetime-trigger:focus-visible {
  border-color: color-mix(in srgb, var(--brand-yellow, #ca8a04) 65%, var(--brand-border, #d6d3d1));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-yellow, #ca8a04) 22%, transparent);
  outline: none;
}

.gcal-datetime-trigger--empty .gcal-datetime-display {
  color: var(--brand-muted, #64748b);
  font-weight: 500;
}

.gcal-datetime-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  color: var(--brand-yellow, #ca8a04);
}

.gcal-datetime-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  z-index: 80;
  width: 13.25rem;
  max-width: calc(100vw - 2rem);
  padding: 0.55rem 0.6rem 0.45rem;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--brand-border, #d6d3d1) 55%, transparent);
  background: color-mix(in srgb, #fff 92%, var(--brand-cream, #faf7ed));
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.06),
    0 12px 24px -8px rgba(15, 23, 42, 0.14);
}

.dark .gcal-datetime-popover {
  background: rgb(15 23 42);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px -8px rgba(0, 0, 0, 0.55);
}

.gcal-datetime-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}

.gcal-datetime-month {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--brand-dark, #111827);
}

.dark .gcal-datetime-month {
  color: #f8fafc;
}

.gcal-datetime-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid color-mix(in srgb, var(--brand-border, #d6d3d1) 50%, transparent);
  border-radius: 9999px;
  background: #fff;
  color: var(--brand-muted, #64748b);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.dark .gcal-datetime-nav {
  background: rgb(30 41 59);
  border-color: rgba(255, 255, 255, 0.1);
}

.gcal-datetime-nav:hover {
  background: color-mix(in srgb, var(--brand-yellow, #ca8a04) 14%, #fff);
  border-color: color-mix(in srgb, var(--brand-yellow, #ca8a04) 45%, transparent);
  color: var(--brand-dark, #111827);
}

.gcal-datetime-nav svg {
  width: 0.65rem;
  height: 0.65rem;
}

.gcal-datetime-weekdays,
.gcal-datetime-grid {
  display: grid;
  grid-template-columns: repeat(7, 1.5rem);
  justify-content: center;
  gap: 0.125rem;
}

.gcal-datetime-weekdays {
  margin-bottom: 0.2rem;
}

.gcal-datetime-weekdays span {
  text-align: center;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-muted, #64748b);
}

.gcal-datetime-day {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--brand-dark, #111827);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
  padding: 0;
}

.dark .gcal-datetime-day {
  color: #e2e8f0;
}

.gcal-datetime-day:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand-yellow, #ca8a04) 16%, transparent);
}

.gcal-datetime-day--muted {
  color: #94a3b8;
}

.gcal-datetime-day--today:not(.gcal-datetime-day--selected) {
  color: var(--brand-dark, #111827);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand-yellow, #ca8a04) 55%, transparent);
}

.gcal-datetime-day--selected {
  background: var(--brand-yellow, #ca8a04);
  color: var(--brand-dark, #111827);
  box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--brand-yellow, #ca8a04) 55%, transparent);
}

.gcal-datetime-day--selected:hover {
  background: color-mix(in srgb, var(--brand-yellow, #ca8a04) 88%, #fff);
}

.gcal-datetime-day--disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gcal-datetime-time {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid color-mix(in srgb, var(--brand-border, #d6d3d1) 45%, transparent);
}

.dark .gcal-datetime-time {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.gcal-datetime-time-label {
  margin-right: 0.05rem;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-muted, #64748b);
}

.gcal-datetime-hour,
.gcal-datetime-minute,
.gcal-datetime-ampm {
  min-width: 2.35rem;
  min-height: 1.5rem;
  border-radius: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--brand-border, #d6d3d1) 65%, transparent);
  background: #fff;
  color: var(--brand-dark, #111827);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.25rem center;
  background-size: 0.55rem;
  padding-right: 1.1rem;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.dark .gcal-datetime-hour,
.dark .gcal-datetime-minute,
.dark .gcal-datetime-ampm {
  background-color: rgb(30 41 59);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.gcal-datetime-hour:focus,
.gcal-datetime-minute:focus,
.gcal-datetime-ampm:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--brand-yellow, #ca8a04) 65%, var(--brand-border, #d6d3d1));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-yellow, #ca8a04) 20%, transparent);
}

.gcal-datetime-time-sep {
  font-size: 0.625rem;
  font-weight: 800;
  color: var(--brand-muted, #64748b);
}

.gcal-datetime-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
}

.gcal-datetime-footer-btn {
  border: 0;
  background: transparent;
  color: var(--brand-dark, #111827);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.35rem;
  border-radius: 0.35rem;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.dark .gcal-datetime-footer-btn {
  color: #e2e8f0;
}

.gcal-datetime-footer-btn:hover {
  background: color-mix(in srgb, var(--brand-yellow, #ca8a04) 14%, transparent);
  color: var(--brand-dark, #111827);
}

@media (min-width: 420px) {
  .gcal-datetime-popover {
    width: 13.25rem;
  }
}

/* AdHello softphone — portaled above lead panel (z-400) when open */
#softphonePortal {
  position: fixed;
  inset: 0;
  z-index: 450;
  pointer-events: none;
}

/* Modal shell is full-viewport for layout only — must not block pipeline clicks behind it */
#softphonePortal #softphoneModal {
  pointer-events: none !important;
}

#softphonePortal #softphonePanel,
#softphonePortal #softphoneMobileBackdrop:not(.hidden) {
  pointer-events: auto;
}

#softphoneModal:not(.hidden) {
  z-index: 450 !important;
}
#softphoneModal:not(.hidden) #softphonePanel {
  z-index: 451 !important;
}
.softphone-calling-from--live {
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.2);
}

.dark .softphone-calling-from--live {
  border-color: rgba(52, 211, 153, 0.45);
}

.softphone-caller-id-number {
  letter-spacing: 0.02em;
  word-break: break-word;
}

.softphone-caller-id-select {
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 1rem;
  padding-right: 1.35rem !important;
  text-overflow: clip;
  overflow: visible;
  white-space: nowrap;
}

.softphone-redial-btn:not(:disabled):hover {
  filter: brightness(1.03);
}

.softphone-panel {
  display: flex;
  flex-direction: column;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.softphone-body {
  flex: 1 1 auto;
  min-height: 0;
}

.softphone-panel--expanded {
  width: min(100vw - 1rem, 26rem) !important;
  height: min(820px, calc(100vh - 2rem)) !important;
  max-height: min(820px, calc(100vh - 2rem)) !important;
}

/* Focus mode — compact/minimized dialer bar (bottom-right strip) */
.softphone-panel.softphone-panel--compact {
  width: min(calc(100vw - 1.5rem), 22rem) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  border-radius: 1rem !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16) !important;
}

.softphone-panel.softphone-panel--compact .softphone-chrome,
.softphone-panel.softphone-panel--compact .softphone-body,
.softphone-panel.softphone-panel--compact .softphone-bottom-nav {
  display: none !important;
}

.softphone-panel.softphone-panel--compact .softphone-compact-bar {
  display: flex;
}

.softphone-compact-bar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.softphone-compact-bar:active,
.softphone-panel.softphone-panel--compact-dragging .softphone-compact-bar {
  cursor: grabbing;
}

.dark .softphone-compact-bar {
  background: rgba(15, 23, 42, 0.96);
}

.softphone-compact-bar__name {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
}

.dark .softphone-compact-bar__name {
  color: #f8fafc;
}

.softphone-compact-bar__status {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  background: rgba(226, 232, 240, 0.9);
  color: #475569;
  font-size: 0.5625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dark .softphone-compact-bar__status {
  background: rgba(51, 65, 85, 0.85);
  color: #e2e8f0;
}

.softphone-compact-bar__status[data-state='dialing'] {
  background: rgba(251, 191, 36, 0.18);
  color: #b45309;
}

.softphone-compact-bar__status[data-state='in_call'] {
  background: rgba(52, 211, 153, 0.18);
  color: #047857;
}

.softphone-compact-bar__status[data-state='ended'] {
  background: rgba(244, 63, 94, 0.14);
  color: #be123c;
}

.softphone-compact-bar__timer {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #64748b;
}

.dark .softphone-compact-bar__timer {
  color: #94a3b8;
}

.softphone-compact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fff;
  color: #334155;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dark .softphone-compact-btn {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.softphone-compact-btn:hover {
  background: #f8fafc;
}

.dark .softphone-compact-btn:hover {
  background: rgba(51, 65, 85, 0.95);
}

.softphone-compact-btn--danger {
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.12);
  color: #be123c;
}

.dark .softphone-compact-btn--danger {
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(127, 29, 29, 0.35);
  color: #fecdd3;
}

.softphone-compact-btn--danger:hover {
  background: rgba(244, 63, 94, 0.2);
}

.softphone-chrome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: #64748b;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dark .softphone-chrome-btn {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.softphone-chrome-btn:hover {
  background: #fff;
  color: #334155;
}

.softphone-chrome-btn--active {
  background: #e2e8f0;
  color: #0f172a;
  border-color: rgba(100, 116, 139, 0.45);
}

.softphone-settings-section {
  padding: 0.85rem 0.9rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.72);
}

.dark .softphone-settings-section {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.55);
}

.softphone-soundcheck-meter {
  height: 0.45rem;
  border-radius: 9999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.35);
}

.dark .softphone-soundcheck-meter {
  background: rgba(255, 255, 255, 0.12);
}

.softphone-soundcheck-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #fbbf24);
  transition: width 80ms linear;
}

.softphone-status-pill,
.softphone-timer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: rgba(226, 232, 240, 0.85);
  color: #475569;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dark .softphone-status-pill,
.dark .softphone-timer-pill {
  background: rgba(51, 65, 85, 0.85);
  color: #e2e8f0;
}

.softphone-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  justify-items: center;
  margin-top: 0.35rem;
}

.softphone-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 4.35rem;
  height: 4.35rem;
  border-radius: 9999px;
  border: 0;
  background: #ececf1;
  color: #1f2937;
  transition: transform 0.12s ease, background 0.12s ease;
}

.dark .softphone-key {
  background: #334155;
  color: #f8fafc;
}

.softphone-key:hover {
  background: #e2e2ea;
}

.softphone-key:active {
  transform: scale(0.96);
}

.softphone-key-main {
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1;
}

.softphone-key-sub {
  margin-top: 0.1rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748b;
}

.softphone-call-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 1.15rem;
  margin-bottom: 0.35rem;
}

.softphone-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.35rem;
  height: 4.35rem;
  border-radius: 9999px;
  border: 0;
  background: #6ee7b7;
  color: #fff;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.softphone-call-btn:hover {
  filter: brightness(1.03);
}

.softphone-call-btn:active {
  transform: scale(0.96);
}

.softphone-call-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.softphone-backspace-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 0;
  background: transparent;
  color: #64748b;
}

.softphone-backspace-btn:hover {
  color: #334155;
}

.softphone-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0.1rem auto 0.35rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.95);
  color: #64748b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.dark .softphone-scroll-hint {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

.softphone-scroll-hint:hover {
  color: #334155;
  border-color: rgba(148, 163, 184, 0.55);
}

.dark .softphone-scroll-hint:hover {
  color: #e2e8f0;
}

.softphone-scroll-hint:not(.hidden) {
  animation: softphone-scroll-hint-bounce 1.6s ease-in-out infinite;
}

@keyframes softphone-scroll-hint-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

.softphone-bottom-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.15rem;
  padding: 0.35rem 0.5rem 0.15rem;
  flex-shrink: 0;
}

.softphone-nav-btn span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.softphone-queue-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.85);
}

.dark .softphone-queue-item {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.85);
}

.softphone-queue-dial {
  flex-shrink: 0;
  border-radius: 0.75rem;
  background: #6ee7b7;
  color: #fff;
  padding: 0.45rem 0.75rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.softphone-queue-dial:hover {
  filter: brightness(1.05);
}

.softphone-contact-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0.7rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.85);
}

.dark .softphone-contact-row {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.85);
}

.softphone-contact-row__body {
  min-width: 0;
  flex: 1 1 auto;
}

.softphone-contact-row__meta {
  margin-top: 0.15rem;
  font-size: 0.625rem;
  line-height: 1.25;
  color: #64748b;
}

.dark .softphone-contact-row__meta {
  color: #94a3b8;
}

.softphone-contact-row__call {
  flex-shrink: 0;
  align-self: center;
}

.softphone-lead-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  color: #334155;
}

.dark .softphone-lead-nav-btn {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.softphone-lead-nav-btn:hover:not(:disabled) {
  border-color: rgba(250, 204, 21, 0.55);
}

.softphone-lead-nav-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

@media (max-height: 720px) {
  .softphone-key {
    width: 3.75rem;
    height: 3.75rem;
  }

  .softphone-key-main {
    font-size: 1.45rem;
  }

  .softphone-call-btn {
    width: 3.75rem;
    height: 3.75rem;
  }

  .softphone-keypad-grid {
    gap: 0.55rem 0.75rem;
  }

  .softphone-call-row {
    margin-top: 0.75rem;
  }
}

.softphone-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.35rem 0.15rem;
  border: 0;
  border-radius: 0.85rem;
  background: transparent;
  color: #64748b;
  font-size: 0.625rem;
  font-weight: 600;
}

.softphone-nav-btn svg {
  opacity: 0.85;
}

.softphone-nav-btn--active {
  background: rgba(226, 232, 240, 0.95);
  color: #0f172a;
}

.dark .softphone-nav-btn--active {
  background: rgba(51, 65, 85, 0.95);
  color: #f8fafc;
}

.softphone-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dark .softphone-link-card {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.softphone-link-card:hover {
  background: #fff;
  border-color: rgba(148, 163, 184, 0.45);
}

.softphone-ctrl-btn {
  border-radius: 0.75rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.45rem 0.35rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
}

.dark .softphone-ctrl-btn {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.softphone-ctrl-btn--danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.softphone-ctrl-btn--ghl {
  background: #f97316;
  border-color: #ea580c;
  color: #fff;
}

.softphone-ctrl-btn--ghl:hover {
  background: #ea580c;
}

.softphone-ctrl-btn--ghl:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.softphone-ctrl-btn--primary {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.dark .softphone-ctrl-btn--primary {
  background: #f8fafc;
  border-color: #f8fafc;
  color: #0f172a;
}

.softphone-quick-log {
  border-radius: 9999px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #faf8f3;
  padding: 0.35rem 0.5rem;
  font-size: 0.5625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1e293b;
  line-height: 1.2;
}

.dark .softphone-quick-log {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

.softphone-quick-log:hover {
  border-color: rgba(250, 204, 21, 0.55);
}

.softphone-quick-log[data-active='true'] {
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.14);
}

.dark .softphone-quick-log[data-active='true'] {
  background: rgba(250, 204, 21, 0.12);
}

.softphone-action-btn {
  border-radius: 0.95rem;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.softphone-action-btn--vm {
  background: #7c3aed;
  color: #fff;
}

.softphone-action-btn--vm-outline {
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
}

.dark .softphone-action-btn--vm-outline {
  color: #ddd6fe;
}

.tag-filter-combobox-option.is-selected {
  background: rgba(250, 204, 21, 0.15);
}

.dark .tag-filter-combobox-option.is-selected {
  background: rgba(250, 204, 21, 0.12);
}

/* Pipeline toolbar — don't clip Table/Pipeline toggle focus rings */
.pipeline-actions-toolbar {
  overflow-y: visible;
}

[data-pipeline-menu-panel] {
  z-index: 10000 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  background: #ffffff !important;
  color: var(--brand-dark);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: isolate;
  opacity: 1 !important;
}

.pipeline-import-export-menu-panel,
.pipeline-import-export-menu-panel__surface {
  background-color: #ffffff !important;
  background-image: none !important;
  background: #ffffff !important;
}

[data-pipeline-menu-panel].hidden,
[data-pipeline-menu-panel][hidden] {
  display: none !important;
}

.dark .pipeline-import-export-menu-panel,
.dark .pipeline-import-export-menu-panel__surface,
html.dark .pipeline-import-export-menu-panel,
html.dark .pipeline-import-export-menu-panel__surface {
  background-color: #0f172a !important;
  background: #0f172a !important;
  color: #f8fafc;
}

.dark [data-pipeline-menu-panel],
html.dark [data-pipeline-menu-panel] {
  background-color: #0f172a !important;
  background: #0f172a !important;
  color: #f8fafc;
}

[data-pipeline-menu-panel]:not(.hidden) {
  box-shadow:
    0 16px 40px -10px rgba(15, 23, 42, 0.18),
    0 6px 16px -6px rgba(15, 23, 42, 0.12);
}

.dark [data-pipeline-menu-panel]:not(.hidden) {
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.55);
}

.pipeline-view-toggle-wrap {
  overflow: visible;
}

.pipeline-search-card {
  overflow: visible !important;
}

.pipeline-search-card details,
.pipeline-search-card .tag-filter-combobox {
  overflow: visible;
}

.tag-filter-combobox-menu {
  min-width: 12rem;
  z-index: 10000 !important;
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: var(--brand-dark);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: isolate;
  opacity: 1 !important;
}

.dark .tag-filter-combobox-menu,
html.dark .tag-filter-combobox-menu {
  background-color: #0f172a !important;
  background: #0f172a !important;
  color: #f8fafc;
}

.tag-filter-combobox-menu [data-tag-filter-list],
.tag-filter-combobox-menu > .p-2 {
  background-color: inherit;
}

.tag-filter-combobox-option {
  background-color: transparent;
}

.tag-filter-combobox-menu:not(.hidden) {
  box-shadow:
    0 16px 40px -10px rgba(15, 23, 42, 0.18),
    0 6px 16px -6px rgba(15, 23, 42, 0.12);
}

.dark .tag-filter-combobox-menu:not(.hidden) {
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.55);
}

/* Direct Mail — preview zoom + saved library */
.dm-preview-btn:focus-visible {
  outline: 2px solid var(--brand-yellow);
  outline-offset: 2px;
}

.dm-preview-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dm-lightbox:not(.hidden) {
  display: flex;
  z-index: 9999;
}

.dm-saved-card {
  position: relative;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(250, 247, 237, 0.5);
  aspect-ratio: 2 / 3;
}

.dark .dm-saved-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.6);
}

.dm-saved-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dm-saved-slot-badge {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  z-index: 2;
  padding: 0.15rem 0.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dark .dm-saved-slot-badge {
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
}

.dm-export-actions .dm-studio-topbtn {
  font-size: 10px;
}

.dm-post-copy-section {
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.dark .dm-post-copy-section {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.dm-post-copy-editor {
  font-size: 12px;
  line-height: 1.55;
  min-height: 7.5rem;
}

.dm-saved-card-actions {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.25rem;
  padding: 0.35rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.72), transparent 55%);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.dm-saved-card:hover .dm-saved-card-actions,
.dm-saved-card:focus-within .dm-saved-card-actions {
  opacity: 1;
}

/* Direct Mail Studio — Canva-style workspace */
.dm-studio-page {
  --dm-sidebar-w: 17.5rem;
  --dm-rail-w: 4.25rem;
  --dm-inspector-w: 18rem;
  --dm-canvas-bg: #e8e4dc;
  --dm-canvas-dot: rgba(17, 24, 39, 0.08);
}

.dark .dm-studio-page {
  --dm-canvas-bg: #1a1f2e;
  --dm-canvas-dot: rgba(255, 255, 255, 0.06);
}

.dm-studio-root {
  max-width: none;
  padding: 0;
}

.dm-studio-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.dark .dm-studio-topbar {
  background: rgba(15, 23, 42, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dm-studio-eyebrow {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-muted, #6b7280);
  margin-bottom: 0.15rem;
}

.dm-studio-title {
  font-family: var(--font-display, inherit);
  font-weight: 800;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  letter-spacing: -0.02em;
  color: var(--brand-dark, #111827);
}

.dark .dm-studio-title {
  color: #fff;
}

.dm-studio-topbar-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  min-width: 0;
}

.dm-studio-format-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(250, 204, 21, 0.18);
  color: #854d0e;
  border: 1px solid rgba(250, 204, 21, 0.35);
}

.dark .dm-studio-format-pill {
  color: #fde68a;
}

.dm-studio-topbar-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.dm-studio-badge {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}

.dm-studio-badge--ok {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.dm-studio-badge--warn {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

.dm-studio-topbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff;
  color: var(--brand-dark, #111827);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dark .dm-studio-topbtn {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.dm-studio-topbtn:hover {
  border-color: rgba(250, 204, 21, 0.55);
}

.dm-studio-topbtn--primary {
  background: var(--brand-yellow, #facc15);
  border-color: transparent;
  color: var(--brand-dark, #111827);
}

.dm-studio-topbtn--match {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.35);
  color: rgb(67, 56, 202);
}

.dark .dm-studio-topbtn--match {
  background: rgba(129, 140, 248, 0.12);
  border-color: rgba(129, 140, 248, 0.35);
  color: rgb(199, 210, 254);
}

.dm-lob-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 1rem 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
}

.dm-lob-banner--ok {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.dm-lob-banner--warn {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.dm-lob-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #10b981;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.dm-lob-text {
  margin: 0;
  color: var(--brand-muted, #6b7280);
  line-height: 1.45;
}

.dm-studio {
  display: grid;
  grid-template-columns: var(--dm-rail-w) var(--dm-sidebar-w) minmax(0, 1fr) var(--dm-inspector-w);
  min-height: min(78vh, 820px);
  margin: 0 1rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: #fff;
  box-shadow: 0 20px 50px -24px rgba(17, 24, 39, 0.25);
}

.dark .dm-studio {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.08);
}

.dm-studio-rail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding: 0.65rem 0.4rem;
  background: #faf7ed;
  border-right: 1px solid rgba(17, 24, 39, 0.08);
}

.dark .dm-studio-rail {
  background: #111827;
  border-right-color: rgba(255, 255, 255, 0.06);
}

.dm-rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.55rem 0.25rem;
  border-radius: 0.65rem;
  border: none;
  background: transparent;
  color: var(--brand-muted, #6b7280);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.dm-rail-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.dm-rail-btn span {
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dm-rail-btn:hover,
.dm-rail-btn.is-active {
  background: rgba(250, 204, 21, 0.2);
  color: var(--brand-dark, #111827);
}

.dark .dm-rail-btn:hover,
.dark .dm-rail-btn.is-active {
  color: #fde68a;
}

.dm-studio-drawer {
  border-right: 1px solid rgba(17, 24, 39, 0.08);
  overflow-y: auto;
  padding: 1rem 0.85rem 1.25rem;
  background: #fff;
}

.dark .dm-studio-drawer {
  background: #0f172a;
  border-right-color: rgba(255, 255, 255, 0.06);
}

.dm-drawer-panel[hidden] {
  display: none !important;
}

.dm-drawer-title {
  font-family: var(--font-display, inherit);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--brand-dark, #111827);
  margin-bottom: 0.35rem;
}

.dark .dm-drawer-title {
  color: #fff;
}

.dm-drawer-desc {
  font-size: 0.6875rem;
  color: var(--brand-muted, #6b7280);
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.dm-format-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.dm-format-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.55rem 0.5rem;
  border-radius: 0.65rem;
  border: 2px solid transparent;
  background: rgba(250, 247, 237, 0.65);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dark .dm-format-card {
  background: rgba(30, 41, 59, 0.55);
}

.dm-format-card:hover {
  border-color: rgba(250, 204, 21, 0.45);
}

.dm-format-card.is-selected {
  border-color: var(--brand-yellow, #facc15);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35);
}

.dm-format-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.15rem;
  color: var(--brand-muted, #6b7280);
}

.dm-format-card.is-selected .dm-format-icon,
.dm-format-card:hover .dm-format-icon {
  color: var(--brand-dark, #111827);
}

.dark .dm-format-card.is-selected .dm-format-icon,
.dark .dm-format-card:hover .dm-format-icon {
  color: #fde68a;
}

.dm-playbook-card:hover {
  border-color: rgba(250, 204, 21, 0.45);
}

.dm-playbook-card.is-selected {
  border-color: var(--brand-yellow, #facc15);
  background: rgba(250, 204, 21, 0.08);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35);
}

.dm-format-icon-svg {
  width: 1.35rem;
  height: 1.35rem;
}

.dm-rail-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.72;
}

.dm-rail-btn.is-active svg,
.dm-rail-btn:hover svg {
  opacity: 1;
}

.dm-fullscreen-btn {
  gap: 0.35rem;
}

.dm-fullscreen-label {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dm-fullscreen-btn-canvas {
  width: auto;
  min-width: 1.85rem;
  padding: 0 0.35rem;
  margin-right: 0.25rem;
}

.dm-fullscreen-btn .hidden,
.dm-fullscreen-btn-canvas .hidden {
  display: none;
}

/* Full-screen studio mode */
body.dm-studio-fullscreen-active {
  overflow: hidden;
}

body.dm-studio-fullscreen-active #appSidebar,
body.dm-studio-fullscreen-active #appTopbar {
  display: none !important;
}

body.dm-studio-fullscreen-active.app-with-sidebar {
  grid-template-columns: 1fr !important;
}

body.dm-studio-fullscreen-active .app-shell-content {
  grid-column: 1 / -1;
  min-height: 100vh;
}

body.dm-studio-fullscreen-active .dm-studio-shell {
  position: fixed;
  inset: 0;
  z-index: 280;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--brand-bg, #faf7ed);
  padding: 0;
}

.dark body.dm-studio-fullscreen-active .dm-studio-shell {
  background: #0f172a;
}

body.dm-studio-fullscreen-active .dm-studio-topbar {
  position: relative;
  top: auto;
  flex-shrink: 0;
}

body.dm-studio-fullscreen-active .dm-lob-banner {
  flex-shrink: 0;
  margin: 0 0.75rem 0.35rem;
}

body.dm-studio-fullscreen-active .dm-studio {
  flex: 1;
  min-height: 0;
  margin: 0 0.75rem 0.75rem;
  max-height: none;
}

body.dm-studio-fullscreen-active .dm-studio-stage {
  min-height: 0;
}

body.dm-studio-fullscreen-active .dm-canvas-viewport {
  min-height: 0;
}

body.dm-studio-fullscreen-active .dm-workflow-section {
  display: none;
}

.dm-format-label {
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--brand-dark, #111827);
}

.dark .dm-format-label {
  color: #f1f5f9;
}

.dm-format-sub {
  font-size: 0.5625rem;
  color: var(--brand-muted, #6b7280);
}

.dm-drawer-settings {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.dark .dm-drawer-settings {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.dm-field-label {
  display: block;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-muted, #6b7280);
  margin-bottom: 0.25rem;
}

.dm-select,
.dm-input {
  width: 100%;
  border-radius: 0.55rem;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff;
  padding: 0.45rem 0.55rem;
  font-size: 0.8125rem;
  color: var(--brand-dark, #111827);
}

.dark .dm-select,
.dark .dm-input {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.dm-brand-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dm-brand-logo-row {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.dm-brand-logo-preview {
  width: 4rem;
  height: 4rem;
  border-radius: 0.55rem;
  border: 1px dashed rgba(17, 24, 39, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 0.5625rem;
  color: var(--brand-muted, #6b7280);
  background: rgba(250, 247, 237, 0.5);
}

.dm-brand-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.dm-brand-logo-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.dm-brand-save-status {
  font-size: 0.625rem;
  min-height: 1rem;
  color: var(--brand-muted, #6b7280);
}

.dm-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--brand-muted, #6b7280);
  cursor: pointer;
}

.dm-merge-preview {
  font-size: 0.6875rem;
  color: var(--brand-muted, #6b7280);
  margin-bottom: 0.65rem;
  min-height: 1rem;
  line-height: 1.4;
}

.dm-saved-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  max-height: 22rem;
  overflow-y: auto;
}

.dm-studio-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--dm-canvas-bg);
  background-image: radial-gradient(var(--dm-canvas-dot) 1px, transparent 1px);
  background-size: 16px 16px;
}

.dm-stage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(6px);
}

.dark .dm-stage-toolbar {
  background: rgba(15, 23, 42, 0.75);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.dm-page-tabs {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 0.55rem;
  background: rgba(17, 24, 39, 0.06);
}

.dark .dm-page-tabs {
  background: rgba(255, 255, 255, 0.06);
}

.dm-page-tab {
  border: none;
  background: transparent;
  padding: 0.35rem 0.75rem;
  border-radius: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-muted, #6b7280);
  cursor: pointer;
}

.dm-page-tab.is-active {
  background: #fff;
  color: var(--brand-dark, #111827);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.12);
}

.dark .dm-page-tab.is-active {
  background: #1e293b;
  color: #fff;
}

.dm-stage-toolbar-start {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.dm-canvas-hint-tip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 0.05rem;
}

.dm-stage-toolbar-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.dm-stage-hint {
  font-size: 0.6875rem;
  color: var(--brand-muted, #6b7280);
}

.dm-new-design-btn {
  font-size: 0.6875rem;
  padding: 0.35rem 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 800;
}

.dm-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: 0.55rem;
  background: rgba(17, 24, 39, 0.06);
}

.dark .dm-zoom-controls {
  background: rgba(255, 255, 255, 0.06);
}

.dm-zoom-btn {
  width: 1.65rem;
  height: 1.65rem;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-dark, #111827);
  cursor: pointer;
}

.dark .dm-zoom-btn {
  color: #e2e8f0;
}

.dm-zoom-btn:hover {
  background: rgba(250, 204, 21, 0.25);
}

.dm-zoom-label {
  font-size: 0.625rem;
  font-weight: 800;
  min-width: 2.75rem;
  text-align: center;
  color: var(--brand-muted, #6b7280);
}

.dm-canvas-viewport {
  flex: 1;
  min-height: 14rem;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.dm-canvas-viewport.is-canvas-zoomed {
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.dm-canvas-scaler {
  transform-origin: center center;
  transition: zoom 0.15s ease, transform 0.15s ease;
  will-change: zoom, transform;
}

@supports not (zoom: 1) {
  .dm-canvas-scaler {
    transform: scale(var(--dm-zoom, 1));
  }
}

.dm-artboard-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dm-artboard {
  position: relative;
  width: min(22rem, 72vw);
  max-height: min(34rem, 62vh);
  border: none;
  padding: 0;
  border-radius: 0.35rem;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(17, 24, 39, 0.08),
    0 24px 48px -20px rgba(17, 24, 39, 0.35);
  cursor: zoom-in;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.dm-artboard.has-image {
  cursor: zoom-in;
}

.dm-artboard.has-image:hover {
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.55),
    0 24px 48px -20px rgba(17, 24, 39, 0.35);
}

.dm-artboard-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dm-lob-zone {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  border: 2px dashed rgba(239, 68, 68, 0.85);
  background: repeating-linear-gradient(
    -45deg,
    rgba(254, 226, 226, 0.45),
    rgba(254, 226, 226, 0.45) 6px,
    rgba(255, 255, 255, 0.15) 6px,
    rgba(255, 255, 255, 0.15) 12px
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.dm-lob-zone--address {
  right: 4.4%;
  bottom: 5.9%;
  width: 52.5%;
  height: 55.9%;
}

.dm-lob-zone--qr {
  right: 5%;
  bottom: 7%;
  width: 12%;
  height: 18%;
}

.dm-lob-zone--safe {
  left: 4%;
  top: 5.9%;
  width: 92%;
  height: 88.2%;
  border-color: rgba(59, 130, 246, 0.75);
  background: transparent;
}

body:not(.dm-show-lob-zones) .dm-lob-zone {
  display: none;
}

.dark .dm-lob-zone {
  border-color: rgba(248, 113, 113, 0.9);
  background: repeating-linear-gradient(
    -45deg,
    rgba(127, 29, 29, 0.35),
    rgba(127, 29, 29, 0.35) 6px,
    rgba(15, 23, 42, 0.2) 6px,
    rgba(15, 23, 42, 0.2) 12px
  );
}

.dm-artboard-empty {
  font-size: 0.6875rem;
  color: var(--brand-muted, #6b7280);
  text-align: center;
  padding: 1rem;
  line-height: 1.45;
}

.dm-artboard-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  left: auto;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  background: rgba(17, 24, 39, 0.65);
  color: #fff;
  pointer-events: none;
}

.dm-preview-zoom-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.45rem;
  border-radius: 0.35rem;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.dm-artboard:hover .dm-preview-zoom-badge {
  opacity: 1;
}

.dm-artboard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dm-artboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 0.35rem 0.75rem 0.5rem;
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(17, 24, 39, 0.06);
}

.dark .dm-artboard-actions {
  background: rgba(15, 23, 42, 0.55);
  border-top-color: rgba(255, 255, 255, 0.05);
}

.dm-text-btn {
  border: none;
  background: none;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-yellow, #ca8a04);
  cursor: pointer;
}

.dm-prompt-resizer {
  flex-shrink: 0;
  height: 0.45rem;
  margin: 0 0.75rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  cursor: row-resize;
  position: relative;
  transition: background 0.15s ease;
}

.dm-prompt-resizer:hover,
.dm-prompt-resizer.is-dragging {
  background: rgba(250, 204, 21, 0.45);
}

.dm-prompt-resizer::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2.5rem;
  height: 0.2rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.2);
}

.dark .dm-prompt-resizer {
  background: rgba(255, 255, 255, 0.08);
}

.dark .dm-prompt-resizer::after {
  background: rgba(255, 255, 255, 0.25);
}

body.dm-prompt-resize-active {
  cursor: row-resize !important;
  user-select: none !important;
}

.dm-prompt-dock {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 7.5rem;
  max-height: min(52vh, 28rem);
  height: var(--dm-prompt-h, 11.5rem);
  padding: 0.65rem 0.75rem 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(8px);
}

.dark .dm-prompt-dock {
  background: rgba(15, 23, 42, 0.92);
  border-top-color: rgba(255, 255, 255, 0.06);
}

.dm-chat-log {
  flex: 1;
  min-height: 4.5rem;
  max-height: none;
  overflow-y: auto;
  margin-bottom: 0.5rem;
  padding: 0.35rem;
  border-radius: 0.55rem;
  background: rgba(250, 247, 237, 0.45);
}

.dark .dm-chat-log {
  background: rgba(30, 41, 59, 0.45);
}

.dm-chat-welcome {
  font-size: 0.6875rem;
  color: var(--brand-muted, #6b7280);
  line-height: 1.45;
}

.dm-prompt-row {
  display: flex;
  gap: 0.45rem;
  align-items: flex-end;
}

.dm-prompt-compose {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex-shrink: 0;
}

.dm-prompt-input-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1.25rem;
}

.dm-prompt-input-head__help {
  margin-left: auto;
  flex-shrink: 0;
}

/* Design studio status icon — color dot + hover tooltip */
.dm-status-tip {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  flex-shrink: 0;
}

.dm-status-tip.hidden {
  display: none !important;
}

.dm-status-tip__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border-radius: 0.45rem;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.95);
  cursor: default;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dark .dm-status-tip__btn {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
}

.dm-status-tip__btn:hover,
.dm-status-tip__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.35);
}

.dm-status-tip__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--dm-status-color, #9ca3af);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--dm-status-color, #9ca3af) 25%, transparent);
}

.dm-status-tip--idle {
  --dm-status-color: #9ca3af;
}

.dm-status-tip--info {
  --dm-status-color: #2563eb;
}

.dm-status-tip--ok {
  --dm-status-color: #059669;
}

.dm-status-tip--error {
  --dm-status-color: #e11d48;
}

.dm-status-tip--warn {
  --dm-status-color: #d97706;
}

.dm-status-tip__panel {
  position: absolute;
  z-index: 60;
  min-width: 12rem;
  max-width: min(22rem, 70vw);
  padding: 0.45rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.dm-status-tip--top .dm-status-tip__panel {
  bottom: calc(100% + 0.35rem);
  left: 0;
}

.dm-status-tip--bottom .dm-status-tip__panel {
  top: calc(100% + 0.35rem);
  left: 0;
}

.dm-status-tip--align-center .dm-status-tip__panel {
  left: 50%;
  transform: translateX(-50%) translateY(4px);
}

.dm-status-tip--align-end .dm-status-tip__panel {
  left: auto;
  right: 0;
}

.dm-status-tip--bottom.dm-status-tip--align-center .dm-status-tip__panel {
  transform: translateX(-50%) translateY(-4px);
}

.dm-status-tip:hover .dm-status-tip__panel,
.dm-status-tip:focus-within .dm-status-tip__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dm-status-tip--align-center:hover .dm-status-tip__panel,
.dm-status-tip--align-center:focus-within .dm-status-tip__panel {
  transform: translateX(-50%) translateY(0);
}

.dm-status-tip--bottom.dm-status-tip--align-center:hover .dm-status-tip__panel,
.dm-status-tip--bottom.dm-status-tip--align-center:focus-within .dm-status-tip__panel {
  transform: translateX(-50%) translateY(0);
}

.dm-status-tip__panel-inner {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: #fff;
  color: var(--brand-dark, #111827);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
}

.dark .dm-status-tip__panel-inner {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.dm-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.dm-prompt-input--stacked {
  width: 100%;
  flex: none;
  min-height: 3.25rem;
}

.dm-prompt-input {
  flex: 1;
  min-height: 2.65rem;
  max-height: 6rem;
  resize: vertical;
  border-radius: 0.75rem;
  border: 1px solid rgba(17, 24, 39, 0.12);
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  background: #fff;
  color: var(--brand-dark, #111827);
}

.dark .dm-prompt-input {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.dm-prompt-btn {
  flex-shrink: 0;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 0.75rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #fff;
  color: var(--brand-dark, #111827);
  cursor: pointer;
}

.dm-prompt-btn--primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--brand-yellow, #facc15);
  border-color: transparent;
}

.dm-prompt-btn--both {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
  color: #5b21b6;
}

.dark .dm-prompt-btn--both {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(167, 139, 250, 0.4);
  color: #ddd6fe;
}


.dm-studio-inspector {
  border-left: 1px solid rgba(17, 24, 39, 0.08);
  padding: 1rem 0.85rem;
  overflow-y: auto;
  background: #fff;
}

.dark .dm-studio-inspector {
  background: #0f172a;
  border-left-color: rgba(255, 255, 255, 0.06);
}

.dm-prompt-editor-wrap.hidden {
  display: none;
}

.dm-prompt-editor {
  min-height: 10rem;
  font-size: 0.75rem;
  line-height: 1.45;
}

.dm-slot-badge {
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.2);
  color: #854d0e;
}

.dm-inspector-tips {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.dark .dm-inspector-tips {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.dm-workflow-section {
  padding: 1.25rem 1rem 2rem;
  max-width: none;
}

.dm-workflow-summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-dark, #111827);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  list-style: none;
}

.dark .dm-workflow-summary {
  color: #fff;
}

.dm-workflow-summary::-webkit-details-marker {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1280px) {
  .dm-studio {
    grid-template-columns: var(--dm-rail-w) minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .dm-studio-drawer {
    grid-column: 2;
    grid-row: 1;
    max-height: 14rem;
    border-right: none;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  }

  .dm-studio-stage {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 28rem;
  }

  .dm-studio-inspector {
    display: none;
  }
}

@media (max-width: 768px) {
  .dm-studio {
    grid-template-columns: 1fr;
    margin: 0 0.5rem;
  }

  .dm-studio-rail {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  }

  .dm-rail-btn {
    min-width: 4rem;
  }

  .dm-studio-drawer {
    grid-column: 1;
  }
}

/* App-wide navbar lead search */
.nav-lead-search {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: none;
}

@media (min-width: 768px) {
  #appTopbar .app-topbar-inner {
    width: 100%;
    max-width: none;
  }

  #appTopbar .nav-lead-search {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }
}

.nav-lead-search-form {
  position: relative;
}

.nav-lead-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-lead-search-icon {
  position: absolute;
  left: 0.85rem;
  width: 1rem;
  height: 1rem;
  color: rgb(100 116 139);
  pointer-events: none;
}

.dark .nav-lead-search-icon {
  color: rgb(148 163 184);
}

.nav-lead-search-input {
  width: 100%;
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0.55rem 4.25rem 0.55rem 2.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgb(15 23 42);
  transition: color 0.15s ease;
  box-shadow: none;
}

.dark .nav-lead-search-input {
  background: transparent;
  color: rgb(248 250 252);
}

.nav-lead-search-input::placeholder {
  color: rgb(100 116 139 / 0.85);
  font-weight: 500;
}

.dark .nav-lead-search-input::placeholder {
  color: rgb(148 163 184 / 0.85);
}

.nav-lead-search-input:focus {
  outline: none;
  border: none;
  box-shadow: none;
  background: transparent;
}

.dark .nav-lead-search-input:focus {
  background: transparent;
}

.nav-lead-search-kbd {
  position: absolute;
  right: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 0.375rem;
  border: none;
  background: rgb(243 244 246 / 0.9);
  color: rgb(156 163 175);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

.dark .nav-lead-search-kbd {
  background: rgb(255 255 255 / 0.08);
  color: rgb(148 163 184);
}

.nav-lead-search-clear {
  position: absolute;
  right: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 9999px;
  color: rgb(100 116 139);
}

.nav-lead-search-clear:hover {
  background: rgb(241 245 249);
  color: rgb(51 65 85);
}

.dark .nav-lead-search-clear:hover {
  background: rgb(51 65 85);
  color: rgb(226 232 240);
}

.nav-lead-search-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 130;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(255 255 255);
  box-shadow: 0 18px 40px rgb(15 23 42 / 0.14);
  max-height: min(22rem, calc(100vh - 7rem));
  overflow-y: auto;
}

.dark .nav-lead-search-dropdown {
  border-color: rgb(255 255 255 / 0.1);
  background: rgb(15 23 42);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.45);
}

.nav-lead-search--mobile .nav-lead-search-dropdown {
  position: relative;
  top: 0.35rem;
  max-height: min(18rem, calc(100vh - 9rem));
}

.nav-lead-search-item,
.nav-lead-search-footer,
.nav-lead-search-empty,
.nav-lead-search-loading {
  display: block;
  width: 100%;
  text-align: left;
}

.nav-lead-search-item {
  padding: 0.65rem 0.9rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-lead-search-item:hover,
.nav-lead-search-item--active {
  background: rgb(254 249 195 / 0.55);
}

.dark .nav-lead-search-item:hover,
.dark .nav-lead-search-item--active {
  background: rgb(250 204 21 / 0.08);
}

.nav-lead-search-item-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgb(15 23 42);
  line-height: 1.25;
}

.dark .nav-lead-search-item-title {
  color: rgb(248 250 252);
}

.nav-lead-search-item-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(100 116 139);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dark .nav-lead-search-item-meta {
  color: rgb(148 163 184);
}

.nav-lead-search-footer {
  padding: 0.65rem 0.9rem;
  border: 0;
  border-top: 1px solid rgb(226 232 240);
  background: rgb(248 250 252);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(161 98 7);
  cursor: pointer;
}

.dark .nav-lead-search-footer {
  border-top-color: rgb(255 255 255 / 0.08);
  background: rgb(30 41 59 / 0.65);
  color: rgb(250 204 21);
}

.nav-lead-search-empty,
.nav-lead-search-loading {
  padding: 0.85rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(100 116 139);
}

.dark .nav-lead-search-empty,
.dark .nav-lead-search-loading {
    color: rgb(148 163 184);
}

/* ========= App info tip (i) hover tooltips ========= */
.app-info-tip {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
    flex-shrink: 0;
}

.app-info-tip__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 1px solid rgb(203 213 225 / 0.85);
    border-radius: 9999px;
    background: rgb(255 255 255 / 0.92);
    color: rgb(100 116 139);
    cursor: help;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dark .app-info-tip__btn {
    border-color: rgb(255 255 255 / 0.14);
    background: rgb(30 41 59 / 0.85);
    color: rgb(148 163 184);
}

.app-info-tip__btn:hover,
.app-info-tip__btn:focus-visible {
    color: rgb(234 179 8);
    border-color: rgb(234 179 8 / 0.55);
    background: rgb(254 252 232 / 0.95);
    box-shadow: 0 0 0 2px rgb(234 179 8 / 0.18);
    outline: none;
}

.dark .app-info-tip__btn:hover,
.dark .app-info-tip__btn:focus-visible {
    background: rgb(51 65 85 / 0.95);
    color: rgb(250 204 21);
}

.app-info-tip--sm .app-info-tip__btn {
    width: 1.15rem;
    height: 1.15rem;
}

.app-info-tip--lg .app-info-tip__btn {
    width: 1.5rem;
    height: 1.5rem;
}

.app-info-tip__icon {
    width: 0.72rem;
    height: 0.72rem;
}

.app-info-tip--sm .app-info-tip__icon {
    width: 0.62rem;
    height: 0.62rem;
}

.app-info-tip--lg .app-info-tip__icon {
    width: 0.82rem;
    height: 0.82rem;
}

.app-info-tip__panel {
    position: absolute;
    z-index: 60;
    margin-top: 0.4rem;
    padding: 0.65rem 0.85rem;
    max-width: min(calc(100vw - 2rem), 26rem);
    width: max-content;
    border-radius: 0.85rem;
    border: 1px solid var(--brand-border);
    background: var(--brand-card-bg);
    box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.14), 0 6px 14px -6px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.dark .app-info-tip__panel {
    box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.5), 0 6px 14px -6px rgba(0, 0, 0, 0.28);
}

.app-info-tip--wide .app-info-tip__panel {
    max-width: min(calc(100vw - 2rem), 34rem);
}

.app-info-tip--bottom .app-info-tip__panel {
    top: 100%;
    bottom: auto;
}

.app-info-tip--top .app-info-tip__panel {
    bottom: 100%;
    top: auto;
    margin-top: 0;
    margin-bottom: 0.4rem;
    transform: translateY(-4px);
}

.app-info-tip--align-start .app-info-tip__panel {
    left: 0;
    right: auto;
}

.app-info-tip--align-center .app-info-tip__panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(4px);
}

.app-info-tip--align-end .app-info-tip__panel {
    left: auto;
    right: 0;
}

.app-info-tip--top.app-info-tip--align-center .app-info-tip__panel {
    transform: translateX(-50%) translateY(-4px);
}

.app-info-tip:hover .app-info-tip__panel,
.app-info-tip:focus-within .app-info-tip__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.app-info-tip--align-start:hover .app-info-tip__panel,
.app-info-tip--align-start:focus-within .app-info-tip__panel {
    transform: translateY(0);
}

.app-info-tip--align-end:hover .app-info-tip__panel,
.app-info-tip--align-end:focus-within .app-info-tip__panel {
    transform: translateY(0);
}

.app-info-tip--top.app-info-tip--align-start:hover .app-info-tip__panel,
.app-info-tip--top.app-info-tip--align-start:focus-within .app-info-tip__panel {
    transform: translateY(0);
}

.app-info-tip--top.app-info-tip--align-end:hover .app-info-tip__panel,
.app-info-tip--top.app-info-tip--align-end:focus-within .app-info-tip__panel {
    transform: translateY(0);
}

.app-info-tip--align-center:hover .app-info-tip__panel,
.app-info-tip--align-center:focus-within .app-info-tip__panel {
    transform: translateX(-50%) translateY(0);
}

.app-info-tip--top.app-info-tip--align-center:hover .app-info-tip__panel,
.app-info-tip--top.app-info-tip--align-center:focus-within .app-info-tip__panel {
    transform: translateX(-50%) translateY(0);
}

.app-info-tip__panel-inner {
    display: block;
    color: rgb(71 85 105);
    font-weight: 500;
}

.dark .app-info-tip__panel-inner {
    color: rgb(203 213 225);
}

.app-info-tip__panel-inner code {
    font-size: 0.68rem;
}

.app-info-tip__panel-inner ul {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
    list-style: disc;
}

.app-info-tip__panel-inner li + li {
    margin-top: 0.25rem;
}

.page-heading-with-tip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}
