/* Zypexa Stage 6 Pass 1 — shared SaaS UI system and page shell cleanup. */
:root {
    --zxp-page-max-width: none;
    --zxp-page-readable-width: 1180px;
    --zxp-page-gutter: clamp(14px, 1.45vw, 26px);
    --zxp-page-gap: clamp(14px, 1.35vw, 22px);
    --zxp-card-padding: clamp(16px, 1.45vw, 24px);
    --zxp-card-radius: var(--surface-radius);
    --zxp-control-radius: var(--control-radius);
    --zxp-grid-gap: clamp(10px, 1.15vw, 18px);
    --zxp-shadow-soft: var(--surface-shadow);
    --zxp-shadow-lifted: var(--surface-shadow-lifted);
    --zxp-border-soft: var(--surface-border);
    --zxp-surface-soft: rgba(248, 251, 255, 0.92);
}

.zxp-app-shell {
    isolation: isolate;
}

.zxp-page-shell {
    width: 100%;
    max-width: var(--zxp-page-max-width);
    min-width: 0;
    margin-inline: 0;
    scroll-padding-top: 22px;
}

.zxp-page-stack,
.zxp-card-stack {
    display: grid;
    gap: var(--zxp-page-gap);
}

.zxp-page-header,
.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--zxp-page-gap);
    min-width: 0;
}

.zxp-page-title-group,
.page-header-row > div:first-child {
    min-width: 0;
}

.zxp-page-eyebrow,
.page-header-row .eyebrow,
.profile-hero-kicker {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.1em;
    line-height: 1.25;
    text-transform: uppercase;
}

.zxp-page-title,
.page-header-row h1 {
    margin-bottom: 8px;
}

.zxp-page-subtitle,
.page-header-row .muted-text,
.zxp-card-subtitle,
.profile-card-header .muted,
.profile-card-header .muted-text {
    max-width: 78ch;
    margin-top: 0;
    color: #5f6f84;
    line-height: 1.5;
}

.zxp-page-actions,
.zxp-card-actions,
.page-header-row > div:last-child,
.topbar-actions {
    min-width: 0;
}

.zxp-card,
.profile-card,
.dashboard-card,
.crm-tasks-card,
.notifications-card,
.account-crm-work-card,
.saas-card,
.card {
    min-width: 0;
    border-color: var(--zxp-border-soft);
}

.zxp-card,
.profile-card,
.dashboard-card,
.crm-tasks-card,
.notifications-card,
.account-crm-work-card {
    box-shadow: var(--zxp-shadow-soft);
}

.zxp-card-header,
.profile-card-header,
.crm-tasks-card__head,
.notifications-card__head,
.account-crm-work-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.zxp-card-title,
.zxp-card-header h2,
.profile-card-header h2,
.crm-tasks-card__head h2,
.notifications-card__head h2 {
    margin-bottom: 5px;
    letter-spacing: -0.03em;
}

.zxp-toolbar,
.zxp-filter-row,
.record-layout-toolbar,
.crm-tasks-filters {
    min-width: 0;
    border-color: var(--zxp-border-soft);
}

.zxp-toolbar,
.record-layout-toolbar {
    box-shadow: 0 12px 28px rgba(8, 47, 73, 0.055);
}

.zxp-filter-row,
.crm-tasks-filters {
    padding: 12px;
    border-radius: 18px;
    background: var(--zxp-surface-soft);
}

.zxp-metric-grid,
.stats,
.profile-metric-grid,
.metric-grid,
.crm-tasks-metrics,
.notifications-summary,
.account-crm-work-metrics {
    gap: var(--zxp-grid-gap);
}

.zxp-metric-card,
.stat,
.profile-metric-card,
.metric-card,
.crm-tasks-metric,
.notifications-summary-card,
.profile-summary-pill {
    border-color: var(--zxp-border-soft);
}

.zxp-empty-state,
.empty-state,
.notifications-empty-state,
.builder-empty,
.record-metric-empty-state {
    border-color: var(--zxp-border-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.92));
}

.zxp-status-badge,
.status-pill,
.tag,
.badge,
.mode-pill,
.user-pill {
    max-width: 100%;
    line-height: 1.1;
    white-space: nowrap;
}

.zxp-inline-help,
.inline-help,
.inline-help-card,
.muted-text,
.small {
    line-height: 1.5;
}

.zxp-button-row,
.button-row,
.form-actions,
.table-actions,
.crm-tasks-filter-actions,
.notifications-header__actions,
.notification-card__actions,
.account-crm-task-actions {
    min-width: 0;
    row-gap: 8px;
}

.zxp-responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: var(--zxp-grid-gap);
}

.zxp-table-wrap,
.table-wrap,
.crm-tasks-table-wrap {
    max-width: 100%;
    border-color: var(--zxp-border-soft);
    border-radius: 18px;
}

.zxp-visually-muted {
    color: var(--muted);
    font-weight: 750;
}

.zxp-surface-panel {
    border: 1px solid var(--zxp-border-soft);
    border-radius: var(--zxp-card-radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--zxp-shadow-soft);
}

.zxp-surface-panel--soft {
    background: var(--zxp-surface-soft);
}

.zxp-section-divider {
    height: 1px;
    margin: var(--zxp-page-gap) 0;
    border: 0;
    background: linear-gradient(90deg, transparent, var(--zxp-border-soft), transparent);
}

.zxp-app-shell button:focus-visible,
.zxp-app-shell .button:focus-visible,
.zxp-app-shell a:focus-visible,
.zxp-app-shell input:focus-visible,
.zxp-app-shell select:focus-visible,
.zxp-app-shell textarea:focus-visible {
    outline: 3px solid rgba(0, 189, 227, 0.22);
    outline-offset: 2px;
}

@media (max-width: 1100px) {
    .zxp-page-header,
    .page-header-row,
    .zxp-card-header,
    .profile-card-header,
    .crm-tasks-card__head,
    .notifications-card__head,
    .account-crm-work-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .zxp-page-actions,
    .zxp-card-actions,
    .page-header-row > div:last-child,
    .profile-card-header .button-row,
    .notifications-header__actions,
    .notification-card__actions,
    .account-crm-task-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .zxp-page-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

    .zxp-card,
    .profile-card,
    .dashboard-card,
    .crm-tasks-card,
    .notifications-card,
    .account-crm-work-card,
    .saas-card,
    .card {
        border-radius: 18px;
    }

    .zxp-button-row .button,
    .button-row .button,
    .form-actions .button,
    .table-actions .button {
        min-width: 0;
    }
}

/* Zypexa Stage 6 Pass 2 — navigation, topbar, badges, and loading states. */
:root {
    --zxp-nav-active-border: rgba(255, 255, 255, 0.14);
    --zxp-nav-active-glow: rgba(0, 189, 227, 0.20);
    --zxp-shell-loading-overlay: rgba(248, 251, 255, 0.64);
}

.zxp-topbar {
    align-items: center;
    min-width: 0;
}

.topbar-context {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.topbar-eyebrow {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
}

.topbar-eyebrow__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-support-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid rgba(37, 99, 235, 0.24);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.09);
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.zxp-topbar-actions {
    min-width: 0;
    align-items: center;
    row-gap: 8px;
    column-gap: 8px;
}

.zxp-company-switcher select {
    min-height: var(--control-height);
    max-width: min(320px, 32vw);
    padding: 8px 34px 8px 12px;
    border-color: var(--control-border);
    border-radius: var(--control-radius);
    background-color: #ffffff;
    font-weight: 850;
}

.topbar-user-pill {
    min-height: var(--control-height);
    max-width: min(240px, 22vw);
    padding: 0 12px;
    gap: 6px;
    border-color: var(--control-border);
    background: rgba(248, 251, 255, 0.96);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.045);
    overflow: hidden;
}

.topbar-user-pill strong,
.topbar-user-pill span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zxp-topbar-notification {
    min-height: var(--control-height);
    border-color: var(--control-border);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
    white-space: nowrap;
}

.zxp-topbar-notification.has-alerts {
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.14);
}

.topbar-logout-button {
    min-height: var(--control-height);
    padding: 0 13px;
    border-radius: var(--control-radius);
}

.side-nav {
    padding-bottom: 20px;
}

.side-nav-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-nav-label::after {
    content: '';
    min-width: 18px;
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, rgba(138, 163, 189, 0.32), transparent);
}

.nav-link,
.side-nav a {
    min-width: 0;
}

.nav-link[aria-current="page"],
.nav-link.active {
    border: 1px solid var(--zxp-nav-active-border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 26px var(--zxp-nav-active-glow);
}

.nav-link.has-notification-badge {
    padding-right: 9px;
}

.nav-label-text,
.nav-link:not(.has-notification-badge) {
    overflow: hidden;
}

.nav-notification-badge {
    flex: 0 0 auto;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.22);
}

.zxp-app-shell[data-zxp-navigation-state="loading"] .topbar,
body[data-zxp-navigation-state="loading"] .topbar {
    border-bottom-color: rgba(0, 189, 227, 0.22);
}

.zxp-page-shell[data-zxp-page-state="loading"],
.zxp-page-shell[data-zxp-page-state="mounting"],
.zxp-page-shell.is-page-loading {
    position: relative;
}

.zxp-page-shell[data-zxp-page-state="loading"]::before,
.zxp-page-shell[data-zxp-page-state="mounting"]::before,
.zxp-page-shell.is-page-loading::before {
    content: '';
    position: fixed;
    top: 78px;
    right: 0;
    bottom: 0;
    left: 284px;
    z-index: 1989;
    pointer-events: none;
    background: linear-gradient(180deg, var(--zxp-shell-loading-overlay), rgba(248, 251, 255, 0.20));
    opacity: 0.62;
    transition: opacity 0.16s ease;
}

body.sidebar-collapsed .zxp-page-shell[data-zxp-page-state="loading"]::before,
body.sidebar-collapsed .zxp-page-shell[data-zxp-page-state="mounting"]::before,
body.sidebar-collapsed .zxp-page-shell.is-page-loading::before {
    left: 0;
}

