/* =========================================================
   247ChatMate — Client View CSS split
   Phase 5-A-13B
   Checkpoint: CLIENTVIEWCSSSPLIT5A13BLOCK

   Purpose:
   - Holds the Client View homepage beta-completion CSS that previously
     lived at the end of admin.css.
   - Behaviour-preserving split only.
   - No frontend widget, chip, save-handler, licence, trial, lead-routing,
     tracking or remote-call changes.
========================================================= */

/* =========================================================
   247ChatMate — Phase 5-A-13 Client View homepage beta completion
   Checkpoint target: CLIENTVIEWHOMEBETABUILD5A13LOCK

   Scope:
   - Client View dashboard/homepage presentation only.
   - Uses existing local-safe settings already available to the admin page.
   - Removes invented lead values from the dashboard homepage.
   - Adds read-only setup health, quick actions and future placeholder cards.
   - No frontend widget, save handler, chip, vertical JSON, WhatsApp handoff,
     lead email, entitlement, trial, registry, analytics, tracking or storage logic changes.
========================================================= */

.matewa-dashboard-page .matewa-dashboard-hero-panel h2 {
    max-width: 460px;
}

.matewa-dashboard-page .matewa-dashboard-hero-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 18px;
}

.matewa-dashboard-page .matewa-dashboard-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--matewa-dash-text);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-dashboard-status-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 999px;
    background: #9ca3af;
}

.matewa-dashboard-page .matewa-dashboard-status-pill.is-live::before,
.matewa-dashboard-page .matewa-dashboard-status-pill.is-success::before {
    background: #22c55e;
}

.matewa-dashboard-page .matewa-dashboard-status-pill.is-off::before,
.matewa-dashboard-page .matewa-dashboard-status-pill.is-warning::before {
    background: #f59e0b;
}

.matewa-dashboard-page .matewa-dashboard-radial-trend.is-needed,
.matewa-dashboard-page .matewa-dashboard-orbit-item.is-needed .matewa-dashboard-metric-trend,
.matewa-dashboard-page .matewa-dashboard-orbit-item.is-needed .matewa-dashboard-metric-value {
    color: var(--matewa-dash-warning) !important;
}

.matewa-dashboard-page .matewa-dashboard-orbit-item.is-needed {
    border-color: rgba(245, 158, 11, 0.32);
    background: #fffbeb;
}

.matewa-dashboard-page .matewa-dashboard-metric-value {
    max-width: 86px;
    overflow-wrap: anywhere;
    font-size: 19px !important;
    letter-spacing: -0.035em;
}

.matewa-dashboard-page .matewa-dashboard-metric-trend {
    max-width: 84px;
    overflow-wrap: anywhere;
    font-size: 10.5px !important;
}

.matewa-dashboard-page .matewa-dashboard-status-cards {
    display: grid;
    gap: 9px;
    margin: 14px 0 16px;
}

.matewa-dashboard-page .matewa-dashboard-status-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 11px 12px;
    border: 1px solid rgba(15, 23, 42, 0.085);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--matewa-dash-text);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.matewa-dashboard-page .matewa-dashboard-status-card:hover,
.matewa-dashboard-page .matewa-dashboard-status-card:focus-visible {
    border-color: rgba(38, 143, 43, 0.26);
    color: var(--matewa-dash-text);
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 143, 43, 0.08), 0 12px 28px rgba(15, 23, 42, 0.06);
}

.matewa-dashboard-page .matewa-dashboard-status-card > .dashicons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 999px;
    background: #ecfdf5;
    color: var(--matewa-dash-green-dark);
    font-size: 15px;
    line-height: 25px;
}

.matewa-dashboard-page .matewa-dashboard-status-card.is-needed > .dashicons {
    background: #fffbeb;
    color: var(--matewa-dash-warning);
}

