/* =========================================================
   247ChatMate — Expert Visual Polish All Modes
   Checkpoint: EXPERTVISUALPOLISHALLMODES5A21B

   Scope:
   - Admin shell, dashboard surfaces, typography, spacing, dark/light mode,
     helper readability, focus states, help page composition and save notice calmness.
   - Visual-only CSS layer loaded after existing admin styles.
   - No public widget assets, rendering files, label systems, handoff mapping,
     persistence, lead routing, licence, trial or save-handler logic.
========================================================= */

.matewa-dashboard-page {
    --matewa-polish-space-1: 4px;
    --matewa-polish-space-2: 8px;
    --matewa-polish-space-3: 12px;
    --matewa-polish-space-4: 16px;
    --matewa-polish-space-5: 20px;
    --matewa-polish-space-6: 24px;
    --matewa-polish-space-8: 32px;
    --matewa-polish-space-10: 40px;
    --matewa-polish-space-12: 48px;
    --matewa-polish-radius-panel: 26px;
    --matewa-polish-radius-card: 20px;
    --matewa-polish-radius-control: 14px;
    --matewa-polish-text: #0f172a;
    --matewa-polish-muted: #334155;
    --matewa-polish-soft: #64748b;
    --matewa-polish-border: rgba(148, 163, 184, 0.25);
    --matewa-polish-surface: rgba(255, 255, 255, 0.94);
    --matewa-polish-surface-strong: #ffffff;
    --matewa-polish-green: #16a34a;
    --matewa-polish-green-deep: #15803d;
    --matewa-polish-green-soft: rgba(22, 163, 74, 0.10);
    --matewa-polish-shadow-soft: 0 18px 42px rgba(15, 23, 42, 0.07);
    --matewa-polish-shadow-card: 0 14px 32px rgba(15, 23, 42, 0.055);
    --matewa-polish-focus: 0 0 0 3px rgba(22, 163, 74, 0.24);
    color: var(--matewa-polish-text);
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] {
    --matewa-polish-text: #f8fafc;
    --matewa-polish-muted: #d7e2ee;
    --matewa-polish-soft: #b8c7d8;
    --matewa-polish-border: rgba(148, 163, 184, 0.24);
    --matewa-polish-surface: rgba(15, 23, 42, 0.88);
    --matewa-polish-surface-strong: rgba(15, 23, 42, 0.96);
    --matewa-polish-green: #4ade80;
    --matewa-polish-green-deep: #22c55e;
    --matewa-polish-green-soft: rgba(74, 222, 128, 0.12);
    --matewa-polish-shadow-soft: 0 22px 54px rgba(0, 0, 0, 0.32);
    --matewa-polish-shadow-card: 0 18px 38px rgba(0, 0, 0, 0.24);
    --matewa-polish-focus: 0 0 0 3px rgba(74, 222, 128, 0.30);
}

.matewa-dashboard-page .matewa-admin-shell {
    gap: clamp(18px, 2vw, 28px) !important;
}

.matewa-dashboard-page .matewa-admin-main {
    gap: clamp(16px, 1.8vw, 24px) !important;
}

.matewa-dashboard-page .matewa-admin-sidebar,
.matewa-dashboard-page .matewa-admin-topbar,
.matewa-dashboard-page .matewa-admin-panel-heading,
.matewa-dashboard-page .matewa-dashboard-value-card,
.matewa-dashboard-page .matewa-core-settings-shell,
.matewa-dashboard-page .matewa-plan-access-shell,
.matewa-dashboard-page .matewa-admin-help-card {
    border-color: var(--matewa-polish-border) !important;
    box-shadow: var(--matewa-polish-shadow-soft) !important;
}

.matewa-dashboard-page .matewa-admin-topbar,
.matewa-dashboard-page .matewa-admin-panel-heading,
.matewa-dashboard-page .matewa-dashboard-value-card,
.matewa-dashboard-page .matewa-core-settings-shell,
.matewa-dashboard-page .matewa-plan-access-shell,
.matewa-dashboard-page .matewa-admin-help-card {
    border-radius: var(--matewa-polish-radius-panel) !important;
}

.matewa-dashboard-page .matewa-admin-sidebar {
    border-radius: 28px !important;
}

.matewa-dashboard-page .matewa-admin-topbar {
    align-items: center !important;
    gap: var(--matewa-polish-space-5) !important;
    padding: clamp(18px, 1.7vw, 24px) clamp(20px, 2.1vw, 30px) !important;
}

.matewa-dashboard-page .matewa-admin-eyebrow,
.matewa-dashboard-page .matewa-dashboard-greeting {
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
    font-weight: 800 !important;
}

.matewa-dashboard-page .matewa-admin-topbar h2,
.matewa-dashboard-page .matewa-admin-panel-heading h2,
.matewa-dashboard-page .matewa-dashboard-hero-panel h2 {
    color: var(--matewa-polish-text) !important;
    letter-spacing: -0.055em !important;
    line-height: 0.96 !important;
}

.matewa-dashboard-page .matewa-admin-topbar p,
.matewa-dashboard-page .matewa-admin-panel-heading p,
.matewa-dashboard-page .matewa-dashboard-hero-panel p,
.matewa-dashboard-page .matewa-dashboard-lead-panel p,
.matewa-dashboard-page .matewa-dashboard-sidebar-intro,
.matewa-dashboard-page .matewa-field-help,
.matewa-dashboard-page .description,
.matewa-dashboard-page .matewa-settings-card p.description,
.matewa-dashboard-page .matewa-core-panel-heading p,
.matewa-dashboard-page .matewa-admin-help-card p,
.matewa-dashboard-page .matewa-plan-access-shell p,
.matewa-dashboard-page .matewa-plan-access-shell small {
    color: var(--matewa-polish-muted) !important;
    line-height: 1.58 !important;
}

.matewa-dashboard-page .matewa-field-help,
.matewa-dashboard-page .description,
.matewa-dashboard-page .matewa-settings-card p.description,
.matewa-dashboard-page .matewa-plan-access-shell small {
    font-size: 12.75px !important;
}

.matewa-dashboard-page .matewa-admin-panel-heading {
    padding: clamp(18px, 1.8vw, 24px) clamp(20px, 2.1vw, 30px) !important;
    margin-bottom: clamp(14px, 1.5vw, 20px) !important;
}

.matewa-dashboard-page .matewa-admin-panel-heading span {
    border-radius: 999px !important;
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.08);
}

.matewa-dashboard-page .matewa-admin-topbar-actions {
    position: relative !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: var(--matewa-polish-space-3) !important;
    min-width: min(100%, 360px) !important;
    padding-bottom: 0 !important;
}

.matewa-dashboard-page .matewa-admin-ghost-button,
.matewa-dashboard-page .matewa-admin-save-button,
.matewa-dashboard-page .matewa-dashboard-primary-button,
.matewa-dashboard-page .matewa-dashboard-secondary-button,
.matewa-dashboard-page .matewa-dashboard-history-button,
.matewa-dashboard-page .matewa-admin-help-card a {
    border-radius: var(--matewa-polish-radius-control) !important;
    font-weight: 800 !important;
    letter-spacing: -0.015em !important;
    min-height: 42px;
    transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, color 140ms ease, opacity 140ms ease !important;
}

.matewa-dashboard-page .matewa-admin-save-button,
.matewa-dashboard-page .matewa-dashboard-primary-button,
.matewa-dashboard-page .matewa-dashboard-history-button:not(.is-secondary):not(.is-warning):not(.is-danger) {
    background: linear-gradient(135deg, var(--matewa-polish-green), var(--matewa-polish-green-deep)) !important;
    border-color: rgba(21, 128, 61, 0.45) !important;
    box-shadow: 0 14px 30px rgba(22, 163, 74, 0.22) !important;
}

.matewa-dashboard-page .matewa-admin-ghost-button,
.matewa-dashboard-page .matewa-dashboard-secondary-button,
.matewa-dashboard-page .matewa-dashboard-history-button.is-secondary,
.matewa-dashboard-page .matewa-admin-help-card a {
    border-color: var(--matewa-polish-border) !important;
    background: rgba(255, 255, 255, 0.72) !important;
    color: var(--matewa-polish-text) !important;
}

.matewa-dashboard-page .matewa-admin-ghost-button:hover,
.matewa-dashboard-page .matewa-admin-save-button:hover,
.matewa-dashboard-page .matewa-dashboard-primary-button:hover,
.matewa-dashboard-page .matewa-dashboard-secondary-button:hover,
.matewa-dashboard-page .matewa-dashboard-history-button:hover,
.matewa-dashboard-page .matewa-admin-help-card a:hover {
    transform: translateY(-1px) !important;
}

.matewa-dashboard-page .matewa-admin-save-confirmation {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    z-index: 12 !important;
    width: max-content !important;
    max-width: min(260px, calc(100vw - 48px)) !important;
    min-height: 32px !important;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12) !important;
    contain: layout paint style !important;
}

.matewa-dashboard-page .matewa-dashboard-value-card {
    gap: clamp(22px, 2.6vw, 40px) !important;
    padding: clamp(22px, 2.4vw, 34px) !important;
}

.matewa-dashboard-page .matewa-dashboard-hero-panel,
.matewa-dashboard-page .matewa-dashboard-lead-panel,
.matewa-dashboard-page .matewa-dashboard-setup-panel,
.matewa-dashboard-page .matewa-dashboard-history-summary-mini > div,
.matewa-dashboard-page .matewa-dashboard-inbox-value-card,
.matewa-dashboard-page .matewa-dashboard-retention-card,
.matewa-dashboard-page .matewa-dashboard-danger-zone,
.matewa-dashboard-page .matewa-core-settings-panel,
.matewa-dashboard-page .matewa-plan-access-section,
.matewa-dashboard-page .matewa-choice-card {
    border-color: var(--matewa-polish-border) !important;
    border-radius: var(--matewa-polish-radius-card) !important;
    box-shadow: var(--matewa-polish-shadow-card) !important;
}

.matewa-dashboard-page .matewa-dashboard-hero-status,
.matewa-dashboard-page .matewa-dashboard-benefits,
.matewa-dashboard-page .matewa-dashboard-hero-actions,
.matewa-dashboard-page .matewa-dashboard-status-cards,
.matewa-dashboard-page .matewa-dashboard-history-summary-mini,
.matewa-dashboard-page .matewa-dashboard-history-actions-rail {
    gap: var(--matewa-polish-space-3) !important;
}

.matewa-dashboard-page .matewa-dashboard-benefit,
.matewa-dashboard-page .matewa-dashboard-status-pill,
.matewa-dashboard-page .matewa-dashboard-status-card,
.matewa-dashboard-page .matewa-dashboard-circle-toggle,
.matewa-dashboard-page .matewa-dashboard-future-card {
    border-color: var(--matewa-polish-border) !important;
    border-radius: var(--matewa-polish-radius-control) !important;
}

.matewa-dashboard-page .matewa-dashboard-circle-header {
    gap: var(--matewa-polish-space-3) !important;
    margin-bottom: var(--matewa-polish-space-4) !important;
}

.matewa-dashboard-page .matewa-dashboard-circle-header h3,
.matewa-dashboard-page .matewa-dashboard-setup-panel h3,
.matewa-dashboard-page .matewa-admin-help-card h3,
.matewa-dashboard-page .matewa-core-panel-heading h3,
.matewa-dashboard-page .matewa-plan-access-shell h3 {
    color: var(--matewa-polish-text) !important;
    letter-spacing: -0.035em !important;
    line-height: 1.06 !important;
}

.matewa-dashboard-page .matewa-dashboard-radial {
    filter: drop-shadow(0 16px 28px rgba(15, 23, 42, 0.06));
}

.matewa-dashboard-page .matewa-dashboard-radial-center,
.matewa-dashboard-page .matewa-dashboard-orbit-item {
    border-color: rgba(22, 163, 74, 0.24) !important;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease !important;
}

.matewa-dashboard-page .matewa-dashboard-radial-center:hover,
.matewa-dashboard-page .matewa-dashboard-orbit-item:hover {
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.matewa-dashboard-page .matewa-dashboard-radial-center:hover {
    transform: translate(-50%, -50%) !important;
}

.matewa-dashboard-page .matewa-dashboard-metric-value,
.matewa-dashboard-page .matewa-dashboard-radial-center strong,
.matewa-dashboard-page .matewa-dashboard-history-summary-mini strong,
.matewa-dashboard-page .matewa-dashboard-status-card strong {
    color: var(--matewa-polish-text) !important;
    letter-spacing: -0.045em !important;
}

.matewa-dashboard-page .matewa-dashboard-metric-label,
.matewa-dashboard-page .matewa-dashboard-metric-trend,
.matewa-dashboard-page .matewa-dashboard-radial-label,
.matewa-dashboard-page .matewa-dashboard-radial-trend,
.matewa-dashboard-page .matewa-dashboard-history-summary-mini small,
.matewa-dashboard-page .matewa-dashboard-history-summary-mini span,
.matewa-dashboard-page .matewa-dashboard-status-card span,
.matewa-dashboard-page .matewa-dashboard-history-mini-row small,
.matewa-dashboard-page .matewa-dashboard-history-privacy-note {
    color: var(--matewa-polish-soft) !important;
}

.matewa-dashboard-page .matewa-core-settings-grid {
    gap: clamp(16px, 1.9vw, 24px) !important;
}

.matewa-dashboard-page .matewa-core-settings-panel {
    padding: clamp(20px, 2vw, 28px) !important;
}

.matewa-dashboard-page .matewa-field-stack,
.matewa-dashboard-page .matewa-choice-stack {
    gap: var(--matewa-polish-space-4) !important;
}

.matewa-dashboard-page .matewa-field-row,
.matewa-dashboard-page .matewa-toggle-row,
.matewa-dashboard-page .matewa-choice-card {
    gap: var(--matewa-polish-space-4) !important;
}

.matewa-dashboard-page input[type="text"],
.matewa-dashboard-page input[type="email"],
.matewa-dashboard-page input[type="url"],
.matewa-dashboard-page input[type="tel"],
.matewa-dashboard-page input[type="password"],
.matewa-dashboard-page select,
.matewa-dashboard-page textarea {
    border-radius: 12px !important;
    border-color: var(--matewa-polish-border) !important;
    color: var(--matewa-polish-text) !important;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease, color 140ms ease !important;
}

.matewa-dashboard-page input[type="text"]:focus,
.matewa-dashboard-page input[type="email"]:focus,
.matewa-dashboard-page input[type="url"]:focus,
.matewa-dashboard-page input[type="tel"]:focus,
.matewa-dashboard-page input[type="password"]:focus,
.matewa-dashboard-page select:focus,
.matewa-dashboard-page textarea:focus,
.matewa-dashboard-page button:focus-visible,
.matewa-dashboard-page a:focus-visible,
.matewa-dashboard-page summary:focus-visible {
    border-color: rgba(22, 163, 74, 0.55) !important;
    box-shadow: var(--matewa-polish-focus) !important;
    outline: 2px solid transparent !important;
    outline-offset: 2px !important;
}

.matewa-dashboard-page .matewa-admin-help-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(16px, 1.8vw, 24px) !important;
    align-items: stretch !important;
}

.matewa-dashboard-page .matewa-admin-help-card {
    position: relative;
    min-height: 220px !important;
    padding: clamp(22px, 2.1vw, 30px) !important;
    overflow: hidden;
}

.matewa-dashboard-page .matewa-admin-help-card::after {
    content: "";
    position: absolute;
    inset: auto -28px -36px auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: var(--matewa-polish-green-soft);
    pointer-events: none;
}

.matewa-dashboard-page .matewa-admin-help-card > .dashicons {
    width: 44px !important;
    height: 44px !important;
    border-radius: 16px !important;
    background: var(--matewa-polish-green-soft) !important;
    color: var(--matewa-polish-green-deep) !important;
}

.matewa-dashboard-page .matewa-admin-help-card a {
    position: relative;
    z-index: 1;
    min-height: 40px;
    padding: 9px 14px !important;
    text-decoration: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="help"] .matewa-admin-panel[data-matewa-admin-panel="help"] {
    min-height: clamp(380px, calc(100vh - 260px), 560px) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-admin-shell,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-admin-sidebar,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-admin-topbar,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-admin-panel-heading,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-value-card,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-core-settings-shell,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-shell,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-admin-help-card {
    background-color: var(--matewa-polish-surface) !important;
    color: var(--matewa-polish-text) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-hero-panel,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-lead-panel,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-setup-panel,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-summary-mini > div,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-inbox-value-card,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-retention-card,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-danger-zone,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-core-settings-panel,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-choice-card,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-status-card,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-future-card,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-circle-toggle,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-benefit,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-status-pill {
    background-color: var(--matewa-polish-surface-strong) !important;
    border-color: var(--matewa-polish-border) !important;
    color: var(--matewa-polish-text) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-admin-ghost-button,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-secondary-button,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-button.is-secondary,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-admin-help-card a {
    background: rgba(15, 23, 42, 0.74) !important;
    border-color: rgba(148, 163, 184, 0.30) !important;
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] input[type="text"],
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] input[type="email"],
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] input[type="url"],
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] input[type="tel"],
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] input[type="password"],
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] select,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] textarea {
    background-color: rgba(2, 6, 23, 0.36) !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] input::placeholder,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] textarea::placeholder {
    color: rgba(203, 213, 225, 0.72) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-radial {
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.24));
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-radial-center,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-orbit-item {
    border-color: rgba(74, 222, 128, 0.28) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-theme-option:not(.is-active),
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-side-link:not(.is-active) {
    color: #d7e2ee !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-admin-save-confirmation {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34) !important;
}


/* =========================================================
   Dashboard overlap and radial hover stability correction
   Scope: admin dashboard layout only.
   Purpose: preserve the existing three-column dashboard without the centre
   radial drifting over the left copy panel on narrower desktop widths.
========================================================= */
@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        gap: clamp(16px, 1.45vw, 24px) !important;
        padding: clamp(20px, 1.65vw, 28px) !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        position: relative !important;
        min-width: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial-center:hover {
        transform: translate(-50%, -50%) !important;
    }
}