html.zx-navigation-loading .zxp-page-shell > * {
    transition: opacity 0.16s ease, transform 0.16s ease;
}

html.zx-navigation-loading .zxp-page-shell > *:not(.admin-status-strip):not(.flash-stack) {
    opacity: 0.72;
}

@media (max-width: 1100px) {
    .zxp-topbar {
        align-items: flex-start;
    }

    .topbar-context {
        flex: 1 1 auto;
    }

    .zxp-topbar-actions {
        justify-content: flex-start;
    }

    .zxp-company-switcher select,
    .topbar-user-pill {
        max-width: min(100%, 340px);
    }
}

@media (max-width: 980px) {
    .zxp-page-shell[data-zxp-page-state="loading"]::before,
    .zxp-page-shell[data-zxp-page-state="mounting"]::before,
    .zxp-page-shell.is-page-loading::before {
        top: 70px;
        left: 0;
    }
}

@media (max-width: 720px) {
    .topbar-eyebrow {
        flex-wrap: wrap;
    }

    .topbar-page-context {
        font-size: 18px;
    }

    .topbar-user-pill {
        display: none;
    }
}

/* Zypexa Stage 6 Pass 3 — contact, account, and task workspace consistency. */
:root {
    --zxp-record-card-shadow: 0 18px 44px rgba(8, 47, 73, 0.065);
    --zxp-record-card-shadow-hover: 0 22px 54px rgba(8, 47, 73, 0.09);
    --zxp-record-row-border: rgba(207, 226, 246, 0.82);
    --zxp-record-work-soft: rgba(248, 251, 255, 0.82);
}

.zxp-record-hero {
    border-color: rgba(186, 217, 246, 0.96);
    box-shadow: 0 22px 58px rgba(8, 47, 73, 0.075);
}

.zxp-record-hero .profile-actions,
.zxp-record-hero .profile-quick-facts {
    min-width: 0;
}

.zxp-record-work-card,
.zxp-task-workspace-card {
    border-color: var(--zxp-border-soft);
    box-shadow: var(--zxp-record-card-shadow);
}

.zxp-record-work-card:hover,
.zxp-task-workspace-card:hover {
    box-shadow: var(--zxp-record-card-shadow-hover);
}

.zxp-workspace-page .page-header-row,
.zxp-record-hero,
.zxp-record-work-card,
.zxp-task-workspace-card {
    animation: zxpStage6SurfaceIn 0.18s ease-out both;
}

@keyframes zxpStage6SurfaceIn {
    from {
        opacity: 0.985;
        transform: translateY(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zxp-record-work-card .profile-card-header,
.zxp-task-workspace-card .crm-tasks-card__head,
.zxp-record-work-card .account-crm-work-panel-head {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(207, 226, 246, 0.58);
}

.zxp-record-work-card .button,
.zxp-task-workspace-card .button,
.zxp-record-hero .button {
    min-height: 36px;
}

.zxp-record-work-card .status-pill,
.zxp-task-workspace-card .status-pill,
.zxp-record-work-card .profile-summary-pill,
.zxp-task-workspace-card .crm-task-due {
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.035);
}

.zxp-record-work-card .profile-empty-state,
.zxp-record-work-card .empty-state,
.zxp-task-workspace-card .zxp-empty-state {
    border-color: rgba(186, 217, 246, 0.9);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9));
}

@media (max-width: 900px) {
    .zxp-record-hero {
        grid-template-columns: 1fr;
    }

    .zxp-record-hero .profile-hero-side,
    .zxp-record-hero .profile-actions,
    .zxp-record-hero .profile-quick-facts {
        align-items: flex-start;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .zxp-record-hero,
    .zxp-record-work-card,
    .zxp-task-workspace-card {
        border-radius: 18px;
    }

    .zxp-record-hero .profile-actions .button,
    .zxp-record-work-card .button-row .button,
    .zxp-task-workspace-card .button-row .button {
        width: 100%;
        justify-content: center;
    }
}

/* Zypexa Stage 6 Pass 4 — forms, buttons, empty states, and validation polish. */
:root {
    --zxp-field-border: rgba(186, 217, 246, 0.92);
    --zxp-field-focus: rgba(0, 189, 227, 0.18);
    --zxp-field-error: rgba(220, 38, 38, 0.22);
    --zxp-danger: #dc2626;
    --zxp-success: #16a34a;
}

.zxp-form-stack,
.zxp-enhanced-form.zxp-form-stack {
    display: grid;
    gap: 0.9rem;
}

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

.zxp-field,
.zxp-enhanced-form .form-group,
.zxp-enhanced-form .form-field,
.zxp-enhanced-form label:not(.contact-crm-follow-up-toggle) {
    min-width: 0;
}

.zxp-field-label,
.zxp-enhanced-form label > span:first-child,
.zxp-enhanced-form .form-field > span:first-child,
.zxp-enhanced-form .form-group > span:first-child {
    color: #26364f;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: -0.005em;
}

.zxp-required-label:not(.sr-only)::after,
.zxp-field-label.zxp-required::after {
    content: ' *';
    color: var(--zxp-danger);
    font-weight: 950;
}

.zxp-field-help,
.zxp-field-error,
.zxp-enhanced-form small,
.zxp-enhanced-form .muted.small {
    font-size: 0.78rem;
    line-height: 1.45;
}

.zxp-field-error,
.zxp-field-invalid .zxp-field-error {
    color: #991b1b;
    font-weight: 800;
}

.zxp-form-control,
.zxp-app-shell input.zxp-form-control,
.zxp-app-shell select.zxp-form-control,
.zxp-app-shell textarea.zxp-form-control {
    width: 100%;
    min-height: var(--control-height);
    border-color: var(--control-border);
    border-radius: var(--zxp-control-radius);
}

.zxp-app-shell input.zxp-form-control:focus,
.zxp-app-shell select.zxp-form-control:focus,
.zxp-app-shell textarea.zxp-form-control:focus {
    border-color: var(--control-focus-border);
    box-shadow: 0 0 0 3px var(--control-focus-ring);
}

.zxp-field-invalid input,
.zxp-field-invalid select,
.zxp-field-invalid textarea,
.zxp-app-shell input[aria-invalid="true"],
.zxp-app-shell select[aria-invalid="true"],
.zxp-app-shell textarea[aria-invalid="true"] {
    border-color: rgba(220, 38, 38, 0.58) !important;
    box-shadow: 0 0 0 4px var(--zxp-field-error) !important;
}

.zxp-actions-row,
.zxp-empty-state-actions,
.zxp-card-actions,
.zxp-app-shell .form-actions,
.zxp-app-shell .button-row,
.zxp-app-shell .table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.zxp-app-shell .button,
.zxp-app-shell button,
.zxp-app-shell .btn-primary,
.zxp-app-shell .btn-secondary,
.zxp-app-shell .btn-danger {
    min-width: 0;
    border-radius: var(--zxp-control-radius);
    font-weight: 900;
    text-decoration: none;
}

.zxp-app-shell .btn-primary {
    display: inline-flex;
    min-height: var(--control-height);
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: var(--zxp-control-radius);
    background: linear-gradient(135deg, var(--primary), #075dc7);
    color: #ffffff;
    box-shadow: var(--button-shadow);
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.zxp-app-shell .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: var(--button-shadow-hover);
    transform: translateY(-1px);
}

.zxp-app-shell .btn-secondary {
    display: inline-flex;
    min-height: var(--control-height);
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--button-secondary-border);
    border-radius: var(--zxp-control-radius);
    background: var(--button-secondary-bg);
    color: var(--primary-dark);
    box-shadow: none;
    transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.zxp-app-shell .btn-secondary:hover {
    border-color: var(--control-border-hover);
    background: var(--button-secondary-hover-bg);
    transform: translateY(-1px);
}

.zxp-app-shell .btn-danger,
.zxp-app-shell .button-danger,
.zxp-app-shell button.button-danger {
    border-color: var(--zxp-danger);
    background: var(--zxp-danger);
    color: #ffffff;
}

.zxp-enhanced-form[data-zxp-submitting="true"] button[type="submit"],
.zxp-enhanced-form[data-zxp-submitting="true"] .button[type="submit"],
.zxp-enhanced-form[data-zxp-submitting="true"] .btn-primary[type="submit"] {
    cursor: wait;
    opacity: 0.82;
}

.zxp-button-stack {
    display: grid;
    gap: 8px;
}

.zxp-empty-state {
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: clamp(18px, 2.2vw, 28px);
    text-align: center;
}

.zxp-empty-state--actionable {
    border-style: dashed;
}

.zxp-empty-state-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.07);
    color: #1d4ed8;
    font-size: 1rem;
    font-weight: 950;
}

.zxp-empty-state-title {
    margin: 0;
    letter-spacing: -0.025em;
}

.zxp-empty-state-copy {
    max-width: 58ch;
    margin: 0;
}

.zxp-empty-state-actions {
    justify-content: center;
    margin-top: 4px;
}

@media (max-width: 760px) {
    .zxp-form-grid,
    .zxp-enhanced-form.zxp-form-grid {
        grid-template-columns: 1fr;
    }

    .zxp-actions-row,
    .zxp-empty-state-actions,
    .zxp-card-actions,
    .zxp-app-shell .form-actions,
    .zxp-app-shell .button-row,
    .zxp-app-shell .table-actions {
        align-items: stretch;
    }
}

@media (max-width: 560px) {
    .zxp-actions-row > *,
    .zxp-empty-state-actions > *,
    .zxp-app-shell .form-actions > *,
    .zxp-app-shell .button-row > *,
    .zxp-app-shell .table-actions > * {
        width: 100%;
        justify-content: center;
    }
}