.matewa-dashboard-page .matewa-dashboard-status-card small,
.matewa-dashboard-page .matewa-dashboard-check-row small {
    display: block;
    margin: 0 0 3px;
    color: var(--matewa-dash-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.18;
}

.matewa-dashboard-page .matewa-dashboard-status-card strong {
    display: block;
    margin: 0 0 4px;
    color: var(--matewa-dash-text);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.18;
}

.matewa-dashboard-page .matewa-dashboard-status-card em {
    display: block;
    color: var(--matewa-dash-muted);
    font-size: 11.2px;
    font-style: normal;
    font-weight: 650;
    line-height: 1.28;
}

.matewa-dashboard-page .matewa-dashboard-quick-actions {
    margin-top: 8px;
}

.matewa-dashboard-page .matewa-dashboard-quick-actions h4 {
    margin: 0 0 8px;
    color: var(--matewa-dash-text);
    font-size: 13px;
    font-weight: 950;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-dashboard-check-row {
    grid-template-columns: auto 1fr auto;
}

.matewa-dashboard-page .matewa-dashboard-check-row small {
    margin-top: 3px;
    margin-bottom: 0;
    font-weight: 700;
}

.matewa-dashboard-page .matewa-dashboard-beta-placeholders {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}

.matewa-dashboard-page .matewa-dashboard-beta-placeholders .matewa-dashboard-future-card {
    min-height: 132px;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-status-pill,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-status-card,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-orbit-item.is-needed {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(9, 20, 32, 0.78);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-status-card > .dashicons {
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-status-card.is-needed > .dashicons {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
}

@media (max-width: 1120px) {
    .matewa-dashboard-page .matewa-dashboard-value-card {
        grid-template-columns: 1fr;
    }

    .matewa-dashboard-page .matewa-dashboard-lead-panel h3 {
        position: static;
        margin-bottom: 10px;
    }

    .matewa-dashboard-page .matewa-dashboard-lead-panel .matewa-dashboard-radial {
        margin-top: 0;
    }

    .matewa-dashboard-page .matewa-dashboard-status-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .matewa-dashboard-page .matewa-dashboard-beta-placeholders {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .matewa-dashboard-page .matewa-dashboard-status-cards,
    .matewa-dashboard-page .matewa-dashboard-beta-placeholders {
        grid-template-columns: 1fr;
    }

    .matewa-dashboard-page .matewa-dashboard-hero-status,
    .matewa-dashboard-page .matewa-dashboard-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .matewa-dashboard-page .matewa-dashboard-primary-button,
    .matewa-dashboard-page .matewa-dashboard-secondary-button {
        width: 100%;
    }
}

/* =========================================================
   247ChatMate — Phase 5-A-14E Dashboard Leads/Status toggle
   Checkpoint: DASHBOARDLEADSSTATUSTOGGLE5A14ELOCK

   Scope:
   - Client View front-dashboard circle display only.
   - Adds a view-only Leads/Status toggle for prepared local-safe values.
   - No lead counting, reset action, storage write, remote call, widget change,
     licence/trial change or save-handler change.
========================================================= */

.matewa-dashboard-page .matewa-dashboard-circle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
    padding: 0 8px 0 20px;
}

.matewa-dashboard-page .matewa-dashboard-lead-panel .matewa-dashboard-circle-header h3 {
    position: static !important;
    margin: 0 !important;
}

.matewa-dashboard-page .matewa-dashboard-circle-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.matewa-dashboard-page .matewa-dashboard-circle-toggle-button {
    min-height: 30px;
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--matewa-dash-muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
}

.matewa-dashboard-page .matewa-dashboard-circle-toggle-button.is-active {
    background: var(--matewa-dash-green);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(38, 143, 43, 0.20);
}

.matewa-dashboard-page .matewa-dashboard-circle-toggle-button:focus-visible {
    outline: 2px solid rgba(38, 143, 43, 0.35);
    outline-offset: 2px;
}

.matewa-dashboard-page .matewa-dashboard-circle-view[hidden] {
    display: none !important;
}

.matewa-dashboard-page .matewa-dashboard-circle-view.is-active {
    display: block;
}

.matewa-dashboard-page .matewa-dashboard-circle-view .matewa-dashboard-radial {
    margin-top: 10px;
}

.matewa-dashboard-page .matewa-dashboard-orbit-item.is-waiting .matewa-dashboard-metric-value,
.matewa-dashboard-page .matewa-dashboard-orbit-item.is-waiting .matewa-dashboard-metric-trend,
.matewa-dashboard-page .matewa-dashboard-radial-trend.is-waiting {
    color: var(--matewa-dash-muted) !important;
}

.matewa-dashboard-page .matewa-dashboard-orbit-item.is-waiting {
    border-color: rgba(100, 116, 139, 0.18);
    background: rgba(248, 250, 252, 0.92);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-circle-toggle,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-orbit-item.is-waiting {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(9, 20, 32, 0.78);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-circle-toggle-button {
    color: #cbd5e1;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-circle-toggle-button.is-active {
    background: var(--matewa-dash-green);
    color: #ffffff;
}

@media (max-width: 1120px) {
    .matewa-dashboard-page .matewa-dashboard-circle-header {
        padding: 0;
    }
}

@media (max-width: 640px) {
    .matewa-dashboard-page .matewa-dashboard-circle-header {
        align-items: stretch;
        flex-direction: column;
    }

    .matewa-dashboard-page .matewa-dashboard-circle-toggle,
    .matewa-dashboard-page .matewa-dashboard-circle-toggle-button {
        width: 100%;
    }

    .matewa-dashboard-page .matewa-dashboard-circle-toggle-button {
        justify-content: center;
    }
}

/* =========================================================
   247ChatMate — Phase 5-A-14F right rail history controls / 5-A-14G0 refresh link
   Checkpoint: HISTORYPANELEXPORTRESET5A14FLOCK

   Scope:
   - Replaces duplicated right-rail Quick actions with a mode-aware panel.
   - Leads mode shows local aggregate history/export/reset controls.
   - Status mode keeps setup status only.
   - No frontend, chip, licence, trial, registry, lifecycle or remote changes.
========================================================= */

.matewa-dashboard-page .matewa-dashboard-sidebar-view[hidden] {
    display: none !important;
}

.matewa-dashboard-page .matewa-dashboard-sidebar-view.is-active {
    display: block;
}

.matewa-dashboard-page .matewa-dashboard-sidebar-intro {
    margin: 4px 0 10px;
    color: var(--matewa-dash-muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}


.matewa-dashboard-page .matewa-dashboard-history-notice {
    margin: 0 0 12px;
    padding: 10px 11px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
}

.matewa-dashboard-page .matewa-dashboard-history-notice.is-success {
    border: 1px solid rgba(22, 163, 74, 0.22);
    background: rgba(240, 253, 244, 0.92);
    color: #166534;
}

.matewa-dashboard-page .matewa-dashboard-history-notice.is-warning {
    border: 1px solid rgba(217, 119, 6, 0.24);
    background: rgba(255, 251, 235, 0.94);
    color: #92400e;
}

.matewa-dashboard-page .matewa-dashboard-history-summary-mini {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 12px 0;
}

.matewa-dashboard-page .matewa-dashboard-history-summary-mini > div {
    padding: 11px 12px;
    border: 1px solid rgba(15, 23, 42, 0.085);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.matewa-dashboard-page .matewa-dashboard-history-summary-mini small,
.matewa-dashboard-page .matewa-dashboard-history-summary-mini span {
    display: block;
    color: var(--matewa-dash-muted);
    font-size: 10.8px;
    font-weight: 800;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-dashboard-history-summary-mini strong {
    display: block;
    margin: 4px 0 3px;
    color: var(--matewa-dash-text);
    font-size: 24px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.04em;
}

.matewa-dashboard-page .matewa-dashboard-history-mini-list {
    margin: 12px 0;
}

.matewa-dashboard-page .matewa-dashboard-history-mini-list h4 {
    margin: 0 0 8px;
    color: var(--matewa-dash-text);
    font-size: 13px;
    font-weight: 950;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-dashboard-history-mini-list p,
.matewa-dashboard-page .matewa-dashboard-history-privacy-note {
    margin: 0;
    color: var(--matewa-dash-muted);
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.45;
}

.matewa-dashboard-page .matewa-dashboard-history-mini-row {
    display: grid;
    gap: 3px;
    padding: 9px 11px;
    border: 1px solid rgba(15, 23, 42, 0.075);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.88);
}

.matewa-dashboard-page .matewa-dashboard-history-mini-row + .matewa-dashboard-history-mini-row {
    margin-top: 7px;
}

.matewa-dashboard-page .matewa-dashboard-history-mini-row span,
.matewa-dashboard-page .matewa-dashboard-history-mini-row small {
    color: var(--matewa-dash-muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-dashboard-history-mini-row strong {
    color: var(--matewa-dash-text);
    font-size: 13px;
    font-weight: 950;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-dashboard-inbox-value-card {
    display: grid;
    gap: 8px;
    margin: 12px 0;
    padding: 11px 12px;
    border: 1px solid rgba(22, 163, 74, 0.16);
    border-radius: 16px;
    background: rgba(240, 253, 244, 0.66);
}

.matewa-dashboard-page .matewa-dashboard-inbox-value-card.is-needed {
    border-color: rgba(217, 119, 6, 0.22);
    background: rgba(255, 251, 235, 0.78);
}

.matewa-dashboard-page .matewa-dashboard-inbox-value-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.matewa-dashboard-page .matewa-dashboard-inbox-value-card strong {
    color: var(--matewa-dash-text);
    font-size: 12.5px;
    font-weight: 950;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-dashboard-inbox-value-card span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.10);
    color: #166534;
    font-size: 10.5px;
    font-weight: 950;
    line-height: 1;
}

.matewa-dashboard-page .matewa-dashboard-inbox-value-card.is-needed span {
    background: rgba(217, 119, 6, 0.12);
    color: #92400e;
}

.matewa-dashboard-page .matewa-dashboard-inbox-value-card p,
.matewa-dashboard-page .matewa-dashboard-inbox-value-card small {
    margin: 0;
    color: var(--matewa-dash-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.matewa-dashboard-page .matewa-dashboard-inbox-value-card code {
    display: block;
    max-width: 100%;
    padding: 8px 9px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--matewa-dash-text);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.matewa-dashboard-page .matewa-dashboard-inbox-value-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 11px;
    border: 1px solid rgba(22, 163, 74, 0.24);
    border-radius: 999px;
    background: #ffffff;
    color: var(--matewa-dash-green);
    font-size: 11px;
    font-weight: 950;
    line-height: 1;
    text-decoration: none;
}

.matewa-dashboard-page .matewa-dashboard-history-actions-rail {
    display: grid;
    gap: 10px;
    margin: 12px 0;
}

.matewa-dashboard-page .matewa-dashboard-history-actions-rail form,
.matewa-dashboard-page .matewa-dashboard-danger-zone-inner form {
    display: grid;
    gap: 8px;
    margin: 0;
}

.matewa-dashboard-page .matewa-dashboard-history-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding: 9px 13px;
    border: 0;
    border-radius: 999px;
    background: var(--matewa-dash-green);
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.1;
    text-decoration: none;
}

.matewa-dashboard-page .matewa-dashboard-history-button.is-secondary {
    background: #ffffff;
    color: var(--matewa-dash-green);
    border: 1px solid rgba(22, 163, 74, 0.24);
}

.matewa-dashboard-page .matewa-dashboard-history-button.is-warning {
    background: #d97706;
}

.matewa-dashboard-page .matewa-dashboard-history-button.is-danger {
    background: #dc2626;
}

.matewa-dashboard-page .matewa-dashboard-retention-card {
    display: grid;
    gap: 8px;
    padding: 10px 11px;
    border: 1px solid rgba(22, 163, 74, 0.16);
    border-radius: 16px;
    background: rgba(240, 253, 244, 0.7);
}

.matewa-dashboard-page .matewa-dashboard-retention-card strong {
    color: var(--matewa-dash-text);
    font-size: 12px;
    font-weight: 950;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-dashboard-retention-card p,
.matewa-dashboard-page .matewa-dashboard-retention-card small {
    margin: 0;
    color: var(--matewa-dash-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.matewa-dashboard-page .matewa-dashboard-retention-card form {
    display: grid;
    gap: 8px;
    margin: 0;
}

.matewa-dashboard-page .matewa-dashboard-retention-card label {
    display: grid;
    gap: 6px;
    color: var(--matewa-dash-muted);
    font-size: 11.5px;
    font-weight: 850;
    line-height: 1.3;
}

.matewa-dashboard-page .matewa-dashboard-retention-card select {
    width: 100%;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 12px;
    background: #ffffff;
    color: var(--matewa-dash-text);
    font-size: 12px;
    font-weight: 800;
}

.matewa-dashboard-page .matewa-dashboard-danger-zone {
    border: 1px solid rgba(220, 38, 38, 0.16);
    border-radius: 16px;
    background: rgba(254, 242, 242, 0.72);
    overflow: hidden;
}

.matewa-dashboard-page .matewa-dashboard-danger-zone summary {
    cursor: pointer;
    padding: 10px 12px;
    color: #991b1b;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-dashboard-danger-zone-inner {
    display: grid;
    gap: 12px;
    padding: 0 12px 12px;
}

.matewa-dashboard-page .matewa-dashboard-danger-zone-inner label,
.matewa-dashboard-page .matewa-dashboard-history-confirm {
    display: grid;
    gap: 6px;
    color: var(--matewa-dash-muted);
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.3;
}

.matewa-dashboard-page .matewa-dashboard-history-confirm {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.matewa-dashboard-page .matewa-dashboard-danger-zone-inner input[type="text"] {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 12px;
    background: #ffffff;
    color: var(--matewa-dash-text);
    font-size: 12px;
    font-weight: 750;
}

.matewa-dashboard-page .matewa-dashboard-history-privacy-note {
    margin-top: 12px;
    padding: 10px 11px;
    border-radius: 14px;
    background: rgba(241, 245, 249, 0.78);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-summary-mini > div,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-mini-row,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-privacy-note,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-inbox-value-card,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-retention-card {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(9, 20, 32, 0.78);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-inbox-value-card code,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-inbox-value-card a {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.88);
    color: #bbf7d0;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-danger-zone {
    border-color: rgba(248, 113, 113, 0.22);
    background: rgba(127, 29, 29, 0.22);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-danger-zone summary {
    color: #fecaca;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-button.is-secondary {
    background: rgba(15, 23, 42, 0.88);
    color: #bbf7d0;
    border-color: rgba(187, 247, 208, 0.28);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-retention-card select {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.88);
    color: #e5f9ef;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-notice.is-success {
    border-color: rgba(74, 222, 128, 0.22);
    background: rgba(22, 101, 52, 0.18);
    color: #bbf7d0;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-notice.is-warning {
    border-color: rgba(251, 191, 36, 0.24);
    background: rgba(120, 53, 15, 0.22);
    color: #fde68a;
}

@media (max-width: 640px) {
    .matewa-dashboard-page .matewa-dashboard-history-summary-mini {
        grid-template-columns: 1fr;
    }
}


/* -------------------------------------------------------------------------
   Phase 5-A-14G3C: Calibrating display polish.
   Display-only refinement for handoff-rate calibration states.
   No counter, lead, widget, licence, trial or storage logic changes.
------------------------------------------------------------------------- */
.matewa-dashboard-page .matewa-dashboard-orbit-item.is-calibrating {
    border-color: rgba(245, 158, 11, 0.30);
    background: #fffbeb;
}

.matewa-dashboard-page .matewa-dashboard-orbit-item.is-calibrating .matewa-dashboard-metric-value {
    max-width: 76px;
    color: #92400e !important;
    font-size: 13.5px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.045em;
}

.matewa-dashboard-page .matewa-dashboard-orbit-item.is-calibrating .matewa-dashboard-metric-label {
    color: #713f12 !important;
}

.matewa-dashboard-page .matewa-dashboard-orbit-item.is-calibrating .matewa-dashboard-metric-trend {
    max-width: 76px;
    color: #92400e !important;
    font-size: 9.5px !important;
    line-height: 1.08 !important;
}

.matewa-dashboard-page .matewa-dashboard-history-rate.is-calibrating {
    border-color: rgba(245, 158, 11, 0.28);
    background: #fffbeb;
}

.matewa-dashboard-page .matewa-dashboard-history-rate.is-calibrating strong {
    color: #92400e !important;
    font-size: 17px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.04em;
}

.matewa-dashboard-page .matewa-dashboard-history-rate.is-calibrating span {
    color: #92400e !important;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-orbit-item.is-calibrating,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-rate.is-calibrating {
    border-color: rgba(245, 158, 11, 0.36);
    background: rgba(245, 158, 11, 0.12);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-orbit-item.is-calibrating .matewa-dashboard-metric-value,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-orbit-item.is-calibrating .matewa-dashboard-metric-label,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-orbit-item.is-calibrating .matewa-dashboard-metric-trend,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-rate.is-calibrating strong,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-rate.is-calibrating span {
    color: #fbbf24 !important;
}

/* -------------------------------------------------------------------------
   Phase 5-A-14G4: Dashboard plan status centre refinement.
   Display-only refinement for the Status radial centre.
   No entitlement, licence, trial, lead, widget, chip or storage logic changes.
------------------------------------------------------------------------- */
.matewa-dashboard-page .matewa-dashboard-radial-center.is-plan-centre {
    gap: 4px;
    padding: 18px 14px;
}

.matewa-dashboard-page .matewa-dashboard-radial-center.is-plan-centre .matewa-dashboard-radial-icon {
    background: rgba(22, 163, 74, 0.12);
    color: var(--matewa-dash-green-dark);
}

.matewa-dashboard-page .matewa-dashboard-radial-center.is-plan-centre strong {
    max-width: 112px;
    font-size: clamp(19px, 2.1vw, 28px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.055em;
    overflow-wrap: anywhere;
    text-align: center;
}

.matewa-dashboard-page .matewa-dashboard-radial-center.is-plan-centre .matewa-dashboard-radial-label {
    font-size: 11.5px !important;
    line-height: 1.12 !important;
}

.matewa-dashboard-page .matewa-dashboard-radial-center.is-plan-centre .matewa-dashboard-radial-trend {
    max-width: 118px;
    font-size: 10.5px !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere;
    text-align: center;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-radial-center.is-plan-centre .matewa-dashboard-radial-icon {
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
}

/* -------------------------------------------------------------------------
   Phase 5-A-15: Setup health and status panel.
   Read-only dashboard panel only. No save forms, storage, entitlement,
   lead-routing, widget, chip or frontend behaviour changes.
------------------------------------------------------------------------- */
.matewa-dashboard-page .matewa-dashboard-health-panel {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.085);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.06);
}

.matewa-dashboard-page .matewa-dashboard-health-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.matewa-dashboard-page .matewa-dashboard-health-heading span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.10);
    color: var(--matewa-dash-green-dark);
    font-size: 11px;
    font-weight: 950;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.matewa-dashboard-page .matewa-dashboard-health-heading h3 {
    margin: 8px 0 5px;
    color: var(--matewa-dash-text);
    font-size: 20px;
    font-weight: 950;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.matewa-dashboard-page .matewa-dashboard-health-heading p {
    max-width: 650px;
    margin: 0;
    color: var(--matewa-dash-muted);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.matewa-dashboard-page .matewa-dashboard-health-score {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid rgba(22, 163, 74, 0.22);
    border-radius: 999px;
    background: #ecfdf5;
    color: var(--matewa-dash-green-dark);
    font-size: 12px;
    font-weight: 950;
    line-height: 1.15;
}

.matewa-dashboard-page .matewa-dashboard-health-score.is-needed {
    border-color: rgba(245, 158, 11, 0.28);
    background: #fffbeb;
    color: #92400e;
}

.matewa-dashboard-page .matewa-dashboard-health-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.matewa-dashboard-page .matewa-dashboard-health-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 11px;
    align-items: start;
    min-height: 108px;
    padding: 13px 14px;
    border: 1px solid rgba(15, 23, 42, 0.085);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.78);
}

.matewa-dashboard-page .matewa-dashboard-health-card > .dashicons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    color: var(--matewa-dash-green-dark);
    font-size: 16px;
    line-height: 30px;
}

.matewa-dashboard-page .matewa-dashboard-health-card.is-needed {
    border-color: rgba(245, 158, 11, 0.24);
    background: #fffbeb;
}

.matewa-dashboard-page .matewa-dashboard-health-card.is-needed > .dashicons {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.matewa-dashboard-page .matewa-dashboard-health-card.is-waiting > .dashicons {
    background: rgba(148, 163, 184, 0.14);
    color: #475569;
}

.matewa-dashboard-page .matewa-dashboard-health-card small {
    display: block;
    margin: 0 0 4px;
    color: var(--matewa-dash-muted);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.15;
}

.matewa-dashboard-page .matewa-dashboard-health-card strong {
    display: block;
    margin: 0 0 5px;
    color: var(--matewa-dash-text);
    font-size: 15px;
    font-weight: 950;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.matewa-dashboard-page .matewa-dashboard-health-card em {
    display: block;
    color: var(--matewa-dash-muted);
    font-size: 11.5px;
    font-style: normal;
    font-weight: 650;
    line-height: 1.35;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-health-panel,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-health-card {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(9, 20, 32, 0.78);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-health-heading span,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-health-score,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-health-card > .dashicons {
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-health-score.is-needed,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-health-card.is-needed,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-health-card.is-needed > .dashicons {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-health-card.is-waiting > .dashicons {
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
}

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

@media (max-width: 720px) {
    .matewa-dashboard-page .matewa-dashboard-health-heading {
        display: grid;
    }

    .matewa-dashboard-page .matewa-dashboard-health-score {
        justify-content: center;
        width: 100%;
    }

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

/* -------------------------------------------------------------------------
   Phase 5-A-19: Dashboard mobile and accessibility QA.
   CSS/markup-support polish only. No dashboard data, lead, widget, chip,
   WhatsApp, licence, trial, storage, remote-call or save-handler changes.
------------------------------------------------------------------------- */
.matewa-dashboard-page .matewa-dashboard-circle-toggle-button,
.matewa-dashboard-page .matewa-dashboard-history-button,
.matewa-dashboard-page .matewa-dashboard-inbox-value-card a,
.matewa-dashboard-page .matewa-dashboard-danger-zone summary,
.matewa-dashboard-page .matewa-dashboard-retention-card select,
.matewa-dashboard-page .matewa-dashboard-danger-zone-inner input[type="text"] {
    min-height: 42px;
}

.matewa-dashboard-page .matewa-dashboard-circle-toggle-button:focus-visible,
.matewa-dashboard-page .matewa-dashboard-history-button:focus-visible,
.matewa-dashboard-page .matewa-dashboard-inbox-value-card a:focus-visible,
.matewa-dashboard-page .matewa-dashboard-danger-zone summary:focus-visible,
.matewa-dashboard-page .matewa-dashboard-retention-card select:focus-visible,
.matewa-dashboard-page .matewa-dashboard-danger-zone-inner input[type="text"]:focus-visible {
    outline: 3px solid rgba(38, 143, 43, 0.28);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(38, 143, 43, 0.08);
}

.matewa-dashboard-page .matewa-dashboard-danger-zone summary {
    display: flex;
    align-items: center;
}

.matewa-dashboard-page .matewa-dashboard-history-mini-row,
.matewa-dashboard-page .matewa-dashboard-history-privacy-note,
.matewa-dashboard-page .matewa-dashboard-inbox-value-card,
.matewa-dashboard-page .matewa-dashboard-retention-card {
    overflow-wrap: anywhere;
}

.matewa-dashboard-page .matewa-dashboard-sidebar-view h3,
.matewa-dashboard-page .matewa-dashboard-history-mini-list h4,
.matewa-dashboard-page .matewa-dashboard-inbox-value-card-header {
    scroll-margin-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
    .matewa-dashboard-page .matewa-dashboard-circle-toggle-button,
    .matewa-dashboard-page .matewa-dashboard-history-button,
    .matewa-dashboard-page .matewa-dashboard-inbox-value-card a,
    .matewa-dashboard-page .matewa-dashboard-health-card,
    .matewa-dashboard-page .matewa-dashboard-history-mini-row,
    .matewa-dashboard-page .matewa-dashboard-status-card {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 960px) {
    .matewa-dashboard-page .matewa-dashboard-circle-header {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 0;
    }

    .matewa-dashboard-page .matewa-dashboard-circle-toggle {
        width: 100%;
    }

    .matewa-dashboard-page .matewa-dashboard-circle-toggle-button {
        flex: 1 1 0;
        justify-content: center;
    }
}

@media (max-width: 782px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        padding: 16px !important;
        gap: 18px !important;
        border-radius: 18px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel h2 {
        font-size: clamp(30px, 10vw, 40px) !important;
        line-height: 1.02 !important;
    }

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

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

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        align-items: stretch;
        padding-top: 20px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel h3 {
        margin: 0 0 10px !important;
        text-align: left;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-radial {
        display: grid !important;
        gap: 10px !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-radial::before,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-radial::after {
        display: none !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-radial-center,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item.is-position-1,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item.is-position-2,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item.is-position-3,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item.is-position-4,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item.is-position-5,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item.is-position-6 {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        min-height: 78px !important;
        border-radius: 16px !important;
    }

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

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item {
        display: grid !important;
        grid-template-columns: 68px minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        padding: 12px 14px !important;
        text-align: left;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item .matewa-dashboard-metric-value {
        grid-row: 1 / span 2;
        max-width: none;
        text-align: center;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item .matewa-dashboard-metric-label,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel .matewa-dashboard-orbit-item .matewa-dashboard-metric-trend {
        max-width: none;
    }

    .matewa-dashboard-page .matewa-dashboard-history-summary-mini {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .matewa-dashboard-page .matewa-dashboard-history-actions-rail {
        gap: 12px;
    }
}

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

    .matewa-dashboard-page .matewa-dashboard-health-panel {
        padding: 14px;
        border-radius: 18px;
    }

    .matewa-dashboard-page .matewa-dashboard-inbox-value-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .matewa-dashboard-page .matewa-dashboard-history-button,
    .matewa-dashboard-page .matewa-dashboard-inbox-value-card a {
        min-height: 44px;
    }
}


/* -------------------------------------------------------------------------
   Phase 5-A-19A recovery: dashboard width constraint and clutter balance.
   Layout/markup-support only. No widget, chip, WhatsApp, lead-routing,
   wp_mail, licence, trial, storage, remote-call, counter logic or save-handler
   changes.
------------------------------------------------------------------------- */
.matewa-dashboard-page,
.matewa-dashboard-page *,
.matewa-dashboard-page *::before,
.matewa-dashboard-page *::after {
    box-sizing: border-box;
}

.matewa-dashboard-page {
    max-width: 100%;
    overflow-x: hidden;
}

@supports (overflow-x: clip) {
    .matewa-dashboard-page {
        overflow-x: clip;
    }
}

/* Constrain the admin shell as one composed dashboard instead of squeezing the
   internal columns. This stops zoomed-out desktop views stretching endlessly
   while preserving the existing 5-A-18/5-A-19 dashboard proportions. */
.matewa-dashboard-page .matewa-dashboard-shell,
.matewa-dashboard-page .matewa-admin-shell {
    width: 100% !important;
    max-width: min(100%, 1540px) !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

.matewa-dashboard-page .matewa-admin-main,
.matewa-dashboard-page .matewa-admin-panel,
.matewa-dashboard-page #matewa-admin-panel-dashboard,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card,
.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,
.matewa-dashboard-page .matewa-dashboard-health-panel,
.matewa-dashboard-page .matewa-dashboard-health-card,
.matewa-dashboard-page .matewa-dashboard-history-mini-row,
.matewa-dashboard-page .matewa-dashboard-history-summary-mini > div,
.matewa-dashboard-page .matewa-dashboard-inbox-value-card,
.matewa-dashboard-page .matewa-dashboard-retention-card {
    min-width: 0;
    max-width: 100%;
}

/* Do not let the right rail help card show while the Lead activity rail is
   active. The help prompt belongs with Status/setup guidance, not the reporting
   controls. */
.matewa-dashboard-page .matewa-dashboard-setup-panel:has(#matewa-dashboard-history-panel.is-active) .matewa-dashboard-help-box {
    display: none !important;
}

/* Keep the reporting rail readable without compressing the radial dashboard. */
.matewa-dashboard-page .matewa-dashboard-history-summary-mini,
.matewa-dashboard-page .matewa-dashboard-history-actions-rail {
    max-width: 100%;
}

.matewa-dashboard-page .matewa-dashboard-history-mini-row,
.matewa-dashboard-page .matewa-dashboard-inbox-value-card,
.matewa-dashboard-page .matewa-dashboard-retention-card,
.matewa-dashboard-page .matewa-dashboard-history-privacy-note {
    overflow-wrap: anywhere;
}

@media (min-width: 1541px) {
    .matewa-dashboard-page .matewa-dashboard-shell,
    .matewa-dashboard-page .matewa-admin-shell {
        max-width: 1500px !important;
    }
}

@media (max-width: 1540px) {
    .matewa-dashboard-page .matewa-dashboard-shell,
    .matewa-dashboard-page .matewa-admin-shell {
        max-width: 100% !important;
    }
}


/* -------------------------------------------------------------------------
   Phase 5-A-19C: radial responsive balance correction.
   CSS/layout-only follow-up to 5-A-19A.
   Purpose: recover the dashboard from the over-low/over-small radial state,
   keep the lead circle visually central, and make it scale down before the
   layout crushes on narrower desktop widths.
   No widget, chip, WhatsApp, lead-routing, wp_mail, licence, trial, storage,
   counter, remote-call or save-handler changes.
------------------------------------------------------------------------- */
@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        display: grid !important;
        grid-template-columns: minmax(240px, 0.82fr) minmax(420px, 1.18fr) minmax(270px, 0.90fr) !important;
        gap: clamp(18px, 1.65vw, 30px) !important;
        align-items: start !important;
        min-height: max(640px, calc(100vh - 150px)) !important;
        padding: clamp(22px, 1.8vw, 30px) !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel {
        min-height: 100% !important;
        justify-content: space-between !important;
        padding: 8px 0 10px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        align-self: start !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        min-width: 0 !important;
        min-height: 0 !important;
        padding: clamp(42px, 4.5vh, 64px) 0 0 !important;
        border-left: 0 !important;
        overflow: visible !important;
    }

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

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

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(152px, 11.6vw, 184px);
        --matewa-cv-orbit-node: clamp(96px, 7.1vw, 112px);
        --matewa-cv-centre-size: clamp(188px, 13.4vw, 216px);
        --matewa-cv-outer-ring: calc((var(--matewa-cv-orbit-distance) * 2) + (var(--matewa-cv-orbit-node) * 0.72));
        width: min(100%, calc((var(--matewa-cv-orbit-distance) * 2) + (var(--matewa-cv-orbit-node) * 1.45))) !important;
        max-width: 600px !important;
        min-height: calc((var(--matewa-cv-orbit-distance) * 2) + (var(--matewa-cv-orbit-node) * 1.35)) !important;
        margin: 0 auto !important;
        transform: none !important;
        transform-origin: center center !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial::before {
        width: var(--matewa-cv-outer-ring) !important;
        height: var(--matewa-cv-outer-ring) !important;
    }

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

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial-center {
        width: var(--matewa-cv-centre-size) !important;
        height: var(--matewa-cv-centre-size) !important;
        padding: clamp(18px, 1.35vw, 26px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item {
        width: var(--matewa-cv-orbit-node) !important;
        height: var(--matewa-cv-orbit-node) !important;
        padding: clamp(10px, 0.8vw, 13px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item.is-position-1 {
        transform: translate(-50%, -50%) rotate(270deg) translate(var(--matewa-cv-orbit-distance)) rotate(-270deg) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item.is-position-2 {
        transform: translate(-50%, -50%) rotate(330deg) translate(var(--matewa-cv-orbit-distance)) rotate(-330deg) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item.is-position-3 {
        transform: translate(-50%, -50%) rotate(30deg) translate(var(--matewa-cv-orbit-distance)) rotate(-30deg) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item.is-position-4 {
        transform: translate(-50%, -50%) rotate(90deg) translate(var(--matewa-cv-orbit-distance)) rotate(-90deg) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item.is-position-5 {
        transform: translate(-50%, -50%) rotate(150deg) translate(var(--matewa-cv-orbit-distance)) rotate(-150deg) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item.is-position-6 {
        transform: translate(-50%, -50%) rotate(210deg) translate(var(--matewa-cv-orbit-distance)) rotate(-210deg) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        grid-column: auto !important;
        align-self: start !important;
        display: flex !important;
        flex-direction: column !important;
        min-width: 0 !important;
        min-height: 100% !important;
        padding: 22px !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(220px, 0.78fr) minmax(390px, 1.16fr) minmax(255px, 0.92fr) !important;
        gap: 18px !important;
        padding: 22px !important;
    }

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

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(142px, 11.2vw, 160px);
        --matewa-cv-orbit-node: clamp(92px, 7vw, 102px);
        --matewa-cv-centre-size: clamp(178px, 13.1vw, 196px);
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        padding: 0 6px !important;
    }
}

@media (min-width: 1361px) and (max-width: 1540px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(245px, 0.82fr) minmax(430px, 1.18fr) minmax(270px, 0.90fr) !important;
    }
}

@media (min-width: 1541px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(290px, 0.86fr) minmax(500px, 1.18fr) minmax(300px, 0.88fr) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        padding-top: clamp(48px, 4vh, 70px) !important;
    }
}

@media (max-width: 1180px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: 1fr !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        justify-content: flex-start !important;
        padding: 24px 0 0 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        transform: none !important;
    }
}


/* -------------------------------------------------------------------------
   Phase 5-A-19D: dashboard repetition cleanup and right rail simplification.
   CSS/layout-only support for the Client View home cleanup.
   Purpose: remove repeated setup block from the dashboard home, simplify the
   lead rail, give the radial a stronger central presence, and keep it scaling
   down before the layout crushes.
   No widget, chip, WhatsApp, lead-routing, wp_mail, licence, trial, storage,
   counter, remote-call or save-handler changes.
------------------------------------------------------------------------- */
.matewa-dashboard-page .matewa-dashboard-health-panel {
    display: none !important;
}

.matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 12px;
}

.matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified > div {
    min-height: 86px;
    padding: 12px 13px;
}

.matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified > div.is-primary {
    border-color: rgba(22, 163, 74, 0.18);
    background: rgba(240, 253, 244, 0.72);
}

.matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified > div.is-top-page strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 14px;
    letter-spacing: -0.015em;
    line-height: 1.12;
}

.matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified > div.is-top-page span {
    overflow-wrap: anywhere;
}

.matewa-dashboard-page .matewa-dashboard-detail-zone,
.matewa-dashboard-page .matewa-dashboard-danger-zone {
    border-radius: 15px;
    overflow: hidden;
}

.matewa-dashboard-page .matewa-dashboard-detail-zone {
    border: 1px solid rgba(22, 163, 74, 0.15);
    background: rgba(240, 253, 244, 0.54);
}

.matewa-dashboard-page .matewa-dashboard-detail-zone summary,
.matewa-dashboard-page .matewa-dashboard-danger-zone summary {
    min-height: 40px;
}

.matewa-dashboard-page .matewa-dashboard-detail-zone summary {
    cursor: pointer;
    padding: 10px 12px;
    color: #166534;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.2;
}

.matewa-dashboard-page .matewa-dashboard-detail-zone .matewa-dashboard-retention-card {
    border: 0;
    border-top: 1px solid rgba(22, 163, 74, 0.12);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: none;
}

.matewa-dashboard-page .matewa-dashboard-history-actions-rail {
    gap: 8px;
    margin-top: 12px;
}

.matewa-dashboard-page .matewa-dashboard-inbox-value-card {
    margin: 12px 0;
}

.matewa-dashboard-page .matewa-dashboard-sidebar-intro {
    margin-bottom: 12px;
}

.matewa-dashboard-page .matewa-dashboard-history-privacy-note {
    margin-top: 10px;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-summary-mini.is-simplified > div.is-primary,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-detail-zone {
    border-color: rgba(34, 197, 94, 0.18);
    background: rgba(20, 83, 45, 0.22);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-detail-zone summary {
    color: #bbf7d0;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-detail-zone .matewa-dashboard-retention-card {
    border-top-color: rgba(148, 163, 184, 0.15);
    background: rgba(9, 20, 32, 0.58);
}

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(245px, 0.86fr) minmax(500px, 1.34fr) minmax(270px, 0.80fr) !important;
        gap: clamp(18px, 1.45vw, 28px) !important;
        min-height: clamp(570px, calc(100vh - 172px), 690px) !important;
        padding: clamp(22px, 1.65vw, 30px) !important;
    }

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

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        justify-content: flex-start !important;
        padding-top: clamp(24px, 2.6vh, 38px) !important;
    }

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

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(166px, 12.35vw, 212px);
        --matewa-cv-orbit-node: clamp(100px, 7.3vw, 122px);
        --matewa-cv-centre-size: clamp(202px, 14.2vw, 248px);
        max-width: 660px !important;
        margin: 0 auto !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        min-height: 0 !important;
        padding: clamp(16px, 1.45vw, 22px) !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(220px, 0.80fr) minmax(445px, 1.28fr) minmax(255px, 0.82fr) !important;
        gap: 18px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(148px, 11.2vw, 172px);
        --matewa-cv-orbit-node: clamp(92px, 6.8vw, 106px);
        --matewa-cv-centre-size: clamp(184px, 13.3vw, 208px);
        max-width: 540px !important;
    }

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

@media (min-width: 1361px) and (max-width: 1540px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(255px, 0.84fr) minmax(510px, 1.34fr) minmax(275px, 0.80fr) !important;
    }
}

@media (min-width: 1541px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(300px, 0.86fr) minmax(600px, 1.38fr) minmax(305px, 0.76fr) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(182px, 11.6vw, 226px);
        --matewa-cv-orbit-node: clamp(108px, 6.8vw, 128px);
        --matewa-cv-centre-size: clamp(220px, 13.4vw, 264px);
    }
}

@media (max-width: 1180px) {
    .matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------------
   Phase 5-A-19E: right rail accommodation and radial left balance.
   CSS/layout-only follow-up to 5-A-19D.
   Purpose: stop the simplified right Lead activity rail being clipped on
   desktop, move the radial/toggle slightly left to create breathing room,
   and let the radial scale down earlier before the layout crushes.
   No widget, chip, WhatsApp, lead-routing, wp_mail, licence, trial, storage,
   counter, remote-call or save-handler changes.
------------------------------------------------------------------------- */
@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(220px, 0.76fr) minmax(0, 1.06fr) minmax(300px, 0.92fr) !important;
        gap: clamp(14px, 1.05vw, 22px) !important;
        overflow: hidden !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        position: relative !important;
        z-index: 1 !important;
        transform: translateX(clamp(-38px, -2.15vw, -24px)) !important;
        width: calc(100% + clamp(24px, 2.15vw, 38px)) !important;
        padding-top: clamp(18px, 2.1vh, 32px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
        width: min(100%, 590px) !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        padding-right: clamp(10px, 1vw, 16px) !important;
    }

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

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        margin-left: 0 !important;
        margin-right: auto !important;
        max-width: min(100%, 640px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        position: relative !important;
        z-index: 2 !important;
        justify-self: stretch !important;
        width: 100% !important;
        min-width: 0 !important;
        padding-left: clamp(14px, 1.1vw, 20px) !important;
        padding-right: clamp(14px, 1.1vw, 20px) !important;
    }

    .matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified {
        gap: 8px !important;
    }

    .matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified > div {
        min-height: 82px !important;
        padding: 11px 12px !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(200px, 0.72fr) minmax(0, 1fr) minmax(286px, 0.96fr) !important;
        gap: 14px !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        transform: translateX(-20px) !important;
        width: calc(100% + 20px) !important;
    }

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

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(136px, 10.2vw, 150px) !important;
        --matewa-cv-orbit-node: clamp(84px, 6.4vw, 94px) !important;
        --matewa-cv-centre-size: clamp(170px, 12.6vw, 186px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-setup-panel {
        padding: 14px !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(230px, 0.78fr) minmax(0, 1.08fr) minmax(308px, 0.92fr) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(150px, 11.25vw, 178px) !important;
        --matewa-cv-orbit-node: clamp(94px, 6.8vw, 108px) !important;
        --matewa-cv-centre-size: clamp(188px, 13.4vw, 216px) !important;
    }
}

@media (min-width: 1541px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(290px, 0.84fr) minmax(0, 1.18fr) minmax(320px, 0.84fr) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        transform: translateX(clamp(-48px, -2.2vw, -36px)) !important;
        width: calc(100% + clamp(36px, 2.2vw, 48px)) !important;
    }
}

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

/* -------------------------------------------------------------------------
   Phase 5-A-19F: medium-width radial shrink and overlap guard.
   CSS/layout-only follow-up to 5-A-19E.
   Purpose: when the browser/window is reduced but still using the desktop
   dashboard layout, shrink the radial earlier and stop the lead toggle/header
   drifting over the left title. No widget, chip, WhatsApp, lead-routing,
   wp_mail, licence, trial, storage, counter, remote-call or save-handler
   changes.
------------------------------------------------------------------------- */
@media (min-width: 1181px) and (max-width: 1540px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        grid-template-columns: minmax(190px, 0.72fr) minmax(0, 0.98fr) minmax(286px, 0.96fr) !important;
        gap: clamp(12px, 0.9vw, 18px) !important;
        padding-left: clamp(18px, 1.35vw, 22px) !important;
        padding-right: clamp(18px, 1.35vw, 22px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-lead-panel {
        transform: none !important;
        width: 100% !important;
        padding-top: clamp(18px, 1.8vh, 28px) !important;
        overflow: visible !important;
    }

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

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

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
        --matewa-cv-orbit-distance: clamp(118px, 8.1vw, 152px) !important;
        --matewa-cv-orbit-node: clamp(78px, 5.5vw, 98px) !important;
        --matewa-cv-centre-size: clamp(152px, 10.6vw, 192px) !important;
        max-width: min(100%, 455px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial-center strong {
        font-size: clamp(31px, 2.6vw, 42px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-value {
        font-size: clamp(15px, 1.28vw, 19px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-label,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-trend {
        font-size: clamp(8.4px, 0.72vw, 10.5px) !important;
        line-height: 1.08 !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(180px, 0.70fr) minmax(0, 0.92fr) minmax(276px, 1fr) !important;
        gap: 12px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel h2 {
        font-size: clamp(30px, 2.65vw, 38px) !important;
        letter-spacing: -0.055em !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-hero-panel p {
        font-size: 13px !important;
        line-height: 1.42 !important;
    }

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

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header h3 {
        font-size: 13px !important;
        white-space: normal !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-toggle-button {
        min-height: 34px !important;
        padding: 6px 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(104px, 7.8vw, 124px) !important;
        --matewa-cv-orbit-node: clamp(72px, 5.2vw, 84px) !important;
        --matewa-cv-centre-size: clamp(142px, 10.2vw, 166px) !important;
        max-width: min(100%, 365px) !important;
    }

    .matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified > div {
        min-height: 76px !important;
        padding: 10px !important;
    }

    .matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified strong {
        font-size: 20px !important;
    }

    .matewa-dashboard-page .matewa-dashboard-history-summary-mini.is-simplified > div.is-top-page strong {
        font-size: 12.5px !important;
    }
}

/* Fallback guard for browsers that support container queries: if the Client
   View card itself becomes narrow while the viewport still looks desktop-wide,
   force an earlier compact desktop radial rather than letting columns overlap. */
@supports (container-type: inline-size) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        container-type: inline-size;
        container-name: matewa-client-home;
    }

    @container matewa-client-home (max-width: 980px) {
        .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
            grid-template-columns: minmax(178px, 0.70fr) minmax(0, 0.90fr) minmax(270px, 1fr) !important;
            gap: 12px !important;
        }

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

        .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header {
            max-width: 350px !important;
            margin-left: auto !important;
            margin-right: auto !important;
        }

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

        .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial {
            --matewa-cv-orbit-distance: 104px !important;
            --matewa-cv-orbit-node: 72px !important;
            --matewa-cv-centre-size: 142px !important;
            max-width: 350px !important;
            margin-left: auto !important;
            margin-right: auto !important;
        }
    }

    @container matewa-client-home (max-width: 860px) {
        .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
            grid-template-columns: 1fr !important;
            overflow: visible !important;
        }

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

/* -------------------------------------------------------------------------
   Phase 5-A-19G: Status view height guard.
   CSS/layout-only follow-up to 5-A-19F.
   Purpose: keep the Client View dashboard page footprint stable when toggling
   between Leads and Status, so the Status view does not shrink the page/card.
   No widget, chip, WhatsApp, lead-routing, wp_mail, licence, trial, storage,
   counter, remote-call or save-handler changes.
------------------------------------------------------------------------- */
@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        min-height: max(760px, calc(100vh - 150px)) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"] {
        min-height: 640px !important;
    }
}

@media (min-width: 1181px) and (max-width: 1320px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        min-height: max(720px, calc(100vh - 140px)) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"] {
        min-height: 600px !important;
    }
}

@media (max-width: 1180px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-sidebar-view[data-matewa-circle-sidebar-view="status"] {
        min-height: 0 !important;
    }
}

/* -------------------------------------------------------------------------
   Phase 5-A-20C: dashboard card gap and radius final polish.
   CSS/layout-only. Keeps the accepted dashboard structure while reducing the
   excessive bottom footprint and normalising the Client View card corners.
   No widget, chip, WhatsApp, lead-routing, licence, trial, storage, counter,
   remote-call or save-handler changes.
------------------------------------------------------------------------- */
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
    border-radius: 24px !important;
}

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        min-height: clamp(660px, calc(100vh - 195px), 720px) !important;
        padding-top: clamp(22px, 1.55vw, 28px) !important;
        padding-bottom: clamp(22px, 1.55vw, 28px) !important;
    }

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

@media (min-width: 1181px) and (max-width: 1320px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        min-height: clamp(640px, calc(100vh - 185px), 700px) !important;
    }

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

@media (max-width: 782px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        border-radius: 18px !important;
        min-height: 0 !important;
    }
}

/* -------------------------------------------------------------------------
   Phase 5-A-20F: dashboard visual uniformity finish.
   CSS/layout-only. Keeps the accepted Leads/Status radial behaviour while
   matching the final admin radius, padding and card rhythm.
   No frontend widget, save, Visitor Button Studio, WhatsApp, lead-routing,
   licence, trial, counter, storage or remote-call logic changes.
------------------------------------------------------------------------- */
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card,
.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 {
    border-radius: 22px !important;
    box-sizing: border-box !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
    gap: clamp(14px, 1.25vw, 18px) !important;
    border-radius: 24px !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.45vw, 24px) !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-header,
.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 {
    max-width: 100% !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-check-row,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-status-card,
.matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-history-summary-mini > div {
    border-radius: 16px !important;
}

@media (min-width: 1181px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        min-height: clamp(650px, calc(100vh - 200px), 710px) !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: 1181px) and (max-width: 1320px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card {
        min-height: clamp(635px, calc(100vh - 190px), 690px) !important;
    }
}

@media (max-width: 782px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-value-card,
    .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 {
        border-radius: 18px !important;
    }
}

/* =========================================================
   247ChatMate — 5-A-20F-7 responsive radial text guard
   Scope: Client View dashboard text sizing only. Reduces orbit/centre text
   as the radial shrinks so labels do not collide or overflow. No dashboard
   counts, storage, lead-routing, widget, chip, licence, trial, or remote logic.
========================================================= */

@media (min-width: 1181px) and (max-width: 1440px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item {
        padding: 7px !important;
        gap: 2px !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-value {
        max-width: calc(var(--matewa-cv-orbit-node, 98px) - 18px) !important;
        font-size: clamp(13px, 1.08vw, 17px) !important;
        line-height: 0.98 !important;
        letter-spacing: -0.035em !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-label,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-trend {
        max-width: calc(var(--matewa-cv-orbit-node, 98px) - 14px) !important;
        font-size: clamp(7.2px, 0.62vw, 9.2px) !important;
        line-height: 1.06 !important;
        letter-spacing: -0.02em !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial-center strong {
        font-size: clamp(26px, 2.25vw, 35px) !important;
        line-height: 0.94 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial-center .matewa-dashboard-radial-label,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial-center .matewa-dashboard-radial-trend {
        font-size: clamp(8.2px, 0.72vw, 10.5px) !important;
        line-height: 1.08 !important;
    }
}

@media (min-width: 1181px) and (max-width: 1280px) {
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-value {
        font-size: clamp(12px, 1vw, 15.5px) !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-label,
    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-trend {
        font-size: clamp(6.8px, 0.56vw, 8.4px) !important;
        line-height: 1.04 !important;
    }

    .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial-center strong {
        font-size: clamp(24px, 2vw, 31px) !important;
    }
}

@supports (container-type: inline-size) {
    @container matewa-client-home (max-width: 980px) {
        .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item {
            padding: 6px !important;
            gap: 1px !important;
        }

        .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-value {
            font-size: 12px !important;
            line-height: 0.96 !important;
        }

        .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-label,
        .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-orbit-item .matewa-dashboard-metric-trend {
            font-size: 6.8px !important;
            line-height: 1.02 !important;
        }

        .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial-center strong {
            font-size: 24px !important;
        }

        .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial-center .matewa-dashboard-radial-label,
        .matewa-dashboard-page[data-matewa-active-panel="dashboard"] .matewa-dashboard-circle-view .matewa-dashboard-radial-center .matewa-dashboard-radial-trend {
            font-size: 8px !important;
            line-height: 1.05 !important;
        }
    }
}

/* =========================================================
   247ChatMate — 5-A-21A client view visual calibration pass
   Checkpoint: EXPERTVISUALCALIBRATION5A21ALOCK

   Scope:
   - Client dashboard hierarchy, radial balance, lead rail readability,
     contrast, density and premium surface separation.
   - Visual-only. No counters, lead history, storage, routing, widget,
     licence, save-handler or chip-system changes.
========================================================= */

.matewa-dashboard-page .matewa-dashboard-value-card {
    gap: clamp(22px, 2.2vw, 34px);
}

.matewa-dashboard-page .matewa-dashboard-hero-panel h2 {
    letter-spacing: -0.055em;
}

.matewa-dashboard-page .matewa-dashboard-hero-panel p,
.matewa-dashboard-page .matewa-dashboard-lead-panel p,
.matewa-dashboard-page .matewa-dashboard-inbox-value-card p,
.matewa-dashboard-page .matewa-dashboard-history-privacy-note,
.matewa-dashboard-page .matewa-dashboard-future-card span {
    line-height: 1.55;
}

.matewa-dashboard-page .matewa-dashboard-status-pill,
.matewa-dashboard-page .matewa-dashboard-history-button,
.matewa-dashboard-page .matewa-dashboard-inbox-value-card code {
    letter-spacing: -0.01em;
}

.matewa-dashboard-page .matewa-dashboard-future-card {
    min-height: 92px;
}

.matewa-dashboard-page .matewa-dashboard-future-card span {
    max-width: 112px;
}

.matewa-dashboard-page .matewa-dashboard-circle-toggle {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.075);
}

.matewa-dashboard-page .matewa-dashboard-radial-center,
.matewa-dashboard-page .matewa-dashboard-orbit-item,
.matewa-dashboard-page .matewa-dashboard-history-summary-mini > div,
.matewa-dashboard-page .matewa-dashboard-inbox-value-card,
.matewa-dashboard-page .matewa-dashboard-retention-card {
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

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

.matewa-dashboard-page .matewa-dashboard-lead-panel {
    border-radius: 24px;
}

.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 {
    border-radius: 16px;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-hero-panel p,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-lead-panel p,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-inbox-value-card p,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-privacy-note,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-future-card span {
    color: #d6e2ee !important;
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-value-card,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-lead-panel {
    border-color: rgba(148, 163, 184, 0.22);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-radial-center,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-orbit-item,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-history-summary-mini > div,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-inbox-value-card,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-retention-card,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-danger-zone {
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-circle-toggle {
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-metric-label,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-metric-trend,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-radial-label,
.matewa-dashboard-shell[data-matewa-dashboard-theme="dark"] .matewa-dashboard-radial-trend {
    color: #dbeafe;
}

@media (max-width: 1180px) {
    .matewa-dashboard-page .matewa-dashboard-future-card span {
        max-width: 140px;
    }
}

/* =========================================================
   247ChatMate — 5A21K dashboard top-card gap guard
   Dashboard component spacing only.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard {
    margin-top: var(--matewa-admin-visual-top-gap, 14px) !important;
    padding-top: 0 !important;
}

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


/* =========================================================
   247ChatMate — 5A21L dashboard rear-card top gap support
   Dashboard card owns its top offset from the topbar.
========================================================= */

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.matewa-dashboard-page[data-matewa-active-panel="dashboard"] #matewa-admin-panel-dashboard > .matewa-dashboard-value-card {
    margin-top: var(--matewa-admin-visual-top-gap, 14px) !important;
}