@media (min-width: 1181px) and (max-width: 1360px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(218px, 0.78fr) minmax(388px, 1.16fr) minmax(248px, 0.84fr) !important;
        gap: 16px !important;
        padding: 20px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        width: min(100%, 430px) !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(128px, 9.9vw, 146px) !important;
        --matewa-cv-orbit-node: clamp(84px, 6.3vw, 96px) !important;
        --matewa-cv-centre-size: clamp(172px, 12.4vw, 194px) !important;
        max-width: 430px !important;
        min-height: calc((var(--matewa-cv-orbit-distance) * 2) + (var(--matewa-cv-orbit-node) * 1.24)) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial::after {
        width: calc(var(--matewa-cv-centre-size) + 34px) !important;
        height: calc(var(--matewa-cv-centre-size) + 34px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial-center {
        padding: clamp(16px, 1.15vw, 22px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item {
        padding: clamp(9px, 0.7vw, 11px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        padding: 16px !important;
    }
}

@media (max-width: 782px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-radial-center:hover {
        transform: none !important;
    }
}

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

@media (max-width: 1180px) {
    .matewa-dashboard-page .matewa-admin-topbar {
        align-items: flex-start !important;
    }

    .matewa-dashboard-page .matewa-admin-help-grid {
        grid-template-columns: 1fr !important;
    }

    .matewa-dashboard-page .matewa-admin-help-card {
        min-height: 0 !important;
    }
}

@media (max-width: 782px) {
    .matewa-dashboard-page .matewa-admin-topbar,
    .matewa-dashboard-page .matewa-admin-panel-heading,
    .matewa-dashboard-page .matewa-dashboard-value-card,
    .matewa-dashboard-page .matewa-core-settings-shell,
    .matewa-dashboard-page .matewa-plan-access-shell,
    .matewa-dashboard-page .matewa-admin-help-card {
        border-radius: 20px !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar-actions {
        justify-content: stretch !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .matewa-dashboard-page .matewa-admin-ghost-button,
    .matewa-dashboard-page .matewa-admin-save-button {
        flex: 1 1 150px !important;
    }

    .matewa-dashboard-page .matewa-admin-save-confirmation {
        right: 0 !important;
        max-width: 100% !important;
    }
}

/* =========================================================
   Dark mode readability correction
   Scope: admin visual surfaces only.
   Purpose: replace low-contrast legacy light cards and muted labels in dark mode.
========================================================= */
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-overview,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-overview__next,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-status-circle,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section .matewa-license-check-form,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section .matewa-license-status-box {
    background:
        radial-gradient(circle at 96% 0%, rgba(74, 222, 128, 0.075), transparent 34%),
        rgba(8, 17, 30, 0.92) !important;
    border-color: rgba(148, 163, 184, 0.30) !important;
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section .matewa-license-check-form,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section .matewa-license-status-box {
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.20) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-license-status-grid {
    gap: 12px !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-license-stat {
    background: rgba(15, 23, 42, 0.82) !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
    color: #f8fafc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-license-stat strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-status-circle strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-overview__next strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-overview__copy h3,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section h3,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section > summary span {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-license-stat span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-license-code,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-status-circle span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-overview__copy p,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section p,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section .description,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section > summary small {
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-status-circle strong:first-child,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-license-stat strong:first-child {
    color: #86efac !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-overview__next span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-access-section > summary::after {
    background: rgba(74, 222, 128, 0.16) !important;
    color: #bbf7d0 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-status-badge,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-plan-overview .matewa-status-badge {
    background: rgba(236, 253, 245, 0.94) !important;
    color: #14532d !important;
    border-color: rgba(187, 247, 208, 0.78) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-admin-panel,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-settings-card,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-core-settings-panel,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-field-row,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-toggle-row,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-choice-card {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-settings-card label,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-field-row label,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-toggle-row label,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-choice-card strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-core-panel-heading h3 {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-settings-card p,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-settings-card small,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-field-help,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .description,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-choice-card span {
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] input[type="text"],
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] input[type="email"],
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] input[type="url"],
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] input[type="tel"],
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] input[type="password"],
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] select,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] textarea {
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: rgba(148, 163, 184, 0.42) !important;
    color: #f8fafc !important;
}

/* =========================================================
   Dashboard front-card overlap correction
   Checkpoint: DASHBOARDFRONTOVERLAPFIX5A21F

   Scope: Client View dashboard only.
   Purpose: keep the left hero/status/benefit/actions panel inside its own
   column at normal desktop widths so the centre circle panel cannot obscure it
   in light or dark mode. Visual CSS only; no frontend widget logic touched.
========================================================= */
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
    isolation: isolate !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
    min-width: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel {
    position: relative !important;
    z-index: 2 !important;
    overflow: visible !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
    position: relative !important;
    z-index: 1 !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
    position: relative !important;
    z-index: 2 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-status,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-actions {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-pill {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

@media (min-width: 1181px) and (max-width: 1540px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(216px, 0.78fr) minmax(390px, 1.16fr) minmax(248px, 0.86fr) !important;
        gap: clamp(14px, 1.35vw, 20px) !important;
        padding: clamp(18px, 1.55vw, 22px) !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel {
        justify-content: space-between !important;
        padding-right: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel h2 {
        max-width: 100% !important;
        font-size: clamp(27px, 2.45vw, 34px) !important;
        line-height: 1.02 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel > p:not(.matewa-dashboard-greeting) {
        max-width: 100% !important;
        font-size: 14px !important;
        line-height: 1.48 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-status {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits {
        grid-template-columns: repeat(2, minmax(78px, 88px)) !important;
        justify-content: start !important;
        gap: 14px 12px !important;
        width: 100% !important;
        margin-top: clamp(18px, 2vw, 28px) !important;
        margin-bottom: 16px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit {
        width: 88px !important;
        max-width: 88px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit .dashicons {
        width: 38px !important;
        height: 38px !important;
        font-size: 20px !important;
        line-height: 38px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit strong {
        max-width: 86px !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: min(100%, 198px) !important;
        gap: 10px !important;
        margin-top: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-primary-button,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-secondary-button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 42px !important;
        padding-inline: 14px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-radial {
        max-width: 420px !important;
        margin-inline: auto !important;
    }
}

@media (min-width: 1181px) and (max-width: 1320px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(210px, 0.75fr) minmax(372px, 1.12fr) minmax(238px, 0.84fr) !important;
        gap: 14px !important;
        padding: 18px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(122px, 9.3vw, 138px) !important;
        --matewa-cv-orbit-node: clamp(80px, 6vw, 92px) !important;
        --matewa-cv-centre-size: clamp(166px, 12vw, 188px) !important;
        max-width: 398px !important;
        min-height: calc((var(--matewa-cv-orbit-distance) * 2) + (var(--matewa-cv-orbit-node) * 1.26)) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item {
        padding: 9px !important;
    }
}

@media (max-width: 1180px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        overflow: visible !important;
    }
}

/* =========================================================
   247ChatMate — 5A21G dashboard recovery + confidence label guard
   Scope: admin visual layout + admin Visitor Button Studio constraints only.
   Purpose:
   - Recover the dashboard from the compressed 5A21F layout.
   - Keep the centre radial panel clear of the left Client View content without
     flattening the circle or stacking the left actions unnecessarily.
   - Bring the topbar-to-section spacing closer to the other admin pages.
   - Frontend widget/chip CSS remains untouched.
========================================================= */

/* Consistent section rhythm across Dashboard, Appearance & pages, Visitor buttons and Help. */
.matewa-dashboard-page .matewa-admin-main {
    gap: 10px !important;
}

.matewa-dashboard-page .matewa-admin-panel-heading {
    margin-bottom: 10px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-admin-topbar {
    margin-bottom: 10px !important;
}

/* Non-crushing dashboard overlap recovery. The centre panel must not hide the
   left plan/status/benefit/action content, but the radial should keep its
   premium proportions. */
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
    isolation: isolate !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel {
    position: relative !important;
    z-index: 3 !important;
    min-width: 0 !important;
    overflow: visible !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
    position: relative !important;
    z-index: 1 !important;
    min-width: 0 !important;
    transform: none !important;
    width: 100% !important;
    overflow: visible !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
    position: relative !important;
    z-index: 2 !important;
    min-width: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-status,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-actions {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-pill {
    max-width: 100% !important;
    min-width: 0 !important;
}

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(280px, 300px) minmax(340px, 1fr) minmax(252px, 285px) !important;
        gap: clamp(14px, 1.2vw, 20px) !important;
        padding: clamp(20px, 1.55vw, 26px) !important;
        min-height: clamp(650px, calc(100vh - 205px), 710px) !important;
        align-items: stretch !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        padding: clamp(18px, 1.35vw, 24px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel {
        justify-content: space-between !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 10px !important;
        width: 100% !important;
        margin-top: auto !important;
        margin-bottom: 14px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit {
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit .dashicons {
        width: 36px !important;
        height: 36px !important;
        font-size: 19px !important;
        line-height: 36px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit strong {
        max-width: 100% !important;
        font-size: clamp(10px, 0.78vw, 11.5px) !important;
        line-height: 1.18 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        gap: 10px !important;
        margin-top: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-primary-button,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-secondary-button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 42px !important;
        padding-inline: 12px !important;
        white-space: normal !important;
        text-align: center !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        align-items: center !important;
        justify-content: flex-start !important;
        padding-top: clamp(20px, 2vh, 30px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        width: 100% !important;
        max-width: 440px !important;
        margin: 0 auto 10px !important;
        padding: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view.is-active {
        justify-content: center !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(120px, 8.35vw, 154px) !important;
        --matewa-cv-orbit-node: clamp(80px, 5.7vw, 98px) !important;
        --matewa-cv-centre-size: clamp(154px, 10.8vw, 194px) !important;
        max-width: min(100%, 455px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        transform: none !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"] {
        min-height: clamp(540px, calc(100vh - 285px), 600px) !important;
    }
}

@media (min-width: 1321px) and (max-width: 1540px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(300px, 320px) minmax(390px, 1fr) minmax(270px, 300px) !important;
        gap: clamp(16px, 1.35vw, 22px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(136px, 9.8vw, 170px) !important;
        --matewa-cv-orbit-node: clamp(90px, 6.3vw, 106px) !important;
        --matewa-cv-centre-size: clamp(174px, 12.2vw, 212px) !important;
        max-width: min(100%, 520px) !important;
    }
}

@media (min-width: 1181px) and (max-width: 1240px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(260px, 280px) minmax(320px, 1fr) minmax(238px, 260px) !important;
        gap: 12px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-actions {
        gap: 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(110px, 8vw, 126px) !important;
        --matewa-cv-orbit-node: clamp(76px, 5.45vw, 86px) !important;
        --matewa-cv-centre-size: clamp(146px, 10.2vw, 168px) !important;
        max-width: min(100%, 380px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit strong {
        font-size: 10px !important;
    }
}

@media (max-width: 1180px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        transform: none !important;
        width: 100% !important;
    }
}

/* Keep radial hover feedback as polish only: no centre movement. */
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-radial-center:hover {
    transform: translate(-50%, -50%) !important;
}

/* =========================================================
   247ChatMate — 5A21H correction pass
   Dashboard spacing + radial proportion recovery
   Admin-only visual correction. No public widget/chip CSS touched.
========================================================= */

/* Normalise only the pages that drifted. Setup and Appearance remain the spacing reference. */
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-admin-main,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] .matewa-admin-main,
.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-admin-main,
.matewa-dashboard-page[data-matewa-active-panel="help"] .matewa-admin-main {
    gap: 14px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-admin-topbar,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] .matewa-admin-topbar,
.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-admin-topbar,
.matewa-dashboard-page[data-matewa-active-panel="help"] .matewa-admin-topbar {
    margin-bottom: 0 !important;
}

/* Visitor Button Studio: restore the same top breathing room as the reference pages without redesigning the studio. */
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card {
    margin-top: 0 !important;
    padding-top: 24px !important;
}

/* Plan page: recent spacing made the first follow-on section feel detached. Tighten only the shell rhythm. */
.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-shell {
    gap: 12px !important;
}

/* Dashboard: undo the compressed centre column/radial behaviour while keeping the existing three-column scaffold. */
@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(290px, 320px) minmax(500px, 1fr) minmax(280px, 320px) !important;
        gap: clamp(18px, 1.5vw, 24px) !important;
        padding: clamp(22px, 1.7vw, 28px) !important;
        align-items: stretch !important;
        overflow: hidden !important;
        min-height: clamp(650px, calc(100vh - 192px), 730px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        min-width: 0 !important;
        position: relative !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        width: 100% !important;
        transform: none !important;
        align-items: center !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        width: min(100%, 560px) !important;
        max-width: 560px !important;
        margin: 0 auto 14px !important;
        padding: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view.is-active {
        justify-content: center !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(146px, 10.4vw, 182px) !important;
        --matewa-cv-orbit-node: clamp(92px, 6.35vw, 110px) !important;
        --matewa-cv-centre-size: clamp(184px, 12.6vw, 224px) !important;
        width: min(100%, calc((var(--matewa-cv-orbit-distance) * 2) + (var(--matewa-cv-orbit-node) * 1.45))) !important;
        max-width: 560px !important;
        min-height: calc((var(--matewa-cv-orbit-distance) * 2) + (var(--matewa-cv-orbit-node) * 1.36)) !important;
        margin: 0 auto !important;
        transform: none !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-radial-center {
        width: var(--matewa-cv-centre-size) !important;
        height: var(--matewa-cv-centre-size) !important;
        min-width: var(--matewa-cv-centre-size) !important;
        min-height: var(--matewa-cv-centre-size) !important;
        max-width: var(--matewa-cv-centre-size) !important;
        max-height: var(--matewa-cv-centre-size) !important;
        aspect-ratio: 1 / 1 !important;
        border-radius: 999px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-orbit-item {
        width: var(--matewa-cv-orbit-node) !important;
        height: var(--matewa-cv-orbit-node) !important;
        min-width: var(--matewa-cv-orbit-node) !important;
        min-height: var(--matewa-cv-orbit-node) !important;
        max-width: var(--matewa-cv-orbit-node) !important;
        max-height: var(--matewa-cv-orbit-node) !important;
        aspect-ratio: 1 / 1 !important;
        border-radius: 999px !important;
        overflow: hidden !important;
    }
}

@media (min-width: 1181px) and (max-width: 1320px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(260px, 282px) minmax(400px, 1fr) minmax(246px, 270px) !important;
        gap: 14px !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        max-width: 470px !important;
        margin-bottom: 12px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(132px, 10vw, 152px) !important;
        --matewa-cv-orbit-node: clamp(84px, 6.15vw, 96px) !important;
        --matewa-cv-centre-size: clamp(168px, 12.3vw, 190px) !important;
        max-width: 470px !important;
    }
}

@media (min-width: 1321px) and (max-width: 1540px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(285px, 310px) minmax(470px, 1fr) minmax(265px, 300px) !important;
        gap: clamp(16px, 1.35vw, 22px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        max-width: 540px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(144px, 10.4vw, 174px) !important;
        --matewa-cv-orbit-node: clamp(90px, 6.4vw, 106px) !important;
        --matewa-cv-centre-size: clamp(180px, 12.6vw, 214px) !important;
        max-width: 540px !important;
    }
}

@media (min-width: 1541px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(305px, 340px) minmax(520px, 1fr) minmax(285px, 325px) !important;
        gap: clamp(20px, 1.55vw, 26px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        max-width: 600px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(158px, 11.2vw, 198px) !important;
        --matewa-cv-orbit-node: clamp(96px, 6.7vw, 116px) !important;
        --matewa-cv-centre-size: clamp(200px, 13.5vw, 238px) !important;
        max-width: 600px !important;
    }
}

/* Narrow desktop guard: keep the correction from crushing text or stretching circles. */
@media (min-width: 1181px) and (max-width: 1240px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(250px, 270px) minmax(380px, 1fr) minmax(238px, 258px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(122px, 9.8vw, 140px) !important;
        --matewa-cv-orbit-node: clamp(80px, 6vw, 90px) !important;
        --matewa-cv-centre-size: clamp(158px, 12vw, 178px) !important;
        max-width: 430px !important;
    }
}

/* =========================================================
   247ChatMate — 5A21K manual top-card gap lock
   Scope: admin-only top rhythm correction.
   Purpose: make the visual gap between the top header card and the
   first visible page card identical when switching pages.
   No frontend widget, frontend chips, chip persistence, WhatsApp handoff,
   licence, trial, lead routing or save-handler logic touched.
========================================================= */

.matewa-dashboard-page {
    --matewa-admin-visual-top-gap: 14px;
}

/* Stop old row-gap and topbar margin rules from adding a different amount per page. */
.matewa-dashboard-page .matewa-admin-main {
    gap: 0 !important;
    row-gap: 0 !important;
}

.matewa-dashboard-page .matewa-admin-topbar {
    margin-bottom: 0 !important;
}

/* Reset the immediate wrappers so the only top gap is the one below. */
.matewa-dashboard-page #matewa-admin-panel-dashboard,
.matewa-dashboard-page #matewa-plan-access-section,
.matewa-dashboard-page #matewa-admin-panel-help,
.matewa-dashboard-page #matewa-settings-form {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* One visual top gap per active page. For Setup, Appearance and Visitor Buttons
   the form wrapper is the real first row after the topbar, so it owns the gap. */
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard,
.matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section,
.matewa-dashboard-page[data-matewa-active-panel="help"] #matewa-admin-panel-help,
.matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-settings-form,
.matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-settings-form,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-settings-form {
    margin-top: var(--matewa-admin-visual-top-gap) !important;
}

/* Keep the page cards themselves flush inside their owning wrapper. */
.matewa-dashboard-page #matewa-admin-panel-dashboard > .matewa-dashboard-value-card,
.matewa-dashboard-page #matewa-admin-panel-setup > .matewa-core-settings-shell,
.matewa-dashboard-page #matewa-chip-labels-section > .matewa-chip-studio-card,
.matewa-dashboard-page #matewa-plan-access-section .matewa-dashboard-lower-accordions,
.matewa-dashboard-page #matewa-admin-panel-help > .matewa-admin-help-grid {
    margin-top: 0 !important;
}

/* Plan & Licence uses a transparent wrapper; keep the first visible plan card
   from adding another top offset. */
.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-shell,
.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-overview {
    margin-top: 0 !important;
}


/* =========================================================
   247ChatMate — 5A21L rear-card top gap lock
   Scope: admin-only top rhythm correction.
   Purpose: the topbar-to-content gap is measured from the furthest-back
   visible page card/surface, not from hidden wrappers, forms or inner cards.
   No frontend widget, frontend chips, chip persistence, WhatsApp handoff,
   licence, trial, lead routing or save-handler logic touched.
========================================================= */

.matewa-dashboard-page {
    --matewa-admin-visual-top-gap: 14px;
}

/* Stop wrappers from owning the visual gap. */
.matewa-dashboard-page .matewa-admin-main {
    gap: 0 !important;
    row-gap: 0 !important;
}

.matewa-dashboard-page .matewa-admin-topbar {
    margin-bottom: 0 !important;
}

.matewa-dashboard-page #matewa-admin-panel-dashboard,
.matewa-dashboard-page #matewa-plan-access-section,
.matewa-dashboard-page #matewa-admin-panel-help,
.matewa-dashboard-page #matewa-settings-form,
.matewa-dashboard-page #matewa-admin-panel-setup,
.matewa-dashboard-page #matewa-chip-labels-section,
.matewa-dashboard-page .matewa-dashboard-lower-accordions {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* The duplicate intro cards are intentionally hidden; the rear content card owns the gap. */
.matewa-dashboard-page:not([data-matewa-active-panel="dashboard"]) .matewa-admin-panel-heading,
.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-admin-panel-heading {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Actual furthest-back visible surfaces per page. */
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card,
.matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
.matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card,
.matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section .matewa-plan-access-shell,
.matewa-dashboard-page[data-matewa-active-panel="help"] #matewa-admin-panel-help > .matewa-admin-help-grid {
    margin-top: var(--matewa-admin-visual-top-gap) !important;
}

/* Inner cards must stay flush so the page does not gain a double top gap. */
.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-shell > :first-child,
.matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-shell > :first-child,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] .matewa-chip-studio-card > :first-child,
.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-shell > :first-child,
.matewa-dashboard-page[data-matewa-active-panel="help"] .matewa-admin-help-card:first-child {
    margin-top: 0 !important;
}

/* =========================================================
   247ChatMate — 5A21N Plan & Licence rear card match
   Scope: Plan page rear surface only.
   Purpose: make the Plan & Licence rear card use the same visual contract
   as the other main admin content cards when switching pages.
   No frontend widget, chips, save handler, licence logic, trial logic,
   WhatsApp handoff or JavaScript touched.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section .matewa-plan-access-shell {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: 22px !important;
    border: 1px solid var(--matewa-polish-border) !important;
    border-radius: var(--matewa-polish-radius-panel) !important;
    background:
        radial-gradient(circle at 96% 0%, rgba(38, 143, 43, 0.08), transparent 32%),
        #ffffff !important;
    box-shadow: var(--matewa-polish-shadow-soft) !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="plan"] #matewa-plan-access-section .matewa-plan-access-shell {
    background:
        radial-gradient(circle at 96% 0%, rgba(74, 222, 128, 0.10), transparent 32%),
        var(--matewa-polish-surface) !important;
    border-color: var(--matewa-polish-border) !important;
    color: var(--matewa-polish-text) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section .matewa-plan-access-shell > h2 {
    margin-top: 0 !important;
}

/* =========================================================
   247ChatMate — 5A21O Plan & Licence card tidy
   Visual-only: keep the page calm by making diagnostics support-only and
   preventing multiple long details panels feeling like one endless page.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-sections {
    gap: 8px !important;
    margin-top: 12px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-section:not([open]) {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.028) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-section:not([open]) > summary {
    min-height: 50px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-section--support {
    border-style: dashed !important;
    background: rgba(248, 250, 252, 0.72) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-section--support:not([open]) {
    opacity: 0.78;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-section--support > summary span {
    color: #334155 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-section--support > summary::after {
    background: rgba(15, 23, 42, 0.06) !important;
    color: #475569 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="plan"] .matewa-plan-access-section--support {
    background: rgba(15, 23, 42, 0.42) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="plan"] .matewa-plan-access-section--support > summary span {
    color: #dbe4ee !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="plan"] .matewa-plan-access-section--support > summary::after {
    background: rgba(148, 163, 184, 0.14) !important;
    color: #cbd5e1 !important;
}

/* =========================================================
   247ChatMate — 5A21P Plan & Licence customer view final cascade
   Visual-only. Keeps the visible page customer-safe while support details
   stay collapsed unless explicitly opened.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-overview--customer,
.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-feature-grid,
.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-next-step,
.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-actions-card {
    width: 100% !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-status-circles {
    display: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-section--support:not([open]) {
    opacity: 0.72 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-section--support > summary small {
    color: #64748b !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-access-section--support[open] {
    margin-top: 12px !important;
}

/* =========================================================
   247ChatMate — 5A21S Dashboard Leads/Status height lock
   Visual-only dashboard correction.

   Locks the Dashboard rear card and three front columns so the page does
   not jump when switching between Leads and Status. The Status rail keeps
   the Need help box pinned low, placing spare space between the final
   setup/next-action card and the help box. The Leads rail scrolls inside
   the existing right column instead of stretching the whole dashboard.
========================================================= */

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        --matewa-dashboard-fixed-card-height: max(640px, calc(100vh - 150px));
        height: var(--matewa-dashboard-fixed-card-height) !important;
        min-height: var(--matewa-dashboard-fixed-card-height) !important;
        align-items: stretch !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        height: 100% !important;
        min-height: 0 !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        display: flex !important;
        flex-direction: column !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view.is-active {
        flex: 1 1 auto !important;
        min-height: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view.is-active {
        height: 100% !important;
        min-height: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"].is-active {
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"] .matewa-dashboard-status-cards {
        flex: 0 0 auto !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-dashboard-help-box {
        margin-top: auto !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="leads"].is-active {
        display: block !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 6px !important;
        scrollbar-gutter: stable;
    }
}

/* =========================================================
   247ChatMate — 5A21U universal rear-card height lock
   Scope: admin-only visual stability pass.
   Purpose: every rear content surface beneath the headline uses the same
   desktop height and padding as the Dashboard card so switching pages does
   not visually flicker or jump.
   No frontend widget, chips, WhatsApp handoff, licence/trial logic,
   registry logic, save handler or JavaScript touched.
========================================================= */

.matewa-dashboard-page {
    --matewa-admin-rear-card-height: max(640px, calc(100vh - 150px));
    --matewa-admin-rear-card-padding: clamp(22px, 1.7vw, 28px);
}

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card,
    .matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card,
    .matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section .matewa-plan-access-shell,
    .matewa-dashboard-page[data-matewa-active-panel="help"] #matewa-admin-panel-help > .matewa-admin-help-grid {
        height: var(--matewa-admin-rear-card-height) !important;
        min-height: var(--matewa-admin-rear-card-height) !important;
        max-height: var(--matewa-admin-rear-card-height) !important;
        box-sizing: border-box !important;
        padding: var(--matewa-admin-rear-card-padding) !important;
        margin-top: var(--matewa-admin-visual-top-gap, 14px) !important;
        overflow-x: hidden !important;
        transition: none !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card,
    .matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section .matewa-plan-access-shell,
    .matewa-dashboard-page[data-matewa-active-panel="help"] #matewa-admin-panel-help > .matewa-admin-help-grid {
        overflow-y: auto !important;
        scrollbar-gutter: stable;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card {
        overflow: hidden !important;
    }


    .matewa-dashboard-page[data-matewa-active-panel="help"] #matewa-admin-panel-help > .matewa-admin-help-grid {
        align-content: start !important;
    }
}

@media (max-width: 1180px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card,
    .matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card,
    .matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section .matewa-plan-access-shell,
    .matewa-dashboard-page[data-matewa-active-panel="help"] #matewa-admin-panel-help > .matewa-admin-help-grid {
        max-height: none !important;
        overflow: visible !important;
    }
}


/* =========================================================
   247ChatMate — 5A21V rear-card top alignment lock
   Scope: admin-only visual alignment.
   Purpose: stop Visitor Buttons and Plan & Licence sitting lower than
   the other pages by removing duplicate wrapper gaps and letting only the
   visible rear card own the top offset beneath the headline.
   No chips, frontend widget, WhatsApp handoff, licence/trial logic,
   registry logic, save handler or JavaScript touched.
========================================================= */

.matewa-dashboard-page {
    --matewa-admin-visual-top-gap: 14px;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard,
.matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-settings-form,
.matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-settings-form,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-settings-form,
.matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section,
.matewa-dashboard-page[data-matewa-active-panel="help"] #matewa-admin-panel-help,
.matewa-dashboard-page #matewa-admin-panel-setup,
.matewa-dashboard-page #matewa-chip-labels-section,
.matewa-dashboard-page .matewa-dashboard-lower-accordions {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card,
.matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
.matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card,
.matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section > .matewa-plan-access-shell,
.matewa-dashboard-page[data-matewa-active-panel="help"] #matewa-admin-panel-help > .matewa-admin-help-grid {
    margin-top: var(--matewa-admin-visual-top-gap) !important;
}

/* =========================================================
   247ChatMate — 5A21W setup/display visual top-gap match
   Scope: admin-only CSS alignment.
   Purpose: Setup and Appearance & Pages visually read closer to the
   header than the other rear cards because they sit inside the shared
   settings form shell. Apply a tiny page-specific visual compensation
   while keeping the locked rear-card height, padding and structure.
   No PHP, JS, chips, frontend widget, WhatsApp handoff, licence/trial,
   registry or save-handler logic touched.
========================================================= */

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card,
    .matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section .matewa-plan-access-shell,
    .matewa-dashboard-page[data-matewa-active-panel="help"] #matewa-admin-panel-help > .matewa-admin-help-grid {
        margin-top: var(--matewa-admin-visual-top-gap, 14px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell {
        margin-top: calc(var(--matewa-admin-visual-top-gap, 14px) + 4px) !important;
    }
}

/* =========================================================
   247ChatMate — 5A21X admin page micro-transition
   Scope: admin-only navigation feel.
   Purpose: add a tiny, stable enter transition when switching left-menu
   pages and avoid unnecessary scroll nudges when the dashboard shell is
   already in view. No layout dimensions, chips, widget, licence, trial,
   WhatsApp handoff or save-handler behaviour changed.
========================================================= */

@media (prefers-reduced-motion: no-preference) {
    .matewa-dashboard-page.is-admin-panel-transitioning .matewa-admin-topbar,
    .matewa-dashboard-page.is-admin-panel-transitioning .matewa-admin-panel[data-matewa-admin-panel] {
        opacity: 0.04;
        transform: translateY(4px);
        transition:
            opacity 150ms cubic-bezier(0.22, 1, 0.36, 1),
            transform 150ms cubic-bezier(0.22, 1, 0.36, 1) !important;
        will-change: opacity, transform;
    }

    .matewa-dashboard-page.is-admin-panel-transitioning.is-admin-panel-entered .matewa-admin-topbar,
    .matewa-dashboard-page.is-admin-panel-transitioning.is-admin-panel-entered .matewa-admin-panel[data-matewa-admin-panel] {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   247ChatMate — 5A21Y viewport fit + typography guard
   Scope: admin-only final visual stability pass.
   Purpose:
   - Keep the rear page surfaces and their main content inside the 100% zoom
     viewport on normal desktop screens.
   - Preserve quality when the window is reduced by scaling spacing and text
     proportionally instead of allowing labels to overflow buttons/cards.
   - No frontend widget, frontend chips, WhatsApp handoff, licence/trial logic,
     registry logic, save handler or PHP touched.
========================================================= */

.matewa-dashboard-page {
    --matewa-admin-fit-text-xs: clamp(10.5px, 0.64vw, 12px);
    --matewa-admin-fit-text-sm: clamp(11.25px, 0.72vw, 13px);
    --matewa-admin-fit-text-md: clamp(12.25px, 0.82vw, 14px);
    --matewa-admin-fit-text-lg: clamp(14px, 1.02vw, 17px);
    --matewa-admin-fit-heading-sm: clamp(15px, 1.08vw, 18px);
    --matewa-admin-fit-heading-md: clamp(20px, 1.55vw, 26px);
    --matewa-admin-fit-heading-lg: clamp(25px, 2.05vw, 36px);
}

@media (min-width: 1181px) {
    .matewa-dashboard-page .matewa-admin-shell,
    .matewa-dashboard-page .matewa-admin-main,
    .matewa-dashboard-page .matewa-admin-panel,
    .matewa-dashboard-page .matewa-admin-topbar,
    .matewa-dashboard-page .matewa-dashboard-value-card,
    .matewa-dashboard-page .matewa-core-settings-shell,
    .matewa-dashboard-page .matewa-plan-access-shell,
    .matewa-dashboard-page .matewa-chip-studio-card,
    .matewa-dashboard-page .matewa-admin-help-grid,
    .matewa-dashboard-page .matewa-core-settings-panel,
    .matewa-dashboard-page .matewa-plan-overview,
    .matewa-dashboard-page .matewa-plan-feature-card,
    .matewa-dashboard-page .matewa-plan-action-row,
    .matewa-dashboard-page .matewa-dashboard-hero-panel,
    .matewa-dashboard-page .matewa-dashboard-lead-panel,
    .matewa-dashboard-page .matewa-dashboard-setup-panel,
    .matewa-dashboard-page .matewa-dashboard-status-card,
    .matewa-dashboard-page .matewa-dashboard-history-summary-mini > div,
    .matewa-dashboard-page .matewa-dashboard-history-mini-row,
    .matewa-dashboard-page .matewa-admin-help-card {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar h2,
    .matewa-dashboard-page .matewa-dashboard-hero-panel h2 {
        font-size: var(--matewa-admin-fit-heading-lg) !important;
        line-height: 1.02 !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
    }

    .matewa-dashboard-page .matewa-admin-panel-heading h2,
    .matewa-dashboard-page .matewa-plan-overview__copy h3 {
        font-size: var(--matewa-admin-fit-heading-md) !important;
        line-height: 1.12 !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
    }

    .matewa-dashboard-page .matewa-core-panel-heading h3,
    .matewa-dashboard-page .matewa-plan-actions-card__copy h3,
    .matewa-dashboard-page .matewa-plan-access-section h3,
    .matewa-dashboard-page .matewa-admin-help-card h3,
    .matewa-dashboard-page .matewa-chip-studio-panel-header h3,
    .matewa-dashboard-page .matewa-dashboard-setup-panel h3 {
        font-size: var(--matewa-admin-fit-heading-sm) !important;
        line-height: 1.16 !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar p,
    .matewa-dashboard-page .matewa-admin-panel-heading p,
    .matewa-dashboard-page .matewa-dashboard-hero-panel > p:not(.matewa-dashboard-greeting),
    .matewa-dashboard-page .matewa-core-panel-heading p,
    .matewa-dashboard-page .matewa-plan-overview__copy p,
    .matewa-dashboard-page .matewa-plan-actions-card__copy p,
    .matewa-dashboard-page .matewa-admin-help-card p,
    .matewa-dashboard-page .matewa-chip-studio-panel-header p {
        font-size: var(--matewa-admin-fit-text-md) !important;
        line-height: 1.42 !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
    }

    .matewa-dashboard-page .matewa-field-help,
    .matewa-dashboard-page .description,
    .matewa-dashboard-page .matewa-settings-card p.description,
    .matewa-dashboard-page .matewa-plan-feature-card small,
    .matewa-dashboard-page .matewa-plan-action-row span,
    .matewa-dashboard-page .matewa-dashboard-status-card span,
    .matewa-dashboard-page .matewa-dashboard-history-mini-row span,
    .matewa-dashboard-page .matewa-dashboard-history-mini-row small,
    .matewa-dashboard-page .matewa-support-summary-card span,
    .matewa-dashboard-page .matewa-support-safe-note,
    .matewa-dashboard-page .matewa-chip-preview-subtle,
    .matewa-dashboard-page .matewa-chip-editor-helper,
    .matewa-dashboard-page .matewa-chip-editor-subtle {
        font-size: var(--matewa-admin-fit-text-sm) !important;
        line-height: 1.34 !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
    }

    .matewa-dashboard-page .matewa-admin-ghost-button,
    .matewa-dashboard-page .matewa-admin-save-button,
    .matewa-dashboard-page .matewa-dashboard-primary-button,
    .matewa-dashboard-page .matewa-dashboard-secondary-button,
    .matewa-dashboard-page .matewa-dashboard-history-button,
    .matewa-dashboard-page .matewa-dashboard-circle-toggle-button,
    .matewa-dashboard-page .matewa-plan-access-shell .button,
    .matewa-dashboard-page .matewa-chip-studio-card .button,
    .matewa-dashboard-page .matewa-admin-help-card a {
        width: auto;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 38px !important;
        padding: 8px 12px !important;
        font-size: var(--matewa-admin-fit-text-sm) !important;
        line-height: 1.15 !important;
        white-space: normal !important;
        text-align: center !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page .matewa-dashboard-status-pill,
    .matewa-dashboard-page .matewa-status-badge,
    .matewa-dashboard-page .matewa-plan-overview__next span,
    .matewa-dashboard-page .matewa-plan-countdown-card span,
    .matewa-dashboard-page .matewa-plan-next-step span,
    .matewa-dashboard-page .matewa-plan-access-section > summary small,
    .matewa-dashboard-page .matewa-support-summary-card strong {
        max-width: 100% !important;
        font-size: var(--matewa-admin-fit-text-xs) !important;
        line-height: 1.18 !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }

    .matewa-dashboard-page .matewa-plan-feature-card strong,
    .matewa-dashboard-page .matewa-plan-action-row strong,
    .matewa-dashboard-page .matewa-dashboard-status-card strong,
    .matewa-dashboard-page .matewa-dashboard-history-summary-mini strong,
    .matewa-dashboard-page .matewa-dashboard-history-mini-row strong,
    .matewa-dashboard-page .matewa-choice-card strong {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
    }

    .matewa-dashboard-page .matewa-plan-feature-grid,
    .matewa-dashboard-page .matewa-support-summary-grid,
    .matewa-dashboard-page .matewa-dashboard-status-cards,
    .matewa-dashboard-page .matewa-dashboard-history-summary-mini,
    .matewa-dashboard-page .matewa-core-settings-grid,
    .matewa-dashboard-page .matewa-chip-studio-layout,
    .matewa-dashboard-page .matewa-admin-help-grid {
        min-width: 0 !important;
    }
}

@media (min-width: 1181px) and (max-width: 1360px) {
    .matewa-dashboard-page {
        --matewa-admin-rear-card-padding: clamp(18px, 1.35vw, 22px);
    }

    .matewa-dashboard-page .matewa-core-settings-grid {
        gap: 14px !important;
    }

    .matewa-dashboard-page .matewa-core-settings-panel,
    .matewa-dashboard-page .matewa-plan-feature-card,
    .matewa-dashboard-page .matewa-plan-next-step,
    .matewa-dashboard-page .matewa-plan-actions-card,
    .matewa-dashboard-page .matewa-admin-help-card {
        padding: clamp(14px, 1.2vw, 18px) !important;
    }

    .matewa-dashboard-page .matewa-plan-feature-grid {
        gap: 8px !important;
    }

    .matewa-dashboard-page .matewa-plan-feature-card {
        min-height: 96px !important;
    }

    .matewa-dashboard-page .matewa-plan-action-row {
        grid-template-columns: minmax(0, 1fr) minmax(92px, auto) !important;
        gap: 10px !important;
        min-height: 68px !important;
        padding: 10px !important;
    }
}

@media (min-width: 1181px) and (max-height: 820px) {
    .matewa-dashboard-page {
        --matewa-admin-rear-card-height: calc(100vh - 132px);
        --matewa-dashboard-fixed-card-height: calc(100vh - 132px);
        --matewa-admin-rear-card-padding: clamp(16px, 1.22vw, 20px);
        --matewa-admin-visual-top-gap: 12px;
    }

    .matewa-dashboard-page .matewa-admin-topbar {
        min-height: 62px !important;
        padding: 12px 18px !important;
    }

    .matewa-dashboard-page .matewa-admin-shell {
        gap: 18px !important;
    }

    .matewa-dashboard-page .matewa-dashboard-value-card,
    .matewa-dashboard-page .matewa-core-settings-shell,
    .matewa-dashboard-page .matewa-plan-access-shell,
    .matewa-dashboard-page .matewa-chip-studio-card,
    .matewa-dashboard-page .matewa-admin-help-grid {
        padding: var(--matewa-admin-rear-card-padding) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        gap: 14px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        padding: 16px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-cards,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-history-summary-mini,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-history-actions-rail {
        gap: 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit .dashicons {
        width: 32px !important;
        height: 32px !important;
        font-size: 17px !important;
        line-height: 32px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        margin-bottom: 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(118px, 8.4vw, 150px) !important;
        --matewa-cv-orbit-node: clamp(78px, 5.5vw, 96px) !important;
        --matewa-cv-centre-size: clamp(154px, 10.8vw, 194px) !important;
    }

    .matewa-dashboard-page .matewa-core-settings-grid,
    .matewa-dashboard-page .matewa-field-stack,
    .matewa-dashboard-page .matewa-choice-stack,
    .matewa-dashboard-page .matewa-plan-access-sections {
        gap: 10px !important;
    }

    .matewa-dashboard-page .matewa-core-settings-panel,
    .matewa-dashboard-page .matewa-plan-overview,
    .matewa-dashboard-page .matewa-plan-feature-card,
    .matewa-dashboard-page .matewa-plan-next-step,
    .matewa-dashboard-page .matewa-plan-actions-card,
    .matewa-dashboard-page .matewa-plan-action-row {
        padding: 12px !important;
    }

    .matewa-dashboard-page .matewa-plan-overview,
    .matewa-dashboard-page .matewa-plan-feature-grid,
    .matewa-dashboard-page .matewa-plan-next-step,
    .matewa-dashboard-page .matewa-plan-actions-card {
        margin-bottom: 8px !important;
    }

    .matewa-dashboard-page .matewa-plan-countdown-card,
    .matewa-dashboard-page .matewa-plan-feature-card {
        min-height: 86px !important;
    }

    .matewa-dashboard-page .matewa-plan-countdown-card strong {
        font-size: clamp(19px, 1.7vw, 23px) !important;
    }

    .matewa-dashboard-page .matewa-admin-help-card {
        min-height: 180px !important;
        padding: 16px !important;
    }
}

@media (min-width: 1181px) and (max-height: 720px) {
    .matewa-dashboard-page {
        --matewa-admin-rear-card-height: calc(100vh - 118px);
        --matewa-dashboard-fixed-card-height: calc(100vh - 118px);
        --matewa-admin-rear-card-padding: 14px;
        --matewa-admin-visual-top-gap: 10px;
    }

    .matewa-dashboard-page .matewa-admin-topbar {
        min-height: 56px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar h2,
    .matewa-dashboard-page .matewa-dashboard-hero-panel h2 {
        font-size: clamp(23px, 1.85vw, 30px) !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar p,
    .matewa-dashboard-page .matewa-dashboard-hero-panel > p:not(.matewa-dashboard-greeting),
    .matewa-dashboard-page .matewa-plan-overview__copy p {
        font-size: 12px !important;
        line-height: 1.32 !important;
    }
}

@media (max-width: 1180px) {
    .matewa-dashboard-page .matewa-admin-ghost-button,
    .matewa-dashboard-page .matewa-admin-save-button,
    .matewa-dashboard-page .matewa-dashboard-primary-button,
    .matewa-dashboard-page .matewa-dashboard-secondary-button,
    .matewa-dashboard-page .matewa-dashboard-history-button,
    .matewa-dashboard-page .matewa-plan-access-shell .button,
    .matewa-dashboard-page .matewa-chip-studio-card .button,
    .matewa-dashboard-page .matewa-admin-help-card a {
        max-width: 100% !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar h2,
    .matewa-dashboard-page .matewa-admin-panel-heading h2,
    .matewa-dashboard-page .matewa-dashboard-hero-panel h2,
    .matewa-dashboard-page .matewa-plan-overview__copy h3,
    .matewa-dashboard-page .matewa-core-panel-heading h3,
    .matewa-dashboard-page .matewa-plan-actions-card__copy h3 {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
    }
}

/* =========================================================
   247ChatMate — 5A21Z dashboard countdown + setup diagnostics move
   Scope: admin-only layout relocation / 100% scaling guard.
========================================================= */

.matewa-dashboard-page .matewa-dashboard-plan-nudge {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: clamp(12px, 1vw, 16px);
    border: 1px solid rgba(34, 197, 94, 0.22);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 60%),
        linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(255, 255, 255, 0.96));
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
    color: #0f172a;
    text-decoration: none;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.matewa-dashboard-page .matewa-dashboard-plan-nudge::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 1px solid rgba(34, 197, 94, 0.32);
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
    animation: matewa-plan-nudge-pulse 2.8s ease-in-out infinite;
}

.matewa-dashboard-page .matewa-dashboard-plan-nudge:hover,
.matewa-dashboard-page .matewa-dashboard-plan-nudge:focus-visible {
    border-color: rgba(22, 163, 74, 0.46);
    box-shadow: 0 18px 36px rgba(22, 163, 74, 0.13);
    color: #0f172a;
    outline: none;
}

.matewa-dashboard-page .matewa-dashboard-plan-nudge span,
.matewa-dashboard-page .matewa-dashboard-plan-nudge em {
    font-size: clamp(10px, 0.72vw, 12px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #15803d;
}

.matewa-dashboard-page .matewa-dashboard-plan-nudge strong {
    font-size: clamp(18px, 1.55vw, 25px);
    line-height: 1.03;
    font-weight: 950;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.matewa-dashboard-page .matewa-dashboard-plan-nudge small {
    font-size: clamp(11px, 0.8vw, 13px);
    line-height: 1.3;
    font-weight: 750;
    color: #334155;
    overflow-wrap: anywhere;
}

.matewa-dashboard-page .matewa-dashboard-plan-nudge em {
    justify-self: start;
    margin-top: 3px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    font-style: normal;
}

.matewa-dashboard-page .matewa-dashboard-plan-nudge.is-warning {
    border-color: rgba(245, 158, 11, 0.34);
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 60%),
        linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(255, 255, 255, 0.96));
}

.matewa-dashboard-page .matewa-dashboard-plan-nudge.is-expired {
    border-color: rgba(239, 68, 68, 0.28);
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.13), transparent 60%),
        linear-gradient(135deg, rgba(254, 242, 242, 0.98), rgba(255, 255, 255, 0.96));
}

@keyframes matewa-plan-nudge-pulse {
    0%, 100% {
        opacity: 0;
        transform: scale(0.98);
    }
    45% {
        opacity: 1;
        transform: scale(1.015);
    }
}

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        display: flex !important;
        flex-direction: column !important;
        gap: clamp(10px, 0.8vw, 14px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge {
        flex: 0 0 auto !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view.is-active {
        flex: 1 1 auto !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

.matewa-dashboard-page .matewa-core-support-diagnostics-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
    border-style: dashed;
}

.matewa-dashboard-page .matewa-core-support-diagnostics-panel .matewa-panel-step {
    width: auto;
    min-width: 44px;
    padding-inline: 10px;
    border-radius: 999px;
    font-size: 11px;
}

.matewa-dashboard-page .matewa-setup-support-diagnostics {
    margin-top: 10px;
}

.matewa-dashboard-page .matewa-setup-support-diagnostics > summary {
    min-height: 44px;
}

.matewa-dashboard-page .matewa-plan-overview--customer {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section .matewa-plan-access-shell {
    overflow-y: auto !important;
    scrollbar-gutter: stable !important;
}

.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-feature-grid,
.matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-actions-card__body {
    grid-auto-rows: minmax(0, auto) !important;
}

@media (min-width: 1181px) and (max-height: 780px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge {
        padding: 10px 12px !important;
        gap: 3px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge strong {
        font-size: clamp(17px, 1.25vw, 21px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge small,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge span,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge em {
        font-size: 10px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-feature-card,
    .matewa-dashboard-page[data-matewa-active-panel="plan"] .matewa-plan-action-row {
        min-height: 0 !important;
        padding: 10px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .matewa-dashboard-page .matewa-dashboard-plan-nudge::after {
        animation: none !important;
    }
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-plan-nudge,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-core-support-diagnostics-panel {
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.16), transparent 62%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96));
    border-color: rgba(74, 222, 128, 0.24);
    color: #e5e7eb;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-plan-nudge strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-plan-nudge small {
    color: #e5e7eb;
}

/* =========================================================
   247ChatMate — 5A21AA dashboard lead controls relocation
   Scope: admin-only content relocation / visual containment.
========================================================= */

.matewa-dashboard-page .matewa-admin-hidden-action-form {
    display: none !important;
}

.matewa-dashboard-page .matewa-dashboard-export-card {
    display: grid !important;
    gap: 10px !important;
    width: 100% !important;
    padding: clamp(14px, 1vw, 18px) !important;
    border: 1px solid rgba(34, 197, 94, 0.18) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.10), transparent 56%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)) !important;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06) !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-dashboard-export-card h3,
.matewa-dashboard-page .matewa-dashboard-export-card p {
    margin: 0 !important;
}

.matewa-dashboard-page .matewa-dashboard-export-card p {
    color: #334155 !important;
    font-size: clamp(11px, 0.78vw, 13px) !important;
    line-height: 1.42 !important;
    font-weight: 650 !important;
}

.matewa-dashboard-page .matewa-dashboard-export-card form,
.matewa-dashboard-page .matewa-dashboard-export-card .matewa-dashboard-history-button {
    width: 100% !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="leads"].is-active {
    display: flex !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    padding-right: 0 !important;
    scrollbar-gutter: auto !important;
}

.matewa-dashboard-page .matewa-setup-lead-tools {
    display: grid !important;
    gap: 12px !important;
    padding: 14px !important;
    border: 1px solid rgba(34, 197, 94, 0.18) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 58%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-setup-lead-tools__heading {
    display: grid !important;
    gap: 3px !important;
}

.matewa-dashboard-page .matewa-setup-lead-tools__heading strong {
    font-size: clamp(13px, 0.9vw, 15px) !important;
    line-height: 1.18 !important;
    color: #0f172a !important;
}

.matewa-dashboard-page .matewa-setup-lead-tools__heading span {
    color: #475569 !important;
    font-size: clamp(11px, 0.78vw, 13px) !important;
    line-height: 1.36 !important;
    font-weight: 650 !important;
}

.matewa-dashboard-page .matewa-setup-lead-tool-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.matewa-dashboard-page .matewa-setup-lead-tool-grid .matewa-dashboard-history-button,
.matewa-dashboard-page .matewa-setup-lead-tool-grid button.matewa-dashboard-history-button {
    width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
}

.matewa-dashboard-page .matewa-setup-lead-detail {
    margin: 0 !important;
    border-radius: 16px !important;
}

.matewa-dashboard-page .matewa-setup-lead-detail > summary {
    min-height: 42px !important;
    padding: 10px 12px !important;
    font-weight: 850 !important;
    cursor: pointer !important;
}

.matewa-dashboard-page .matewa-setup-lead-detail .matewa-dashboard-retention-card,
.matewa-dashboard-page .matewa-setup-lead-detail .matewa-dashboard-danger-zone-inner {
    padding: 12px !important;
}

.matewa-dashboard-page .matewa-setup-lead-detail label,
.matewa-dashboard-page .matewa-setup-lead-detail p,
.matewa-dashboard-page .matewa-setup-lead-detail small {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
}

.matewa-dashboard-page .matewa-setup-lead-detail select,
.matewa-dashboard-page .matewa-setup-lead-detail input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 1180px) {
    .matewa-dashboard-page .matewa-setup-lead-tool-grid {
        grid-template-columns: 1fr !important;
    }
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-export-card,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-setup-lead-tools {
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 60%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96)) !important;
    border-color: rgba(74, 222, 128, 0.20) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-export-card p,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-setup-lead-tools__heading span {
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-setup-lead-tools__heading strong {
    color: #f8fafc !important;
}


/* =========================================================
   247ChatMate — 5A21AB dashboard export + setup diagnostics placement
   Scope: admin-only visual/layout correction.
   Purpose: match lead export to plan nudge styling, keep export content
   aligned at the bottom, and keep Support diagnostics on Setup only.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="leads"].is-active {
    display: flex !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.matewa-dashboard-page .matewa-dashboard-export-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: clamp(14px, 1vw, 18px) !important;
    border: 1px solid rgba(34, 197, 94, 0.22) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 60%),
        linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(255, 255, 255, 0.96)) !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.matewa-dashboard-page .matewa-dashboard-export-card h3 {
    margin: 0 0 2px !important;
    color: #0f172a !important;
    font-size: clamp(14px, 0.96vw, 16px) !important;
    line-height: 1.15 !important;
    font-weight: 950 !important;
    letter-spacing: -0.025em !important;
}

.matewa-dashboard-page .matewa-dashboard-export-card p {
    margin: 0 !important;
    max-width: 100% !important;
    color: #334155 !important;
    font-size: clamp(11px, 0.78vw, 13px) !important;
    line-height: 1.38 !important;
    font-weight: 700 !important;
    overflow-wrap: normal !important;
}

.matewa-dashboard-page .matewa-dashboard-export-card form {
    width: 100% !important;
    margin-top: 8px !important;
}

.matewa-dashboard-page .matewa-dashboard-export-card .matewa-dashboard-history-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 11px 24px !important;
    border-radius: var(--matewa-polish-radius-control) !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-support-diagnostics-panel {
    display: block !important;
    grid-column: 1 / -1 !important;
    order: 5 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-support-diagnostics-panel {
    display: none !important;
}

.matewa-dashboard-page .matewa-core-support-diagnostics-panel .matewa-panel-step {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-panel--wide:not(.matewa-core-support-diagnostics-panel) .matewa-panel-step {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    padding: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    border-radius: 999px !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-export-card {
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.16), transparent 62%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96)) !important;
    border-color: rgba(74, 222, 128, 0.24) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-export-card h3,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-export-card p {
    color: #e5e7eb !important;
}

/* =========================================================
   247ChatMate — 5A21AC dashboard export rear-card height trim
   Scope: admin-only visual correction.
   Purpose: keep the Lead export backing card as a compact bottom card,
   aligned with the hero action row rather than stretching up the right rail.
========================================================= */

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="leads"].is-active {
        align-items: flex-end !important;
        justify-content: flex-end !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-export-card {
        flex: 0 0 auto !important;
        height: auto !important;
        min-height: clamp(128px, 14vh, 158px) !important;
        max-height: none !important;
        margin-top: auto !important;
    }
}

@media (min-width: 1181px) and (max-height: 780px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-export-card {
        min-height: 126px !important;
        padding: 12px !important;
        gap: 6px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-export-card form {
        margin-top: 6px !important;
    }
}


/* =========================================================
   247ChatMate — 5A21AD header word removal + title alignment
   Scope: admin-only shell header correction.
   Purpose: remove repeated small brand/eyebrow wording and vertically align
   every page title with the topbar actions so page changes feel consistent.
========================================================= */

.matewa-dashboard-page .matewa-admin-brand {
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 44px !important;
}

.matewa-dashboard-page .matewa-admin-brand-copy,
.matewa-dashboard-page .matewa-admin-eyebrow {
    display: none !important;
}

.matewa-dashboard-page .matewa-admin-topbar {
    align-items: center !important;
    min-height: 86px !important;
    padding-top: clamp(17px, 1.45vw, 22px) !important;
    padding-bottom: clamp(17px, 1.45vw, 22px) !important;
}

.matewa-dashboard-page .matewa-admin-topbar-copy,
.matewa-dashboard-page .matewa-admin-topbar > div:first-child:not(.matewa-admin-topbar-actions) {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 48px !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 5px !important;
}

.matewa-dashboard-page .matewa-admin-topbar h2 {
    margin: 0 !important;
    line-height: 1.02 !important;
}

.matewa-dashboard-page .matewa-admin-topbar p[data-matewa-admin-page-description] {
    margin: 0 !important;
    max-width: 760px !important;
    line-height: 1.36 !important;
}

.matewa-dashboard-page .matewa-admin-topbar-actions {
    align-self: center !important;
}

@media (max-width: 900px) {
    .matewa-dashboard-page .matewa-admin-topbar {
        align-items: flex-start !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar-copy,
    .matewa-dashboard-page .matewa-admin-topbar > div:first-child:not(.matewa-admin-topbar-actions) {
        min-height: 0 !important;
    }
}

/* =========================================================
   247ChatMate — 5A21AE brand title restore + nav simplify
   Scope: admin shell only.
   Purpose: restore one clean 247ChatMate title beside the top-left icon
   while keeping Plan & Licence and Help removed from the visible nav.
========================================================= */

.matewa-dashboard-page .matewa-admin-brand {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    min-height: 44px !important;
}

.matewa-dashboard-page .matewa-admin-brand-logo,
.matewa-dashboard-page .matewa-dashboard-brand-icon {
    flex: 0 0 auto !important;
}

.matewa-dashboard-page .matewa-admin-brand-copy {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
}

.matewa-dashboard-page .matewa-admin-brand-copy strong {
    display: block !important;
    margin: 0 !important;
    color: var(--matewa-admin-ink, #06122b) !important;
    font-size: clamp(15px, 0.98vw, 18px) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: -0.045em !important;
    white-space: nowrap !important;
}

.matewa-dashboard-page .matewa-admin-brand-copy small {
    display: none !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-admin-brand-copy strong {
    color: #f8fafc !important;
}

/* =========================================================
   247ChatMate — 5A21AF dashboard 100 percent fit + alignment guard
   Scope: admin visual CSS only.
   Purpose:
   - Stop the sidebar brand/title from looking crushed at 100% browser zoom.
   - Align the Dashboard left hero box with the top headline rhythm.
   - Keep Dashboard text/buttons/radial/status cards readable and contained at
     100% zoom and when the browser window is reduced.
   - Compact the Status right rail so all cards can display without being cut.
   No frontend widget, chips, WhatsApp handoff, licence/trial logic, save
   handler, PHP or JavaScript changed.
========================================================= */

.matewa-dashboard-page {
    --matewa-admin-rear-card-height: clamp(620px, calc(100vh - 164px), 710px);
    --matewa-dashboard-fixed-card-height: clamp(620px, calc(100vh - 164px), 710px);
    --matewa-admin-rear-card-padding: clamp(18px, 1.45vw, 24px);
    --matewa-admin-title-pad-x: clamp(22px, 2vw, 30px);
}

.matewa-dashboard-page .matewa-admin-brand-copy strong {
    max-width: none !important;
    font-size: clamp(16px, 0.98vw, 18px) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.018em !important;
    white-space: nowrap !important;
    text-rendering: geometricPrecision;
    transform: none !important;
}

.matewa-dashboard-page .matewa-admin-brand-copy {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: visible !important;
}

.matewa-dashboard-page .matewa-admin-topbar {
    min-height: 78px !important;
    padding: 15px var(--matewa-admin-title-pad-x) !important;
    align-items: center !important;
}

.matewa-dashboard-page .matewa-admin-topbar-copy {
    min-height: 48px !important;
    justify-content: center !important;
}

.matewa-dashboard-page .matewa-admin-topbar h2 {
    font-size: clamp(28px, 1.9vw, 36px) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.052em !important;
}

.matewa-dashboard-page .matewa-admin-topbar p[data-matewa-admin-page-description] {
    font-size: clamp(12.5px, 0.82vw, 14px) !important;
    line-height: 1.3 !important;
}

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card,
    .matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card {
        height: var(--matewa-admin-rear-card-height) !important;
        min-height: var(--matewa-admin-rear-card-height) !important;
        max-height: var(--matewa-admin-rear-card-height) !important;
        padding: var(--matewa-admin-rear-card-padding) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(286px, 320px) minmax(430px, 1fr) minmax(250px, 294px) !important;
        gap: clamp(14px, 1.18vw, 20px) !important;
        align-items: stretch !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        height: 100% !important;
        min-height: 0 !important;
        padding: clamp(16px, 1.2vw, 22px) !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel h2 {
        margin: 0 !important;
        font-size: clamp(29px, 2vw, 36px) !important;
        line-height: 1.02 !important;
        letter-spacing: -0.055em !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel > p:not(.matewa-dashboard-greeting) {
        margin: 14px 0 0 !important;
        font-size: clamp(12.5px, 0.82vw, 14px) !important;
        line-height: 1.42 !important;
        max-width: 100% !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-status {
        margin: 14px 0 0 !important;
        gap: 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-pill {
        min-height: 28px !important;
        padding: 5px 10px !important;
        font-size: clamp(10.75px, 0.72vw, 12px) !important;
        line-height: 1.12 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: clamp(7px, 0.6vw, 10px) !important;
        width: 100% !important;
        margin-top: auto !important;
        margin-bottom: 12px !important;
        align-items: end !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit {
        display: grid !important;
        justify-items: center !important;
        align-content: start !important;
        gap: 6px !important;
        min-width: 0 !important;
        width: auto !important;
        max-width: none !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit .dashicons {
        width: 32px !important;
        height: 32px !important;
        font-size: 17px !important;
        line-height: 32px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit strong {
        max-width: 100% !important;
        font-size: clamp(9.8px, 0.66vw, 11px) !important;
        line-height: 1.16 !important;
        letter-spacing: -0.025em !important;
        overflow-wrap: normal !important;
        text-wrap: balance;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-primary-button,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-secondary-button {
        min-height: 44px !important;
        padding: 10px 12px !important;
        font-size: clamp(11px, 0.74vw, 13px) !important;
        line-height: 1.15 !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: stretch !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        width: min(100%, 520px) !important;
        max-width: 520px !important;
        margin: 0 auto 8px !important;
        padding: 0 !important;
        align-items: center !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header h3 {
        font-size: clamp(14px, 0.92vw, 16px) !important;
        line-height: 1.15 !important;
        margin: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view.is-active {
        display: flex !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(130px, 9.15vw, 166px) !important;
        --matewa-cv-orbit-node: clamp(84px, 5.82vw, 104px) !important;
        --matewa-cv-centre-size: clamp(170px, 11.85vw, 214px) !important;
        width: min(100%, calc((var(--matewa-cv-orbit-distance) * 2) + (var(--matewa-cv-orbit-node) * 1.4))) !important;
        max-width: 520px !important;
        min-height: calc((var(--matewa-cv-orbit-distance) * 2) + (var(--matewa-cv-orbit-node) * 1.34)) !important;
        margin: 0 auto !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        gap: clamp(9px, 0.75vw, 12px) !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge {
        padding: clamp(11px, 0.9vw, 15px) !important;
        gap: 4px !important;
        flex: 0 0 auto !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge strong {
        font-size: clamp(20px, 1.5vw, 27px) !important;
        line-height: 1.02 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge small,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge span,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge em {
        font-size: clamp(10.5px, 0.72vw, 12px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"].is-active {
        display: flex !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: auto !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"] h3 {
        margin: 0 0 8px !important;
        font-size: clamp(14px, 0.92vw, 16px) !important;
        line-height: 1.15 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-summary {
        gap: 8px !important;
        margin: 0 0 8px !important;
        padding: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-summary .dashicons {
        width: 24px !important;
        height: 24px !important;
        font-size: 17px !important;
        line-height: 24px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-summary strong {
        font-size: clamp(12.5px, 0.85vw, 14px) !important;
        line-height: 1.15 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-summary p {
        margin: 2px 0 0 !important;
        font-size: clamp(11px, 0.74vw, 12px) !important;
        line-height: 1.24 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-progress {
        height: 7px !important;
        margin: 0 0 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-cards {
        display: grid !important;
        gap: 7px !important;
        margin: 0 !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        align-content: start !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card {
        min-height: 0 !important;
        padding: 8px 10px !important;
        gap: 8px !important;
        border-radius: 14px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card > .dashicons {
        width: 23px !important;
        height: 23px !important;
        min-width: 23px !important;
        font-size: 14px !important;
        line-height: 23px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card small {
        margin-bottom: 2px !important;
        font-size: clamp(10px, 0.66vw, 11px) !important;
        line-height: 1.1 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card strong {
        margin-bottom: 2px !important;
        font-size: clamp(12px, 0.82vw, 13px) !important;
        line-height: 1.12 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card em {
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden !important;
        font-size: clamp(10.25px, 0.68vw, 11.2px) !important;
        line-height: 1.2 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="leads"].is-active {
        display: flex !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        align-items: flex-end !important;
        justify-content: flex-end !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-export-card {
        min-height: clamp(124px, 13vh, 152px) !important;
        padding: clamp(12px, 0.9vw, 16px) !important;
    }
}

@media (min-width: 1181px) and (max-width: 1360px) {
    .matewa-dashboard-page .matewa-admin-shell,
    .matewa-dashboard-page .matewa-dashboard-shell {
        grid-template-columns: 206px minmax(0, 1fr) !important;
        gap: 12px !important;
        width: min(100%, calc(100vw - 18px)) !important;
        padding: 8px !important;
    }

    .matewa-dashboard-page .matewa-admin-sidebar {
        width: 206px !important;
        min-width: 206px !important;
        max-width: 206px !important;
        padding-inline: 10px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(270px, 296px) minmax(380px, 1fr) minmax(236px, 270px) !important;
        gap: 12px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(118px, 8.9vw, 142px) !important;
        --matewa-cv-orbit-node: clamp(78px, 5.7vw, 92px) !important;
        --matewa-cv-centre-size: clamp(154px, 11.4vw, 184px) !important;
        max-width: 438px !important;
    }
}

@media (min-width: 1181px) and (max-height: 860px) {
    .matewa-dashboard-page {
        --matewa-admin-rear-card-height: clamp(600px, calc(100vh - 170px), 686px);
        --matewa-dashboard-fixed-card-height: clamp(600px, calc(100vh - 170px), 686px);
        --matewa-admin-rear-card-padding: 16px;
        --matewa-admin-visual-top-gap: 12px;
    }

    .matewa-dashboard-page .matewa-admin-topbar {
        min-height: 72px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        padding: 15px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel h2 {
        font-size: clamp(27px, 1.8vw, 32px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel > p:not(.matewa-dashboard-greeting) {
        margin-top: 10px !important;
        font-size: 12.25px !important;
        line-height: 1.36 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-status {
        margin-top: 10px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits {
        gap: 7px !important;
        margin-bottom: 10px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit .dashicons {
        width: 30px !important;
        height: 30px !important;
        font-size: 16px !important;
        line-height: 30px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit strong {
        font-size: 9.8px !important;
        line-height: 1.12 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-primary-button,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-secondary-button {
        min-height: 40px !important;
        padding: 8px 10px !important;
        font-size: 11px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(114px, 8.5vw, 144px) !important;
        --matewa-cv-orbit-node: clamp(78px, 5.55vw, 92px) !important;
        --matewa-cv-centre-size: clamp(152px, 11vw, 186px) !important;
        max-width: 448px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge {
        padding: 10px 12px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge strong {
        font-size: clamp(18px, 1.35vw, 23px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-cards {
        gap: 6px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card {
        padding: 7px 9px !important;
        gap: 7px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card em {
        -webkit-line-clamp: 1;
    }
}

@media (min-width: 1181px) and (max-height: 740px) {
    .matewa-dashboard-page {
        --matewa-admin-rear-card-height: calc(100vh - 136px);
        --matewa-dashboard-fixed-card-height: calc(100vh - 136px);
        --matewa-admin-rear-card-padding: 12px;
        --matewa-admin-visual-top-gap: 8px;
    }

    .matewa-dashboard-page .matewa-admin-topbar {
        min-height: 60px !important;
        padding-top: 9px !important;
        padding-bottom: 9px !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar h2 {
        font-size: clamp(24px, 1.65vw, 30px) !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar p[data-matewa-admin-page-description] {
        font-size: 11.5px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        gap: 10px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        margin-bottom: 4px !important;
    }
}

/* =========================================================
   247ChatMate — 5A21AG shell alignment + 100% zoom guard
   Scope: admin shell / dashboard only.
   Purpose:
   - Align the top-left brand row with the page title rhythm.
   - Align the sidebar icon column with the nav icon column.
   - Keep the dashboard left hero panel and top header feeling level.
   - Keep the bottom benefit icons visually aligned.
   - Apply safely across all visible admin pages.
========================================================= */

.matewa-dashboard-page {
    --matewa-admin-sidebar-brand-size: 38px;
    --matewa-admin-sidebar-brand-row: 54px;
    --matewa-admin-sidebar-icon-track: 38px;
    --matewa-admin-sidebar-gap: 12px;
}

.matewa-dashboard-page .matewa-admin-sidebar {
    padding: 16px 12px 12px !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-admin-brand,
.matewa-dashboard-page .matewa-dashboard-brand {
    display: grid !important;
    grid-template-columns: var(--matewa-admin-sidebar-icon-track) minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: var(--matewa-admin-sidebar-gap) !important;
    min-height: var(--matewa-admin-sidebar-brand-row) !important;
    height: var(--matewa-admin-sidebar-brand-row) !important;
    max-height: var(--matewa-admin-sidebar-brand-row) !important;
    margin: 0 0 14px !important;
    padding: 0 6px !important;
}

.matewa-dashboard-page .matewa-admin-brand-logo,
.matewa-dashboard-page .matewa-dashboard-brand-icon {
    width: var(--matewa-admin-sidebar-brand-size) !important;
    height: var(--matewa-admin-sidebar-brand-size) !important;
    min-width: var(--matewa-admin-sidebar-brand-size) !important;
    min-height: var(--matewa-admin-sidebar-brand-size) !important;
    display: grid !important;
    place-items: center !important;
    justify-self: center !important;
    align-self: center !important;
}

.matewa-dashboard-page .matewa-admin-brand-logo img,
.matewa-dashboard-page .matewa-dashboard-brand-icon img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.matewa-dashboard-page .matewa-admin-brand-copy {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    min-height: var(--matewa-admin-sidebar-brand-size) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.matewa-dashboard-page .matewa-admin-brand-copy strong {
    margin: 0 !important;
    font-size: clamp(16px, 1.02vw, 19px) !important;
    line-height: 1 !important;
    letter-spacing: -0.035em !important;
    text-wrap: nowrap !important;
}

.matewa-dashboard-page .matewa-dashboard-side-nav {
    margin: 0 0 12px !important;
    gap: 8px !important;
}

.matewa-dashboard-page .matewa-dashboard-side-link,
.matewa-dashboard-page .matewa-dashboard-side-link.is-active,
.matewa-dashboard-page .matewa-dashboard-side-link:hover,
.matewa-dashboard-page .matewa-dashboard-side-link:focus-visible {
    display: grid !important;
    grid-template-columns: var(--matewa-admin-sidebar-icon-track) minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: var(--matewa-admin-sidebar-gap) !important;
    min-height: 40px !important;
    height: 40px !important;
    max-height: 40px !important;
    padding: 0 12px 0 6px !important;
}

.matewa-dashboard-page .matewa-dashboard-side-link .dashicons {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    font-size: 18px !important;
    line-height: 18px !important;
    justify-self: center !important;
    align-self: center !important;
}

.matewa-dashboard-page .matewa-dashboard-side-link > span:last-child {
    min-width: 0 !important;
    align-self: center !important;
}

.matewa-dashboard-page .matewa-admin-topbar {
    min-height: 88px !important;
    padding: 18px clamp(24px, 2vw, 30px) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: 20px !important;
}

.matewa-dashboard-page .matewa-admin-topbar-copy,
.matewa-dashboard-page .matewa-admin-topbar > div:first-child:not(.matewa-admin-topbar-actions) {
    min-height: 52px !important;
    justify-content: center !important;
    align-self: center !important;
}

.matewa-dashboard-page .matewa-admin-topbar h2 {
    margin: 0 !important;
    font-size: clamp(29px, 2vw, 38px) !important;
    line-height: 1 !important;
    letter-spacing: -0.05em !important;
}

.matewa-dashboard-page .matewa-admin-topbar p[data-matewa-admin-page-description] {
    margin: 0 !important;
    font-size: clamp(12.5px, 0.84vw, 14px) !important;
    line-height: 1.36 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
    align-items: stretch !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel h2 {
    margin: 0 0 12px !important;
    font-size: clamp(28px, 1.95vw, 36px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.05em !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel > p:not(.matewa-dashboard-greeting) {
    margin: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits {
    align-items: start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit {
    grid-template-rows: 32px auto !important;
    align-content: start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit .dashicons {
    justify-self: center !important;
    align-self: center !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"].is-active {
    justify-content: flex-start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-cards {
    align-content: start !important;
}

@media (min-width: 1181px) and (max-height: 860px) {
    .matewa-dashboard-page .matewa-admin-topbar {
        min-height: 82px !important;
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar h2 {
        font-size: clamp(27px, 1.85vw, 34px) !important;
    }

    .matewa-dashboard-page .matewa-admin-brand,
    .matewa-dashboard-page .matewa-dashboard-brand {
        margin-bottom: 12px !important;
    }
}

@media (max-width: 1180px) {
    .matewa-dashboard-page .matewa-admin-topbar {
        grid-template-columns: 1fr !important;
        row-gap: 12px !important;
    }
}


/* =========================================================
   247ChatMate — 5A21AH precision alignment correction
   Scope: admin visual CSS only.
   Purpose:
   - Bring the top-left 247ChatMate title further left.
   - Put the sidebar brand icon and nav icons on the same vertical track.
   - Align the headline text position with the dashboard/card content text.
   - Keep the topbar card and rear content cards visually locked across pages.
========================================================= */

.matewa-dashboard-page {
    --matewa-shell-side-icon-size: 36px;
    --matewa-shell-nav-icon-size: 18px;
    --matewa-shell-icon-track: 36px;
    --matewa-shell-icon-gap: 7px;
    --matewa-shell-card-pad: 22px;
    --matewa-shell-panel-pad: 20px;
    --matewa-shell-headline-x: calc(var(--matewa-shell-card-pad) + var(--matewa-shell-panel-pad));
}

/* Sidebar brand: move title left while keeping the icon/nav icon column true. */
.matewa-dashboard-page .matewa-admin-sidebar {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.matewa-dashboard-page .matewa-admin-brand,
.matewa-dashboard-page .matewa-dashboard-brand {
    display: grid !important;
    grid-template-columns: var(--matewa-shell-icon-track) minmax(0, 1fr) !important;
    column-gap: var(--matewa-shell-icon-gap) !important;
    align-items: center !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 0 0 0 !important;
    margin: 0 0 14px !important;
}

.matewa-dashboard-page .matewa-admin-brand-logo,
.matewa-dashboard-page .matewa-dashboard-brand-icon {
    width: var(--matewa-shell-side-icon-size) !important;
    height: var(--matewa-shell-side-icon-size) !important;
    min-width: var(--matewa-shell-side-icon-size) !important;
    min-height: var(--matewa-shell-side-icon-size) !important;
    justify-self: center !important;
    align-self: center !important;
}

.matewa-dashboard-page .matewa-admin-brand-copy {
    min-width: 0 !important;
    align-self: center !important;
    justify-self: start !important;
    transform: translateX(-2px) !important;
}

.matewa-dashboard-page .matewa-admin-brand-copy strong {
    font-size: clamp(16px, 1vw, 18px) !important;
    line-height: 1 !important;
    letter-spacing: -0.035em !important;
    white-space: nowrap !important;
}

/* Sidebar nav: same icon centre line as the top brand icon. */
.matewa-dashboard-page .matewa-dashboard-side-link,
.matewa-dashboard-page .matewa-dashboard-side-link.is-active,
.matewa-dashboard-page .matewa-dashboard-side-link:hover,
.matewa-dashboard-page .matewa-dashboard-side-link:focus-visible {
    display: grid !important;
    grid-template-columns: var(--matewa-shell-icon-track) minmax(0, 1fr) !important;
    column-gap: var(--matewa-shell-icon-gap) !important;
    align-items: center !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 10px 0 0 !important;
}

.matewa-dashboard-page .matewa-dashboard-side-link .dashicons {
    width: var(--matewa-shell-nav-icon-size) !important;
    height: var(--matewa-shell-nav-icon-size) !important;
    min-width: var(--matewa-shell-nav-icon-size) !important;
    min-height: var(--matewa-shell-nav-icon-size) !important;
    font-size: var(--matewa-shell-nav-icon-size) !important;
    line-height: var(--matewa-shell-nav-icon-size) !important;
    justify-self: center !important;
    align-self: center !important;
}

/* Topbar/rear-card alignment: outer cards line up; text line is shared. */
.matewa-dashboard-page .matewa-admin-main {
    align-items: stretch !important;
}

.matewa-dashboard-page .matewa-admin-topbar {
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: var(--matewa-shell-headline-x) !important;
    padding-right: clamp(24px, 2vw, 30px) !important;
}

.matewa-dashboard-page .matewa-admin-topbar-copy,
.matewa-dashboard-page .matewa-admin-topbar > div:first-child:not(.matewa-admin-topbar-actions) {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* Match first visible rear-card left edge with topbar left edge on every active page. */
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card,
.matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
.matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* Dashboard: headline text and left hero text now share the same visual x-line. */
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
    padding-left: var(--matewa-shell-card-pad) !important;
    padding-right: var(--matewa-shell-card-pad) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
    padding: var(--matewa-shell-panel-pad) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel h2,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel p,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-status {
    margin-left: 0 !important;
}

/* Benefit icon row: force the small icon centres into a clean common row. */
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit {
    display: grid !important;
    grid-template-rows: 34px auto !important;
    justify-items: center !important;
    align-content: start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit .dashicons {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    font-size: 17px !important;
    line-height: 32px !important;
    justify-self: center !important;
    align-self: center !important;
}

/* Reduced-width desktop: keep the same geometry but shave the spacing safely. */
@media (min-width: 1181px) and (max-width: 1360px) {
    .matewa-dashboard-page {
        --matewa-shell-side-icon-size: 34px;
        --matewa-shell-icon-track: 34px;
        --matewa-shell-icon-gap: 6px;
        --matewa-shell-card-pad: 18px;
        --matewa-shell-panel-pad: 18px;
    }

    .matewa-dashboard-page .matewa-admin-brand-copy {
        transform: translateX(-3px) !important;
    }
}

@media (min-width: 1181px) and (max-height: 820px) {
    .matewa-dashboard-page {
        --matewa-shell-card-pad: 18px;
        --matewa-shell-panel-pad: 17px;
    }

    .matewa-dashboard-page .matewa-admin-topbar {
        padding-left: var(--matewa-shell-headline-x) !important;
    }
}

/* =========================================================
   247ChatMate — 5A21AI alignment rollback + 100% breathing room
   Scope: admin visual CSS only.
   Purpose:
   - Undo the over-tight feel from the previous precision pass.
   - Give the right side a little breathing room at 100% browser scaling.
   - Put the top headline text and the Dashboard left-card title on the same x-line.
   - Keep the sidebar logo/nav icon column aligned while moving 247ChatMate left.
========================================================= */

.matewa-dashboard-page {
    --matewa-shell-sidebar-icon-track: 34px;
    --matewa-shell-sidebar-icon-gap: 5px;
    --matewa-shell-sidebar-logo-size: 34px;
    --matewa-shell-nav-icon-size: 17px;
    --matewa-shell-card-pad: 18px;
    --matewa-shell-panel-pad: 18px;
    --matewa-shell-text-inset: 36px;
}

/* Sidebar: one clean icon rail, with the brand title moved left. */
.matewa-dashboard-page .matewa-admin-sidebar {
    width: 210px !important;
    min-width: 210px !important;
    max-width: 210px !important;
    padding: 14px 11px 12px !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-admin-brand,
.matewa-dashboard-page .matewa-dashboard-brand {
    display: grid !important;
    grid-template-columns: var(--matewa-shell-sidebar-icon-track) minmax(0, 1fr) !important;
    column-gap: var(--matewa-shell-sidebar-icon-gap) !important;
    align-items: center !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 0 !important;
    margin: 0 0 14px !important;
}

.matewa-dashboard-page .matewa-admin-brand-logo,
.matewa-dashboard-page .matewa-dashboard-brand-icon {
    width: var(--matewa-shell-sidebar-logo-size) !important;
    height: var(--matewa-shell-sidebar-logo-size) !important;
    min-width: var(--matewa-shell-sidebar-logo-size) !important;
    min-height: var(--matewa-shell-sidebar-logo-size) !important;
    justify-self: center !important;
    align-self: center !important;
}

.matewa-dashboard-page .matewa-admin-brand-copy {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    transform: translateX(-5px) !important;
}

.matewa-dashboard-page .matewa-admin-brand-copy strong {
    font-size: 16px !important;
    line-height: 1 !important;
    letter-spacing: -0.025em !important;
    white-space: nowrap !important;
}

.matewa-dashboard-page .matewa-dashboard-side-link,
.matewa-dashboard-page .matewa-dashboard-side-link.is-active,
.matewa-dashboard-page .matewa-dashboard-side-link:hover,
.matewa-dashboard-page .matewa-dashboard-side-link:focus-visible {
    display: grid !important;
    grid-template-columns: var(--matewa-shell-sidebar-icon-track) minmax(0, 1fr) !important;
    column-gap: var(--matewa-shell-sidebar-icon-gap) !important;
    align-items: center !important;
    height: 39px !important;
    min-height: 39px !important;
    max-height: 39px !important;
    padding: 0 10px 0 0 !important;
}

.matewa-dashboard-page .matewa-dashboard-side-link .dashicons {
    width: var(--matewa-shell-nav-icon-size) !important;
    height: var(--matewa-shell-nav-icon-size) !important;
    min-width: var(--matewa-shell-nav-icon-size) !important;
    min-height: var(--matewa-shell-nav-icon-size) !important;
    font-size: var(--matewa-shell-nav-icon-size) !important;
    line-height: var(--matewa-shell-nav-icon-size) !important;
    justify-self: center !important;
    align-self: center !important;
}

/* Shell: give the right side a small safety margin at 100% zoom. */
@media (min-width: 1181px) {
    .matewa-dashboard-page .matewa-admin-shell,
    .matewa-dashboard-page .matewa-dashboard-shell {
        grid-template-columns: 210px minmax(0, 1fr) !important;
        gap: 16px !important;
        width: min(100%, calc(100vw - 32px)) !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page .matewa-admin-main {
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar {
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: var(--matewa-shell-text-inset) !important;
        padding-right: 22px !important;
        min-height: 84px !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar-copy,
    .matewa-dashboard-page .matewa-admin-topbar > div:first-child:not(.matewa-admin-topbar-actions) {
        padding-left: 0 !important;
        margin-left: 0 !important;
        min-height: 50px !important;
        justify-content: center !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar h2 {
        margin: 0 !important;
        font-size: clamp(28px, 1.95vw, 36px) !important;
        line-height: 1 !important;
        letter-spacing: -0.045em !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar p[data-matewa-admin-page-description] {
        margin: 0 !important;
        line-height: 1.34 !important;
    }

    /* First visible rear cards keep the same left/right edge as the headline box. */
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card,
    .matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card {
        width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Dashboard: text line = topbar headline line. */
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        padding-left: var(--matewa-shell-card-pad) !important;
        padding-right: var(--matewa-shell-card-pad) !important;
        grid-template-columns: minmax(278px, 306px) minmax(380px, 1fr) minmax(238px, 274px) !important;
        gap: 14px !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        padding: var(--matewa-shell-panel-pad) !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel h2 {
        margin: 0 0 12px !important;
        font-size: clamp(28px, 1.9vw, 34px) !important;
        line-height: 1.02 !important;
        letter-spacing: -0.045em !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel > p:not(.matewa-dashboard-greeting),
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-status {
        margin-left: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        max-width: 470px !important;
        --matewa-cv-orbit-distance: clamp(128px, 8.8vw, 156px) !important;
        --matewa-cv-orbit-node: clamp(82px, 5.6vw, 98px) !important;
        --matewa-cv-centre-size: clamp(160px, 10.8vw, 200px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        align-items: start !important;
        gap: 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit {
        grid-template-rows: 32px auto !important;
        justify-items: center !important;
        align-content: start !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit .dashicons {
        width: 32px !important;
        height: 32px !important;
        font-size: 17px !important;
        line-height: 32px !important;
    }
}

@media (min-width: 1181px) and (max-width: 1360px) {
    .matewa-dashboard-page {
        --matewa-shell-card-pad: 16px;
        --matewa-shell-panel-pad: 16px;
        --matewa-shell-text-inset: 32px;
    }

    .matewa-dashboard-page .matewa-admin-shell,
    .matewa-dashboard-page .matewa-dashboard-shell {
        grid-template-columns: 204px minmax(0, 1fr) !important;
        gap: 14px !important;
        width: min(100%, calc(100vw - 28px)) !important;
    }

    .matewa-dashboard-page .matewa-admin-sidebar {
        width: 204px !important;
        min-width: 204px !important;
        max-width: 204px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(262px, 286px) minmax(360px, 1fr) minmax(224px, 254px) !important;
        gap: 12px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        max-width: 430px !important;
        --matewa-cv-orbit-distance: clamp(112px, 8.3vw, 138px) !important;
        --matewa-cv-orbit-node: clamp(76px, 5.35vw, 88px) !important;
        --matewa-cv-centre-size: clamp(150px, 10.7vw, 176px) !important;
    }

    .matewa-dashboard-page .matewa-admin-brand-copy {
        transform: translateX(-7px) !important;
    }
}

@media (min-width: 1181px) and (max-height: 820px) {
    .matewa-dashboard-page {
        --matewa-shell-card-pad: 16px;
        --matewa-shell-panel-pad: 15px;
        --matewa-shell-text-inset: 31px;
    }

    .matewa-dashboard-page .matewa-admin-topbar {
        min-height: 76px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
}

/* =========================================================
   247ChatMate — 5A21AK dashboard alignment + right rail fit
   Scope: admin visual CSS only.
   Purpose:
   - Widen and compact the dashboard right rail so Status can hold its cards
     without cutting the lower items at normal desktop height.
   - Re-lock the Dashboard headline x-position to the left dashboard title.
   - Keep the dashboard rear card aligned with the top headline card.
   - Preserve widget, chips, Visitor Buttons, save handling, licence/trial,
     WhatsApp handoff, lead routing and all PHP/JS logic.
========================================================= */

.matewa-dashboard-page {
    --matewa-5a21ak-card-pad: 20px;
    --matewa-5a21ak-panel-pad: 16px;
    --matewa-5a21ak-title-inset: calc(var(--matewa-5a21ak-card-pad) + var(--matewa-5a21ak-panel-pad));
}

@media (min-width: 1181px) {
    .matewa-dashboard-page .matewa-admin-main {
        align-items: stretch !important;
        min-width: 0 !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: var(--matewa-5a21ak-title-inset) !important;
        padding-right: 22px !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar-copy,
    .matewa-dashboard-page .matewa-admin-topbar > div:first-child:not(.matewa-admin-topbar-actions) {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(276px, 302px) minmax(0, 1fr) minmax(292px, 318px) !important;
        gap: 14px !important;
        padding-left: var(--matewa-5a21ak-card-pad) !important;
        padding-right: var(--matewa-5a21ak-card-pad) !important;
        align-items: stretch !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        padding: var(--matewa-5a21ak-panel-pad) !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel h2,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel > p:not(.matewa-dashboard-greeting),
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-status {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        min-width: 0 !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        max-width: 500px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(126px, 8.7vw, 158px) !important;
        --matewa-cv-orbit-node: clamp(80px, 5.35vw, 98px) !important;
        --matewa-cv-centre-size: clamp(160px, 10.6vw, 198px) !important;
        max-width: 492px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        min-width: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        scrollbar-gutter: stable;
        padding-right: 14px !important;
        gap: 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"].is-active {
        display: flex !important;
        flex: 0 0 auto !important;
        min-height: 0 !important;
        height: auto !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge {
        min-height: 0 !important;
        padding: 12px 14px !important;
        gap: 3px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge strong {
        font-size: clamp(22px, 1.58vw, 28px) !important;
        line-height: 1 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge small,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge span,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge em {
        font-size: clamp(10.5px, 0.7vw, 12px) !important;
        line-height: 1.12 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"] h3 {
        margin: 0 0 7px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-summary {
        margin: 0 0 7px !important;
        gap: 7px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-summary p {
        font-size: clamp(10.8px, 0.68vw, 11.8px) !important;
        line-height: 1.18 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-progress {
        height: 6px !important;
        margin: 0 0 7px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-cards {
        flex: 0 0 auto !important;
        gap: 6px !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card {
        min-height: 0 !important;
        padding: 7px 9px !important;
        gap: 7px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card > .dashicons {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        font-size: 13px !important;
        line-height: 22px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card small {
        margin-bottom: 1px !important;
        font-size: clamp(9.8px, 0.62vw, 10.8px) !important;
        line-height: 1.08 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card strong {
        margin-bottom: 1px !important;
        font-size: clamp(11.8px, 0.76vw, 13px) !important;
        line-height: 1.08 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card em {
        font-size: clamp(10px, 0.64vw, 11px) !important;
        line-height: 1.14 !important;
        -webkit-line-clamp: 2;
    }
}

@media (min-width: 1181px) and (max-width: 1360px) {
    .matewa-dashboard-page {
        --matewa-5a21ak-card-pad: 16px;
        --matewa-5a21ak-panel-pad: 14px;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(254px, 278px) minmax(0, 1fr) minmax(276px, 296px) !important;
        gap: 12px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(110px, 8.2vw, 136px) !important;
        --matewa-cv-orbit-node: clamp(74px, 5.3vw, 88px) !important;
        --matewa-cv-centre-size: clamp(148px, 10.45vw, 176px) !important;
        max-width: 420px !important;
    }
}

@media (min-width: 1181px) and (max-height: 860px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge {
        padding: 10px 13px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card {
        padding: 6px 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-cards {
        gap: 5px !important;
    }
}

/* =========================================================
   247ChatMate — 5A21AL dashboard responsive anti-crush guard
   Scope: admin visual CSS only.
   Purpose:
   - Prevent the Dashboard three-column layout crushing when the browser
     window is reduced.
   - Keep the normal wide desktop alignment from 5A21AK.
   - Step down to a balanced two-row desktop layout before the columns become
     too tight, then a single-column layout below the tablet breakpoint.
   - Preserve widget, chips, Visitor Buttons, save handling, licence/trial,
     WhatsApp handoff, lead routing and all PHP/JS logic.
========================================================= */

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-admin-main,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card {
        min-width: 0 !important;
    }
}

/* Narrow desktop: keep the three-column layout, but stop the centre from being squeezed too early. */
@media (min-width: 1281px) and (max-width: 1420px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(254px, 278px) minmax(420px, 1fr) minmax(276px, 296px) !important;
        gap: 12px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(106px, 7.9vw, 132px) !important;
        --matewa-cv-orbit-node: clamp(72px, 5.1vw, 86px) !important;
        --matewa-cv-centre-size: clamp(146px, 10.1vw, 172px) !important;
        max-width: 404px !important;
    }
}

/* Small desktop: do not crush the radial/status rail. Stack the status rail underneath. */
@media (min-width: 1181px) and (max-width: 1280px) {
    .matewa-dashboard-page {
        --matewa-5a21ak-card-pad: 16px;
        --matewa-5a21ak-panel-pad: 14px;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        display: grid !important;
        grid-template-columns: minmax(244px, 286px) minmax(460px, 1fr) !important;
        grid-template-areas:
            "hero radial"
            "status status" !important;
        gap: 12px !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel {
        grid-area: hero !important;
        min-width: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        grid-area: radial !important;
        min-width: 0 !important;
        min-height: 540px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        grid-area: status !important;
        min-width: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        padding-right: var(--matewa-5a21ak-panel-pad) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(104px, 8.1vw, 126px) !important;
        --matewa-cv-orbit-node: clamp(72px, 5.45vw, 84px) !important;
        --matewa-cv-centre-size: clamp(146px, 11vw, 170px) !important;
        max-width: 396px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"].is-active {
        width: 100% !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-cards {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-plan-nudge {
        max-width: none !important;
    }
}

/* Tablet/mobile: one clean column rather than squeezed cards. */
@media (max-width: 1180px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        min-height: 500px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(96px, 18vw, 132px) !important;
        --matewa-cv-orbit-node: clamp(68px, 13vw, 86px) !important;
        --matewa-cv-centre-size: clamp(138px, 27vw, 176px) !important;
        max-width: min(100%, 420px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-cards {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
}

@media (max-width: 720px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-cards,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits {
        grid-template-columns: 1fr !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        min-height: 470px !important;
    }
}

/* =========================================================
   247ChatMate — 5A21AM dashboard status rail simplification
   Scope: Dashboard Client View only.
   Purpose:
   - Reduce radial outer-circle typography so labels fit cleanly in both
     Leads and Status views.
   - Replace the repeated Status-card stack with one green setup/next-action
     summary card aligned with the Leads export card position.
   - Preserve chips, widget, WhatsApp handoff, lead routing, licence/trial
     logic, save handling and frontend CSS.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-orbit-item {
    padding: clamp(7px, 0.56vw, 9px) !important;
    text-align: center !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-metric-value {
    display: block !important;
    max-width: 100% !important;
    margin: 0 auto 3px !important;
    color: #0f172a !important;
    font-size: clamp(12px, 0.72vw, 15px) !important;
    line-height: 0.98 !important;
    font-weight: 950 !important;
    letter-spacing: -0.055em !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-metric-label,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-metric-trend {
    display: block !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    color: #64748b !important;
    font-size: clamp(8px, 0.49vw, 9.8px) !important;
    line-height: 1.08 !important;
    font-weight: 850 !important;
    letter-spacing: -0.025em !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-metric-trend {
    margin-top: 1px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"].is-active {
    display: flex !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    gap: clamp(12px, 0.9vw, 15px) !important;
    width: 100% !important;
    min-height: clamp(252px, 22.2vw, 330px) !important;
    padding: clamp(15px, 1.08vw, 19px) !important;
    border: 1px solid rgba(34, 197, 94, 0.22) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 60%),
        linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(255, 255, 255, 0.96)) !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-section,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-next-action-section {
    display: grid !important;
    gap: 9px !important;
    min-width: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-section {
    padding-bottom: clamp(12px, 0.86vw, 15px) !important;
    border-bottom: 1px dashed rgba(22, 163, 74, 0.28) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-card h3,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-next-action-section small,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-summary strong,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-next-action-section strong,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-summary p,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-next-action-section p {
    margin: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-card h3 {
    color: #0f172a !important;
    font-size: clamp(14px, 0.96vw, 16px) !important;
    line-height: 1.12 !important;
    font-weight: 950 !important;
    letter-spacing: -0.025em !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-summary,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-next-action-section {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 10px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-summary > .dashicons,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-next-action-section > .dashicons {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 999px !important;
    background: rgba(34, 197, 94, 0.12) !important;
    color: #16803a !important;
    font-size: 17px !important;
    line-height: 28px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-summary strong,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-next-action-section strong {
    display: block !important;
    color: #16803a !important;
    font-size: clamp(13px, 0.86vw, 15px) !important;
    line-height: 1.14 !important;
    font-weight: 950 !important;
    letter-spacing: -0.025em !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-next-action-section small {
    display: block !important;
    color: #0f172a !important;
    font-size: clamp(11px, 0.72vw, 12px) !important;
    line-height: 1.12 !important;
    font-weight: 900 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-summary p,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-next-action-section p {
    color: #334155 !important;
    font-size: clamp(11px, 0.76vw, 13px) !important;
    line-height: 1.34 !important;
    font-weight: 650 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-progress {
    width: 100% !important;
    height: 7px !important;
    margin: 9px 0 0 !important;
    border-radius: 999px !important;
    background: rgba(22, 163, 74, 0.12) !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-progress > span {
    display: block !important;
    height: 100% !important;
    border-radius: inherit !important;
    background: linear-gradient(90deg, #16a34a, #15803d) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 44px !important;
    margin-top: 1px !important;
    padding: 11px 18px !important;
    border: 0 !important;
    border-radius: var(--matewa-polish-radius-control) !important;
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    color: #ffffff !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 950 !important;
    text-decoration: none !important;
    box-shadow: 0 13px 26px rgba(22, 163, 74, 0.18) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-button .dashicons {
    width: 16px !important;
    height: 16px !important;
    font-size: 16px !important;
    line-height: 16px !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-status-action-card {
    border-color: rgba(74, 222, 128, 0.22) !important;
    background:
        radial-gradient(circle at top right, rgba(74, 222, 128, 0.16), transparent 62%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96)) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-status-action-card h3,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-next-action-section small {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-status-action-summary strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-next-action-section strong {
    color: #86efac !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-status-action-summary p,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-next-action-section p,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-metric-label,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-metric-trend {
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-metric-value {
    color: #f8fafc !important;
}

@media (min-width: 1181px) and (max-height: 860px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-card {
        min-height: clamp(228px, 21vw, 286px) !important;
        gap: 10px !important;
        padding: 14px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-section {
        padding-bottom: 10px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-summary p,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-next-action-section p {
        font-size: clamp(10.5px, 0.68vw, 11.8px) !important;
        line-height: 1.22 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-button {
        min-height: 40px !important;
        padding-top: 9px !important;
        padding-bottom: 9px !important;
    }
}

@media (max-width: 1280px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"].is-active {
        justify-content: flex-start !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-card {
        min-height: 0 !important;
    }
}

/* =========================================================
   247ChatMate — 5-A-21AK one-screen 100% fit + scrollbar removal
   Checkpoint target: FINAL100SCALINGALIGNMENTQA5A21AKLOCK

   Scope:
   - Admin visual CSS only.
   - Removes the desktop inner rear-card scrollbars on split admin pages.
   - Compacts Setup, Appearance & pages and Visitor buttons so the active
     screen is designed to sit cleanly at 100% browser zoom on standard
     desktop/laptop heights.

   Does not:
   - Change frontend widget behaviour, chips, chip rendering, chip persistence,
     WhatsApp handoff, lead routing, licence/trial/registry/lifecycle logic,
     vertical JSON, save handler, PHP or JavaScript.
========================================================= */

@media (min-width: 1181px) {
    .matewa-dashboard-page {
        --matewa-admin-rear-card-padding: clamp(12px, 0.95vw, 16px);
        --matewa-admin-visual-top-gap: 8px;
        --matewa-admin-one-screen-gap: 8px;
    }

    .matewa-dashboard-page .matewa-admin-shell,
    .matewa-dashboard-page .matewa-dashboard-shell {
        gap: 10px !important;
        padding: 8px !important;
    }

    .matewa-dashboard-page .matewa-admin-main {
        gap: var(--matewa-admin-one-screen-gap) !important;
    }

    .matewa-dashboard-page .matewa-admin-sidebar,
    .matewa-dashboard-page .matewa-dashboard-sidebar {
        height: calc(100vh - 30px) !important;
        max-height: calc(100vh - 30px) !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar {
        min-height: 66px !important;
        padding: 10px 18px !important;
        border-radius: 22px !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar-copy {
        min-height: 0 !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar h2 {
        font-size: clamp(25px, 1.65vw, 31px) !important;
        line-height: 0.98 !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar p[data-matewa-admin-page-description] {
        margin-top: 4px !important;
        font-size: 12px !important;
        line-height: 1.24 !important;
    }

    .matewa-dashboard-page .matewa-admin-ghost-button,
    .matewa-dashboard-page .matewa-admin-save-button {
        min-height: 38px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .matewa-dashboard-page:not([data-matewa-active-panel="dashboard"]) .matewa-admin-panel .matewa-settings-card,
    .matewa-dashboard-page:not([data-matewa-active-panel="dashboard"]) .matewa-admin-panel .matewa-plan-access-shell,
    .matewa-dashboard-page:not([data-matewa-active-panel="dashboard"]) .matewa-admin-panel .matewa-chip-studio-card,
    .matewa-dashboard-page:not([data-matewa-active-panel="dashboard"]) .matewa-core-settings-shell,
    .matewa-dashboard-page:not([data-matewa-active-panel="dashboard"]) .matewa-admin-help-grid,
    .matewa-dashboard-page[data-matewa-active-panel="setup"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card,
    .matewa-dashboard-page[data-matewa-active-panel="plan"] #matewa-plan-access-section .matewa-plan-access-shell,
    .matewa-dashboard-page[data-matewa-active-panel="help"] #matewa-admin-panel-help > .matewa-admin-help-grid {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        overflow-y: visible !important;
        scrollbar-gutter: auto !important;
        margin-top: var(--matewa-admin-visual-top-gap) !important;
        padding: var(--matewa-admin-rear-card-padding) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-grid,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-grid {
        gap: 10px !important;
        margin-bottom: 10px !important;
        grid-auto-rows: auto !important;
        align-items: start !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-panel,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-panel {
        height: auto !important;
        min-height: 0 !important;
        padding: 13px 14px !important;
        border-radius: 18px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-panel-heading,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-panel-heading {
        gap: 8px !important;
        margin-bottom: 9px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-panel-step,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-panel-step {
        width: 23px !important;
        height: 23px !important;
        min-width: 23px !important;
        font-size: 11px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-panel-heading h3,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-panel-heading h3 {
        font-size: 14px !important;
        line-height: 1.12 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-panel-heading p,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-panel-heading p {
        font-size: 11.5px !important;
        line-height: 1.22 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-field-stack,
    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-choice-stack,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-field-stack,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-choice-stack {
        gap: 9px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-field-row,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-field-row {
        grid-template-columns: 128px minmax(0, 1fr) !important;
        gap: 9px !important;
        align-items: start !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-field-label,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-field-label {
        margin-top: 6px !important;
        font-size: 11.5px !important;
        line-height: 1.18 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-panel input.regular-text,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-panel input.regular-text {
        min-height: 31px !important;
        max-height: 31px !important;
        font-size: 12px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-panel .description,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-panel .description,
    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-license-meta,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-license-meta {
        margin-top: 3px !important;
        font-size: 11.25px !important;
        line-height: 1.24 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-choice-card,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-choice-card {
        padding: 10px !important;
        border-radius: 14px !important;
        gap: 9px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-choice-card strong,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-choice-card strong {
        font-size: 12.25px !important;
        line-height: 1.18 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-choice-card small,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-choice-card small {
        font-size: 11.25px !important;
        line-height: 1.22 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-lead-tools {
        gap: 8px !important;
        padding: 10px !important;
        border-radius: 15px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-lead-tools__heading {
        gap: 1px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-lead-tools__heading strong {
        font-size: 13px !important;
        line-height: 1.1 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-lead-tools__heading span {
        font-size: 11px !important;
        line-height: 1.18 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-dashboard-history-notice {
        min-height: 28px !important;
        padding: 6px 10px !important;
        font-size: 11px !important;
        line-height: 1.18 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-lead-tool-grid {
        gap: 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-lead-tool-grid .matewa-dashboard-history-button,
    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-lead-tool-grid button.matewa-dashboard-history-button {
        min-height: 34px !important;
        padding-top: 7px !important;
        padding-bottom: 7px !important;
        font-size: 11.5px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-lead-detail > summary {
        min-height: 34px !important;
        padding: 7px 10px !important;
        font-size: 11.75px !important;
        line-height: 1.15 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-shell .submit {
        margin-top: 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-shell .button-primary {
        min-height: 36px !important;
        padding-top: 7px !important;
        padding-bottom: 7px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-page-targeting-box {
        margin-top: 10px !important;
        padding: 12px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-page-checkbox-list {
        max-height: none !important;
        overflow: visible !important;
        padding: 12px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-page-checkbox-row {
        padding: 8px 10px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card {
        padding: 14px 16px !important;
        border-radius: 22px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-layout {
        gap: 14px !important;
        align-items: stretch !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-business-panel,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-editor-panel {
        padding: 14px 16px !important;
        border-radius: 18px !important;
        min-height: 0 !important;
        height: auto !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-panel-header {
        min-height: 32px !important;
        margin-bottom: 9px !important;
        gap: 7px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-panel-header h3 {
        font-size: 14px !important;
        line-height: 1.12 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-step-badge {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        font-size: 11px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-selector-grid,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-current-context {
        gap: 8px !important;
        min-height: 104px !important;
        margin-bottom: 20px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-selector-field:not(.matewa-selector-action),
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-current-context-item {
        min-height: 49px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-preview-heading,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-editor-subtle {
        margin-bottom: 7px !important;
        min-height: 16px !important;
        font-size: 11.5px !important;
        line-height: 1.25 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap .matewa-chip-preview-subtle,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-column .matewa-chip-editor-helper {
        min-height: 46px !important;
        margin-top: 10px !important;
        padding: 8px 10px !important;
        font-size: 11.5px !important;
        line-height: 1.24 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap .matewa-chip-preview-final-actions {
        padding-top: 14px !important;
        margin-top: 10px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-column .matewa-chip-studio-save-actions {
        margin-top: 10px !important;
        padding-top: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap .matewa-chip-preview-final-actions .button-primary,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-column .matewa-chip-studio-save-actions .button-primary,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-save-actions .button-secondary {
        min-height: 38px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}

@media (min-width: 1181px) and (max-height: 820px) {
    .matewa-dashboard-page {
        --matewa-admin-rear-card-padding: 12px;
        --matewa-admin-visual-top-gap: 7px;
    }

    .matewa-dashboard-page .matewa-admin-topbar {
        min-height: 60px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar h2 {
        font-size: clamp(23px, 1.55vw, 28px) !important;
    }

    .matewa-dashboard-page .matewa-admin-topbar p[data-matewa-admin-page-description] {
        font-size: 11.25px !important;
        line-height: 1.18 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-panel,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-panel {
        padding: 11px 12px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-grid,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-grid {
        gap: 8px !important;
        margin-bottom: 8px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-panel-heading,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-panel-heading {
        margin-bottom: 7px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-field-stack,
    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-choice-stack,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-field-stack,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-choice-stack {
        gap: 7px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-lead-tools {
        gap: 7px !important;
        padding: 9px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-lead-detail > summary {
        min-height: 31px !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card {
        padding: 12px 14px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-business-panel,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-editor-panel {
        padding: 12px 14px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-selector-grid,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-current-context {
        margin-bottom: 16px !important;
    }
}

/* =========================================================
   247ChatMate — 5-A-21AK follow-up alignment lock
   Scope: admin visual CSS only.
   - Keeps the left admin navigation column visually aligned with the main
     rear content card at 100% zoom.
   - Re-aligns Visitor buttons footer actions so the left green confirm button
     sits on the same baseline as the right green confirm button.
   No frontend widget, chip rendering, chip persistence, WhatsApp handoff,
   lead routing, licence/trial logic, PHP or JavaScript changes.
========================================================= */

@media (min-width: 1181px) {
    .matewa-dashboard-page .matewa-admin-sidebar,
    .matewa-dashboard-page .matewa-dashboard-sidebar {
        height: calc(100vh - 54px) !important;
        min-height: calc(100vh - 54px) !important;
        max-height: calc(100vh - 54px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-business-panel,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-editor-panel {
        display: flex !important;
        flex-direction: column !important;
        align-self: stretch !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-column {
        display: flex !important;
        flex: 1 1 auto !important;
        flex-direction: column !important;
        min-height: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap .matewa-chip-preview-final-actions,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-column .matewa-chip-studio-save-actions {
        margin-top: auto !important;
        padding-top: 10px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap .matewa-chip-preview-final-actions .button-primary,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-column .matewa-chip-studio-save-actions .button-primary {
        min-height: 38px !important;
        width: 100% !important;
    }
}

@media (min-width: 1181px) and (max-height: 820px) {
    .matewa-dashboard-page .matewa-admin-sidebar,
    .matewa-dashboard-page .matewa-dashboard-sidebar {
        height: calc(100vh - 58px) !important;
        min-height: calc(100vh - 58px) !important;
        max-height: calc(100vh - 58px) !important;
    }
}


/* =========================================================
   247ChatMate — 5-A-23E copy/subheading alignment lock
   Scope: admin topbar and requested copy-only movement.
========================================================= */

.matewa-dashboard-page .matewa-admin-topbar p[data-matewa-admin-page-description][hidden],
.matewa-dashboard-page [data-matewa-hero-status-pills][hidden] {
    display: none !important;
}

.matewa-dashboard-page .matewa-admin-topbar {
    align-items: center !important;
}

.matewa-dashboard-page .matewa-admin-topbar-actions {
    align-self: center !important;
}

.matewa-dashboard-page .matewa-admin-topbar-copy {
    align-self: center !important;
}


/* =========================================================
   247ChatMate — 5-A-23E follow-up: Visitor helper + Appearance rear-card match
   Scope: requested admin-only copy visibility and Appearance/Visitor card dimension match.
   No frontend widget, chips, WhatsApp handoff, lead routing, licence/trial,
   save-handler, counters or JavaScript logic changed.
========================================================= */

/* Visitor buttons: show the moved helper as a single clear line under the first section title. */
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-business-panel .matewa-chip-studio-panel-header {
    height: auto !important;
    min-height: 42px !important;
    max-height: none !important;
    overflow: visible !important;
    align-items: flex-start !important;
    margin-bottom: 12px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-business-panel .matewa-chip-studio-panel-header p {
    display: block !important;
    margin: 3px 0 0 !important;
    max-width: 560px !important;
    color: var(--matewa-polish-muted, #334155) !important;
    font-size: 11.5px !important;
    line-height: 1.24 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Appearance & pages: keep the rear surface dimension matched to Visitor buttons on desktop. */
@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section > .matewa-chip-studio-card {
        height: var(--matewa-admin-rear-card-height, max(640px, calc(100vh - 150px))) !important;
        min-height: var(--matewa-admin-rear-card-height, max(640px, calc(100vh - 150px))) !important;
        max-height: var(--matewa-admin-rear-card-height, max(640px, calc(100vh - 150px))) !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell {
        display: flex !important;
        flex-direction: column !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell .matewa-core-settings-grid {
        flex: 1 1 auto !important;
        min-height: 0 !important;
    }
}


/* =========================================================
   247ChatMate — 5-A-23E follow-up 3: Dashboard intro cleanup
   Scope: dashboard topbar subtitle removal, left intro copy and title/button alignment only.
   No widget, chips, lead logic, counters, licence/trial, save handler or vertical logic changed.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-admin-topbar-copy {
    justify-content: center !important;
    min-height: 42px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-admin-topbar h2 {
    display: flex !important;
    align-items: center !important;
    min-height: 42px !important;
}

.matewa-dashboard-page .matewa-dashboard-hero-intro {
    margin: 0 0 14px !important;
    max-width: 300px !important;
}

.matewa-dashboard-page .matewa-dashboard-hero-intro p {
    margin: 0 0 8px !important;
    color: var(--matewa-polish-text) !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
}

.matewa-dashboard-page .matewa-dashboard-hero-intro p strong {
    font-weight: 900 !important;
}

.matewa-dashboard-page .matewa-dashboard-hero-intro ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: grid !important;
    gap: 5px !important;
}

.matewa-dashboard-page .matewa-dashboard-hero-intro li {
    position: relative !important;
    margin: 0 !important;
    padding-left: 16px !important;
    color: var(--matewa-polish-muted) !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
}

.matewa-dashboard-page .matewa-dashboard-hero-intro li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.48em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--matewa-polish-green);
}

/* =========================================================
   247ChatMate — 5-A-23E follow-up 4: Dashboard benefit bullets
   Scope: Dashboard left hero copy/benefit presentation only.
   Converts the old horizontal icon benefit row into a compact vertical
   bullet list and keeps the approved lead-focused intro copy.
   No widget, chips, lead logic, counters, licence/trial, save handler
   or vertical logic changed.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-intro {
    margin-bottom: 12px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-intro ul {
    gap: 6px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    margin: 10px 0 16px !important;
    padding: 0 !important;
    list-style: none !important;
    align-items: start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit {
    position: relative !important;
    display: block !important;
    min-height: 0 !important;
    padding: 0 0 0 16px !important;
    margin: 0 !important;
    text-align: left !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--matewa-polish-green, #16a34a);
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit .dashicons {
    display: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefit strong {
    display: inline !important;
    color: var(--matewa-polish-muted, #334155) !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
}

/* =========================================================
   247ChatMate — 5-A-23E follow-up 5: Dashboard left-card hierarchy repair
   Scope: Dashboard left card copy, status pill placement and top-row alignment only.
   Removes the duplicated benefit block visually if any old markup is cached,
   keeps the approved lead-focused copy as one compact paragraph, and keeps
   the status pills directly under the intro instead of floating mid-card.
   No widget, chips, lead counters, lead routing, licence/trial, save handler
   or vertical logic changed.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel {
    justify-content: flex-start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-intro {
    margin: 10px 0 12px !important;
    max-width: 280px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-intro p {
    margin: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-intro p + p {
    margin-top: 8px !important;
    color: var(--matewa-polish-muted, #334155) !important;
    font-size: 13px !important;
    line-height: 1.42 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-intro p strong {
    display: block !important;
    color: var(--matewa-polish-text, #0f172a) !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-intro ul,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-benefits {
    display: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-status {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 14px 0 0 !important;
    align-items: flex-start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-actions {
    margin-top: auto !important;
}

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-intro {
        margin-top: 14px !important;
    }
}

/* =========================================================
   247ChatMate — 5-A-23F final Dashboard benefit bullets lock
   Scope: Dashboard left-card intro copy display only.
   Restores the approved vertical bullet format after the earlier paragraph fallback.
   No widget, chips, lead counters, lead routing, licence/trial, save handler,
   vertical JSON, WhatsApp handoff or dashboard metric logic changed.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-intro ul {
    display: grid !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
    gap: 6px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-intro li {
    position: relative !important;
    margin: 0 !important;
    padding-left: 16px !important;
    color: var(--matewa-polish-muted, #334155) !important;
    font-size: 13px !important;
    line-height: 1.36 !important;
    font-weight: 750 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-intro li::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0.48em !important;
    width: 6px !important;
    height: 6px !important;
    border-radius: 999px !important;
    background: var(--matewa-polish-green, #16a34a) !important;
}

/* =========================================================
   247ChatMate — Phase 5-A-26 ready-to-save button state
   Scope: topbar save-button visual state only. No save-handler,
   widget, chip, lead, licence, trial or routing logic changes.
========================================================= */

.matewa-dashboard-page .matewa-admin-save-button[data-matewa-save-state="ready"],
.matewa-dashboard-page .matewa-admin-save-button.is-ready-to-save {
    background: #ffffff !important;
    border-color: rgba(22, 163, 74, 0.78) !important;
    color: var(--matewa-polish-green, #16a34a) !important;
    text-shadow: none !important;
    box-shadow:
        0 16px 34px rgba(22, 163, 74, 0.18),
        0 0 0 1px rgba(22, 163, 74, 0.16) inset !important;
    transform: translateY(-1px) !important;
    animation: matewa-ready-to-save-pulse 1650ms ease-in-out infinite !important;
}

.matewa-dashboard-page .matewa-admin-save-button[data-matewa-save-state="ready"]:hover,
.matewa-dashboard-page .matewa-admin-save-button.is-ready-to-save:hover {
    background: rgba(240, 253, 244, 0.98) !important;
    border-color: rgba(22, 163, 74, 0.92) !important;
    color: var(--matewa-polish-green-deep, #15803d) !important;
}

.matewa-dashboard-page .matewa-admin-save-button[data-matewa-save-state="saving"],
.matewa-dashboard-page .matewa-admin-save-button.is-saving {
    cursor: progress !important;
    opacity: 0.94 !important;
    animation: none !important;
}

.matewa-dashboard-page .matewa-admin-save-button[data-matewa-save-state="saved"],
.matewa-dashboard-page .matewa-admin-save-button.is-saved {
    background: var(--matewa-polish-green, #16a34a) !important;
    border-color: var(--matewa-polish-green, #16a34a) !important;
    color: #ffffff !important;
    text-shadow: none !important;
    box-shadow:
        0 14px 30px rgba(22, 163, 74, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.16) inset !important;
    animation: none !important;
}

@keyframes matewa-ready-to-save-pulse {
    0%, 100% {
        box-shadow:
            0 14px 30px rgba(22, 163, 74, 0.22),
            0 0 0 0 rgba(34, 197, 94, 0.18);
    }
    50% {
        box-shadow:
            0 18px 38px rgba(22, 163, 74, 0.30),
            0 0 0 5px rgba(34, 197, 94, 0.10);
    }
}

@media (prefers-reduced-motion: reduce) {
    .matewa-dashboard-page .matewa-admin-save-button[data-matewa-save-state="ready"],
    .matewa-dashboard-page .matewa-admin-save-button.is-ready-to-save {
        animation: none !important;
    }
}

/* =========================================================
   247ChatMate — Phase 5-A-26B save-button width lock
   Scope: topbar save-button visual stability only.
   Keeps Save changes / Ready to save / Saving… / Saved the same width.
========================================================= */

.matewa-dashboard-page .matewa-admin-save-button {
    inline-size: 128px !important;
    min-width: 128px !important;
    max-width: 128px !important;
    white-space: nowrap !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

@media (max-width: 782px) {
    .matewa-dashboard-page .matewa-admin-save-button {
        inline-size: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 1 1 150px !important;
    }
}

/* =========================================================
   247ChatMate — Phase 5-A-26A guided input haze and save guard
   Scope: admin setup field hand-holding and no-change save helper only.
   No custom save handler, widget, chips, WhatsApp, lead routing, licence,
   trial, registry, lifecycle, metrics or phone selector logic changed.
========================================================= */

.matewa-dashboard-page .matewa-guided-input.is-awaiting-input {
    background:
        linear-gradient(180deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.98)) !important;
    border-color: rgba(22, 163, 74, 0.40) !important;
    box-shadow:
        0 0 0 1px rgba(22, 163, 74, 0.10) inset,
        0 0 0 4px rgba(34, 197, 94, 0.055) !important;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, color 150ms ease !important;
}

.matewa-dashboard-page .matewa-guided-input.is-awaiting-input::placeholder {
    color: rgba(21, 128, 61, 0.68) !important;
}

.matewa-dashboard-page .matewa-guided-input.is-awaiting-input:focus,
.matewa-dashboard-page .matewa-guided-input.is-awaiting-input.is-guided-focus {
    background: #ffffff !important;
    border-color: rgba(22, 163, 74, 0.70) !important;
    box-shadow:
        0 0 0 1px rgba(22, 163, 74, 0.16) inset,
        0 0 0 4px rgba(34, 197, 94, 0.12) !important;
}


.matewa-dashboard-page .matewa-guided-field-row.is-awaiting-input .matewa-field-label {
    color: var(--matewa-polish-green-deep, #15803d) !important;
}

.matewa-dashboard-page .matewa-guided-field-row.has-guided-value .matewa-field-label {
    color: var(--matewa-polish-text, #0f172a) !important;
}

/* 5-A-20G-1: save-too-early helper formatting lock. Do not alter during future chip/helper-box polish. */
.matewa-dashboard-page .matewa-save-guard-helper {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: 0 !important;
    z-index: 40 !important;
    display: none !important;
    width: min(340px, calc(100vw - 48px)) !important;
    max-width: min(340px, calc(100vw - 48px)) !important;
    min-height: 38px !important;
    padding: 9px 13px !important;
    border: 1px solid rgba(22, 163, 74, 0.28) !important;
    border-radius: 14px !important;
    background: rgba(240, 253, 244, 0.98) !important;
    color: var(--matewa-polish-green-deep, #15803d) !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: left !important;
    pointer-events: none !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-save-guard-helper.is-visible:not([hidden]) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-guided-input.is-awaiting-input {
    background:
        linear-gradient(180deg, rgba(20, 83, 45, 0.34), rgba(15, 23, 42, 0.82)) !important;
    border-color: rgba(74, 222, 128, 0.42) !important;
    box-shadow:
        0 0 0 1px rgba(74, 222, 128, 0.12) inset,
        0 0 0 4px rgba(74, 222, 128, 0.075) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-guided-input.is-awaiting-input:focus,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-guided-input.is-awaiting-input.is-guided-focus {
    background: rgba(15, 23, 42, 0.96) !important;
    border-color: rgba(74, 222, 128, 0.72) !important;
    box-shadow:
        0 0 0 1px rgba(74, 222, 128, 0.18) inset,
        0 0 0 4px rgba(74, 222, 128, 0.14) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-guided-field-row.is-awaiting-input .matewa-field-label {
    color: var(--matewa-polish-green, #4ade80) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-guided-field-row.has-guided-value .matewa-field-label {
    color: var(--matewa-polish-text, #f8fafc) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-save-guard-helper {
    border-color: rgba(74, 222, 128, 0.24) !important;
    background: rgba(20, 83, 45, 0.92) !important;
    color: #dcfce7 !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28) !important;
}

@media (max-width: 782px) {
    .matewa-dashboard-page .matewa-save-guard-helper {
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        max-width: none !important;
        white-space: normal !important;
        text-align: center !important;
    }
}

/* =========================================================
   247ChatMate — Phase 5-A-26C sequential guided completion flow
   Scope: admin setup guidance + Visitor Buttons confirm-state polish only.
   No frontend widget, chip limits, WhatsApp, lead routing, licence/trial,
   registry, lifecycle, vertical JSON or save-handler logic changed.
========================================================= */

.matewa-dashboard-page .matewa-guided-field-row.is-current-guided-step .matewa-field-label,
.matewa-dashboard-page .matewa-selector-field.is-current-guided-step label {
    color: var(--matewa-polish-green-deep, #15803d) !important;
}

.matewa-dashboard-page .matewa-guided-input.is-current-guided-step.is-awaiting-input,
.matewa-dashboard-page .matewa-selector-field.is-current-guided-step select {
    background:
        linear-gradient(180deg, rgba(240, 253, 244, 0.98), rgba(255, 255, 255, 0.98)) !important;
    border-color: rgba(22, 163, 74, 0.52) !important;
    box-shadow:
        0 0 0 1px rgba(22, 163, 74, 0.12) inset,
        0 0 0 4px rgba(34, 197, 94, 0.075) !important;
}

.matewa-dashboard-page .matewa-guided-field-row.is-guided-ahead .matewa-field-label,
.matewa-dashboard-page .matewa-selector-field.is-guided-ahead label {
    color: rgba(51, 65, 85, 0.62) !important;
}

.matewa-dashboard-page .matewa-guided-input.is-guided-ahead,
.matewa-dashboard-page .matewa-selector-field.is-guided-ahead select {
    opacity: 0.82 !important;
}

.matewa-dashboard-page .matewa-guided-field-row.is-guided-blocked input,
.matewa-dashboard-page .matewa-selector-field.is-visitor-guide-blocked select {
    border-color: rgba(185, 28, 28, 0.38) !important;
    box-shadow:
        0 0 0 1px rgba(185, 28, 28, 0.08) inset,
        0 0 0 4px rgba(248, 113, 113, 0.10) !important;
}

.matewa-dashboard-page .matewa-guided-step-helper,
.matewa-dashboard-page .matewa-visitor-guide-helper {
    display: none !important;
    margin-top: 5px !important;
    color: #991b1b !important;
    font-size: 11.2px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
}

.matewa-dashboard-page .matewa-guided-step-helper.is-visible:not([hidden]),
.matewa-dashboard-page .matewa-visitor-guide-helper.is-visible:not([hidden]) {
    display: block !important;
}

.matewa-dashboard-page .matewa-chip-studio-card .button[data-matewa-confirm-action] {
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease !important;
}

.matewa-dashboard-page .matewa-chip-studio-card .button[data-matewa-confirm-action].is-confirm-ready {
    background: #ffffff !important;
    border-color: rgba(22, 163, 74, 0.76) !important;
    color: var(--matewa-polish-green-deep, #15803d) !important;
    text-shadow: none !important;
    box-shadow:
        0 12px 24px rgba(22, 163, 74, 0.14),
        0 0 0 1px rgba(22, 163, 74, 0.13) inset !important;
}

.matewa-dashboard-page .matewa-chip-studio-card .button[data-matewa-confirm-action].is-confirm-ready:hover {
    background: rgba(240, 253, 244, 0.98) !important;
    border-color: rgba(22, 163, 74, 0.92) !important;
    color: var(--matewa-polish-green-deep, #15803d) !important;
}

.matewa-dashboard-page .matewa-chip-studio-card .button[data-matewa-confirm-action].is-confirm-saved,
.matewa-dashboard-page .matewa-chip-studio-card .button[data-matewa-confirm-action].is-confirm-saving {
    background: var(--matewa-polish-green, #16a34a) !important;
    border-color: var(--matewa-polish-green, #16a34a) !important;
    color: #ffffff !important;
    text-shadow: none !important;
    box-shadow:
        0 12px 26px rgba(22, 163, 74, 0.20),
        0 0 0 1px rgba(255, 255, 255, 0.16) inset !important;
    animation: none !important;
}

.matewa-dashboard-page .matewa-chip-studio-card .button[data-matewa-confirm-action].is-confirm-ready.is-attention {
    animation: matewa-ready-to-save-pulse 1650ms ease-in-out infinite !important;
}

.matewa-dashboard-page .matewa-chip-editor-helper ul {
    margin: 7px 0 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.matewa-dashboard-page .matewa-chip-editor-helper li {
    position: relative !important;
    margin: 0 0 4px !important;
    padding-left: 13px !important;
    line-height: 1.28 !important;
}

.matewa-dashboard-page .matewa-chip-editor-helper li::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0.48em !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 999px !important;
    background: var(--matewa-polish-green, #16a34a) !important;
}

.matewa-dashboard-page .matewa-chip-editor-helper p {
    margin: 7px 0 0 !important;
    color: var(--matewa-polish-muted, #334155) !important;
    line-height: 1.28 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-guided-field-row.is-current-guided-step .matewa-field-label,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-selector-field.is-current-guided-step label {
    color: var(--matewa-polish-green, #4ade80) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-guided-input.is-current-guided-step.is-awaiting-input,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-selector-field.is-current-guided-step select {
    background:
        linear-gradient(180deg, rgba(20, 83, 45, 0.36), rgba(15, 23, 42, 0.88)) !important;
    border-color: rgba(74, 222, 128, 0.54) !important;
    box-shadow:
        0 0 0 1px rgba(74, 222, 128, 0.14) inset,
        0 0 0 4px rgba(74, 222, 128, 0.10) !important;
}

@media (prefers-reduced-motion: reduce) {
    .matewa-dashboard-page .matewa-chip-studio-card .button[data-matewa-confirm-action].is-confirm-ready.is-attention {
        animation: none !important;
    }
}

/* =========================================================
   247ChatMate — Phase 5-A-26D industry-to-business match helper
   Suggested business type feedback only. No chip/layout rebuild.
========================================================= */
.matewa-dashboard-page .matewa-industry-match-helper {
    display: none;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(37, 211, 102, 0.24);
    border-radius: 14px;
    background: rgba(37, 211, 102, 0.08);
    color: #136b3b;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.matewa-dashboard-page .matewa-industry-match-helper.is-visible:not([hidden]) {
    display: block;
}

.matewa-dashboard-page .matewa-industry-match-helper[data-match-state="fallback"] {
    border-color: rgba(148, 163, 184, 0.34);
    background: rgba(248, 250, 252, 0.86);
    color: #475569;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-industry-match-helper {
    border-color: rgba(37, 211, 102, 0.36);
    background: rgba(37, 211, 102, 0.12);
    color: #bbf7d0;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-industry-match-helper[data-match-state="fallback"] {
    border-color: rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.72);
    color: #cbd5e1;
}

/* =========================================================
   247ChatMate — 5-A-26D suggestion helper placement polish
   Scope: Visitor Buttons helper position/copy alignment only.
========================================================= */
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap .matewa-chip-preview-final-actions .matewa-industry-match-helper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    font-weight: 650 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap .matewa-chip-preview-final-actions .button,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-column .matewa-chip-studio-save-actions .button {
    width: 100% !important;
    min-height: 43px !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* =========================================================
   247ChatMate — 5-A-26D admin chip parity hardlock
   Scope: Visitor Buttons suggested/editable admin chips only.
   Source of truth: public/css/matewa-widget.css CHIPS contract.
   DO NOT ALTER during general admin polish, spacing/radius passes, dashboard
   polish or helper-copy work. These rules intentionally mirror the frontend
   chip dimensions/restrictions so the admin editor does not drift again.
========================================================= */
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-chip-preview-grid,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 292px !important;
    max-width: 292px !important;
    min-width: 292px !important;
    gap: 8px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-column > .matewa-chip-editor-frame,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap .matewa-chip-editor-frame {
    width: 292px !important;
    max-width: 292px !important;
    min-width: 292px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-chip-preview-grid .matewa-chip-editor-chip,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-grid .matewa-chip-editor-chip {
    width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 6px 8px !important;
    border-radius: 14px !important;
    border: 1.5px solid var(--matewa-polish-green, #16a34a) !important;
    background: #ffffff !important;
    color: var(--matewa-polish-green, #16a34a) !important;
    box-shadow: none !important;
    overflow: hidden !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-chip-preview-grid .matewa-chip-editor-chip span,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-grid .matewa-chip-editor-chip textarea,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-grid .matewa-chip-editor-measure {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: 34px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    overflow: hidden !important;
    box-shadow: none !important;
    resize: none !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-chip-preview-grid .matewa-chip-editor-chip span {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-grid .matewa-chip-editor-chip textarea {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    align-self: center !important;
    white-space: pre-wrap !important;
}

.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-grid .matewa-chip-editor-chip.is-single-line textarea {
    height: 15px !important;
    min-height: 15px !important;
    max-height: 15px !important;
}

@media (max-width: 420px) {
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-chip-preview-grid,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-grid,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-column > .matewa-chip-editor-frame,
    .matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap .matewa-chip-editor-frame {
        width: 100% !important;
        max-width: 292px !important;
        min-width: 0 !important;
    }
}

/* =========================================================
   247ChatMate — 5-A-26D helper/action box dimension restore
   Scope: Visitor Buttons helper boxes and action buttons under chips only.
   DO NOT ALTER during chip parity work: chip grids are locked to the
   frontend 292px contract, but helper/action boxes underneath must remain
   full-column width so the editor does not become visually cramped.
========================================================= */
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-column > .matewa-chip-editor-helper,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card .matewa-chip-studio-edit-column > .matewa-chip-studio-save-actions,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap > .matewa-chip-preview-subtle,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] #matewa-chip-labels-section .matewa-chip-studio-card #matewa-manual-business-type-preview-wrap > .matewa-chip-preview-final-actions {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
}


/* =========================================================
   247ChatMate — AGENCYHUBGATEDNAVLOCK1
   Scope: agency-only admin labels, gated Agency Hub shell and
   dashboard agency state. No widget/chip/lead behaviour changes.
========================================================= */

.matewa-dashboard-page .matewa-dashboard-plan-nudge.is-agency {
    border-color: rgba(34, 197, 94, 0.30) !important;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.22), transparent 58%),
        linear-gradient(135deg, rgba(240, 253, 244, 0.99), rgba(255, 255, 255, 0.97)) !important;
}

.matewa-dashboard-page .matewa-agency-hub-shell {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.matewa-dashboard-page .matewa-agency-hub-hero,
.matewa-dashboard-page .matewa-agency-hub-card {
    border: 1px solid rgba(34, 197, 94, 0.18);
    background:
        radial-gradient(circle at 92% 0%, rgba(34, 197, 94, 0.12), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    border-radius: 22px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
    box-sizing: border-box;
}

.matewa-dashboard-page .matewa-agency-hub-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
}

.matewa-dashboard-page .matewa-agency-hub-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.13);
    color: #15803d;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.matewa-dashboard-page .matewa-agency-hub-hero h3,
.matewa-dashboard-page .matewa-agency-hub-card h4 {
    margin: 0;
    color: #0f172a;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.matewa-dashboard-page .matewa-agency-hub-hero h3 {
    font-size: clamp(24px, 2vw, 34px);
    line-height: 1.02;
}

.matewa-dashboard-page .matewa-agency-hub-hero p,
.matewa-dashboard-page .matewa-agency-hub-card p,
.matewa-dashboard-page .matewa-agency-hub-card small {
    color: #334155;
    font-weight: 750;
    line-height: 1.45;
}

.matewa-dashboard-page .matewa-agency-hub-status-pill {
    display: grid;
    place-items: center;
    min-width: 150px;
    min-height: 112px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(240, 253, 244, 0.92);
    border: 1px solid rgba(34, 197, 94, 0.22);
    text-align: center;
}

.matewa-dashboard-page .matewa-agency-hub-status-pill strong {
    font-size: 36px;
    line-height: 1;
    color: #15803d;
    font-weight: 950;
}

.matewa-dashboard-page .matewa-agency-hub-status-pill span {
    max-width: 120px;
    color: #14532d;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 850;
}

.matewa-dashboard-page .matewa-agency-hub-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.matewa-dashboard-page .matewa-agency-hub-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 210px;
    padding: 18px;
}

.matewa-dashboard-page .matewa-agency-hub-card > .dashicons {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    font-size: 20px;
}

.matewa-dashboard-page .matewa-agency-hub-card h4 {
    font-size: 16px;
}

.matewa-dashboard-page .matewa-agency-hub-card p,
.matewa-dashboard-page .matewa-agency-hub-card small {
    margin: 0;
}

.matewa-dashboard-page .matewa-agency-hub-card small {
    display: block;
    margin-top: auto;
    font-size: 11px;
    color: #64748b;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-hero,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-card,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-status-pill {
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: rgba(34, 197, 94, 0.24) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-hero h3,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-card h4,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-status-pill strong {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-hero p,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-card p,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-card small,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-status-pill span {
    color: #cbd5e1 !important;
}

@media (max-width: 1180px) {
    .matewa-dashboard-page .matewa-agency-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .matewa-dashboard-page .matewa-agency-hub-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .matewa-dashboard-page .matewa-agency-hub-status-pill {
        width: 100%;
    }

    .matewa-dashboard-page .matewa-agency-hub-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   247ChatMate — AGENCYOVERVIEWREADONLYLOCK1
   Scope: read-only agency overview board, client onboarding
   table preview and agency client-health dashboard state.
========================================================= */

.matewa-dashboard-page .matewa-agency-hub-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.matewa-dashboard-page .matewa-agency-hub-stat-card,
.matewa-dashboard-page .matewa-agency-client-board {
    border: 1px solid rgba(34, 197, 94, 0.18);
    background:
        radial-gradient(circle at 92% 0%, rgba(34, 197, 94, 0.10), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.96));
    border-radius: 22px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.055);
    box-sizing: border-box;
}

.matewa-dashboard-page .matewa-agency-hub-stat-card {
    display: grid;
    gap: 6px;
    min-height: 116px;
    padding: 16px;
}

.matewa-dashboard-page .matewa-agency-hub-stat-card span,
.matewa-dashboard-page .matewa-agency-client-board-header p,
.matewa-dashboard-page .matewa-agency-client-board-note {
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 800;
}

.matewa-dashboard-page .matewa-agency-hub-stat-card strong {
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.matewa-dashboard-page .matewa-agency-hub-stat-card small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 800;
}

.matewa-dashboard-page .matewa-agency-hub-stat-card.is-warning {
    border-color: rgba(245, 158, 11, 0.28);
    background:
        radial-gradient(circle at 92% 0%, rgba(245, 158, 11, 0.16), transparent 44%),
        linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 255, 255, 0.96));
}

.matewa-dashboard-page .matewa-agency-client-board {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.matewa-dashboard-page .matewa-agency-client-board-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.matewa-dashboard-page .matewa-agency-client-board-header h4 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.matewa-dashboard-page .matewa-agency-client-board-header p {
    max-width: 680px;
    margin: 7px 0 0;
}

.matewa-dashboard-page .matewa-agency-client-board-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.matewa-dashboard-page .matewa-agency-soft-pill,
.matewa-dashboard-page .matewa-agency-table-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
}

.matewa-dashboard-page .matewa-agency-soft-pill {
    padding: 8px 10px;
    border: 1px solid rgba(34, 197, 94, 0.18);
    background: rgba(240, 253, 244, 0.86);
    color: #15803d;
}

.matewa-dashboard-page .matewa-agency-table-pill {
    padding: 7px 9px;
}

.matewa-dashboard-page .matewa-agency-table-pill.is-muted {
    border: 1px solid rgba(100, 116, 139, 0.18);
    background: rgba(248, 250, 252, 0.96);
    color: #475569;
}

.matewa-dashboard-page .matewa-agency-table-pill.is-warning {
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(255, 251, 235, 0.96);
    color: #92400e;
}

.matewa-dashboard-page .matewa-agency-client-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

.matewa-dashboard-page .matewa-agency-client-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.matewa-dashboard-page .matewa-agency-client-table th,
.matewa-dashboard-page .matewa-agency-client-table td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    color: #334155;
    text-align: left;
    vertical-align: top;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 800;
}

.matewa-dashboard-page .matewa-agency-client-table th {
    background: rgba(248, 250, 252, 0.94);
    color: #0f172a;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.matewa-dashboard-page .matewa-agency-client-table td strong,
.matewa-dashboard-page .matewa-agency-client-table td span {
    display: block;
}

.matewa-dashboard-page .matewa-agency-client-table td strong {
    margin-bottom: 3px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 950;
}

.matewa-dashboard-page .matewa-agency-client-table td > span:not(.matewa-agency-table-pill) {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.matewa-dashboard-page .matewa-agency-client-table tr:last-child td {
    border-bottom: 0;
}

.matewa-dashboard-page .matewa-agency-client-board-note {
    margin: 0;
}

.matewa-dashboard-page .matewa-dashboard-agency-client-card .matewa-dashboard-status-action-summary .dashicons,
.matewa-dashboard-page .matewa-dashboard-radial-center.is-agency-centre .matewa-dashboard-radial-icon {
    color: #15803d;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-stat-card,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-board,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-table-wrap {
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: rgba(34, 197, 94, 0.24) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-stat-card strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-board-header h4,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-table th,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-table td strong {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-stat-card span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-stat-card small,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-board-header p,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-board-note,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-table td,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-table td > span:not(.matewa-agency-table-pill) {
    color: #cbd5e1 !important;
}

@media (max-width: 1180px) {
    .matewa-dashboard-page .matewa-agency-hub-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .matewa-dashboard-page .matewa-agency-hub-stats {
        grid-template-columns: 1fr;
    }

    .matewa-dashboard-page .matewa-agency-client-board-header {
        flex-direction: column;
    }

    .matewa-dashboard-page .matewa-agency-client-board-actions {
        justify-content: flex-start;
    }
}

/* ======================================================================
   AGENCYBUNDLELICENCELOCK1
   Scope: agency bundle checkout links, masked licence rows and bundle
   intake UI only. No widget/chip/lead behaviour changes.
====================================================================== */

.matewa-dashboard-page .matewa-license-save-refresh__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.matewa-dashboard-page .matewa-agency-buy-licences-button {
    font-weight: 800;
}

.matewa-dashboard-page .matewa-agency-hub-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.matewa-dashboard-page .matewa-agency-bundle-panel {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
    padding: 22px;
}

.matewa-dashboard-page .matewa-agency-soft-pill.is-link {
    color: #047857;
    text-decoration: none;
    background: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.28);
}

.matewa-dashboard-page .matewa-agency-soft-pill.is-link:hover,
.matewa-dashboard-page .matewa-agency-soft-pill.is-link:focus {
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.55);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
    outline: none;
}

.matewa-dashboard-page .matewa-agency-bundle-notice {
    margin: 14px 0 0;
    border-radius: 16px;
    padding: 12px 14px;
    font-weight: 750;
    font-size: 13px;
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.matewa-dashboard-page .matewa-agency-bundle-notice.is-success {
    background: #ecfdf5;
    color: #047857;
    border-color: rgba(16, 185, 129, 0.32);
}

.matewa-dashboard-page .matewa-agency-bundle-notice.is-warning {
    background: #fff7ed;
    color: #9a3412;
    border-color: rgba(251, 146, 60, 0.36);
}

.matewa-dashboard-page .matewa-agency-bundle-entry {
    display: grid;
    grid-template-columns: minmax(190px, 0.85fr) minmax(260px, 1.4fr);
    gap: 16px;
    align-items: start;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 20px;
    padding: 16px;
    margin-top: 16px;
}

.matewa-dashboard-page .matewa-agency-bundle-entry label {
    display: grid;
    gap: 4px;
    margin: 0;
}

.matewa-dashboard-page .matewa-agency-bundle-entry label strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 850;
}

.matewa-dashboard-page .matewa-agency-bundle-entry label span,
.matewa-dashboard-page .matewa-agency-bundle-entry small {
    color: #64748b;
    font-size: 12.5px;
    line-height: 1.45;
}

.matewa-dashboard-page .matewa-agency-bundle-entry-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.matewa-dashboard-page .matewa-agency-bundle-entry textarea {
    width: 100%;
    min-height: 48px;
    resize: vertical;
    border-radius: 14px;
}

.matewa-dashboard-page .matewa-agency-bundle-table-wrap {
    margin-top: 16px;
}

.matewa-dashboard-page .matewa-agency-bundle-table .button-small {
    margin: 2px 4px 2px 0;
    min-height: 28px;
    line-height: 1.2;
    font-weight: 750;
}

.matewa-dashboard-page .matewa-agency-table-pill.is-ready {
    background: #ecfdf5;
    color: #047857;
    border-color: rgba(16, 185, 129, 0.3);
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-bundle-panel,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-bundle-entry {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.24);
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-bundle-entry label strong {
    color: #f8fafc;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-bundle-entry label span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-bundle-entry small {
    color: #cbd5e1;
}

@media (max-width: 900px) {
    .matewa-dashboard-page .matewa-agency-bundle-entry,
    .matewa-dashboard-page .matewa-agency-bundle-entry-controls {
        grid-template-columns: 1fr;
    }
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-action-button.is-secondary {
    margin-top: 8px !important;
    background: #ffffff !important;
    color: #047857 !important;
    border: 1px solid rgba(16, 185, 129, 0.28) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-dashboard-status-action-button.is-secondary {
    background: #0f172a !important;
    color: #86efac !important;
    border-color: rgba(134, 239, 172, 0.28) !important;
}


/* ======================================================================
   AGENCYBUNDLELICENCELOCK1A
   Scope: visual polish only for agency bundle licence controls.
   - Align bundle buttons with the top-right admin action visual language.
   - Keep the bundle licence key textarea compact as a single-row input.
   No entitlement, seat, widget, chip, WhatsApp, lead or summary logic changes.
====================================================================== */

.matewa-dashboard-page .matewa-agency-bundle-entry-controls {
    align-items: center;
}

.matewa-dashboard-page .matewa-agency-bundle-entry textarea {
    min-height: 42px !important;
    height: 42px !important;
    max-height: 42px !important;
    resize: none !important;
    overflow: hidden !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    line-height: 20px !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-agency-bundle-panel .button,
.matewa-dashboard-page .matewa-agency-hub-hero-actions .button,
.matewa-dashboard-page .matewa-license-save-refresh__actions .matewa-agency-buy-licences-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 42px !important;
    padding: 10px 18px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-agency-bundle-panel .button-primary,
.matewa-dashboard-page .matewa-agency-hub-hero-actions .button-primary,
.matewa-dashboard-page .matewa-license-save-refresh__actions .matewa-agency-buy-licences-button.button-primary {
    background: var(--matewa-polish-green, #16a34a) !important;
    border-color: var(--matewa-polish-green, #16a34a) !important;
    color: #ffffff !important;
    text-shadow: none !important;
    box-shadow:
        0 14px 30px rgba(22, 163, 74, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.16) inset !important;
}

.matewa-dashboard-page .matewa-agency-bundle-panel .button-primary:hover,
.matewa-dashboard-page .matewa-agency-bundle-panel .button-primary:focus-visible,
.matewa-dashboard-page .matewa-agency-hub-hero-actions .button-primary:hover,
.matewa-dashboard-page .matewa-agency-hub-hero-actions .button-primary:focus-visible,
.matewa-dashboard-page .matewa-license-save-refresh__actions .matewa-agency-buy-licences-button.button-primary:hover,
.matewa-dashboard-page .matewa-license-save-refresh__actions .matewa-agency-buy-licences-button.button-primary:focus-visible {
    background: var(--matewa-polish-green-deep, #15803d) !important;
    border-color: var(--matewa-polish-green-deep, #15803d) !important;
    color: #ffffff !important;
    box-shadow:
        0 18px 38px rgba(22, 163, 74, 0.30),
        0 0 0 3px rgba(34, 197, 94, 0.12) !important;
    outline: none !important;
}

.matewa-dashboard-page .matewa-agency-bundle-panel .button:not(.button-primary),
.matewa-dashboard-page .matewa-agency-hub-hero-actions .button:not(.button-primary) {
    background: #ffffff !important;
    border: 1px solid rgba(22, 163, 74, 0.30) !important;
    color: var(--matewa-polish-green-deep, #15803d) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

.matewa-dashboard-page .matewa-agency-bundle-panel .button:not(.button-primary):hover,
.matewa-dashboard-page .matewa-agency-bundle-panel .button:not(.button-primary):focus-visible,
.matewa-dashboard-page .matewa-agency-hub-hero-actions .button:not(.button-primary):hover,
.matewa-dashboard-page .matewa-agency-hub-hero-actions .button:not(.button-primary):focus-visible {
    background: #f0fdf4 !important;
    border-color: rgba(22, 163, 74, 0.58) !important;
    color: var(--matewa-polish-green-deep, #15803d) !important;
    box-shadow: 0 14px 30px rgba(22, 163, 74, 0.14) !important;
    outline: none !important;
}

.matewa-dashboard-page .matewa-agency-bundle-table .button-small {
    min-height: 34px !important;
    padding: 7px 12px !important;
    margin: 2px 5px 2px 0 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-bundle-panel .button:not(.button-primary),
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-hub-hero-actions .button:not(.button-primary) {
    background: #0f172a !important;
    color: #86efac !important;
    border-color: rgba(134, 239, 172, 0.32) !important;
}

@media (max-width: 900px) {
    .matewa-dashboard-page .matewa-agency-bundle-entry textarea {
        height: 44px !important;
        max-height: 44px !important;
    }
}

/* ======================================================================
   AGENCYCLIENTPACKMANUALLOCK1
   Scope: manual client setup-pack form and saved setup-pack rows only.
   No frontend widget, chip, WhatsApp, lead email or summary changes.
====================================================================== */

.matewa-dashboard-page .matewa-agency-client-pack-form {
    display: grid;
    gap: 16px;
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.matewa-dashboard-page .matewa-agency-client-pack-form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.matewa-dashboard-page .matewa-agency-client-pack-form-head strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 850;
}

.matewa-dashboard-page .matewa-agency-client-pack-form-head span,
.matewa-dashboard-page .matewa-agency-client-pack-actions small {
    display: block;
    color: #64748b;
    font-size: 12.5px;
    line-height: 1.45;
}

.matewa-dashboard-page .matewa-agency-client-pack-form-head em {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid rgba(16, 185, 129, 0.26);
    color: #047857;
    font-style: normal;
    font-size: 12px;
    font-weight: 850;
}

.matewa-dashboard-page .matewa-agency-client-pack-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.matewa-dashboard-page .matewa-agency-client-pack-grid label {
    display: grid;
    gap: 6px;
    margin: 0;
}

.matewa-dashboard-page .matewa-agency-client-pack-grid label span {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.matewa-dashboard-page .matewa-agency-client-pack-grid input,
.matewa-dashboard-page .matewa-agency-client-pack-grid select {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    background: #ffffff;
    color: #0f172a;
    font-size: 13px;
    box-shadow: none;
}

.matewa-dashboard-page .matewa-agency-client-pack-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.matewa-dashboard-page .matewa-agency-client-pack-actions .button.button-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 10px 18px !important;
    border-radius: 12px !important;
    background: #2f963d !important;
    border-color: #2f963d !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    box-shadow: 0 16px 32px rgba(47, 150, 61, 0.22) !important;
}

.matewa-dashboard-page .matewa-agency-client-pack-actions .button.button-primary:hover,
.matewa-dashboard-page .matewa-agency-client-pack-actions .button.button-primary:focus-visible {
    background: #23742f !important;
    border-color: #23742f !important;
    color: #ffffff !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-form {
    background:
        radial-gradient(circle at 92% 0%, rgba(74, 222, 128, 0.07), transparent 42%),
        rgba(15, 23, 42, 0.94) !important;
    border-color: rgba(74, 222, 128, 0.22) !important;
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-form-head strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-grid label span {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-form-head span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-actions small {
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-grid input,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-grid select {
    background: #0f172a !important;
    border-color: rgba(148, 163, 184, 0.36) !important;
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-grid input::placeholder {
    color: #94a3b8 !important;
}

@media (max-width: 1100px) {
    .matewa-dashboard-page .matewa-agency-client-pack-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .matewa-dashboard-page .matewa-agency-client-pack-form-head,
    .matewa-dashboard-page .matewa-agency-client-pack-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .matewa-dashboard-page .matewa-agency-client-pack-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================================================================
   AGENCYCLIENTPACKVISITORBUTTONSLOCK1
   Scope: Agency Hub client setup pack form only.
   Duplicates Visitor Buttons selector/chip data without changing saved Visitor Buttons settings.
====================================================================== */

.matewa-dashboard-page .matewa-agency-client-pack-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.66);
}

.matewa-dashboard-page .matewa-agency-client-pack-section-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.matewa-dashboard-page .matewa-agency-client-pack-step {
    flex: 0 0 auto;
    display: inline-flex;
    width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #2f963d;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.matewa-dashboard-page .matewa-agency-client-pack-section-head strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-agency-client-pack-section-head small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

.matewa-dashboard-page .matewa-agency-client-pack-grid.is-details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.matewa-dashboard-page .matewa-agency-client-pack-grid.is-business-type {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.matewa-dashboard-page .matewa-agency-client-chip-editor {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(47, 150, 61, 0.18);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(236, 253, 245, 0.52), rgba(255, 255, 255, 0.82));
}

.matewa-dashboard-page .matewa-agency-client-chip-editor-head strong {
    display: block;
    color: #14532d;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-agency-client-chip-editor-head small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 740px;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid label {
    display: grid;
    gap: 5px;
    margin: 0;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid label span {
    color: #166534;
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid input {
    width: 100%;
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(47, 150, 61, 0.42);
    background: #ffffff;
    color: #14532d;
    font-size: 12.5px;
    font-weight: 800;
    text-align: center;
    box-shadow: none;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid input:focus {
    border-color: #2f963d;
    box-shadow: 0 0 0 3px rgba(47, 150, 61, 0.13);
    outline: none;
}

.matewa-dashboard-page .matewa-agency-client-chip-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 340px;
}

.matewa-dashboard-page .matewa-agency-client-chip-summary span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(47, 150, 61, 0.24);
    background: rgba(236, 253, 245, 0.78);
    color: #166534;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.1;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-section {
    background: rgba(15, 23, 42, 0.76) !important;
    border-color: rgba(74, 222, 128, 0.16) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-section-head strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-chip-editor-head strong {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-section-head small,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-chip-editor-head small {
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-chip-editor {
    background: rgba(2, 6, 23, 0.34) !important;
    border-color: rgba(74, 222, 128, 0.16) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-chip-grid label span {
    color: #bbf7d0 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-chip-grid input {
    background: #0f172a !important;
    border-color: rgba(74, 222, 128, 0.28) !important;
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-chip-summary span {
    background: rgba(34, 197, 94, 0.12) !important;
    border-color: rgba(74, 222, 128, 0.20) !important;
    color: #dcfce7 !important;
}

@media (max-width: 1100px) {
    .matewa-dashboard-page .matewa-agency-client-pack-grid.is-details,
    .matewa-dashboard-page .matewa-agency-client-chip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .matewa-dashboard-page .matewa-agency-client-pack-grid.is-business-type,
    .matewa-dashboard-page .matewa-agency-client-chip-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   247ChatMate — AGENCYCLIENTPACKROWACTIONSLOCK1
   Scope: Agency Hub client-pack chip alignment and row actions only.
   Keeps copied Visitor Buttons labels inside setup packs; does not alter
   real Visitor Buttons data, frontend chips, widget, handoff or emails.
========================================================= */

.matewa-dashboard-page .matewa-agency-client-chip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    max-width: 660px !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid label {
    min-width: 0 !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid input {
    height: 52px !important;
    min-height: 52px !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
    font-size: 12px !important;
    line-height: 1.16 !important;
    white-space: normal !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-summary {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(78px, 1fr)) !important;
    gap: 6px !important;
    width: min(100%, 330px) !important;
    max-width: 330px !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-summary span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 4px 7px !important;
    border-radius: 12px !important;
    text-align: center !important;
    font-size: 10.5px !important;
    font-weight: 850 !important;
    line-height: 1.08 !important;
    overflow: hidden !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

.matewa-dashboard-page .matewa-agency-client-row-actions {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    align-items: stretch !important;
}

.matewa-dashboard-page .matewa-agency-client-row-actions .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 116px !important;
    min-height: 38px !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(47, 150, 61, 0.42) !important;
    background: #ffffff !important;
    color: #166534 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
}

.matewa-dashboard-page .matewa-agency-client-row-actions .button.is-danger {
    border-color: rgba(220, 38, 38, 0.24) !important;
    color: #991b1b !important;
}

.matewa-dashboard-page .matewa-agency-client-row-note {
    display: block !important;
    margin-top: 7px !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-row-actions .button {
    background: rgba(15, 23, 42, 0.84) !important;
    border-color: rgba(74, 222, 128, 0.24) !important;
    color: #dcfce7 !important;
    box-shadow: none !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-row-actions .button.is-danger {
    border-color: rgba(248, 113, 113, 0.28) !important;
    color: #fecaca !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-row-note {
    color: #cbd5e1 !important;
}

@media (max-width: 1100px) {
    .matewa-dashboard-page .matewa-agency-client-chip-summary {
        grid-template-columns: repeat(2, minmax(78px, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    .matewa-dashboard-page .matewa-agency-client-chip-grid,
    .matewa-dashboard-page .matewa-agency-client-chip-summary {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================================
   247ChatMate — AGENCYCLIENTPACKCHIPFITLOCK1
   Scope: Agency Hub setup-pack Visitor Buttons visual mirror only.
   The editable copied buttons now mirror the Visitor Buttons 3x2 chip
   dimensions and two-line fit. No Visitor Buttons JSON/settings,
   frontend widget, WhatsApp handoff, lead email or licence logic changes.
========================================================= */

.matewa-dashboard-page .matewa-agency-client-chip-editor {
    justify-items: center !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-editor-head {
    width: 100% !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 292px !important;
    max-width: 292px !important;
    min-width: 292px !important;
    gap: 8px !important;
    margin: 0 auto !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-item {
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 6px 8px !important;
    border-radius: 14px !important;
    border: 1.5px solid rgba(5, 122, 41, 0.28) !important;
    background: #ffffff !important;
    color: #057a29 !important;
    box-shadow: none !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip textarea {
    display: block !important;
    align-self: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    font-family: inherit !important;
    text-align: center !important;
    white-space: pre-wrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    overflow: hidden !important;
    box-shadow: none !important;
    resize: none !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip:focus-within {
    border-color: #2f963d !important;
    box-shadow: 0 0 0 3px rgba(47, 150, 61, 0.13) !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-summary {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 292px !important;
    max-width: 292px !important;
    min-width: 292px !important;
    gap: 8px !important;
    margin: 0 !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-summary span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 6px 8px !important;
    border-radius: 14px !important;
    border: 1.5px solid rgba(5, 122, 41, 0.24) !important;
    background: #ffffff !important;
    color: #057a29 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-chip-grid .matewa-chip-editor-chip,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-chip-summary span {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(74, 222, 128, 0.22) !important;
    color: #dcfce7 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-chip-grid .matewa-chip-editor-chip:focus-within {
    border-color: rgba(134, 239, 172, 0.52) !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12) !important;
}

@media (max-width: 760px) {
    .matewa-dashboard-page .matewa-agency-client-chip-grid,
    .matewa-dashboard-page .matewa-agency-client-chip-summary {
        width: 292px !important;
        max-width: min(292px, 100%) !important;
        min-width: 0 !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}


/* =========================================================
   247ChatMate — AGENCYCLIENTPACKCHIPALIGNLOCK1
   Scope: Agency Hub client setup pack selector/chip visual alignment only.
   Keeps copied setup-pack button labels isolated from the live Visitor Buttons page.
========================================================= */

.matewa-dashboard-page .matewa-agency-client-pack-grid.is-business-type select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 44px !important;
    cursor: pointer !important;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 7.5L10 12l4.5-4.5' fill='none' stroke='%23166534' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 14px 14px !important;
}

.matewa-dashboard-page .matewa-agency-client-helper {
    width: 100% !important;
    margin-top: 8px !important;
    padding: 12px 14px !important;
    border: 1px solid rgba(59, 130, 246, 0.18) !important;
    border-radius: 12px !important;
    background: #f8fbff !important;
    color: #334155 !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-agency-client-helper strong {
    display: block !important;
    margin-bottom: 6px !important;
    color: #1e3a8a !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

.matewa-dashboard-page .matewa-agency-client-helper ul {
    margin: 0 !important;
    padding-left: 18px !important;
}

.matewa-dashboard-page .matewa-agency-client-helper li {
    margin: 2px 0 !important;
    color: #475569 !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    font-weight: 650 !important;
}

.matewa-dashboard-page .matewa-agency-client-helper li::marker {
    color: #2f963d !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-editor {
    justify-items: start !important;
    align-items: start !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-editor-head {
    justify-self: stretch !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid {
    margin: 8px 0 0 0 !important;
    justify-self: start !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip {
    align-items: center !important;
    justify-content: center !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip textarea {
    display: block !important;
    align-self: center !important;
    padding: 3px 1px !important;
    line-height: 1.18 !important;
    text-align: center !important;
    scrollbar-width: none !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip textarea::-webkit-scrollbar {
    display: none !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-pack-grid.is-business-type select {
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 7.5L10 12l4.5-4.5' fill='none' stroke='%23dcfce7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-helper {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(96, 165, 250, 0.18) !important;
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-helper strong {
    color: #bfdbfe !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-helper li {
    color: #cbd5e1 !important;
}

@media (max-width: 760px) {
    .matewa-dashboard-page .matewa-agency-client-chip-grid {
        justify-self: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* =========================================================
   247ChatMate — AGENCYCLIENTPACKCHIPVERTICALALIGNLOCK1A
   Scope: Restore CHIPALIGN helper/dropdown layout and keep single-line
   Agency Hub setup-pack chips vertically centred.
========================================================= */

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip.is-single-line textarea {
    height: 15px !important;
    min-height: 15px !important;
    max-height: 15px !important;
    line-height: 1.25 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip:not(.is-single-line) textarea {
    display: block !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

/* =========================================================
   247ChatMate — AGENCYFOUNDATIONUIPOLISH1
   Scope: Agency Hub visual polish only after Foundation Pack 1.
   Keeps all agency save, delete, seat, chip, widget, WhatsApp,
   trial and licence logic unchanged.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell {
    width: min(100%, 1480px) !important;
    max-width: 1480px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    gap: 14px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-hero,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-bundle-panel,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-form {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-hero {
    padding: 18px 20px !important;
    border-radius: 20px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-hero h3 {
    font-size: clamp(23px, 1.65vw, 30px) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-hero p,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board-header p {
    max-width: 760px !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-status-pill {
    min-width: 132px !important;
    min-height: 96px !important;
    padding: 13px !important;
    border-radius: 20px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-status-pill strong {
    font-size: 31px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-stats {
    grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
    gap: 10px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-stat-card {
    min-height: 94px !important;
    padding: 13px 14px !important;
    border-radius: 18px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-stat-card span {
    font-size: 12.5px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-stat-card strong {
    font-size: 22px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-stat-card small {
    font-size: 11.5px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-bundle-panel {
    padding: 17px !important;
    border-radius: 20px !important;
    gap: 13px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board-header {
    align-items: center !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board-header h4 {
    font-size: 20px !important;
    letter-spacing: -0.035em !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-form {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    padding: 14px !important;
    border-radius: 18px !important;
    gap: 13px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-grid.is-details {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-grid label span,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-form-head span,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-actions small {
    font-size: 12.5px !important;
    line-height: 1.35 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-grid input,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-grid select {
    min-height: 40px !important;
    font-size: 13.5px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table {
    min-width: 1120px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table th,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table td {
    padding: 12px 13px !important;
    font-size: 13px !important;
    line-height: 1.38 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table th {
    font-size: 11.5px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table td strong {
    font-size: 14px !important;
    line-height: 1.25 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table td > span:not(.matewa-agency-table-pill),
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-row-note {
    font-size: 12px !important;
    line-height: 1.35 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-table-pill,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-soft-pill {
    font-size: 11.5px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-chip-summary span {
    font-size: 11.5px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-card {
    min-height: 148px !important;
    padding: 15px !important;
    border-radius: 18px !important;
    gap: 7px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-card > .dashicons {
    width: 34px !important;
    height: 34px !important;
    border-radius: 12px !important;
    font-size: 18px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-card h4 {
    font-size: 15px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-card p,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-card small {
    font-size: 12px !important;
    line-height: 1.38 !important;
}

@media (max-width: 1400px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-grid.is-details {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1180px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-stats,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell {
        width: 100% !important;
        max-width: none !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-stats,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-grid,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-grid.is-details {
        grid-template-columns: 1fr !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board-header {
        align-items: flex-start !important;
    }
}

/* =========================================================
   247ChatMate — AGENCYBUNDLEPRICEPILLALIGN1
   Scope: Agency Hub licence checkout pill alignment only.
   Keeps all agency save, delete, seat, chip, widget, WhatsApp,
   trial and licence logic unchanged.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="agency"] #matewa-agency-bundle-licences .matewa-agency-client-board-actions {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-template-rows: repeat(2, minmax(34px, auto)) !important;
    grid-auto-columns: minmax(218px, 1fr) !important;
    gap: 8px 10px !important;
    align-items: stretch !important;
    justify-content: end !important;
    justify-items: stretch !important;
    width: min(100%, 500px) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] #matewa-agency-bundle-licences .matewa-agency-client-board-actions .matewa-agency-soft-pill.is-link {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    box-sizing: border-box !important;
    padding: 8px 14px !important;
    text-align: center !important;
    justify-content: center !important;
}

@media (max-width: 900px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] #matewa-agency-bundle-licences .matewa-agency-client-board-actions {
        grid-auto-flow: row !important;
        grid-template-rows: none !important;
        grid-template-columns: 1fr !important;
        grid-auto-columns: auto !important;
        width: 100% !important;
        justify-content: stretch !important;
    }
}

/* ======================================================================
   AGENCYSTATUSACTIONALIGN1
   Scope: Agency Hub client setup pack table status/action column alignment only.
   Keeps logic, save handling, seats, chips, widget, WhatsApp and licence flow unchanged.
====================================================================== */

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) th:nth-child(7),
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) th:nth-child(8),
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td:nth-child(7),
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td:nth-child(8) {
    width: 124px !important;
    min-width: 124px !important;
    max-width: 124px !important;
    text-align: left !important;
    vertical-align: top !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td[data-label="Status"] br {
    display: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td[data-label="Status"] > .matewa-agency-table-pill {
    display: inline-flex !important;
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    min-height: 36px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 0 8px !important;
    padding: 0 10px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td[data-label="Status"] > span:not(.matewa-agency-table-pill) {
    display: flex !important;
    min-height: 36px !important;
    align-items: center !important;
    margin: 0 0 8px !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) .matewa-agency-client-row-actions {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) .matewa-agency-client-row-actions .button {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 10px !important;
    justify-content: center !important;
    text-align: center !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td[data-label="Actions"] > .matewa-agency-client-row-note {
    display: flex !important;
    min-height: 36px !important;
    align-items: center !important;
    margin: 8px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
}

@media (max-width: 900px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) th:nth-child(7),
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) th:nth-child(8),
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td:nth-child(7),
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td:nth-child(8) {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

/* Agency Client Setup Request Controls - AGENCYCLIENTSETUPREQUESTCONTROLSLOCK1 candidate
   UI-only styling. Does not change client setup pack, widget, chip, WhatsApp, licence, trial or email logic. */
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-panel {
    margin-top: 16px !important;
    border-color: rgba(34, 197, 94, 0.24) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 253, 244, 0.72)) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-message {
    display: grid !important;
    gap: 8px !important;
    margin-top: 14px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-message > span {
    font-size: 12px !important;
    font-weight: 900 !important;
    color: #0f172a !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-message textarea {
    width: 100% !important;
    min-height: 156px !important;
    resize: vertical !important;
    border-radius: 16px !important;
    border: 1px solid rgba(148, 163, 184, 0.36) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #0f172a !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    padding: 14px 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 14px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button {
    min-height: 42px !important;
    border-radius: 14px !important;
    font-weight: 900 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button[disabled] {
    opacity: 0.62 !important;
    cursor: not-allowed !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-dropzone {
    display: grid !important;
    gap: 4px !important;
    margin-top: 14px !important;
    padding: 16px !important;
    border: 1px dashed rgba(34, 197, 94, 0.42) !important;
    border-radius: 18px !important;
    background: rgba(240, 253, 244, 0.62) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-dropzone strong {
    font-size: 13px !important;
    font-weight: 950 !important;
    color: #047857 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-dropzone span {
    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 1.45 !important;
    color: #475569 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-setup-request-panel,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-setup-request-message textarea {
    background: rgba(15, 23, 42, 0.88) !important;
    color: #e5e7eb !important;
    border-color: rgba(148, 163, 184, 0.32) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-setup-request-message > span {
    color: #e5e7eb !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-setup-request-dropzone {
    background: rgba(6, 78, 59, 0.24) !important;
    border-color: rgba(52, 211, 153, 0.36) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-setup-request-dropzone span {
    color: #cbd5e1 !important;
}

@media (max-width: 760px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }
}


/* ============================================================================
   Agency setup request controls - Send now button style lock
   Scope: Agency Hub > Agency Foundation > Client setup request pack only.
   Purpose: make Copy / Send now / PDF buttons match the existing 247ChatMate
   agency button language instead of falling back to default WordPress blue.
   ============================================================================ */
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions {
    gap: 12px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 168px !important;
    min-height: 46px !important;
    padding: 11px 18px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    text-shadow: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button.button-primary,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .matewa-agency-send-now-button {
    background: #2f963d !important;
    border-color: #2f963d !important;
    color: #ffffff !important;
    box-shadow: 0 16px 32px rgba(47, 150, 61, 0.22) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button.button-primary:hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button.button-primary:focus-visible,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .matewa-agency-send-now-button:hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .matewa-agency-send-now-button:focus-visible {
    background: #23742f !important;
    border-color: #23742f !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: 0 18px 38px rgba(47, 150, 61, 0.28), 0 0 0 3px rgba(47, 150, 61, 0.14) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button.button-secondary:not([disabled]) {
    background: #ffffff !important;
    border: 1px solid rgba(47, 150, 61, 0.42) !important;
    color: #23742f !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button.button-secondary:not([disabled]):hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button.button-secondary:not([disabled]):focus-visible {
    background: #f0fdf4 !important;
    border-color: rgba(47, 150, 61, 0.68) !important;
    color: #23742f !important;
    outline: none !important;
    box-shadow: 0 14px 30px rgba(47, 150, 61, 0.14) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button[disabled],
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button[aria-disabled="true"] {
    min-width: 238px !important;
    background: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.32) !important;
    color: #94a3b8 !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

@media (max-width: 782px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button[disabled],
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-setup-request-actions .button[aria-disabled="true"] {
        width: 100% !important;
        min-width: 0 !important;
    }
}


/* ============================================================================
   Agency routing Send now button lock
   Scope: Agency Hub > Agency Foundation > Agency email routing panel.
   Purpose: add a high-contrast Send now control in the routing section itself,
   and show a visible sent state after the test email is sent.
   ============================================================================ */
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-panel .matewa-agency-bundle-notice {
    margin: 12px 0 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-actions {
    align-items: center !important;
    gap: 12px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-actions .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 168px !important;
    min-height: 46px !important;
    padding: 11px 18px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    text-shadow: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-save-button {
    background: #2f963d !important;
    border-color: #2f963d !important;
    color: #ffffff !important;
    box-shadow: 0 16px 32px rgba(47, 150, 61, 0.22) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-send-now-button {
    background: #0f766e !important;
    border-color: #0f766e !important;
    color: #ffffff !important;
    box-shadow: 0 16px 34px rgba(15, 118, 110, 0.26) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-send-now-button:hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-send-now-button:focus-visible {
    background: #115e59 !important;
    border-color: #115e59 !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: 0 18px 38px rgba(15, 118, 110, 0.32), 0 0 0 3px rgba(15, 118, 110, 0.16) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-send-now-button.is-sent {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
    box-shadow: 0 16px 34px rgba(22, 163, 74, 0.28) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-panel.is-sent .matewa-agency-client-pack-form-head em {
    background: #dcfce7 !important;
    border-color: rgba(22, 163, 74, 0.34) !important;
    color: #15803d !important;
}

@media (max-width: 782px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-actions .button {
        width: 100% !important;
        min-width: 0 !important;
    }
}


/* ============================================================================
   Agency routing clear test result control
   Scope: Agency Hub > Agency Foundation > Agency email routing panel.
   Purpose: let agencies clear old Send now diagnostics after testing, without
   changing email routing, setup packs, seat logic, chips or frontend behaviour.
   ============================================================================ */
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-clear-button {
    background: #ffffff !important;
    border: 1px solid rgba(20, 184, 166, 0.38) !important;
    color: #0f766e !important;
    box-shadow: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-clear-button:hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-routing-clear-button:focus-visible {
    background: #ecfdf5 !important;
    border-color: rgba(15, 118, 110, 0.56) !important;
    color: #115e59 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12) !important;
}

/* ==========================================================
   Email Delivery Profiles UI Foundation
   Checkpoint: EMAILDELIVERYPROFILESUILOCK1
========================================================== */
.matewa-email-profile-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.88), rgba(255,255,255,0.96));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.matewa-email-profile-card.is-agency {
  margin-top: 22px;
}

.matewa-email-profile-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.matewa-email-profile-card__head strong {
  display: block;
  color: #071227;
  font-weight: 900;
  font-size: 15px;
  line-height: 1.2;
}

.matewa-email-profile-card__head span {
  display: block;
  margin-top: 3px;
  color: #365174;
  font-size: 13px;
  line-height: 1.35;
}

.matewa-email-profile-card__head em {
  flex: 0 0 auto;
  border: 1px solid rgba(34, 197, 94, 0.32);
  background: rgba(220, 252, 231, 0.74);
  color: #047857;
  border-radius: 999px;
  padding: 7px 12px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

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

.matewa-email-profile-grid label,
.matewa-email-profile-toggles label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #132238;
  font-size: 12px;
  font-weight: 900;
}

.matewa-email-profile-grid input,
.matewa-email-profile-grid select {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: #fff;
  color: #071227;
  font-weight: 600;
}

.matewa-email-profile-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}

.matewa-email-profile-toggles label {
  flex-direction: row;
  align-items: center;
  font-weight: 800;
  color: #365174;
}

.matewa-email-profile-card .description {
  margin: 12px 0 0;
  color: #365174;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .matewa-email-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .matewa-email-profile-card__head {
    flex-direction: column;
  }
  .matewa-email-profile-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   Email delivery profile alignment refinement
   Checkpoint: EMAILDELIVERYPROFILEALIGNMENTLOCK1
   Scope: Setup > Lead routing and Agency Hub sender profile cards only.
   Purpose: align labels, inputs, selects and toggles so the sender profile fields
   do not stagger when one label wraps onto two lines.
   ============================================================================ */
.matewa-email-profile-card .matewa-email-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 16px !important;
    align-items: start !important;
}

.matewa-email-profile-card .matewa-email-profile-grid label {
    display: grid !important;
    grid-template-rows: minmax(34px, auto) 44px !important;
    gap: 8px !important;
    min-width: 0 !important;
}

.matewa-email-profile-card .matewa-email-profile-grid label > span {
    min-height: 34px !important;
    display: flex !important;
    align-items: flex-end !important;
    line-height: 1.25 !important;
}

.matewa-email-profile-card .matewa-email-profile-grid input,
.matewa-email-profile-card .matewa-email-profile-grid select {
    min-height: 44px !important;
    height: 44px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.matewa-email-profile-card .matewa-email-profile-toggles {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 16px !important;
    align-items: center !important;
    margin-top: 14px !important;
}

.matewa-email-profile-card .matewa-email-profile-toggles label {
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

@media (min-width: 1360px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-email-profile-card.is-agency .matewa-email-profile-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 720px) {
    .matewa-email-profile-card .matewa-email-profile-grid,
    .matewa-email-profile-card .matewa-email-profile-toggles {
        grid-template-columns: 1fr !important;
    }

    .matewa-email-profile-card .matewa-email-profile-grid label {
        grid-template-rows: auto 44px !important;
    }

    .matewa-email-profile-card .matewa-email-profile-grid label > span {
        min-height: 0 !important;
        align-items: flex-start !important;
    }
}

/* ============================================================================
   Email profile and Agency Hub chip editing refinement
   Checkpoint: EMAILPROFILEBOXCHIPALIGNLOCK1
   Scope: visual alignment for email profile fields + Agency Hub setup-pack
   chip editing only. No sender, lead-routing, WhatsApp, licence or seat logic.
   ============================================================================ */
.matewa-email-profile-card .matewa-email-profile-grid {
    align-items: stretch !important;
}

.matewa-email-profile-card .matewa-email-profile-grid label {
    grid-template-rows: 40px 46px !important;
    min-height: 94px !important;
    height: 94px !important;
    align-content: start !important;
}

.matewa-email-profile-card .matewa-email-profile-grid label > span {
    min-height: 40px !important;
    height: 40px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
}

.matewa-email-profile-card .matewa-email-profile-grid input,
.matewa-email-profile-card .matewa-email-profile-grid select {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 46px !important;
    vertical-align: middle !important;
}

.matewa-email-profile-card .matewa-email-profile-grid select {
    display: block !important;
    line-height: normal !important;
}

.matewa-email-profile-card .matewa-email-profile-toggles label {
    min-height: 30px !important;
    height: 30px !important;
    align-items: center !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip textarea {
    white-space: pre-wrap !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-summary span {
    white-space: pre-line !important;
}

@media (max-width: 720px) {
    .matewa-email-profile-card .matewa-email-profile-grid label {
        grid-template-rows: auto 46px !important;
        min-height: 0 !important;
        height: auto !important;
    }

    .matewa-email-profile-card .matewa-email-profile-grid label > span {
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }
}


/* =========================================================
   247ChatMate — AGENCYCHIPSECONDLINEEDITORFIX1
   Scope: Agency Hub client setup pack chip editor only.
   Makes an intentional Enter/newline visibly switch the chip textarea
   into its two-line editing state before the second line has text.
========================================================= */

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip.is-two-line-editing textarea,
.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip:not(.is-single-line) textarea {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: 1.16 !important;
    padding: 4px 1px !important;
    white-space: pre-wrap !important;
    overflow: hidden !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip.is-two-line-editing {
    align-items: center !important;
}

.matewa-dashboard-page .matewa-agency-client-chip-grid .matewa-chip-editor-chip.is-two-line-editing textarea::placeholder {
    line-height: 1.16 !important;
}

/* =========================================================
   247ChatMate — AGENCYMAINEMAILPROFILEALIGNMENTFIX1
   Scope: Agency Hub sender profile card only.
   Keeps the agency-main email delivery profile aligned independently of
   the normal Setup panel and removes the wide-screen 4-column squeeze.
========================================================= */
.matewa-email-profile-card.is-agency .matewa-email-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 16px !important;
    align-items: stretch !important;
}

.matewa-email-profile-card.is-agency .matewa-email-profile-grid label {
    display: grid !important;
    grid-template-rows: 40px 46px !important;
    min-height: 94px !important;
    height: 94px !important;
    align-content: start !important;
    min-width: 0 !important;
}

.matewa-email-profile-card.is-agency .matewa-email-profile-grid label > span {
    min-height: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    line-height: 1.24 !important;
    overflow: hidden !important;
}

.matewa-email-profile-card.is-agency .matewa-email-profile-grid input,
.matewa-email-profile-card.is-agency .matewa-email-profile-grid select {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    vertical-align: middle !important;
}

.matewa-email-profile-card.is-agency .matewa-email-profile-grid input {
    line-height: 46px !important;
}

.matewa-email-profile-card.is-agency .matewa-email-profile-grid select {
    line-height: normal !important;
}

.matewa-email-profile-card.is-agency .matewa-email-profile-toggles {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 16px !important;
    align-items: center !important;
    margin-top: 14px !important;
}

.matewa-email-profile-card.is-agency .matewa-email-profile-toggles label {
    min-height: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

@media (max-width: 720px) {
    .matewa-email-profile-card.is-agency .matewa-email-profile-grid,
    .matewa-email-profile-card.is-agency .matewa-email-profile-toggles {
        grid-template-columns: 1fr !important;
    }

    .matewa-email-profile-card.is-agency .matewa-email-profile-grid label {
        grid-template-rows: auto 46px !important;
        min-height: 0 !important;
        height: auto !important;
    }

    .matewa-email-profile-card.is-agency .matewa-email-profile-grid label > span {
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }
}


/* =========================================================
   247ChatMate — MAINSETUPEMAILPROFILEFINALALIGN1
   Scope: Main Setup > Lead routing email delivery profile only.
   Purpose: make the normal-user email profile fields visually even,
   equal-height and internally aligned without affecting Agency Hub.
========================================================= */
.matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) {
    padding: 20px 20px 18px !important;
}

.matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-card__head {
    align-items: flex-start !important;
    margin-bottom: 18px !important;
}

.matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px 18px !important;
    align-items: stretch !important;
}

.matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-grid label {
    display: grid !important;
    grid-template-rows: 28px 48px !important;
    min-height: 76px !important;
    height: 76px !important;
    gap: 8px !important;
    align-content: start !important;
    min-width: 0 !important;
}

.matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-grid label > span {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 28px !important;
    height: 28px !important;
    line-height: 1.2 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

.matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-grid input,
.matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-grid select {
    display: block !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    line-height: normal !important;
    font-size: 14px !important;
}

.matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-toggles {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 18px !important;
    margin-top: 16px !important;
    align-items: center !important;
}

.matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-toggles label {
    min-height: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    line-height: 1.2 !important;
}

@media (max-width: 720px) {
    .matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-grid,
    .matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-toggles {
        grid-template-columns: 1fr !important;
    }

    .matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-grid label {
        grid-template-rows: auto 48px !important;
        min-height: 0 !important;
        height: auto !important;
    }

    .matewa-core-settings-grid .matewa-email-profile-card:not(.is-agency) .matewa-email-profile-grid label > span {
        min-height: 0 !important;
        height: auto !important;
        white-space: normal !important;
        overflow: visible !important;
    }
}

/* ======================================================================
   AGENCYSTATUSDISPLAYCARDEXPAND1
   Scope: Agency Hub table breathing room + Appearance & Pages rear-card expansion only.
   CSS-only. Does not change widget, chips, WhatsApp, licences, seats, exports, emails or save logic.
====================================================================== */

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-admin-main,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-admin-form-shell,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] [data-matewa-admin-panel="agency"],
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-admin-main,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-admin-form-shell,
    .matewa-dashboard-page[data-matewa-active-panel="display"] [data-matewa-admin-panel="settings"] {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table-wrap,
    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-grid,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-panel--wide,
    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-page-targeting-box {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="display"] #matewa-admin-panel-setup > .matewa-core-settings-shell {
        min-height: var(--matewa-admin-rear-card-height, max(640px, calc(100vh - 150px))) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-page-checkbox-list {
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell {
        width: 100% !important;
        max-width: none !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        padding-bottom: 2px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) {
        width: max(100%, 1440px) !important;
        min-width: 1440px !important;
        table-layout: fixed !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) th:nth-child(1),
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td:nth-child(1) {
        width: 235px !important;
        min-width: 235px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) th:nth-child(6),
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td:nth-child(6) {
        width: 330px !important;
        min-width: 330px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) th:nth-child(7),
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td:nth-child(7) {
        width: 178px !important;
        min-width: 178px !important;
        max-width: 178px !important;
        text-align: left !important;
        vertical-align: top !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) th:nth-child(8),
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td:nth-child(8) {
        width: 152px !important;
        min-width: 152px !important;
        max-width: 152px !important;
        text-align: left !important;
        vertical-align: top !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td[data-label="Status"] br {
        display: none !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td[data-label="Status"] > .matewa-agency-table-pill {
        display: inline-flex !important;
        width: 86px !important;
        min-width: 86px !important;
        max-width: 86px !important;
        min-height: 38px !important;
        height: 38px !important;
        margin: 0 0 10px !important;
        padding: 0 12px !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td[data-label="Status"] > span:not(.matewa-agency-table-pill) {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 0 9px !important;
        color: #64748b !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        line-height: 1.28 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) .matewa-agency-client-row-actions {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        margin: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) .matewa-agency-client-row-actions .button {
        width: 126px !important;
        min-width: 126px !important;
        max-width: 126px !important;
        min-height: 40px !important;
        height: 40px !important;
        padding: 0 14px !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td[data-label="Actions"] > .matewa-agency-client-row-note {
        display: block !important;
        width: 126px !important;
        min-height: 0 !important;
        margin: 10px 0 0 !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }
}

/* ==========================================================
   Agency client setup import map — AGENCYCLIENTIMPORTMAP1
   CSS-only presentation for the review-first import panel.
========================================================== */
.matewa-dashboard-page .matewa-agency-client-import-panel {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 22px 0 24px !important;
    padding: 20px !important;
    border-radius: 22px !important;
    border: 1px solid rgba(47, 150, 61, 0.18) !important;
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0.98)) !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06) !important;
    overflow: visible !important;
}

.matewa-dashboard-page .matewa-agency-client-import-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 18px !important;
    margin-bottom: 16px !important;
}

.matewa-dashboard-page .matewa-agency-client-import-head h3 {
    margin: 4px 0 6px !important;
    color: #0f172a !important;
    font-size: 19px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
}

.matewa-dashboard-page .matewa-agency-client-import-head p {
    margin: 0 !important;
    max-width: 760px !important;
    color: #475569 !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
}

.matewa-dashboard-page .matewa-agency-client-import-head em {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 30px !important;
    padding: 6px 11px !important;
    border-radius: 999px !important;
    background: rgba(22, 163, 74, 0.10) !important;
    color: #166534 !important;
    font-size: 11px !important;
    font-style: normal !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
}

.matewa-dashboard-page .matewa-agency-client-import-notice,
.matewa-dashboard-page .matewa-agency-client-import-warnings {
    margin: 0 0 14px !important;
    padding: 12px 14px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(47, 150, 61, 0.18) !important;
    background: rgba(255, 255, 255, 0.82) !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 1.4 !important;
}

.matewa-dashboard-page .matewa-agency-client-import-notice.is-success {
    border-color: rgba(34, 197, 94, 0.28) !important;
    background: rgba(240, 253, 244, 0.9) !important;
    color: #166534 !important;
}

.matewa-dashboard-page .matewa-agency-client-import-notice.is-warning,
.matewa-dashboard-page .matewa-agency-client-import-warnings {
    border-color: rgba(245, 158, 11, 0.26) !important;
    background: rgba(255, 251, 235, 0.92) !important;
    color: #92400e !important;
}

.matewa-dashboard-page .matewa-agency-client-import-upload {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: end !important;
    margin-bottom: 14px !important;
}

.matewa-dashboard-page .matewa-agency-client-import-upload label {
    display: grid !important;
    gap: 7px !important;
    margin: 0 !important;
}

.matewa-dashboard-page .matewa-agency-client-import-upload label span {
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

.matewa-dashboard-page .matewa-agency-client-import-upload input[type="file"] {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 42px !important;
    padding: 8px 10px !important;
    box-sizing: border-box !important;
    border-radius: 14px !important;
    border: 1px solid rgba(148, 163, 184, 0.42) !important;
    background: #ffffff !important;
    color: #0f172a !important;
}

.matewa-dashboard-page .matewa-agency-client-import-upload .button,
.matewa-dashboard-page .matewa-agency-client-import-actions .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 9px 18px !important;
    border-radius: 14px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
}

.matewa-dashboard-page .matewa-agency-client-import-review,
.matewa-dashboard-page .matewa-agency-client-import-last {
    margin-top: 16px !important;
    padding: 16px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(47, 150, 61, 0.18) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

.matewa-dashboard-page .matewa-agency-client-import-review-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin-bottom: 12px !important;
}

.matewa-dashboard-page .matewa-agency-client-import-review-head strong,
.matewa-dashboard-page .matewa-agency-client-import-last strong {
    display: block !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 900 !important;
}

.matewa-dashboard-page .matewa-agency-client-import-review-head span,
.matewa-dashboard-page .matewa-agency-client-import-last span,
.matewa-dashboard-page .matewa-agency-client-import-last small {
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 750 !important;
}

.matewa-dashboard-page .matewa-agency-client-import-review dl {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 0 0 14px !important;
}

.matewa-dashboard-page .matewa-agency-client-import-review dl > div {
    min-width: 0 !important;
    padding: 10px 11px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    background: rgba(248, 250, 252, 0.94) !important;
}

.matewa-dashboard-page .matewa-agency-client-import-review dt {
    margin: 0 0 5px !important;
    color: #64748b !important;
    font-size: 10.5px !important;
    font-weight: 850 !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
}

.matewa-dashboard-page .matewa-agency-client-import-review dd {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1.28 !important;
    overflow-wrap: anywhere !important;
}

.matewa-dashboard-page .matewa-agency-client-import-warnings strong {
    display: block !important;
    margin-bottom: 6px !important;
}

.matewa-dashboard-page .matewa-agency-client-import-warnings ul {
    margin: 0 0 0 18px !important;
}

.matewa-dashboard-page .matewa-agency-client-import-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: center !important;
}

.matewa-dashboard-page .matewa-agency-client-import-panel > .description {
    margin: 12px 0 0 !important;
    color: #64748b !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-panel {
    border-color: rgba(74, 222, 128, 0.20) !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92)) !important;
    box-shadow: none !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-head h3,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-upload label span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-review-head strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-last strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-review dd {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-head p,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-review-head span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-last span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-last small,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-panel > .description {
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-upload input[type="file"],
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-review,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-last,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-review dl > div {
    border-color: rgba(148, 163, 184, 0.22) !important;
    background: rgba(15, 23, 42, 0.72) !important;
    color: #f8fafc !important;
}

@media (max-width: 1100px) {
    .matewa-dashboard-page .matewa-agency-client-import-review dl {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    .matewa-dashboard-page .matewa-agency-client-import-head,
    .matewa-dashboard-page .matewa-agency-client-import-review-head {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .matewa-dashboard-page .matewa-agency-client-import-upload {
        grid-template-columns: 1fr !important;
    }

    .matewa-dashboard-page .matewa-agency-client-import-review dl {
        grid-template-columns: 1fr !important;
    }
}

/* AGENCYSITEPAGESCAN1 — Agency Hub page scan controls */
.matewa-dashboard-page .matewa-agency-page-scan-panel {
    margin-top: 16px !important;
    padding: 16px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(47, 150, 61, 0.16) !important;
    background: rgba(248, 250, 252, 0.92) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin-bottom: 12px !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-head strong {
    display: block !important;
    color: #0f172a !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-head small,
.matewa-dashboard-page .matewa-agency-page-scan-meta {
    display: block !important;
    margin: 4px 0 0 !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.45 !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-head .button {
    min-width: 128px !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 12px 0 !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-row {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: flex-start !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    background: #ffffff !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-row input {
    margin-top: 3px !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-row strong,
.matewa-dashboard-page .matewa-agency-page-scan-row small,
.matewa-dashboard-page .matewa-agency-page-scan-row a {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-row a {
    text-decoration: none !important;
    outline-offset: 3px !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-row a:hover,
.matewa-dashboard-page .matewa-agency-page-scan-row a:focus-visible {
    text-decoration: underline !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-row strong {
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

.matewa-dashboard-page .matewa-agency-page-scan-row small {
    margin-top: 2px !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 650 !important;
}

.matewa-dashboard-page .matewa-agency-client-row-actions .button {
    width: 132px !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-page-scan-panel {
    background: rgba(15, 23, 42, 0.74) !important;
    border-color: rgba(74, 222, 128, 0.18) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-page-scan-head strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-page-scan-row strong {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-page-scan-head small,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-page-scan-meta,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-page-scan-row small {
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-page-scan-row {
    background: rgba(15, 23, 42, 0.88) !important;
    border-color: rgba(148, 163, 184, 0.20) !important;
}

@media (max-width: 1100px) {
    .matewa-dashboard-page .matewa-agency-page-scan-list {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 720px) {
    .matewa-dashboard-page .matewa-agency-page-scan-head {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .matewa-dashboard-page .matewa-agency-page-scan-head .button {
        width: 100% !important;
    }
}


/* AGENCYCLIENTSETUPKEY1 — client-site one-time setup key panel */
.matewa-dashboard-page .matewa-agency-client-setup-key-panel {
    margin-top: 18px !important;
}

.matewa-dashboard-page .matewa-agency-client-setup-key-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-top: 14px !important;
}

.matewa-dashboard-page .matewa-agency-client-setup-key-grid > div {
    min-width: 0 !important;
    padding: 12px 14px !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.82) !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page .matewa-agency-client-setup-key-grid span,
.matewa-dashboard-page .matewa-agency-client-setup-key-output label,
.matewa-dashboard-page .matewa-agency-client-setup-key-output small {
    display: block !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
}

.matewa-dashboard-page .matewa-agency-client-setup-key-grid strong {
    display: block !important;
    margin-top: 4px !important;
    color: #0f172a !important;
    font-size: 12.5px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
    word-break: break-word !important;
}

.matewa-dashboard-page .matewa-agency-client-setup-key-output {
    margin-top: 14px !important;
    padding: 14px !important;
    border: 1px solid rgba(47, 150, 61, 0.18) !important;
    border-radius: 18px !important;
    background: rgba(240, 253, 244, 0.78) !important;
}

.matewa-dashboard-page .matewa-agency-client-setup-key-output input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 6px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-setup-key-grid > div {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: rgba(15, 23, 42, 0.62) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-setup-key-grid strong {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-setup-key-output {
    border-color: rgba(74, 222, 128, 0.20) !important;
    background: rgba(20, 83, 45, 0.20) !important;
}

@media (max-width: 1100px) {
    .matewa-dashboard-page .matewa-agency-client-setup-key-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 720px) {
    .matewa-dashboard-page .matewa-agency-client-setup-key-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   AGENCYREMOTESETUPTESTCOLLAPSE1 — Agency Hub local push test visual containment
   Scope: admin-only Agency Hub display. Keeps test facility hidden until opened.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-test-panel {
    margin-top: 18px !important;
    border-color: rgba(34, 197, 94, 0.18) !important;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 58%),
        rgba(255, 255, 255, 0.92) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-test-panel > summary {
    min-height: 46px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-test-panel > summary span {
    color: #0f172a !important;
    font-weight: 900 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-test-panel > summary small {
    color: #526173 !important;
    font-weight: 750 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-test-panel .matewa-agency-remote-push-test-body {
    display: grid !important;
    gap: 16px !important;
    padding: 18px !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-test-panel {
    background:
        radial-gradient(circle at top right, rgba(74, 222, 128, 0.09), transparent 58%),
        rgba(15, 23, 42, 0.94) !important;
    border-color: rgba(74, 222, 128, 0.22) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-test-panel > summary span {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-test-panel > summary small {
    color: #cbd5e1 !important;
}


/* =========================================================
   AGENCYKEYAGENCYMOVECOLLAPSE1 — Agency Hub declutter + setup key move
   Scope: admin-only Agency Hub display. No widget/chip/licence logic changes.
========================================================= */
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-accordion {
    display: grid !important;
    gap: 14px !important;
    margin-top: 16px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail {
    display: block !important;
    border: 1px solid rgba(47, 150, 61, 0.16) !important;
    border-radius: 24px !important;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 58%),
        rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05) !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    min-height: 62px !important;
    padding: 16px 18px !important;
    position: relative !important;
    cursor: pointer !important;
    list-style: none !important;
    border-radius: 24px !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary::-webkit-details-marker {
    display: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary span {
    color: #0f172a !important;
    font-size: 14px !important;
    font-weight: 950 !important;
    line-height: 1.2 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary small {
    display: block !important;
    max-width: 760px !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
    text-align: right !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary::after {
    content: "↓" !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 999px !important;
    background: rgba(47, 150, 61, 0.10) !important;
    color: #166534 !important;
    font-size: 15px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail[open] > summary {
    border-bottom: 1px solid rgba(47, 150, 61, 0.12) !important;
    border-radius: 24px 24px 0 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail[open] > summary::after {
    content: "↑" !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-body {
    padding: 18px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-body > :first-child {
    margin-top: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-body > :last-child {
    margin-bottom: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-setup-key-panel {
    margin: 0 0 18px !important;
}

.matewa-dashboard-page .matewa-agency-client-import-actions {
    margin-top: 14px !important;
}

.matewa-dashboard-page .matewa-agency-client-import-actions .button.matewa-button-muted,
.matewa-dashboard-page .button.matewa-button-muted {
    background: #f8fafc !important;
    border-color: rgba(47, 150, 61, 0.34) !important;
    color: #166534 !important;
    box-shadow: none !important;
}

.matewa-dashboard-page .matewa-agency-client-import-actions .button.matewa-button-muted:hover,
.matewa-dashboard-page .matewa-agency-client-import-actions .button.matewa-button-muted:focus-visible,
.matewa-dashboard-page .button.matewa-button-muted:hover,
.matewa-dashboard-page .button.matewa-button-muted:focus-visible {
    background: rgba(240, 253, 244, 0.98) !important;
    border-color: rgba(47, 150, 61, 0.58) !important;
    color: #14532d !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail {
    border-color: rgba(74, 222, 128, 0.18) !important;
    background:
        radial-gradient(circle at top right, rgba(74, 222, 128, 0.10), transparent 58%),
        rgba(15, 23, 42, 0.92) !important;
    box-shadow: none !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary span {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary small {
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-agency-client-import-actions .button.matewa-button-muted,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .button.matewa-button-muted {
    background: rgba(15, 23, 42, 0.74) !important;
    border-color: rgba(74, 222, 128, 0.32) !important;
    color: #bbf7d0 !important;
}

@media (max-width: 900px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary small {
        text-align: left !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary::after {
        position: absolute !important;
        right: 18px !important;
        top: 16px !important;
    }
}

/* AGENCYIMPORTFALLBACKMOVE1: keep manual JSON import off Setup and tucked into Agency Hub. */
.matewa-dashboard-page .matewa-agency-client-import-fallback {
    margin: 16px 0 18px;
}

.matewa-dashboard-page .matewa-agency-client-import-fallback .matewa-agency-client-import-panel {
    margin: 14px 0 0;
}

.matewa-dashboard-page .matewa-agency-client-import-fallback .matewa-agency-client-import-head h3 {
    margin-top: 4px;
}


/* =========================================================
   AGENCYBUTTONSTYLEVISUALQA1 — Agency Hub and Setup button visual QA
   Scope: CSS-only admin visual containment.
   - Standardise Agency Hub action buttons to the green/neutral product language.
   - Keep destructive/revoke-style controls muted and non-blue.
   - Keep Setup page secondary buttons neutral where WordPress default styling leaks through.
   No widget, chip, WhatsApp, lead, licence, seat, JSON import/export or remote push logic changes.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button,
.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-shell .button,
.matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-shell .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 40px !important;
    padding: 9px 16px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-primary,
.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-shell .button.button-primary,
.matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-shell .button.button-primary {
    background: linear-gradient(135deg, var(--matewa-polish-green, #16a34a), var(--matewa-polish-green-deep, #15803d)) !important;
    border: 1px solid rgba(21, 128, 61, 0.56) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 30px rgba(22, 163, 74, 0.22) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-primary:hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-primary:focus-visible,
.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-shell .button.button-primary:hover,
.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-shell .button.button-primary:focus-visible,
.matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-shell .button.button-primary:hover,
.matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-shell .button.button-primary:focus-visible {
    background: linear-gradient(135deg, var(--matewa-polish-green-deep, #15803d), var(--matewa-polish-green, #16a34a)) !important;
    border-color: rgba(34, 197, 94, 0.66) !important;
    color: #ffffff !important;
    box-shadow: 0 18px 38px rgba(22, 163, 74, 0.28), 0 0 0 3px rgba(34, 197, 94, 0.14) !important;
    outline: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button:not(.button-primary),
.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-shell .button.button-secondary,
.matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-shell .button.button-secondary {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(22, 163, 74, 0.34) !important;
    color: var(--matewa-polish-green-deep, #15803d) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary:hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary:focus-visible,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button:not(.button-primary):hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button:not(.button-primary):focus-visible,
.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-shell .button.button-secondary:hover,
.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-settings-shell .button.button-secondary:focus-visible,
.matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-shell .button.button-secondary:hover,
.matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-settings-shell .button.button-secondary:focus-visible {
    background: #f0fdf4 !important;
    border-color: rgba(22, 163, 74, 0.58) !important;
    color: var(--matewa-polish-green-deep, #15803d) !important;
    box-shadow: 0 14px 30px rgba(22, 163, 74, 0.14) !important;
    outline: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.matewa-button-muted,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary.matewa-button-muted {
    background: #f8fafc !important;
    border-color: rgba(47, 150, 61, 0.30) !important;
    color: #166534 !important;
    box-shadow: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.matewa-button-muted:hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.matewa-button-muted:focus-visible,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary.matewa-button-muted:hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary.matewa-button-muted:focus-visible {
    background: rgba(240, 253, 244, 0.98) !important;
    border-color: rgba(47, 150, 61, 0.54) !important;
    color: #14532d !important;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.10) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary.is-danger {
    background: #fff7ed !important;
    border-color: rgba(251, 146, 60, 0.42) !important;
    color: #9a3412 !important;
    box-shadow: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary.is-danger:hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary.is-danger:focus-visible {
    background: #ffedd5 !important;
    border-color: rgba(249, 115, 22, 0.58) !important;
    color: #7c2d12 !important;
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.12) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary {
    align-items: flex-start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary span {
    flex: 0 0 260px !important;
    max-width: 260px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary small {
    flex: 1 1 auto !important;
    max-width: none !important;
    margin-right: 40px !important;
    text-align: left !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-import-fallback:not([open]) .matewa-agency-client-import-fallback-body,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-test-panel:not([open]) .matewa-agency-remote-push-test-body {
    display: none !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button:not(.button-primary),
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="setup"] .matewa-core-settings-shell .button.button-secondary,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="display"] .matewa-core-settings-shell .button.button-secondary {
    background: rgba(15, 23, 42, 0.78) !important;
    border-color: rgba(74, 222, 128, 0.34) !important;
    color: #bbf7d0 !important;
    box-shadow: none !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary:hover,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button.button-secondary:focus-visible,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button:not(.button-primary):hover,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-hub-shell .button:not(.button-primary):focus-visible,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="setup"] .matewa-core-settings-shell .button.button-secondary:hover,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="setup"] .matewa-core-settings-shell .button.button-secondary:focus-visible,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="display"] .matewa-core-settings-shell .button.button-secondary:hover,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="display"] .matewa-core-settings-shell .button.button-secondary:focus-visible {
    background: rgba(20, 83, 45, 0.34) !important;
    border-color: rgba(134, 239, 172, 0.48) !important;
    color: #dcfce7 !important;
}

@media (max-width: 900px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary span {
        flex-basis: auto !important;
        max-width: calc(100% - 48px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-section-detail > summary small {
        margin-right: 0 !important;
    }
}

/* ======================================================================
   AGENCYCLIENTDOMAINCOPYFIELD1
   Scope: Agency Hub client setup pack table only.
   Adds a full HTTPS client URL field that can be selected/copied without
   altering saved setup pack data, remote push logic, widget, chips or licences.
====================================================================== */

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table td .matewa-agency-client-copy-domain {
    display: block !important;
    margin: 5px 0 4px !important;
    max-width: 100% !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table td .matewa-agency-client-copy-domain > span {
    display: block !important;
    margin: 0 0 3px !important;
    color: #64748b !important;
    font-size: 10.5px !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.035em !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table td .matewa-agency-client-copy-domain input[readonly] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    border: 1px solid rgba(16, 185, 129, 0.24) !important;
    border-radius: 9px !important;
    background: rgba(240, 253, 244, 0.88) !important;
    color: #064e3b !important;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    cursor: text !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table td .matewa-agency-client-copy-domain input[readonly]:focus {
    border-color: rgba(5, 150, 105, 0.52) !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12) !important;
    outline: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-table td .matewa-agency-client-pack-id {
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    word-break: break-word !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-table td .matewa-agency-client-copy-domain > span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-table td .matewa-agency-client-pack-id {
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-table td .matewa-agency-client-copy-domain input[readonly] {
    background: rgba(6, 78, 59, 0.35) !important;
    border-color: rgba(52, 211, 153, 0.32) !important;
    color: #ecfdf5 !important;
}

/* =========================================================
   AGENCYSETUPKEYBOTTOMDROPDOWN1 — Setup page remote key containment
   Scope: admin-only Setup page. Moves non-agency remote setup key into a collapsed step.
========================================================= */


.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-remote-key-detail {
    margin-top: 10px !important;
    border-color: rgba(47, 150, 61, 0.16) !important;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 58%),
        rgba(255, 255, 255, 0.94) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-remote-key-detail > summary {
    min-height: 46px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-remote-key-detail > summary span {
    color: #0f172a !important;
    font-weight: 900 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-remote-key-detail > summary small {
    color: #526173 !important;
    font-weight: 750 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-remote-key-detail__body {
    padding: 16px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-remote-key-detail .matewa-agency-client-setup-key-panel {
    margin: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-setup-remote-key-detail .matewa-agency-client-import-head {
    gap: 12px !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="setup"] .matewa-setup-remote-key-detail {
    background:
        radial-gradient(circle at top right, rgba(74, 222, 128, 0.09), transparent 58%),
        rgba(15, 23, 42, 0.94) !important;
    border-color: rgba(74, 222, 128, 0.22) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="setup"] .matewa-setup-remote-key-detail > summary span {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="setup"] .matewa-setup-remote-key-detail > summary small {
    color: #cbd5e1 !important;
}


/* =========================================================
   AGENCYSETUPKEYVISIBLESETUPSTEP5FIX1 — Setup key panel visibility
   Scope: admin-only Setup page. The remote setup key panel must show as Step 5
   even though earlier setup/display split CSS hides generic wide panels.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-remote-setup-key-panel {
    display: block !important;
    grid-column: 1 / -1 !important;
    order: 5 !important;
    min-height: 0 !important;
    height: auto !important;
}

.matewa-dashboard-page[data-matewa-active-panel="setup"] .matewa-core-support-diagnostics-panel {
    display: block !important;
    grid-column: 1 / -1 !important;
    order: 6 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="display"] .matewa-core-remote-setup-key-panel {
    display: none !important;
}

/* =========================================================
   247ChatMate — EMAILSENDERADVANCEDCOLLAPSE1
   Scope: Setup > Lead routing > Advanced email sender settings only.
   Keeps the future email-route architecture available but collapsed so
   normal clients focus on the Lead destination inbox first.
========================================================= */
.matewa-core-settings-grid details.matewa-email-profile-card--advanced {
    display: block !important;
    margin-top: 16px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.matewa-core-settings-grid details.matewa-email-profile-card--advanced > summary {
    list-style: none !important;
    cursor: pointer !important;
    padding: 18px 20px !important;
    border-radius: 18px !important;
    outline: none !important;
}

.matewa-core-settings-grid details.matewa-email-profile-card--advanced > summary::-webkit-details-marker {
    display: none !important;
}

.matewa-core-settings-grid details.matewa-email-profile-card--advanced > summary::after {
    content: "Open";
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 12px !important;
    min-height: 30px !important;
    padding: 0 13px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(34, 197, 94, 0.32) !important;
    background: rgba(240, 253, 244, 0.92) !important;
    color: #047857 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

.matewa-core-settings-grid details.matewa-email-profile-card--advanced[open] > summary::after {
    content: "Close";
}

.matewa-core-settings-grid details.matewa-email-profile-card--advanced .matewa-email-profile-card__head {
    margin-bottom: 0 !important;
    align-items: flex-start !important;
}

.matewa-core-settings-grid details.matewa-email-profile-card--advanced .matewa-email-profile-card__body {
    padding: 0 20px 20px !important;
}

.matewa-core-settings-grid .matewa-email-profile-architecture-note {
    display: grid !important;
    grid-template-columns: minmax(0, auto) 1fr !important;
    gap: 6px 8px !important;
    align-items: start !important;
    margin: 2px 0 16px !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    background: rgba(255, 255, 255, 0.74) !important;
    color: #365174 !important;
    font-size: 12px !important;
    line-height: 1.42 !important;
}

.matewa-core-settings-grid .matewa-email-profile-architecture-note strong {
    color: #071227 !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

@media (max-width: 720px) {
    .matewa-core-settings-grid details.matewa-email-profile-card--advanced > summary {
        padding: 16px !important;
    }

    .matewa-core-settings-grid details.matewa-email-profile-card--advanced .matewa-email-profile-card__body {
        padding: 0 16px 16px !important;
    }

    .matewa-core-settings-grid .matewa-email-profile-architecture-note {
        grid-template-columns: 1fr !important;
    }

    .matewa-core-settings-grid .matewa-email-profile-architecture-note strong {
        white-space: normal !important;
    }
}


/* =========================================================
   247ChatMate — EMAILSENDERARCHITECTURELOCK1
   Scope: Setup advanced sender and Agency Hub sender architecture.
   Purpose: expose only complete/safe email routes; hide unbuilt provider choices.
========================================================= */
.matewa-email-profile-card--agency-advanced {
    display: block !important;
    margin-top: 16px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.matewa-email-profile-card--agency-advanced > summary {
    list-style: none !important;
    cursor: pointer !important;
    padding: 18px 20px !important;
    border-radius: 18px !important;
    outline: none !important;
}

.matewa-email-profile-card--agency-advanced > summary::-webkit-details-marker {
    display: none !important;
}

.matewa-email-profile-card--agency-advanced > summary::after {
    content: "Open";
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 12px 0 0 20px !important;
    min-height: 30px !important;
    padding: 0 13px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(34, 197, 94, 0.32) !important;
    background: rgba(240, 253, 244, 0.92) !important;
    color: #047857 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

.matewa-email-profile-card--agency-advanced[open] > summary::after {
    content: "Close";
}

.matewa-email-profile-card--agency-advanced .matewa-email-profile-card__head {
    margin-bottom: 0 !important;
}

.matewa-email-profile-card--agency-advanced .matewa-email-profile-card__body {
    padding: 0 20px 20px !important;
}

.matewa-email-profile-architecture-note.is-locked {
    border-color: rgba(34, 197, 94, 0.24) !important;
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.90)) !important;
}

.matewa-email-architecture-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 0 0 16px !important;
}

.matewa-email-architecture-pill {
    min-height: 66px !important;
    padding: 12px 14px !important;
    border-radius: 15px !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    background: rgba(255, 255, 255, 0.80) !important;
    box-sizing: border-box !important;
}

.matewa-email-architecture-pill span {
    display: block !important;
    margin: 0 0 5px !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
}

.matewa-email-architecture-pill strong {
    display: block !important;
    color: #071227 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1.3 !important;
}

.matewa-email-architecture-pill.is-ready {
    border-color: rgba(34, 197, 94, 0.28) !important;
    background: rgba(240, 253, 244, 0.72) !important;
}

.matewa-email-architecture-pill.is-locked {
    border-color: rgba(234, 179, 8, 0.28) !important;
    background: rgba(254, 252, 232, 0.64) !important;
}

.matewa-email-profile-card input[readonly] {
    background: rgba(248, 250, 252, 0.92) !important;
    color: #365174 !important;
    cursor: default !important;
}

@media (max-width: 720px) {
    .matewa-email-architecture-grid {
        grid-template-columns: 1fr !important;
    }

    .matewa-email-profile-card--agency-advanced > summary {
        padding: 16px !important;
    }

    .matewa-email-profile-card--agency-advanced .matewa-email-profile-card__body {
        padding: 0 16px 16px !important;
    }

    .matewa-email-profile-card--agency-advanced > summary::after {
        margin-left: 16px !important;
    }
}

/* =========================================================
   AGENCYEMAILPROXYARCHITECTURE1 — Agency-owned proxy storage
   Scope: Agency Hub > Agency email proxy & sender settings dropdown only.
   Purpose: keep sender/proxy architecture out of normal Setup while allowing
   agencies to store proxy endpoint + hashed token details safely for later routing.
========================================================= */
.matewa-core-settings-grid details.matewa-email-profile-card--advanced {
    display: none !important;
}

.matewa-email-proxy-box {
    display: block !important;
    margin: 16px 0 14px !important;
    padding: 16px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(34, 197, 94, 0.22) !important;
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0.88)) !important;
    box-sizing: border-box !important;
}

.matewa-email-proxy-box__head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin: 0 0 14px !important;
}

.matewa-email-proxy-box__head strong {
    display: block !important;
    margin: 0 0 4px !important;
    color: #071227 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
}

.matewa-email-proxy-box__head span {
    display: block !important;
    max-width: 780px !important;
    color: #365174 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
}

.matewa-email-proxy-box__head em {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    min-height: 28px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(34, 197, 94, 0.22) !important;
    background: rgba(220, 252, 231, 0.88) !important;
    color: #047857 !important;
    font-size: 11px !important;
    font-style: normal !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

.matewa-email-proxy-toggle,
.matewa-email-proxy-clear {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 12px !important;
    color: #12325a !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1.35 !important;
}

.matewa-email-proxy-toggle input,
.matewa-email-proxy-clear input {
    margin: 0 !important;
}

.matewa-email-profile-grid.is-proxy-grid {
    margin-top: 10px !important;
}

.matewa-email-architecture-pill.is-warning {
    border-color: rgba(245, 158, 11, 0.30) !important;
    background: rgba(255, 251, 235, 0.72) !important;
}

@media (max-width: 720px) {
    .matewa-email-proxy-box__head {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .matewa-email-proxy-box__head em {
        justify-self: start !important;
        white-space: normal !important;
        text-align: left !important;
    }
}


/* =========================================================
   AGENCYREMOTEPUSHFLOWUX1 — Agency remote push flow order + domain input
   Scope: Agency Hub admin only. Moves remote push beneath client setup packs
   and lets agencies type a domain while HTTPS is enforced server-side.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-flow-note,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-next-step {
    display: block !important;
    margin: 14px 0 0 !important;
    padding: 12px 14px !important;
    border: 1px solid rgba(34, 197, 94, 0.20) !important;
    border-radius: 14px !important;
    background: rgba(240, 253, 244, 0.72) !important;
    color: #14532d !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 1.45 !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-flow-note {
    margin-top: 18px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-next-step strong,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-flow-note strong {
    color: #064e3b !important;
    font-weight: 950 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-url-input-label {
    gap: 6px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-url-prefix-field {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    border: 1px solid rgba(47, 150, 61, 0.24) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-url-prefix {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    padding: 0 10px !important;
    border-right: 1px solid rgba(47, 150, 61, 0.18) !important;
    background: rgba(240, 253, 244, 0.78) !important;
    color: #166534 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-url-prefix-field input[type="text"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-url-prefix-field:focus-within {
    border-color: rgba(47, 150, 61, 0.50) !important;
    box-shadow: 0 0 0 3px rgba(47, 150, 61, 0.10) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-url-input-label > small {
    display: block !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-flow-note,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-next-step {
    border-color: rgba(74, 222, 128, 0.24) !important;
    background: rgba(20, 83, 45, 0.18) !important;
    color: #dcfce7 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-next-step strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-flow-note strong {
    color: #bbf7d0 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-url-prefix-field {
    border-color: rgba(74, 222, 128, 0.28) !important;
    background: rgba(15, 23, 42, 0.76) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-url-prefix {
    border-right-color: rgba(74, 222, 128, 0.24) !important;
    background: rgba(20, 83, 45, 0.28) !important;
    color: #bbf7d0 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-url-input-label > small {
    color: #cbd5e1 !important;
}

/* AGENCYREMOTEPUSHPOSTSENDACTIONS1 — post-send refresh/update actions */
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-post-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 12px !important;
    align-items: center !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-post-actions .button {
    min-height: 34px !important;
    border-radius: 12px !important;
    border-color: rgba(47, 150, 61, 0.26) !important;
    background: #ffffff !important;
    color: #166534 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-post-actions .button:hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-post-actions .button:focus {
    border-color: rgba(47, 150, 61, 0.42) !important;
    background: rgba(240, 253, 244, 0.96) !important;
    color: #14532d !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-post-note {
    display: block !important;
    margin-top: 8px !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    line-height: 1.45 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-post-actions .button {
    border-color: rgba(74, 222, 128, 0.28) !important;
    background: rgba(15, 23, 42, 0.82) !important;
    color: #bbf7d0 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-post-actions .button:hover,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-post-actions .button:focus {
    border-color: rgba(74, 222, 128, 0.44) !important;
    background: rgba(20, 83, 45, 0.28) !important;
    color: #dcfce7 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-post-note {
    color: #cbd5e1 !important;
}

/* =========================================================
   AGENCYREMOTEPUSHINLINECLIENTFLOW1 — keep remote push inside client setup pack
   Scope: Agency Hub admin UI only. No frontend widget/chip/lead logic changes.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-inline-tools {
    display: grid !important;
    gap: 0 !important;
    margin: 2px 0 0 !important;
    border: 1px solid rgba(34, 197, 94, 0.20) !important;
    border-radius: 16px !important;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.07), transparent 54%),
        rgba(255, 255, 255, 0.88) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-inline-tools > summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    min-height: 46px !important;
    padding: 12px 14px !important;
    cursor: pointer !important;
    list-style: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-inline-tools > summary::-webkit-details-marker {
    display: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-inline-tools > summary::after {
    content: "→" !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 999px !important;
    background: rgba(34, 197, 94, 0.10) !important;
    color: #166534 !important;
    font-size: 13px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-inline-tools[open] > summary::after {
    content: "↓" !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-inline-tools > summary span {
    display: block !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 950 !important;
    line-height: 1.2 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pack-inline-tools > summary small {
    display: block !important;
    color: #64748b !important;
    font-size: 11.5px !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-inline-body {
    display: grid !important;
    gap: 12px !important;
    padding: 0 14px 14px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-grid {
    grid-template-columns: 1.2fr 1fr 1fr !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-success-summary {
    display: grid !important;
    gap: 7px !important;
    padding: 12px 14px !important;
    border: 1px solid rgba(34, 197, 94, 0.26) !important;
    border-radius: 14px !important;
    background: rgba(240, 253, 244, 0.84) !important;
    color: #14532d !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-success-summary strong {
    color: #064e3b !important;
    font-size: 13px !important;
    font-weight: 950 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-success-summary span,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-success-summary small {
    color: #166534 !important;
    font-size: 11.5px !important;
    font-weight: 750 !important;
    line-height: 1.4 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-audit {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 14px !important;
    background: rgba(248, 250, 252, 0.82) !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-audit > summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    min-height: 40px !important;
    padding: 10px 12px !important;
    cursor: pointer !important;
    list-style: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-audit > summary::-webkit-details-marker {
    display: none !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-audit > summary span {
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-audit > summary small {
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 750 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-audit .matewa-agency-bundle-note {
    margin: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pack-inline-tools {
    border-color: rgba(74, 222, 128, 0.23) !important;
    background:
        radial-gradient(circle at top right, rgba(74, 222, 128, 0.08), transparent 54%),
        rgba(15, 23, 42, 0.92) !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pack-inline-tools > summary span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-audit > summary span {
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pack-inline-tools > summary small,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-audit > summary small {
    color: #cbd5e1 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pack-inline-tools > summary::after {
    background: rgba(74, 222, 128, 0.14) !important;
    color: #bbf7d0 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-success-summary {
    border-color: rgba(74, 222, 128, 0.27) !important;
    background: rgba(20, 83, 45, 0.20) !important;
    color: #dcfce7 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-success-summary strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-success-summary span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-success-summary small {
    color: #dcfce7 !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-remote-push-audit {
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: rgba(15, 23, 42, 0.76) !important;
}

@media (max-width: 1100px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-grid {
        grid-template-columns: 1fr !important;
    }
}

/* AGENCYREMOTESENDINGWIDGETSCOPE1 — isolated remote sending scope inside client setup packs */
.matewa-agency-remote-sending-scope {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(46, 125, 50, 0.18);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.86), rgba(255, 255, 255, 0.96));
}

.matewa-agency-client-pack-section-head.is-compact {
    margin-bottom: 12px;
}

.matewa-agency-client-pack-step.is-soft {
    background: rgba(46, 125, 50, 0.12);
    color: #256b2f;
    border: 1px solid rgba(46, 125, 50, 0.22);
}

.matewa-agency-remote-sending-scope-grid {
    margin-bottom: 12px;
}

.matewa-agency-page-scan-panel--collapsed {
    margin-top: 12px;
    border: 1px solid rgba(46, 125, 50, 0.15) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.76) !important;
    overflow: hidden;
}

.matewa-agency-page-scan-panel--collapsed > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}

.matewa-agency-page-scan-panel--collapsed > summary::-webkit-details-marker {
    display: none;
}

.matewa-agency-page-scan-panel--collapsed > summary span {
    font-weight: 800;
    color: #0f2418;
}

.matewa-agency-page-scan-panel--collapsed > summary small {
    color: #587061;
    font-weight: 700;
}

.matewa-agency-page-scan-panel--collapsed > summary::after {
    content: '+';
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 125, 50, 0.12);
    color: #256b2f;
    font-weight: 900;
}

.matewa-agency-page-scan-panel--collapsed[open] > summary::after {
    content: '−';
}

.matewa-agency-page-scan-body {
    padding: 0 16px 16px;
}


/* =========================================================
   AGENCYCLIENTREMOTEUXANDFREEMIUMFIX1
   Scope: Agency Hub remote sending layout + client Freemium preview centring only.
   No frontend widget renderer/chip runtime changes.
========================================================= */
.matewa-settings-card .matewa-freemium-chip-grid,
.matewa-freemium-button-preview-card .matewa-chip-grid {
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: center !important;
}

.matewa-freemium-button-preview-card .matewa-chip-grid {
    grid-template-columns: repeat(2, minmax(0, 92px)) !important;
    max-width: 200px !important;
    gap: 8px !important;
}

.matewa-freemium-button-preview-card .matewa-chip-box {
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
}

.matewa-freemium-button-preview-card.is-agency-managed-client {
    border-color: rgba(34, 197, 94, 0.24) !important;
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0.98)) !important;
}

.matewa-agency-client-support-note {
    border: 1px solid rgba(34, 197, 94, 0.20) !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
    background: rgba(240, 253, 244, 0.82) !important;
    color: #14532d !important;
    font-weight: 800 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-sending-scope {
    margin-top: 14px !important;
    padding: 14px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-sending-scope .matewa-agency-client-pack-section-head.is-compact {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-sending-scope-grid {
    grid-template-columns: minmax(220px, 0.6fr) minmax(0, 1fr) !important;
    align-items: start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-grid.is-client-detail-aligned {
    display: grid !important;
    grid-template-columns: minmax(230px, 1fr) minmax(230px, 1fr) minmax(230px, 1fr) !important;
    gap: 14px !important;
    align-items: start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-grid.is-client-detail-aligned label {
    align-self: start !important;
    min-width: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-grid.is-client-detail-aligned select,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-grid.is-client-detail-aligned input,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-url-prefix-field {
    min-height: 42px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-grid.is-client-detail-aligned select {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] #matewa-agency-remote-push-panel {
    scroll-margin-top: 110px !important;
}

@media (max-width: 1180px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-push-grid.is-client-detail-aligned,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-remote-sending-scope-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   FREEMIUMPREVIEWVERTICALCENTRE1
   Scope: Admin-only Freemium / agency-managed button preview text alignment.
   No frontend widget runtime changes.
========================================================= */
.matewa-dashboard-page[data-matewa-active-panel="buttons"] .matewa-freemium-button-preview-card .matewa-freemium-chip-grid .matewa-chip-box,
.matewa-dashboard-page[data-matewa-active-panel="buttons"] .matewa-freemium-button-preview-card .matewa-chip-grid .matewa-chip-box,
.matewa-freemium-button-preview-card .matewa-freemium-chip-grid .matewa-chip-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    align-content: center !important;
    place-content: center !important;
    min-height: 52px !important;
    height: 52px !important;
    padding: 0 8px !important;
    line-height: 1.16 !important;
    text-align: center !important;
    vertical-align: middle !important;
}


/* =========================================================
   FREEMIUMPREVIEWCOPYCHIPCSS1
   Scope: Admin-only Freemium / agency-managed preview now reuses the normal chip-preview structure.
   No frontend widget runtime changes.
========================================================= */
.matewa-dashboard-page[data-matewa-active-panel="buttons"] .matewa-freemium-button-preview-card .matewa-freemium-chip-grid .matewa-freemium-preview-chip {
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 6px 8px !important;
    border-radius: 14px !important;
    border: 1.5px solid var(--matewa-polish-green, #16a34a) !important;
    background: #ffffff !important;
    color: var(--matewa-polish-green, #16a34a) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    overflow: hidden !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="buttons"] .matewa-freemium-button-preview-card .matewa-freemium-chip-grid .matewa-freemium-preview-chip span {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: 34px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: 11.2px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    overflow: hidden !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

/* CLIENTMAILDELIVERYOPTIONS1 — lightweight client-side mail delivery controls */
.matewa-client-mail-delivery-zone {
    margin-top: 12px;
    border: 1px solid rgba(46, 125, 50, 0.18);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0.98));
    overflow: hidden;
}

.matewa-client-mail-delivery-zone > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 14px 16px;
    font-weight: 800;
    color: #14532d;
}

.matewa-client-mail-delivery-card {
    padding: 16px;
    border-top: 1px solid rgba(46, 125, 50, 0.14);
}

.matewa-client-mail-delivery-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.matewa-client-mail-delivery-heading strong {
    display: block;
    color: #061532;
    font-size: 14px;
    font-weight: 900;
}

.matewa-client-mail-delivery-heading p,
.matewa-client-mail-provider-note {
    margin: 4px 0 0;
    color: #48607a;
    font-size: 12px;
    line-height: 1.45;
}

.matewa-client-mail-status-pill {
    flex: 0 0 auto;
    border: 1px solid rgba(46, 125, 50, 0.18);
    border-radius: 999px;
    padding: 7px 10px;
    background: #ecfdf5;
    color: #166534;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.matewa-client-mail-delivery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.matewa-client-mail-delivery-grid label,
.matewa-client-mail-checks label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #122033;
    font-size: 12px;
    font-weight: 800;
}

.matewa-client-mail-delivery-grid input,
.matewa-client-mail-delivery-grid select {
    width: 100%;
    min-height: 38px;
    border-color: rgba(22, 101, 52, 0.18);
    border-radius: 10px;
    font-weight: 700;
}

.matewa-client-mail-checks {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid rgba(46, 125, 50, 0.14);
    border-radius: 14px;
    background: rgba(255,255,255,0.7);
}

.matewa-client-mail-checks label {
    flex-direction: row;
    align-items: center;
    font-weight: 700;
    color: #334155;
}

.matewa-client-mail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

@media (max-width: 920px) {
    .matewa-client-mail-delivery-grid {
        grid-template-columns: 1fr;
    }

    .matewa-client-mail-delivery-heading {
        flex-direction: column;
    }
}

/* 247CHATMATEEMAILRELAYPROOF1 — managed relay UI notes */
.matewa-client-mail-relay-note {
    display: block;
    margin-top: 8px !important;
    padding: 10px 12px;
    border: 1px solid rgba(22, 101, 52, 0.14);
    border-radius: 12px;
    background: rgba(240, 253, 244, 0.72);
    color: #34504a !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"] .matewa-client-mail-relay-note {
    background: rgba(20, 83, 45, 0.18);
    color: #cdebd7 !important;
}

/* AGENCYHELPERADVISORYHIGHLIGHTLOCK — advisory-only Agency Hub helper/highlight. */
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-hub-shell .is-agency-helper-current {
    position: relative;
    border-color: rgba(22, 163, 74, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.13), 0 16px 36px rgba(15, 118, 65, 0.08) !important;
    background-image: linear-gradient(135deg, rgba(240, 253, 244, 0.72), rgba(255, 255, 255, 0.9)) !important;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-chip-grid .is-agency-helper-current,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-chip-grid.is-agency-helper-current {
    border-color: inherit !important;
    box-shadow: none !important;
    background-image: none !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-hub-shell .is-agency-helper-current {
    border-color: rgba(74, 222, 128, 0.42) !important;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.14), 0 16px 36px rgba(0, 0, 0, 0.2) !important;
    background-image: linear-gradient(135deg, rgba(20, 83, 45, 0.24), rgba(15, 23, 42, 0.72)) !important;
}

/* AGENCYPDFCREATENEWPACK1LOCK — Agency Hub client setup PDF upload panel. */
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-upload-panel {
    margin: 18px 0 20px;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-upload-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-controls {
    display: grid;
    gap: 14px;
}


.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    background: #f8fafc;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-card.is-primary {
    border-color: rgba(5, 150, 105, 0.2);
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.78) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-head {
    display: grid;
    gap: 5px;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-head strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-head span {
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.45;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select {
    display: grid;
    gap: 7px;
    max-width: 760px;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select > span {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select select {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 750;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone {
    position: relative;
    display: grid;
    place-items: center;
    gap: 9px;
    min-height: 194px;
    padding: 28px 22px;
    border: 1.5px dashed rgba(5, 150, 105, 0.42);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.72) 0%, rgba(255, 255, 255, 0.96) 100%);
    color: #0f172a;
    text-align: center;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone.is-dragging {
    border-color: #059669;
    background: #ecfdf5;
    box-shadow: 0 18px 38px rgba(5, 150, 105, 0.14);
    transform: translateY(-1px);
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone.has-file {
    border-color: rgba(5, 150, 105, 0.72);
    background: #f0fdf4;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone.is-error {
    border-color: rgba(185, 28, 28, 0.62);
    background: #fef2f2;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone > .dashicons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
    font-size: 28px;
    line-height: 1;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone strong {
    max-width: 560px;
    color: #0f172a;
    font-size: 17px;
    font-weight: 950;
    line-height: 1.25;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
    text-transform: uppercase;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-browse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(135deg, #16a34a 0%, #059669 100%);
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(5, 150, 105, 0.18);
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-browse:hover,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-browse:focus-visible {
    background: linear-gradient(135deg, #15803d 0%, #047857 100%);
    color: #ffffff;
    outline: none;
}


.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.72;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone:has(input:disabled) .matewa-agency-client-pdf-browse {
    pointer-events: none;
    background: #94a3b8;
    box-shadow: none;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone small {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone.is-error small {
    color: #b91c1c;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-actions {
    align-items: center;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list {
    display: grid;
    gap: 10px;
    padding-top: 4px;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list > strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 950;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #f8fafc;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li .dashicons {
    flex: 0 0 auto;
    color: #059669;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li strong,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li small {
    display: block;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 950;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li small {
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-empty {
    display: grid;
    gap: 5px;
    padding: 16px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 16px;
    background: #fffbeb;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-empty strong {
    color: #92400e;
    font-size: 13px;
    font-weight: 950;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-empty span {
    color: #78350f;
    font-size: 12px;
    font-weight: 750;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-upload-card,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.72);
}


.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-card {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.56);
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-card.is-primary {
    border-color: rgba(52, 211, 153, 0.24);
    background: rgba(6, 78, 59, 0.18);
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select > span,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list > strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-head strong,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone strong {
    color: #f8fafc;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select select {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone {
    border-color: rgba(52, 211, 153, 0.42);
    background: rgba(6, 78, 59, 0.18);
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone.is-dragging,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone.has-file {
    border-color: #34d399;
    background: rgba(6, 95, 70, 0.28);
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone small,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list p,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li small,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-head span {
    color: #cbd5e1;
}

@media (max-width: 782px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-grid {
        grid-template-columns: 1fr;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li {
        align-items: flex-start;
        flex-direction: column;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-row-actions {
        justify-content: flex-start;
        width: 100%;
    }
}

/* ======================================================================
   AGENCYPDFVISUALTRADEMATCH1LOCK
   Scope: Agency Hub PDF upload alignment + draft-pack business type hint.
   CSS-only visual pass. Does not alter widget, chips rendering, WhatsApp,
   lead routing, licence/trial, remote updater or existing save handlers.
====================================================================== */

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-upload-panel {
    margin: 10px 0 16px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-upload-panel > summary {
    min-height: 42px !important;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-upload-card {
    gap: 12px !important;
    padding: 16px !important;
    border-radius: 20px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-upload-card > .matewa-agency-client-pack-form-head {
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-grid {
    align-items: stretch !important;
    gap: 14px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-card {
    grid-template-rows: auto auto minmax(172px, 1fr) auto !important;
    align-content: stretch !important;
    gap: 12px !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-controls {
    display: contents !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint {
    display: grid !important;
    grid-template-rows: auto 44px auto !important;
    gap: 7px !important;
    max-width: none !important;
    min-height: 82px !important;
    margin: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint input[type="text"],
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select select {
    width: 100% !important;
    min-height: 44px !important;
    border: 1px solid rgba(15, 23, 42, 0.14) !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select small,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint small {
    color: #64748b !important;
    font-size: 11.5px !important;
    font-weight: 750 !important;
    line-height: 1.3 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone {
    min-height: 172px !important;
    padding: 22px 20px !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone > .dashicons {
    width: 46px !important;
    height: 46px !important;
    font-size: 24px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone strong {
    max-width: 430px !important;
    font-size: 15.5px !important;
    line-height: 1.25 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-actions {
    display: grid !important;
    gap: 8px !important;
    align-content: start !important;
    margin-top: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-actions .button {
    justify-self: start !important;
    min-height: 38px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list {
    gap: 8px !important;
    padding-top: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list li {
    padding: 12px 14px !important;
    border-radius: 16px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) th:nth-child(7),
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td:nth-child(7) {
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) th:nth-child(8),
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td:nth-child(8) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td[data-label="Status"] > .matewa-agency-table-pill {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 34px !important;
    height: auto !important;
    padding: 7px 10px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) td[data-label="Status"] > span:not(.matewa-agency-table-pill) {
    display: block !important;
    min-height: 0 !important;
    margin: 0 0 7px !important;
    line-height: 1.28 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) .matewa-agency-client-row-actions {
    align-items: stretch !important;
    gap: 9px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) .matewa-agency-client-row-actions .button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 38px !important;
    height: auto !important;
    justify-content: center !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint input[type="text"] {
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: rgba(15, 23, 42, 0.92) !important;
    color: #f8fafc !important;
}

.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select small,
.matewa-dashboard-page[data-matewa-dashboard-theme="dark"][data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint small {
    color: #cbd5e1 !important;
}

@media (max-width: 960px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-card {
        grid-template-rows: auto auto auto auto !important;
    }
}

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-board .matewa-agency-client-table:not(.matewa-agency-performance-table) {
        width: max(100%, 1320px) !important;
        min-width: 1320px !important;
        table-layout: fixed !important;
    }
}

/* ======================================================================
   AGENCYPDFUPLOADALIGNMENTFIX1LOCK
   Scope: tighten Agency Hub PDF upload card vertical alignment only.
   Keeps upload logic, pack creation, chips, widget, WhatsApp, lead routing,
   licence/trial and remote updater untouched.
====================================================================== */

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-card {
    grid-template-rows: minmax(56px, auto) 112px 182px auto !important;
    gap: 12px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-head {
    min-height: 56px !important;
    align-content: start !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint {
    min-height: 112px !important;
    height: 112px !important;
    grid-template-rows: 14px 44px 34px !important;
    align-content: start !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select > span,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint > span {
    align-self: end !important;
    line-height: 1.1 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select small,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint small {
    min-height: 30px !important;
    max-height: 34px !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone {
    min-height: 182px !important;
    height: 182px !important;
    display: grid !important;
    grid-template-rows: 46px minmax(38px, auto) 14px 38px 18px !important;
    align-content: center !important;
    justify-items: center !important;
    gap: 8px !important;
    padding: 20px !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone > .dashicons {
    align-self: center !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone strong {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    margin: 0 !important;
    text-align: center !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone em,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone small {
    line-height: 1.15 !important;
    margin: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-browse {
    align-self: center !important;
    min-height: 38px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-actions {
    min-height: 66px !important;
}

@media (max-width: 960px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-card {
        grid-template-rows: auto auto auto auto !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone {
        height: auto !important;
    }
}

/* ======================================================================
   AGENCYPDFUPLOADALIGNMENTFIX2LOCK
   Scope: final Agency Hub PDF upload card inner alignment only.
   Corrects the previous fixed-grid squeeze by giving the dropzones enough
   internal height and using flex centring instead of clipped row tracks.
   No PHP, upload logic, pack logic, chips, widget, WhatsApp, lead routing,
   licence/trial or remote updater behaviour is changed.
====================================================================== */

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-grid {
    align-items: stretch !important;
    gap: 16px !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-card {
    display: grid !important;
    grid-template-rows: minmax(64px, auto) 112px 204px minmax(58px, auto) !important;
    gap: 14px !important;
    align-content: start !important;
    padding: 16px !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-head {
    display: grid !important;
    align-content: start !important;
    min-height: 64px !important;
    gap: 5px !important;
    margin: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-controls {
    display: contents !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint {
    display: grid !important;
    grid-template-rows: 16px 44px minmax(0, 36px) !important;
    gap: 7px !important;
    align-content: start !important;
    min-height: 112px !important;
    height: 112px !important;
    max-height: 112px !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select > span,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint > span {
    align-self: center !important;
    line-height: 1.15 !important;
    margin: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select select,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint input[type="text"] {
    align-self: stretch !important;
    min-height: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select small,
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint small {
    display: block !important;
    min-height: 0 !important;
    max-height: 36px !important;
    margin: 0 !important;
    line-height: 1.28 !important;
    overflow: hidden !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 204px !important;
    height: 204px !important;
    padding: 16px 18px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone > .dashicons {
    flex: 0 0 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone strong {
    flex: 0 0 auto !important;
    display: block !important;
    max-width: 430px !important;
    min-height: 0 !important;
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 15.25px !important;
    line-height: 1.22 !important;
    text-align: center !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone em {
    flex: 0 0 auto !important;
    display: block !important;
    margin: 0 !important;
    line-height: 1.1 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-browse {
    flex: 0 0 auto !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 18px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone small {
    flex: 0 0 auto !important;
    display: block !important;
    min-height: 14px !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-actions {
    display: grid !important;
    align-content: start !important;
    justify-items: start !important;
    min-height: 58px !important;
    gap: 7px !important;
    margin: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-actions small {
    display: block !important;
    line-height: 1.35 !important;
    margin: 0 !important;
}

@media (max-width: 960px) {
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-mode-card {
        grid-template-rows: auto auto auto auto !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-pack-select,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-trade-hint,
    .matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-dropzone {
        height: auto !important;
        max-height: none !important;
    }
}

/* =========================================================
   247ChatMate — AGENCYCHIPRULESREVERTPDFANCHOR1LOCK
   Scope: PDF list return anchor only.
   Chip sizing, two-line formatting and editor behaviour are intentionally
   left to the locked actual plugin rules.
========================================================= */
.matewa-dashboard-page[data-matewa-active-panel="agency"] .matewa-agency-client-pdf-list {
    scroll-margin-top: 96px !important;
}