/* Zypexa Stage 6 Pass 5 — mobile browser foundation polish. */
:root {
    --zxp-mobile-safe-top: env(safe-area-inset-top, 0px);
    --zxp-mobile-safe-right: env(safe-area-inset-right, 0px);
    --zxp-mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --zxp-mobile-safe-left: env(safe-area-inset-left, 0px);
    --zxp-mobile-touch-target: 44px;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.zxp-mobile-browser .zxp-page-shell,
.zxp-phone-viewport .zxp-page-shell {
    max-width: 100%;
}

@media (max-width: 980px) {
    .zxp-app-shell {
        min-height: 100dvh;
    }

    .zxp-page-shell {
        width: 100%;
        max-width: 100%;
        padding-right: calc(14px + var(--zxp-mobile-safe-right));
        padding-left: calc(14px + var(--zxp-mobile-safe-left));
        scroll-padding-top: calc(88px + var(--zxp-mobile-safe-top));
    }

    .zxp-page-header,
    .page-header-row,
    .zxp-card-header,
    .profile-card-header,
    .crm-tasks-card__head,
    .notifications-card__head,
    .account-crm-work-panel-head {
        gap: 10px;
    }

    .zxp-page-actions,
    .zxp-card-actions,
    .topbar-actions,
    .record-layout-toolbar-actions,
    .notifications-header__actions,
    .notification-card__actions,
    .account-crm-task-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .zxp-filter-row,
    .crm-tasks-filters,
    .record-layout-toolbar {
        overflow: hidden;
    }

    .zxp-table-wrap,
    .table-wrap,
    .table-responsive,
    .crm-tasks-table-wrap {
        margin-right: calc(-1 * var(--zxp-mobile-safe-right));
        margin-left: calc(-1 * var(--zxp-mobile-safe-left));
        border-radius: 16px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
}

@media (max-width: 720px) {
    .zxp-page-shell {
        padding-right: calc(12px + var(--zxp-mobile-safe-right));
        padding-left: calc(12px + var(--zxp-mobile-safe-left));
    }

    .zxp-card,
    .profile-card,
    .dashboard-card,
    .crm-tasks-card,
    .notifications-card,
    .account-crm-work-card,
    .saas-card,
    .card {
        padding: clamp(14px, 4.4vw, 18px);
    }

    .zxp-status-badge,
    .status-pill,
    .tag,
    .badge,
    .mode-pill,
    .user-pill,
    .profile-summary-pill,
    .crm-task-due {
        white-space: normal;
    }

    .zxp-app-shell button,
    .zxp-app-shell .button,
    .zxp-app-shell .btn-primary,
    .zxp-app-shell .btn-secondary,
    .zxp-app-shell .btn-danger {
        min-height: var(--zxp-mobile-touch-target);
    }

    .zxp-empty-state {
        padding: clamp(18px, 6vw, 26px) 14px;
    }
}

@media (max-width: 560px) {
    .zxp-page-title,
    .page-header-row h1 {
        font-size: clamp(1.5rem, 9vw, 2.05rem);
        line-height: 1.05;
    }

    .zxp-page-subtitle,
    .page-header-row .muted-text,
    .zxp-card-subtitle,
    .profile-card-header .muted,
    .profile-card-header .muted-text {
        font-size: 0.94rem;
    }

    .zxp-empty-state-actions > a,
    .zxp-empty-state-actions > button,
    .zxp-card-actions > a,
    .zxp-card-actions > button {
        width: 100%;
        justify-content: center;
    }
}

/* Zypexa Stage 6 Pass 6 — SaaS UI QA closure guardrails. */
:root {
    --zxp-focus-ring-color: rgba(37, 99, 235, 0.34);
    --zxp-focus-ring-offset: 2px;
}

.zxp-app-shell :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--zxp-focus-ring-color);
    outline-offset: var(--zxp-focus-ring-offset);
}

.zxp-app-shell :where(.button, .btn-primary, .btn-secondary, .btn-danger, .nav-link, .zxp-status-badge, .status-pill) {
    -webkit-tap-highlight-color: rgba(37, 99, 235, 0.12);
}

.zxp-app-shell [aria-busy="true"] {
    cursor: progress;
}

body[data-zxp-ui-system="stage6-pass6"] .zxp-page-shell,
body[data-zxp-ui-system="stage6-pass6"] .content-wrap {
    scroll-padding-top: calc(92px + var(--zxp-mobile-safe-top, 0px));
}

body[data-zxp-ui-system="stage6-pass6"] .zxp-card,
body[data-zxp-ui-system="stage6-pass6"] .zxp-record-work-card,
body[data-zxp-ui-system="stage6-pass6"] .zxp-task-workspace-card {
    background-clip: padding-box;
}

@media (prefers-reduced-motion: reduce) {
    .zxp-app-shell *,
    .zxp-app-shell *::before,
    .zxp-app-shell *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 980px) {
    body.zxp-mobile-polish-ready .zxp-page-shell,
    body.zxp-mobile-polish-ready .content-wrap {
        min-width: 0;
    }

    body.zxp-mobile-polish-ready .zxp-app-shell :where(input, select, textarea) {
        font-size: max(16px, 1rem);
    }
}

/* Zypexa Stage 7 Pass 1 — adaptive workspace density and card accent containment. */
body[data-zxp-stage~="stage7-pass1"] {
    --zxp-stage7-density-gutter: clamp(14px, 1.25vw, 26px);
    --zxp-stage7-card-padding: clamp(16px, 1.25vw, 24px);
    --zxp-stage7-compact-gap: clamp(10px, 1vw, 16px);
}

body[data-zxp-stage~="stage7-pass1"] .content-wrap.zxp-page-shell {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding-inline: var(--zxp-stage7-density-gutter);
}

body[data-zxp-stage~="stage7-pass1"] .zxp-page-header,
body[data-zxp-stage~="stage7-pass1"] .page-header-row,
body[data-zxp-stage~="stage7-pass1"] .crm-list-header,
body[data-zxp-stage~="stage7-pass1"] .list-view-page-heading,
body[data-zxp-stage~="stage7-pass1"] .report-builder-heading {
    width: 100%;
    max-width: none;
}

body[data-zxp-stage~="stage7-pass1"] .crm-list-heading-copy,
body[data-zxp-stage~="stage7-pass1"] .list-view-page-heading > div:first-child,
body[data-zxp-stage~="stage7-pass1"] .report-builder-heading > div:first-child {
    flex: 1 1 auto;
    max-width: var(--zxp-page-readable-width);
}

body[data-zxp-stage~="stage7-pass1"] .zxp-card,
body[data-zxp-stage~="stage7-pass1"] .profile-card,
body[data-zxp-stage~="stage7-pass1"] .dashboard-card,
body[data-zxp-stage~="stage7-pass1"] .crm-tasks-card,
body[data-zxp-stage~="stage7-pass1"] .notifications-card,
body[data-zxp-stage~="stage7-pass1"] .account-crm-work-card,
body[data-zxp-stage~="stage7-pass1"] .saas-card,
body[data-zxp-stage~="stage7-pass1"] .card,
body[data-zxp-stage~="stage7-pass1"] form.form {
    background-clip: padding-box;
}

body[data-zxp-stage~="stage7-pass1"] :where(.card, .container, form.form, .saas-card, .profile-card, .dashboard-card)::before {
    inset: 0;
    width: auto;
    height: auto;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent), var(--primary)) top / 100% var(--surface-accent-height) no-repeat;
    opacity: var(--surface-accent-opacity);
    pointer-events: none;
}

body[data-zxp-stage~="stage7-pass1"] :where(.report-view-toolbar, .report-builder-toolbar, .report-filter-shell, .report-audience-snapshot-card, .report-builder-timeline-card, .report-builder-results-card, .crm-list-card) {
    width: 100%;
    max-width: none;
}

@media (min-width: 981px) and (max-width: 1320px) {
    body[data-zxp-stage~="stage7-pass1"] {
        --zxp-stage7-density-gutter: 14px;
        --zxp-stage7-card-padding: 16px;
        --zxp-page-gap: 14px;
        --zxp-grid-gap: 10px;
    }

    body[data-zxp-stage~="stage7-pass1"] .content-wrap.zxp-page-shell {
        margin-top: 18px;
        padding-bottom: 44px;
    }

    body[data-zxp-stage~="stage7-pass1"] .card:not(.report-filter-shell),
    body[data-zxp-stage~="stage7-pass1"] .saas-card,
    body[data-zxp-stage~="stage7-pass1"] .profile-card,
    body[data-zxp-stage~="stage7-pass1"] .dashboard-card,
    body[data-zxp-stage~="stage7-pass1"] .crm-tasks-card,
    body[data-zxp-stage~="stage7-pass1"] .notifications-card,
    body[data-zxp-stage~="stage7-pass1"] .account-crm-work-card {
        padding: var(--zxp-stage7-card-padding);
    }

    body[data-zxp-stage~="stage7-pass1"] .admin-status-strip,
    body[data-zxp-stage~="stage7-pass1"] .flash-stack {
        margin-bottom: 14px;
    }
}

@media (min-width: 1600px) {
    body[data-zxp-stage~="stage7-pass1"] .content-wrap.zxp-page-shell {
        --zxp-stage7-density-gutter: clamp(18px, 1.35vw, 32px);
    }
}

@media (min-width: 1900px) {
    body[data-zxp-stage~="stage7-pass1"] .content-wrap.zxp-page-shell {
        --zxp-stage7-density-gutter: clamp(22px, 1.4vw, 38px);
    }
}


/* Zypexa Stage 7 Pass 2 — contacts, accounts, and list workspace density polish. */
body[data-zxp-stage~="stage7-pass2"] {
    --zxp-list-card-padding: clamp(18px, 1.12vw, 24px);
    --zxp-list-filter-padding: clamp(12px, 0.85vw, 16px);
    --zxp-list-row-padding-y: 9px;
    --zxp-list-row-padding-x: 12px;
    --zxp-list-control-height: 38px;
    --zxp-list-density-gap: clamp(10px, 0.85vw, 16px);
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace.crm-list-card {
    display: grid;
    gap: var(--zxp-list-density-gap);
    padding: var(--zxp-list-card-padding);
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-header {
    margin-bottom: 0;
    align-items: flex-start;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-heading-copy {
    flex: 1 1 420px;
    max-width: min(760px, 100%);
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-heading-copy h1 {
    margin-bottom: 4px;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-actions {
    flex: 1 1 420px;
    justify-content: flex-end;
    gap: 7px;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-actions .button,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-actions button,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-actions .button,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-actions button {
    min-height: var(--zxp-list-control-height);
    padding: 8px 12px;
    white-space: nowrap;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-panel {
    margin-top: 0;
    padding: var(--zxp-list-filter-padding);
    border-radius: 18px;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-grid {
    gap: var(--zxp-list-density-gap);
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-panel input,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-panel select {
    min-height: var(--zxp-list-control-height);
    padding-top: 8px;
    padding-bottom: 8px;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .crm-filter-grid-contacts {
    grid-template-columns: minmax(340px, 1fr) minmax(280px, 400px) auto;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-primary-filter,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-secondary-filter,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-filter-actions {
    grid-column: auto;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .crm-filter-grid-accounts {
    grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(150px, 0.72fr)) minmax(260px, 1fr) minmax(360px, 1.45fr) auto;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .crm-filter-grid-accounts > .crm-filter-field,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-primary-filter,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-secondary-filter,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-filter-actions {
    grid-column: auto;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-property-filter {
    grid-column: span 2;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-table-meta-row {
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(207, 226, 246, 0.74);
    border-radius: 16px;
    background: rgba(248, 251, 255, 0.74);
}

body[data-zxp-stage~="stage7-pass2"] .zxp-table-meta-row .muted {
    font-weight: 760;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-page-size-form {
    margin-left: auto;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-data-table-card {
    width: 100%;
    overflow: auto;
    border: 1px solid rgba(186, 217, 246, 0.96);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(8, 47, 73, 0.045);
}

body[data-zxp-stage~="stage7-pass2"] .zxp-data-table {
    width: 100%;
    min-width: max(100%, 980px);
    border: 0;
    border-radius: 0;
    background: transparent;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-data-table th,
body[data-zxp-stage~="stage7-pass2"] .zxp-data-table td {
    padding: var(--zxp-list-row-padding-y) var(--zxp-list-row-padding-x);
}

body[data-zxp-stage~="stage7-pass2"] .zxp-data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(248, 251, 255, 0.98);
}

body[data-zxp-stage~="stage7-pass2"] .zxp-data-table td {
    line-height: 1.35;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace .tag,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace .status-pill,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace .status-good,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace .status-bad,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace .status-muted {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    margin: 2px 3px 2px 0;
    white-space: normal;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace .tag {
    padding: 5px 9px;
    border-radius: 999px;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-row-actions {
    justify-content: flex-end;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-row-actions .button,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-row-actions button {
    min-height: 32px;
    padding: 6px 10px;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-pagination {
    margin-top: 0;
    padding-top: 8px;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-empty-state {
    margin-top: 0;
}

@media (min-width: 1500px) {
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .crm-filter-grid-accounts {
        grid-template-columns: minmax(300px, 1.45fr) repeat(3, minmax(170px, 0.75fr)) minmax(300px, 1.05fr) minmax(420px, 1.45fr) auto;
    }
}

@media (max-width: 1380px) {
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .crm-filter-grid-contacts,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .crm-filter-grid-accounts {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-primary-filter,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-primary-filter {
        grid-column: span 3;
    }

    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-secondary-filter,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-secondary-filter,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .crm-filter-grid-accounts > .crm-filter-field,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-property-filter,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-filter-actions,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-filter-actions {
        grid-column: span 3;
    }
}

@media (max-width: 820px) {
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-header,
    body[data-zxp-stage~="stage7-pass2"] .zxp-table-meta-row {
        align-items: stretch;
        flex-direction: column;
    }

    body[data-zxp-stage~="stage7-pass2"] .zxp-list-actions,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-actions {
        justify-content: flex-start;
    }

    body[data-zxp-stage~="stage7-pass2"] .zxp-list-page-size-form {
        margin-left: 0;
    }

    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .crm-filter-grid-contacts,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .crm-filter-grid-accounts,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-primary-filter,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-secondary-filter,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-primary-filter,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-secondary-filter,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .crm-filter-grid-accounts > .crm-filter-field,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-property-filter,
    body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-actions {
        grid-column: auto;
        grid-template-columns: 1fr;
    }
}


/* Zypexa Stage 7 Pass 3 — Report Builder workspace and analytics visual polish. */
body[data-zxp-stage~="stage7-pass3"] {
    --zxp-report-card-padding: clamp(16px, 1.05vw, 22px);
    --zxp-report-density-gap: clamp(12px, 0.85vw, 18px);
    --zxp-report-control-height: 38px;
    --zxp-report-stat-min: 142px;
}

body.zxp-report-builder-page[data-zxp-stage~="stage7-pass3"] .content-wrap.zxp-page-shell {
    gap: var(--zxp-report-density-gap);
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-builder-header {
    align-items: flex-start;
    gap: var(--zxp-report-density-gap);
    margin-bottom: 2px;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-builder-header > div:first-child {
    flex: 1 1 520px;
    max-width: min(900px, 100%);
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-builder-header .wrap-actions {
    flex: 0 1 auto;
    justify-content: flex-end;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-card {
    width: 100%;
    padding: var(--zxp-report-card-padding);
    overflow: visible;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-view-card {
    display: grid;
    grid-template-columns: minmax(420px, 1.2fr) minmax(360px, 0.8fr);
    align-items: center;
    gap: var(--zxp-report-density-gap);
}

body[data-zxp-stage~="stage7-pass3"] .report-view-selector-wrap {
    grid-template-columns: minmax(240px, 360px) minmax(260px, 1fr);
    gap: 8px 16px;
}

body[data-zxp-stage~="stage7-pass3"] .report-view-actions,
body[data-zxp-stage~="stage7-pass3"] .zxp-report-results-actions {
    gap: 7px;
}

body[data-zxp-stage~="stage7-pass3"] .report-view-actions {
    align-self: center;
}

body[data-zxp-stage~="stage7-pass3"] .report-view-actions .button,
body[data-zxp-stage~="stage7-pass3"] .report-view-actions button,
body[data-zxp-stage~="stage7-pass3"] .zxp-report-results-actions .button,
body[data-zxp-stage~="stage7-pass3"] .zxp-report-results-actions button {
    min-height: var(--zxp-report-control-height);
    padding: 8px 12px;
    white-space: nowrap;
}

body[data-zxp-stage~="stage7-pass3"] .report-builder-toolbar-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px 12px;
}

body[data-zxp-stage~="stage7-pass3"] .report-builder-toolbar-actions {
    justify-content: flex-start;
}

body[data-zxp-stage~="stage7-pass3"] .report-builder-toolbar input,
body[data-zxp-stage~="stage7-pass3"] .report-builder-toolbar select,
body[data-zxp-stage~="stage7-pass3"] .report-view-toolbar select,
body[data-zxp-stage~="stage7-pass3"] .report-inline-select select {
    min-height: var(--zxp-report-control-height);
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-filter-card {
    padding: 0;
}

body[data-zxp-stage~="stage7-pass3"] .report-filter-summary {
    gap: var(--zxp-report-density-gap);
    padding: var(--zxp-report-card-padding);
}

body[data-zxp-stage~="stage7-pass3"] .report-filter-chip {
    max-width: min(520px, 100%);
    border-radius: 999px;
}

body[data-zxp-stage~="stage7-pass3"] .report-filter-editor {
    padding: var(--zxp-report-card-padding);
}

body[data-zxp-stage~="stage7-pass3"] .report-filter-rule {
    grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 0.75fr) minmax(240px, 1.35fr) 34px;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-audience-card details {
    display: grid;
    gap: 10px;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-audience-card summary {
    cursor: pointer;
    color: #0f4f9c;
    font-weight: 900;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--zxp-report-stat-min), 1fr));
    gap: clamp(10px, 0.75vw, 14px);
    margin-bottom: 0;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-stats-grid .stat {
    min-width: 0;
    padding: clamp(14px, 0.95vw, 18px);
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-stats-grid .stat h3 {
    max-width: 100%;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-stats-grid .stat strong {
    line-height: 1.02;
    overflow-wrap: anywhere;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-chart-card .section-heading-row,
body[data-zxp-stage~="stage7-pass3"] .zxp-report-results-card .section-heading-row,
body[data-zxp-stage~="stage7-pass3"] .zxp-report-disposition-card .section-heading-row {
    gap: var(--zxp-report-density-gap);
    margin-bottom: 12px;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-chart-card .section-heading-row > div,
body[data-zxp-stage~="stage7-pass3"] .zxp-report-results-card .section-heading-row > div,
body[data-zxp-stage~="stage7-pass3"] .zxp-report-disposition-card .section-heading-row > div {
    min-width: 0;
}

body[data-zxp-stage~="stage7-pass3"] .report-builder-chart-wrap {
    min-height: clamp(280px, 34vh, 430px);
    padding: 8px 4px 0;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-results-card .table-wrap,
body[data-zxp-stage~="stage7-pass3"] .report-builder-table-wrap {
    overflow: auto;
    border: 1px solid rgba(186, 217, 246, 0.9);
    border-radius: 16px;
    background: #ffffff;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-results-card table,
body[data-zxp-stage~="stage7-pass3"] .report-builder-table {
    min-width: max(100%, 1080px);
    border: 0;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-results-card th,
body[data-zxp-stage~="stage7-pass3"] .report-builder-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(248, 251, 255, 0.98);
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-results-card td,
body[data-zxp-stage~="stage7-pass3"] .report-builder-table td {
    vertical-align: top;
    line-height: 1.35;
}

body[data-zxp-stage~="stage7-pass3"] .report-builder-table td .status-pill,
body[data-zxp-stage~="stage7-pass3"] .report-builder-results-card td .status-pill {
    margin: 2px 3px 2px 0;
    white-space: normal;
}

body[data-zxp-stage~="stage7-pass3"] .report-builder-results-heading {
    align-items: flex-start;
}

body[data-zxp-stage~="stage7-pass3"] .zxp-report-results-actions {
    flex: 0 1 auto;
    justify-content: flex-end;
}

body[data-zxp-stage~="stage7-pass3"] .report-builder-pagination {
    padding-top: 12px;
}

body[data-zxp-stage~="stage7-pass3"] .report-disposition-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

body[data-zxp-stage~="stage7-pass3"] .report-disposition-breakdowns {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

body[data-zxp-stage~="stage7-pass3"] .report-disposition-breakdown-card {
    min-width: 0;
    border-radius: 14px;
}

@media (min-width: 1650px) {
    body[data-zxp-stage~="stage7-pass3"] {
        --zxp-report-stat-min: 156px;
    }

    body[data-zxp-stage~="stage7-pass3"] .report-builder-toolbar-grid {
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    }
}

@media (max-width: 1280px) {
    body[data-zxp-stage~="stage7-pass3"] .zxp-report-view-card {
        grid-template-columns: 1fr;
    }

    body[data-zxp-stage~="stage7-pass3"] .report-view-actions,
    body[data-zxp-stage~="stage7-pass3"] .zxp-report-results-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    body[data-zxp-stage~="stage7-pass3"] .zxp-report-builder-header,
    body[data-zxp-stage~="stage7-pass3"] .report-filter-summary,
    body[data-zxp-stage~="stage7-pass3"] .report-builder-results-heading {
        align-items: stretch;
        flex-direction: column;
    }

    body[data-zxp-stage~="stage7-pass3"] .report-view-selector-wrap,
    body[data-zxp-stage~="stage7-pass3"] .report-filter-rule {
        grid-template-columns: 1fr;
    }

    body[data-zxp-stage~="stage7-pass3"] .report-view-current-meta {
        grid-column: 1;
        grid-row: auto;
    }
}

@media (max-width: 640px) {
    body[data-zxp-stage~="stage7-pass3"] {
        --zxp-report-card-padding: 14px;
        --zxp-report-stat-min: 130px;
    }

    body[data-zxp-stage~="stage7-pass3"] .report-builder-toolbar-grid,
    body[data-zxp-stage~="stage7-pass3"] .report-disposition-stats,
    body[data-zxp-stage~="stage7-pass3"] .report-disposition-breakdowns {
        grid-template-columns: 1fr;
    }

    body[data-zxp-stage~="stage7-pass3"] .report-builder-chart-wrap {
        min-height: 260px;
    }
}


/* Zypexa Stage 7 Pass 4 — global search foundation. */
body[data-zxp-stage~="stage7-pass4"] .zxp-topbar {
    gap: clamp(12px, 1.1vw, 18px);
}

.zxp-global-search {
    position: relative;
    display: flex;
    flex: 1 1 min(460px, 42vw);
    min-width: min(100%, 260px);
    max-width: 560px;
    align-items: center;
    align-self: center;
    flex-direction: row;
    gap: 0;
    margin: 0;
}

.zxp-global-search__icon {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(15, 79, 156, 0.62);
    border-radius: 999px;
    pointer-events: none;
    transform: translateY(-50%);
}

.zxp-global-search__icon::after {
    content: '';
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 7px;
    height: 2px;
    border-radius: 999px;
    background: rgba(15, 79, 156, 0.62);
    transform: rotate(45deg);
}

.zxp-global-search .zxp-global-search__input {
    width: 100%;
    min-height: var(--control-height);
    padding: 8px 88px 8px 39px;
    border: 1px solid var(--control-border);
    border-radius: var(--control-radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 20px rgba(8, 47, 73, 0.05);
    color: #172033;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.2;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.zxp-global-search .zxp-global-search__input::placeholder {
    color: rgba(38, 54, 79, 0.60);
    font-weight: 800;
}

.zxp-global-search .zxp-global-search__input:focus {
    border-color: var(--control-focus-border);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--control-focus-ring), 0 10px 24px rgba(8, 47, 73, 0.06);
}

.zxp-global-search__submit {
    position: absolute;
    top: 50%;
    right: 4px;
    min-height: 32px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: var(--control-radius);
    background: #0f4f9c;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 950;
    letter-spacing: 0.02em;
    box-shadow: none;
    transform: translateY(-50%);
}

.zxp-global-search__submit:hover,
.zxp-global-search__submit:focus-visible {
    background: var(--primary-dark);
    box-shadow: none;
    transform: translateY(-50%);
}

.zxp-global-search__submit:active {
    box-shadow: none;
    transform: translateY(-50%);
}

.zxp-global-search__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 60;
    display: grid;
    max-height: min(68vh, 560px);
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(186, 217, 246, 0.94);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 70px rgba(8, 47, 73, 0.18);
}

.zxp-global-search-suggestion,
.zxp-global-search-result {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #172033;
    text-decoration: none;
}

.zxp-global-search-suggestion:hover,
.zxp-global-search-suggestion:focus-visible,
.zxp-global-search-suggestion.is-active,
.zxp-global-search-result:hover,
.zxp-global-search-result:focus-visible {
    border-color: rgba(37, 99, 235, 0.18);
    background: rgba(239, 246, 255, 0.82);
    outline: none;
}

.zxp-global-search-suggestion.is-empty {
    cursor: default;
}

.zxp-global-search-suggestion.is-all-results {
    margin-top: 4px;
    border-top: 1px solid rgba(207, 226, 246, 0.88);
    border-radius: 12px;
    color: #0f4f9c;
}

.zxp-global-search-suggestion__icon,
.zxp-global-search-result__icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.95), rgba(219, 234, 254, 0.72));
    color: #0f4f9c;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.zxp-global-search-suggestion__icon::before,
.zxp-global-search-result__icon::before {
    content: attr(data-zxp-search-icon);
}

.zxp-global-search-suggestion__body,
.zxp-global-search-result__body {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.zxp-global-search-suggestion__body strong,
.zxp-global-search-result__body strong {
    overflow: hidden;
    color: #132238;
    font-size: 0.88rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zxp-global-search-suggestion__body span,
.zxp-global-search-result__body span {
    overflow: hidden;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zxp-global-search-suggestion__meta,
.zxp-global-search-result__meta {
    justify-self: end;
    max-width: 160px;
    overflow: hidden;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.9);
    color: #475569;
    font-size: 0.7rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zxp-global-search-results-card {
    display: grid;
    gap: clamp(16px, 1.5vw, 22px);
}

.zxp-global-search-page-form {
    display: grid;
    gap: 8px;
}

.zxp-global-search-page-form label {
    color: #26364f;
    font-size: 0.82rem;
    font-weight: 950;
}

.zxp-global-search-page-control {
    display: flex;
    gap: 10px;
}

.zxp-global-search-page-control input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    border-radius: 14px;
}

.zxp-global-search-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    color: #64748b;
    font-weight: 800;
}

.zxp-global-search-summary strong {
    color: #132238;
    font-size: 1rem;
    font-weight: 950;
}

.zxp-global-search-group-stack {
    display: grid;
    gap: 18px;
}

.zxp-global-search-group {
    display: grid;
    gap: 10px;
}

.zxp-global-search-group__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.zxp-global-search-group__header h2 {
    margin: 0;
    color: #132238;
    font-size: 0.98rem;
    font-weight: 950;
}

.zxp-global-search-group__header span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
}

.zxp-global-search-result-list {
    display: grid;
    gap: 8px;
}

.zxp-global-search-result {
    border-color: rgba(207, 226, 246, 0.9);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(8, 47, 73, 0.045);
}

.zxp-global-search-empty {
    margin-top: 4px;
}

@media (max-width: 1180px) {
    .zxp-global-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }
}

@media (max-width: 720px) {
    .zxp-global-search {
        min-width: 100%;
    }

    .zxp-global-search .zxp-global-search__input {
        padding-right: 18px;
    }

    .zxp-global-search__submit {
        display: none;
    }

    .zxp-global-search-suggestion,
    .zxp-global-search-result {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .zxp-global-search-suggestion__meta,
    .zxp-global-search-result__meta {
        grid-column: 2;
        justify-self: start;
        max-width: 100%;
    }

    .zxp-global-search-page-control {
        display: grid;
    }
}


/* Stage 7 Pass 5 — setup guidance, onboarding, and actionable empty states */
.zxp-setup-summary-card,
.zxp-onboarding-launch-card,
.zxp-onboarding-checklist-card,
.zxp-onboarding-path-card,
.zxp-onboarding-next-card {
    display: grid;
    gap: clamp(16px, 1.5vw, 24px);
}

.zxp-setup-summary-header {
    align-items: flex-start;
}

.zxp-setup-summary-actions,
.zxp-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.zxp-card-eyebrow,
.zxp-page-kicker,
.zxp-setup-next-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 4px;
    color: #0f4f9c;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.zxp-setup-progress-pill,
.zxp-onboarding-track-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.82);
    color: #0f4f9c;
    font-size: 0.76rem;
    font-weight: 950;
    white-space: nowrap;
}

.zxp-setup-next-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(12px, 1.5vw, 18px);
    padding: clamp(14px, 1.4vw, 18px);
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.95));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.zxp-setup-next-action strong {
    display: block;
    color: #132238;
    font-size: clamp(1rem, 1.15vw, 1.15rem);
    font-weight: 950;
}

.zxp-setup-next-action p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.45;
}

.zxp-setup-readiness-grid .readiness-item,
.zxp-onboarding-check-row {
    border-color: rgba(207, 226, 246, 0.9);
    background: rgba(255, 255, 255, 0.92);
}

.zxp-onboarding-hero {
    margin-bottom: clamp(16px, 1.6vw, 24px);
}

.zxp-onboarding-launch-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) minmax(300px, 1fr);
    align-items: center;
    gap: clamp(16px, 2vw, 28px);
}

.zxp-onboarding-launch-grid h2 {
    margin: 0;
    color: #132238;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
}

.zxp-onboarding-next-action {
    grid-column: 1 / -1;
}

.zxp-onboarding-main-grid {
    align-items: start;
    margin-top: clamp(16px, 1.8vw, 26px);
}

.zxp-onboarding-checklist-list,
.zxp-onboarding-service-list {
    gap: 10px;
}

.zxp-onboarding-check-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(207, 226, 246, 0.9);
    border-radius: 16px;
}

.zxp-onboarding-check-row.ready {
    border-color: rgba(22, 163, 74, 0.22);
    background: rgba(240, 253, 244, 0.68);
}

.zxp-onboarding-check-row.not-ready {
    border-color: rgba(245, 158, 11, 0.26);
    background: rgba(255, 251, 235, 0.68);
}

.zxp-onboarding-check-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #0f4f9c;
    font-weight: 950;
}

.zxp-onboarding-check-row.ready .zxp-onboarding-check-icon {
    color: #15803d;
}

.zxp-onboarding-check-row.not-ready .zxp-onboarding-check-icon {
    color: #b45309;
}

.zxp-onboarding-check-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.zxp-onboarding-check-copy strong {
    color: #132238;
    font-weight: 950;
}

.zxp-setup-guidance-grid,
.zxp-optional-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.zxp-setup-guidance-card,
.zxp-optional-service-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(207, 226, 246, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(8, 47, 73, 0.045);
}

.zxp-setup-guidance-card {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
}

.zxp-setup-guidance-card:hover,
.zxp-setup-guidance-card:focus-visible {
    border-color: rgba(37, 99, 235, 0.22);
    background: rgba(239, 246, 255, 0.76);
    outline: none;
    transform: translateY(-1px);
}

.zxp-setup-guidance-index {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: rgba(239, 246, 255, 0.9);
    color: #0f4f9c;
    font-weight: 950;
}

.zxp-setup-guidance-card strong,
.zxp-optional-service-card strong {
    display: block;
    color: #132238;
    font-weight: 950;
}

.zxp-setup-guidance-card small,
.zxp-optional-service-card span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1.45;
}

.zxp-setup-guidance-card em {
    grid-column: 2;
    color: #0f4f9c;
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 950;
}

.zxp-stage7-empty-state {
    border-style: solid;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.96));
}

.zxp-stage7-empty-state .zxp-empty-state-copy {
    max-width: 720px;
}

@media (max-width: 980px) {
    .zxp-onboarding-launch-grid,
    .zxp-setup-next-action,
    .zxp-onboarding-check-row {
        grid-template-columns: 1fr;
    }

    .zxp-setup-summary-actions,
    .zxp-page-actions {
        justify-content: flex-start;
    }

    .zxp-onboarding-track-pill,
    .zxp-onboarding-check-row .button {
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .zxp-setup-summary-actions,
    .zxp-page-actions,
    .zxp-stage7-empty-state .zxp-empty-state-actions {
        display: grid;
        width: 100%;
    }

    .zxp-setup-summary-actions .button,
    .zxp-page-actions .button,
    .zxp-stage7-empty-state .button {
        width: 100%;
    }
}


/* Stage 7 Pass 6 — notification center, dashboard visibility, and closure QA */
body[data-zxp-stage7-closure="ready"] .zxp-page-shell {
    scroll-padding-top: calc(var(--zxp-topbar-height, 72px) + 18px);
}

body[data-zxp-stage*="stage7-pass6"] .zxp-dashboard-workspace,
body[data-zxp-stage*="stage7-pass6"] .zxp-notification-center {
    width: 100%;
}

.zxp-dashboard-workspace {
    gap: clamp(14px, 1.3vw, 22px);
}

.zxp-dashboard-hero {
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 54px rgba(6, 38, 95, 0.22);
}

.zxp-dashboard-hero::after {
    opacity: 0.82;
}

.zxp-dashboard-hero .zxp-page-eyebrow {
    margin-bottom: 8px;
    color: rgba(219, 234, 254, 0.92);
}

.zxp-dashboard-hero-content {
    max-width: min(920px, 100%);
}

.zxp-dashboard-hero-actions {
    align-items: center;
}

.zxp-dashboard-stats,
.zxp-dashboard-service-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: clamp(10px, 1vw, 16px);
    margin-bottom: 0;
}

.zxp-dashboard-service-stats {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.zxp-dashboard-stat {
    min-width: 0;
    overflow: hidden;
}

.zxp-dashboard-stat strong,
.zxp-dashboard-stat p {
    overflow-wrap: anywhere;
}

.zxp-dashboard-card {
    overflow: hidden;
}

.zxp-dashboard-card > h2,
.zxp-notification-views-card h2 {
    margin-top: 0;
}

.zxp-dashboard-grid {
    grid-template-columns: minmax(360px, 1.25fr) minmax(280px, 0.75fr);
    align-items: start;
    gap: clamp(14px, 1.2vw, 22px);
}

.zxp-dashboard-quick-actions-card .quick-actions {
    gap: 10px;
}

.zxp-dashboard-quick-actions-card .quick-action-card {
    min-height: 82px;
    border-color: rgba(186, 217, 246, 0.92);
    background: rgba(255, 255, 255, 0.88);
}

.zxp-dashboard-quick-actions-card .quick-action-card:hover,
.zxp-dashboard-quick-actions-card .quick-action-card:focus-visible {
    border-color: rgba(37, 99, 235, 0.28);
    background: rgba(239, 246, 255, 0.72);
}

.zxp-dashboard-quick-actions-card .quick-action-card > span:last-child {
    align-self: center;
    justify-self: end;
    white-space: nowrap;
}

.zxp-dashboard-services-card .form-actions {
    gap: 10px;
}

.zxp-notification-center {
    gap: clamp(14px, 1.25vw, 22px);
}

.zxp-notification-center-header {
    margin-bottom: 0;
}

.zxp-notification-center-header .notifications-header__actions {
    align-items: center;
}

.zxp-notification-summary-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: clamp(10px, 1vw, 16px);
}

.zxp-notification-summary-card {
    overflow: hidden;
    padding: clamp(14px, 1.2vw, 18px);
}

.zxp-notification-summary-card strong {
    font-size: clamp(1.7rem, 2.4vw, 2.25rem);
}

.zxp-notification-views-card {
    overflow: hidden;
}

.zxp-notification-views-card .zxp-card-header {
    margin-bottom: 12px;
}

.zxp-notification-view-tabs {
    gap: 8px;
}

.zxp-notification-view-tabs .notifications-view-tab {
    min-height: 36px;
}

.zxp-notification-list {
    gap: 10px;
}

.zxp-notification-card {
    border-color: rgba(186, 217, 246, 0.84);
    box-shadow: 0 14px 32px rgba(8, 47, 73, 0.055);
}

.zxp-notification-card:hover,
.zxp-notification-card:focus-within {
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: 0 18px 40px rgba(8, 47, 73, 0.08);
}

.zxp-notification-card.is-unread {
    border-left: 4px solid rgba(245, 158, 11, 0.72);
}

.zxp-notification-card.notification-card--task-overdue.is-unread {
    border-left-color: rgba(225, 29, 72, 0.72);
}

.zxp-notification-card .notification-card__main,
.zxp-notification-card .notification-card__actions {
    min-width: 0;
}

.zxp-notification-card .notification-card__actions {
    align-self: stretch;
}

.zxp-notification-card .notification-card__actions .button,
.zxp-notification-center-header .button {
    min-height: 34px;
}

body[data-zxp-stage*="stage7-pass6"] .zxp-empty-state--actionable {
    min-height: 220px;
}

body[data-zxp-stage*="stage7-pass6"] .card:focus-within,
body[data-zxp-stage*="stage7-pass6"] .zxp-card:focus-within {
    box-shadow: 0 18px 42px rgba(8, 47, 73, 0.075);
}

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

    .zxp-notification-summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }
}

@media (max-width: 760px) {
    .zxp-dashboard-hero {
        padding: clamp(20px, 6vw, 28px);
        border-radius: 24px;
    }

    .zxp-dashboard-hero-actions,
    .zxp-notification-center-header .notifications-header__actions,
    .zxp-notification-card .notification-card__actions {
        display: grid;
        width: 100%;
        justify-content: stretch;
    }

    .zxp-dashboard-hero-actions .button,
    .zxp-notification-center-header .button,
    .zxp-notification-card .button,
    .zxp-notification-card form,
    .zxp-notification-card form button {
        width: 100%;
    }

    .zxp-dashboard-stats,
    .zxp-dashboard-service-stats,
    .zxp-notification-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Zypexa Exit-Beta UI Stage 1 Pass 3 — responsive shell, toolbars, and overflow foundation. */
.zxp-page-shell > *,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace.crm-list-card > * {
    min-width: 0;
    max-width: 100%;
}

.zxp-page-actions,
.zxp-card-actions,
.zxp-button-row,
.button-row,
.form-actions,
.table-actions,
.crm-list-actions,
.crm-filter-actions,
.account-list-actions,
.notifications-header__actions,
.notification-card__actions,
.account-crm-task-actions {
    max-width: 100%;
    flex-wrap: wrap;
}

.zxp-page-actions > *,
.zxp-card-actions > *,
.zxp-button-row > *,
.button-row > *,
.form-actions > *,
.table-actions > *,
.crm-list-actions > *,
.crm-filter-actions > *,
.account-list-actions > * {
    min-width: 0;
    max-width: 100%;
}

.zxp-table-wrap,
.table-wrap,
.table-responsive,
.compact-table-wrap,
.zxp-data-table-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace.crm-list-card,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-header,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-heading-copy,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-actions,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-panel,
body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-grid,
body[data-zxp-stage~="stage7-pass2"] .zxp-table-meta-row {
    min-width: 0;
    max-width: 100%;
}

/* Zypexa Exit-Beta UI Stage 2 Pass 1 — core CRM workspace consistency and polish. */
.zxp-core-workspace-header {
    width: 100%;
    min-width: 0;
    padding: clamp(18px, 1.45vw, 24px);
}

.zxp-core-workspace-header .zxp-page-header {
    width: 100%;
}

.zxp-core-workspace-header h1 {
    margin: 0 0 6px;
}

.zxp-core-workspace-header .zxp-page-title-group > :last-child {
    margin-bottom: 0;
}

.zxp-core-workspace-header .zxp-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.zxp-empty-state-icon--zero {
    font-variant-numeric: tabular-nums;
}

.zxp-audience-manager-page .content-wrap.zxp-page-shell {
    align-content: start;
}

/* Zypexa Exit-Beta UI Stage 2 Pass 1 Correction — responsive header and operations layout. */
.zxp-audience-header .zxp-page-title-group {
    flex: 1 1 auto;
    min-width: 0;
    max-width: min(980px, 100%);
}

.zxp-audience-header-actions {
    flex: 0 1 auto;
}

.zxp-audience-card {
    width: 100%;
}

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

.audience-filter-grid > * {
    min-width: 0;
}

.audience-span-2 {
    grid-column: span 2;
}

.audience-span-4 {
    grid-column: 1 / -1;
}

.audience-multi-select {
    min-height: 140px;
}

.audience-custom-rule-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.audience-custom-rule-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) minmax(220px, 1.6fr) auto;
    gap: 10px;
    align-items: start;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--zxp-border-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
}

.audience-custom-rule-row.is-unavailable {
    background: rgba(254, 242, 242, 0.92);
}

.audience-custom-value-wrap {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.audience-custom-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.audience-custom-rule-options {
    min-height: 92px;
}

.audience-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.audience-summary-row > * {
    min-width: 0;
}

.audience-actions-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.audience-actions-grid > * {
    min-width: 0;
}

.audience-stat-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.86rem;
}

.audience-checkbox-cell {
    width: 42px;
}

.audience-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

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

.saved-segment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--zxp-border-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
}

.saved-segment-row > * {
    min-width: 0;
}

.zxp-audience-empty-state {
    margin-top: 14px;
}

.zxp-audience-section-title {
    margin: 8px 0 0;
}

.zxp-audience-filter-actions {
    margin-top: 18px;
}

.zxp-audience-selection-actions {
    margin: 18px 0 10px;
}

@media (min-width: 981px) {
    @container zxp-main-shell (max-width: 1180px) {
        .zxp-core-workspace-header .zxp-page-header {
            align-items: stretch;
            flex-direction: column;
        }

        .zxp-core-workspace-header .zxp-page-actions,
        .zxp-audience-header-actions {
            width: 100%;
            justify-content: flex-start;
        }

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

        .audience-span-4 {
            grid-column: 1 / -1;
        }

        .audience-actions-grid,
        .audience-custom-rule-row {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @container zxp-main-shell (max-width: 820px) {
        .audience-filter-grid,
        .audience-actions-grid,
        .audience-custom-rule-row,
        .audience-custom-range {
            grid-template-columns: 1fr;
        }

        .audience-span-2,
        .audience-span-4 {
            grid-column: auto;
        }

        .saved-segment-row,
        .audience-pagination {
            align-items: stretch;
            flex-direction: column;
        }
    }
}

@media (max-width: 980px) {
    .zxp-core-workspace-header .zxp-page-actions,
    .zxp-audience-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .audience-filter-grid,
    .audience-actions-grid,
    .audience-custom-rule-row,
    .audience-custom-range {
        grid-template-columns: 1fr;
    }

    .audience-span-2,
    .audience-span-4 {
        grid-column: auto;
    }

    .saved-segment-row,
    .audience-pagination {
        align-items: stretch;
        flex-direction: column;
    }
}


@media (min-width: 981px) {
    @container zxp-main-shell (max-width: 1540px) {
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .crm-filter-grid-contacts,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .crm-filter-grid-accounts {
            grid-template-columns: repeat(6, minmax(0, 1fr));
        }

        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-primary-filter,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-primary-filter {
            grid-column: span 3;
        }

        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-secondary-filter,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-secondary-filter,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .crm-filter-grid-accounts > .crm-filter-field,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-property-filter,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-filter-actions,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-filter-actions {
            grid-column: span 3;
        }
    }

    @container zxp-main-shell (max-width: 1320px) {
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-header {
            align-items: stretch;
            flex-direction: column;
        }

        body[data-zxp-stage~="stage7-pass2"] .zxp-list-heading-copy {
            flex: 1 1 auto;
            width: 100%;
            max-width: 100%;
        }

        body[data-zxp-stage~="stage7-pass2"] .zxp-list-actions {
            flex: 0 1 auto;
            width: 100%;
            justify-content: flex-start;
        }
    }

    @container zxp-main-shell (max-width: 1120px) {
        .zxp-topbar {
            flex-wrap: wrap;
            align-items: center;
            row-gap: 10px;
            padding-inline: 20px;
        }

        .topbar-context {
            flex: 1 1 220px;
            max-width: 100%;
        }

        .zxp-topbar-actions {
            flex: 0 1 auto;
            max-width: 100%;
            margin-left: auto;
            justify-content: flex-end;
        }

        .zxp-topbar-actions > * {
            min-width: 0;
            max-width: 100%;
        }

        .zxp-global-search {
            order: 3;
            flex: 1 1 100%;
            width: 100%;
            min-width: 0;
            max-width: none;
        }

        .zxp-page-header,
        .page-header-row,
        .zxp-card-header,
        .profile-card-header,
        .crm-tasks-card__head,
        .notifications-card__head,
        .account-crm-work-panel-head {
            align-items: stretch;
            flex-direction: column;
        }

        .zxp-page-actions,
        .zxp-card-actions,
        .page-header-row > div:last-child,
        .profile-card-header .button-row,
        .notifications-header__actions,
        .notification-card__actions,
        .account-crm-task-actions {
            justify-content: flex-start;
        }
    }

    @container zxp-main-shell (max-width: 900px) {
        .zxp-topbar {
            align-items: stretch;
            padding-inline: 16px;
        }

        .topbar-context {
            order: 0;
            flex: 1 1 100%;
            width: 100%;
        }

        .zxp-global-search {
            order: 1;
        }

        .zxp-topbar-actions {
            order: 2;
            width: 100%;
            margin-left: 0;
            justify-content: flex-start;
        }

        .topbar-user-pill {
            max-width: min(100%, 280px);
        }

        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .crm-filter-grid-contacts,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .crm-filter-grid-accounts,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-primary-filter,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--contacts .zxp-list-secondary-filter,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-primary-filter,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-secondary-filter,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .crm-filter-grid-accounts > .crm-filter-field,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-workspace--accounts .zxp-list-property-filter,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-actions {
            grid-column: auto;
            grid-template-columns: 1fr;
        }

        body[data-zxp-stage~="stage7-pass2"] .zxp-list-actions .button,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-actions button,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-actions .button,
        body[data-zxp-stage~="stage7-pass2"] .zxp-list-filter-actions button {
            flex: 1 1 170px;
            white-space: normal;
            text-align: center;
        }

        body[data-zxp-stage~="stage7-pass2"] .zxp-table-meta-row {
            align-items: stretch;
            flex-direction: column;
        }

        body[data-zxp-stage~="stage7-pass2"] .zxp-list-page-size-form {
            margin-left: 0;
        }
    }
}

/* Zypexa Exit-Beta UI Stage 2 Pass 2 — customer communications workspace polish. */
.zxp-communications-header .zxp-page-header {
    align-items: flex-start;
}

.zxp-communications-header .zxp-page-title-group {
    flex: 1 1 680px;
    min-width: 0;
    max-width: min(980px, 100%);
}

.sms-mobile-summary-strip[data-mobile-sms-inbox-summary] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.sms-mobile-summary-strip[data-mobile-sms-inbox-summary] > div {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--zxp-border-soft);
    border-radius: var(--zxp-radius-md);
    background: rgba(248, 250, 252, 0.86);
}

.sms-mobile-summary-strip[data-mobile-sms-inbox-summary] strong {
    display: block;
    margin-top: 4px;
    color: var(--zxp-text-strong);
    font-size: 1rem;
    line-height: 1.25;
}

.team-chat-index-grid .conversation-list-card {
    min-height: 0;
}

.team-chat-index-grid .conversation-list-scroll {
    max-height: 520px;
}

.zxp-team-chat-empty {
    min-height: 116px;
}

.zxp-message-template-card,
.zxp-message-editor-card,
.zxp-sms-campaign-card {
    margin-top: 16px;
}

.zxp-message-template-preview {
    display: -webkit-box;
    max-width: 760px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: var(--zxp-text-muted);
    line-height: 1.45;
}

.zxp-inline-action-form {
    display: inline-flex;
    margin: 0;
}

.zxp-enterprise-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 180px;
    padding: 28px;
    text-align: center;
}

.zxp-enterprise-empty-state strong {
    color: var(--zxp-text-strong);
    font-size: 1rem;
}

.zxp-enterprise-empty-state span {
    max-width: 620px;
    color: var(--zxp-text-muted);
}

.zxp-message-editor-card {
    max-width: 980px;
}

.zxp-message-editor-form,
.zxp-message-editor-form .field {
    min-width: 0;
}

.zxp-message-editor-actions {
    margin-top: 18px;
}

.zxp-sms-campaign-filters {
    margin: 16px 0 18px;
}

.zxp-sms-campaign-schedule-card,
.zxp-sms-delivery-card {
    margin-top: 16px;
}

.zxp-sms-campaign-unschedule,
.zxp-sms-builder-saved-audience,
.zxp-sms-schedule-fields {
    margin-top: 12px;
}

.zxp-sms-schedule-choice {
    margin-top: 8px;
}

.dialer-page-head {
    align-items: center;
    margin-bottom: 18px;
}

.dialer-page-head h1 {
    margin-bottom: 6px;
}

.dialer-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.dialer-list-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 255px;
    padding: 20px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.94));
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.dialer-list-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.dialer-list-card h2 {
    margin: 0 0 5px;
    color: var(--text-strong);
}

.dialer-list-meta {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

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

.dialer-metric-strip div {
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, 0.10);
    border-radius: 16px;
    background: #ffffff;
}

.dialer-metric-strip strong,
.dialer-metric-strip span {
    display: block;
}

.dialer-metric-strip strong {
    color: var(--text-strong);
    font-size: 22px;
    line-height: 1;
}

.dialer-metric-strip span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.dialer-list-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.dialer-list-settings span {
    padding: 6px 9px;
    border: 1px solid rgba(37, 99, 235, 0.10);
    border-radius: 999px;
    background: #eef7ff;
}

.dialer-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.dialer-card-actions form {
    margin: 0;
}

.dialer-card-actions .button,
.dialer-card-actions button {
    min-height: 38px;
}

.button-danger-soft {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    box-shadow: none;
}

.button-danger-soft:hover {
    background: #ffedd5;
    color: #7c2d12;
}

@media (min-width: 981px) {
    @container zxp-main-shell (max-width: 1180px) {
        .zxp-communications-header .zxp-page-header {
            align-items: stretch;
            flex-direction: column;
        }

        .zxp-communications-header .zxp-page-title-group {
            flex: 1 1 auto;
            width: 100%;
            max-width: 100%;
        }

        .zxp-communications-header .zxp-page-actions {
            width: 100%;
            justify-content: flex-start;
        }

        .conversation-index-grid,
        .team-chat-index-grid {
            grid-template-columns: 1fr;
        }

        .conversation-list-card {
            min-height: 0;
        }

        .zxp-sms-campaign-filters .grid-3 {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .zxp-sms-campaign-filters .report-filter-actions {
            grid-column: 1 / -1;
            justify-content: flex-start;
        }
    }

    @container zxp-main-shell (max-width: 820px) {
        .sms-mobile-summary-strip[data-mobile-sms-inbox-summary],
        .zxp-sms-campaign-filters .grid-3,
        .dialer-metric-strip {
            grid-template-columns: 1fr;
        }

        .dialer-list-grid {
            grid-template-columns: 1fr;
        }
    }
}

@media (max-width: 980px) {
    .zxp-communications-header .zxp-page-title-group {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }

    .zxp-communications-header .zxp-page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .zxp-message-editor-card {
        max-width: none;
    }
}

/* Zypexa Exit-Beta UI Stage 2 Pass 3 — core customer workspace closure. */
.zxp-communications-empty-state,
.zxp-team-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 128px;
    padding: 22px;
    text-align: center;
}

.zxp-communications-empty-state strong,
.zxp-team-chat-empty strong {
    color: var(--zxp-text-strong);
    font-size: 0.98rem;
}

.zxp-communications-empty-state span,
.zxp-team-chat-empty span {
    max-width: 520px;
    color: var(--zxp-text-muted);
    line-height: 1.45;
}

.zxp-sms-campaign-context {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.zxp-sms-campaign-context > span {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--zxp-border-soft);
    border-radius: var(--zxp-radius-md);
    background: rgba(248, 250, 252, 0.86);
    color: var(--zxp-text-muted);
    overflow-wrap: anywhere;
}

.zxp-sms-campaign-context > span > strong {
    display: block;
    margin-bottom: 4px;
    color: var(--zxp-text-strong);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.zxp-sms-campaign-builder-card,
.zxp-sms-campaign-confirmation-card,
.zxp-sms-campaign-recipient-filters,
.zxp-sms-campaign-recipient-card {
    margin-top: 16px;
}

.zxp-sms-campaign-builder-card,
.zxp-sms-campaign-confirmation-card {
    min-width: 0;
}

.zxp-sms-campaign-recipient-filter-actions {
    align-self: end;
    justify-content: flex-start;
}

.zxp-contact-intelligence-time {
    font-size: 1rem;
    line-height: 1.25;
}

.zxp-contact-intelligence-override {
    margin-top: 16px;
}

.zxp-contact-intelligence-override-form {
    margin-top: 12px;
}

.zxp-contact-intelligence-table {
    margin-top: 18px;
}

.dialer-empty-card {
    justify-content: center;
}

/* Power Dialer edit/list/import/run styles live here so mobile communications CSS can remain the final responsive layer. */
.dialer-edit-card {
    max-width: 1040px;
}

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

.dialer-edit-grid .field-wide {
    grid-column: 1 / -1;
}

.dialer-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.dialer-edit-card .dialer-custom-update-card {
    grid-column: 1 / -1;
    margin-top: 0;
}

.dialer-custom-update-card,
.dialer-saved-settings-card {
    padding: 16px;
    border: 1px solid #d9e8ff;
    border-radius: 18px;
    background: #f8fbff;
}

.dialer-custom-update-card h2,
.dialer-saved-settings-card h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.dialer-import-help {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid #d9e8ff;
    border-radius: 14px;
    background: #f7fbff;
    color: #42536d;
    font-size: 13px;
    line-height: 1.45;
}

.dialer-mapping-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.dialer-mapping-grid label {
    margin: 0;
}

.dialer-mapping-grid select {
    width: 100%;
}

.dialer-import-form .dialer-saved-settings-card,
.dialer-import-form .dialer-custom-update-card {
    margin-top: 18px;
}

.dialer-saved-settings-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.dialer-detail-head {
    align-items: center;
    margin-bottom: 18px;
}

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

.dialer-detail-actions form {
    margin: 0;
}

.dialer-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dialer-summary-card {
    padding: 17px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.dialer-summary-card strong,
.dialer-summary-card span {
    display: block;
}

.dialer-summary-card strong {
    color: var(--text-strong);
    font-size: 26px;
    line-height: 1;
}

.dialer-summary-card span {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dialer-table-card {
    margin-bottom: 18px;
    border-radius: 24px;
    overflow: hidden;
}

.dialer-table-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.dialer-table-header h2 {
    margin: 0 0 5px;
}

.dialer-table-meta {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.dialer-operator-wrap {
    max-width: 1280px;
    padding-right: 300px;
}

.dialer-topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.dialer-title h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.05;
}

.dialer-title p {
    margin: 6px 0 0;
}

.dialer-actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.dialer-status-strip {
    display: grid;
    grid-template-columns: minmax(300px, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(15, 70, 120, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 12px 30px rgba(10, 35, 70, 0.06);
}

.dialer-status-box {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 14px;
    background: #f5f9ff;
    border: 1px solid #d9e8ff;
    font-size: 13px;
}

.dialer-status-box strong {
    color: #0b5ac2;
}

.dialer-auto-notice {
    margin: 0;
    color: #516079;
    font-size: 13px;
}

.dialer-main-grid {
    display: grid;
    grid-template-columns: minmax(360px, 420px) minmax(420px, 1fr);
    gap: 12px;
    align-items: start;
}

.dialer-card {
    border: 1px solid rgba(15, 70, 120, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 36px rgba(10, 35, 70, 0.07);
    padding: 16px;
}

.dialer-card h2,
.dialer-card h3 {
    margin-top: 0;
}

.lead-name-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.lead-name-row h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.05;
}

.lead-company {
    margin: 5px 0 0;
    color: #52627a;
    font-weight: 700;
}

.dialer-detail-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 7px 10px;
    margin: 12px 0;
    font-size: 14px;
}

.dialer-detail-grid dt {
    color: #5e6c82;
    font-weight: 800;
}

.dialer-detail-grid dd {
    margin: 0;
    color: #091f3a;
    word-break: break-word;
}

.dialer-call-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.dialer-call-row .button {
    width: 100%;
    text-align: center;
}

.dialer-wrapup-panel {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    background: #eff6ff;
    color: #1e3a8a;
}

.dialer-wrapup-panel h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.dialer-wrapup-panel ol {
    margin: 0 0 0 18px;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
}

.dialer-end-call-button[hidden] {
    display: none;
}

.dialer-context-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dialer-mini-card {
    border: 1px solid #d9e8ff;
    background: #f8fbff;
    border-radius: 16px;
    padding: 12px;
}

.dialer-mini-card h3 {
    font-size: 15px;
    margin-bottom: 8px;
}

.dialer-disposition-form {
    margin-top: 12px;
}

.dialer-disposition-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: end;
}

.dialer-disposition-row label,
.dialer-notes-label {
    font-size: 12px;
    font-weight: 800;
    color: #52627a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dialer-disposition-form textarea {
    min-height: 86px;
}

.dialer-crm-update-box {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #d9e8ff;
    border-radius: 16px;
    background: #f8fbff;
}

.dialer-crm-update-box p {
    margin: 4px 0 8px;
    color: #52627a;
    font-size: 13px;
    font-weight: 700;
}

.dialer-follow-up-box {
    margin-top: 10px;
    padding: 12px;
    border: 1px dashed #bfdbfe;
    border-radius: 16px;
    background: #f8fbff;
}

.dialer-follow-up-box.is-required {
    border-color: #f59e0b;
    background: #fffbeb;
}

.dialer-follow-up-box p {
    margin: 4px 0 0;
    color: #52627a;
    font-size: 13px;
    font-weight: 700;
}

.dialer-save-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.dialer-history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.dialer-compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dialer-compact-table th,
.dialer-compact-table td {
    padding: 7px 6px;
    border-bottom: 1px solid #e7edf6;
    text-align: left;
    vertical-align: top;
}

.dialer-compact-table th {
    color: #5e6c82;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 1200px) {
    .dialer-operator-wrap {
        padding-right: 0;
    }

    .dialer-main-grid,
    .dialer-context-grid,
    .dialer-history-grid,
    .dialer-call-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dialer-mapping-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dialer-edit-grid {
        grid-template-columns: 1fr;
    }

    .zxp-sms-campaign-context {
        grid-template-columns: 1fr;
    }

    .dialer-saved-settings-actions {
        align-items: stretch;
    }

    .dialer-saved-settings-actions .button {
        width: 100%;
    }
}

