/*
 * Emma Mason Intelligence Console 0.3.0
 * Lubrand-inspired frontend shell.
 *
 * Presentation only:
 * - backend remains the source of truth;
 * - no settings or write actions are exposed;
 * - existing report renderers are embedded without changing their data logic.
 */

:root {
    --em-shell-bg: #f4f6f8;
    --em-shell-surface: #ffffff;
    --em-shell-ink: #172033;
    --em-shell-muted: #677386;
    --em-shell-border: #dfe5ec;
    --em-shell-topbar: #0b1220;
    --em-shell-topbar-soft: rgba(255, 255, 255, .09);
    --em-shell-accent: #1f5a8a;
    --em-shell-accent-dark: #143b5d;
    --em-shell-brand: #b42336;
    --em-shell-success: #22c55e;
    --em-shell-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    --em-shell-radius: 16px;
}

/*
 * Turn the shortcode page into an app surface.
 * JS adds .em-intel-console-page; :has() is a progressive fallback.
 */
body.em-intel-console-page,
body:has(.em-intel-console[data-em-intelligence-console="1"]) {
    background: var(--em-shell-bg);
}

body.em-intel-console-page .wp-site-blocks > header,
body.em-intel-console-page .wp-site-blocks > footer,
body:has(.em-intel-console[data-em-intelligence-console="1"]) .wp-site-blocks > header,
body:has(.em-intel-console[data-em-intelligence-console="1"]) .wp-site-blocks > footer {
    display: none !important;
}

body.em-intel-console-page .wp-block-post-title,
body.em-intel-console-page .entry-title,
body:has(.em-intel-console[data-em-intelligence-console="1"]) .wp-block-post-title,
body:has(.em-intel-console[data-em-intelligence-console="1"]) .entry-title {
    display: none !important;
}

body.em-intel-console-page main,
body.em-intel-console-page .wp-block-post-content,
body.em-intel-console-page .entry-content,
body:has(.em-intel-console[data-em-intelligence-console="1"]) main,
body:has(.em-intel-console[data-em-intelligence-console="1"]) .wp-block-post-content,
body:has(.em-intel-console[data-em-intelligence-console="1"]) .entry-content {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.em-intel-console {
    --em-content-width: 1680px;
    width: 100vw !important;
    max-width: none !important;
    min-height: calc(100vh - 32px);
    margin: 0 calc(50% - 50vw) !important;
    padding: 0;
    overflow-x: clip;
    background: var(--em-shell-bg);
    color: var(--em-shell-ink);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

.em-intel-console *,
.em-intel-console *::before,
.em-intel-console *::after {
    box-sizing: border-box;
}

.em-intel-console a {
    text-underline-offset: 2px;
}

.em-intel-console h1,
.em-intel-console h2,
.em-intel-console h3,
.em-intel-console h4,
.em-intel-console h5,
.em-intel-console h6 {
    letter-spacing: normal !important;
    word-spacing: normal !important;
}

/* ==========================================================================
 * Sticky topbar, adapted from the Lubrand dashboard shell
 * ========================================================================== */

.em-intel-header {
    position: sticky;
    top: 0;
    z-index: 9990;
    width: 100%;
    background: var(--em-shell-topbar);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 6px 22px rgba(2, 6, 23, .18);
}

.admin-bar .em-intel-header {
    top: 32px;
}

.em-intel-header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(96vw, var(--em-content-width));
    min-height: 64px;
    margin: 0 auto;
    padding: 10px 14px;
}

.em-intel-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 220px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.em-intel-brand-mark {
    display: inline-block;
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 999px;
    background: var(--em-shell-brand);
    box-shadow: 0 0 0 5px rgba(180, 35, 54, .16);
}

.em-intel-brand > span:last-child {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.em-intel-brand strong {
    display: inline;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .06em !important;
}

.em-intel-brand small {
    display: inline;
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
    font-weight: 500;
}

.em-intel-primary-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.em-intel-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .84) !important;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none !important;
    white-space: nowrap;
    transition:
        background .15s ease,
        color .15s ease,
        transform .15s ease;
}

.em-intel-nav-link:hover,
.em-intel-nav-link:focus-visible {
    background: rgba(255, 255, 255, .08);
    color: #fff !important;
}

.em-intel-nav-link.is-active {
    background: rgba(255, 255, 255, .15);
    color: #fff !important;
}

.em-intel-user {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    white-space: nowrap;
}

.em-intel-user a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 9px;
    color: #fff !important;
    text-decoration: none !important;
}

.em-intel-user a:hover {
    background: rgba(255, 255, 255, .08);
}

.em-intel-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-left: auto;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 10px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* ==========================================================================
 * Main sheet and page heading
 * ========================================================================== */

.em-intel-main {
    width: min(96vw, var(--em-content-width));
    min-height: calc(100vh - 64px);
    margin: 0 auto;
    padding: 24px 14px 52px;
}

.em-intel-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 16px;
    padding: 18px 20px;
    border: 1px solid var(--em-shell-border);
    border-radius: var(--em-shell-radius);
    background: var(--em-shell-surface);
    box-shadow: var(--em-shell-shadow);
}

.em-intel-page-head > div {
    min-width: 0;
}

.em-intel-page-head h1 {
    margin: 4px 0 6px !important;
    color: var(--em-shell-ink);
    font-size: clamp(24px, 2.4vw, 34px) !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
}

.em-intel-page-head p {
    max-width: 920px;
    margin: 0 !important;
    color: var(--em-shell-muted);
    font-size: 14px;
    line-height: 1.55;
}

.em-intel-eyebrow,
.em-intel-card-status {
    color: var(--em-shell-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.em-intel-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid var(--em-shell-border);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--em-shell-muted);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

/* ==========================================================================
 * Cards and section directory
 * ========================================================================== */

.em-intel-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.em-intel-card-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.em-intel-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 205px;
    padding: 19px;
    border: 1px solid var(--em-shell-border);
    border-radius: var(--em-shell-radius);
    background: var(--em-shell-surface);
    box-shadow: var(--em-shell-shadow);
    overflow: hidden;
}

.em-intel-card h2 {
    margin: 10px 0 7px !important;
    color: var(--em-shell-ink);
    font-size: 19px !important;
    font-weight: 780 !important;
    line-height: 1.2 !important;
}

.em-intel-card p {
    flex: 1;
    margin: 0 0 16px !important;
    color: var(--em-shell-muted);
    font-size: 13px;
    line-height: 1.55;
}

.em-intel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 38px;
    padding: 9px 14px;
    border: 0;
    border-radius: 11px;
    background: var(--em-shell-topbar);
    color: #fff !important;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    transition:
        opacity .15s ease,
        transform .15s ease;
}

.em-intel-button:hover,
.em-intel-button:focus-visible {
    opacity: .9;
    transform: translateY(-1px);
}

/* ==========================================================================
 * Secondary navigation
 * ========================================================================== */

.em-intel-subnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 14px;
    padding: 10px;
    border: 1px solid var(--em-shell-border);
    border-radius: 14px;
    background: var(--em-shell-surface);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.em-intel-subnav-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 10px;
    color: #445066 !important;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none !important;
}

.em-intel-subnav-link:hover,
.em-intel-subnav-link:focus-visible {
    background: #f1f5f9;
    color: var(--em-shell-ink) !important;
}

.em-intel-subnav-link.is-active {
    background: var(--em-shell-topbar);
    color: #fff !important;
}

/* ==========================================================================
 * Existing People Like You report embedded in the shell
 * ========================================================================== */

.em-intel-legacy-report {
    width: 100%;
    max-width: none !important;
    min-width: 0;
}

.em-intel-legacy-report > * {
    max-width: none !important;
}

.em-intel-legacy-report .yupy-topbar,
.em-intel-legacy-report .emma-c6-page-header > .yupy-pill {
    display: none !important;
}

.em-intel-legacy-report .emma-c6-container,
.em-intel-legacy-report .yupy-container,
.em-intel-legacy-report .emma-c6-shell,
.em-intel-legacy-report .emma-c6-content {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.em-intel-legacy-report .yupy-card,
.em-intel-legacy-report .emma-c6-card {
    border-color: var(--em-shell-border);
    box-shadow: var(--em-shell-shadow);
}

/* ==========================================================================
 * Messages and notices
 * ========================================================================== */

.em-intel-message {
    margin: 14px 0;
    padding: 17px 18px;
    border: 1px solid var(--em-shell-border);
    border-left: 4px solid var(--em-shell-accent);
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--em-shell-shadow);
}

.em-intel-message--error {
    border-left-color: #b42318;
}

.em-intel-message h2 {
    margin: 0 0 5px !important;
    color: var(--em-shell-ink);
    font-size: 18px !important;
}

.em-intel-message p {
    margin: 0 !important;
    color: var(--em-shell-muted);
}

.em-intel-notice {
    margin: 14px 0;
    padding: 11px 13px;
    border: 1px solid #c9dced;
    border-left: 4px solid var(--em-shell-accent);
    border-radius: 10px;
    background: #edf5fb;
    color: #34536c;
    font-size: 12px;
}

/* ==========================================================================
 * Search Console filters and KPIs
 * ========================================================================== */

.em-gsc-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 11px;
    margin: 0 0 14px;
    padding: 15px;
    border: 1px solid var(--em-shell-border);
    border-radius: var(--em-shell-radius);
    background: #fff;
    box-shadow: var(--em-shell-shadow);
}

.em-gsc-filters label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 130px;
    color: #3f4b5f;
    font-size: 11px;
    font-weight: 700;
}

.em-gsc-filters input,
.em-gsc-filters select {
    width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #cbd5df;
    border-radius: 11px;
    background: #fff;
    color: var(--em-shell-ink);
    font: inherit;
    font-size: 12px;
    box-shadow: none;
}

.em-gsc-filters input:focus,
.em-gsc-filters select:focus {
    border-color: var(--em-shell-accent);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(31, 90, 138, .1);
}

.em-gsc-search {
    min-width: 230px !important;
    flex: 1;
}

.em-intel-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.em-intel-metric {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--em-shell-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .045);
}

.em-intel-metric span {
    display: block;
    margin-bottom: 7px;
    color: var(--em-shell-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.em-intel-metric strong {
    display: block;
    overflow: hidden;
    color: var(--em-shell-ink);
    font-size: clamp(20px, 2vw, 27px);
    font-weight: 820;
    line-height: 1.05;
    text-overflow: ellipsis;
}

/* ==========================================================================
 * Tables
 * ========================================================================== */

.em-gsc-table-wrap {
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--em-shell-border);
    border-radius: var(--em-shell-radius);
    background: #fff;
    box-shadow: var(--em-shell-shadow);
}

.em-gsc-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
    border-spacing: 0;
}

.em-gsc-table th,
.em-gsc-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e8edf2;
    text-align: left;
    vertical-align: top;
    font-size: 12px;
}

.em-gsc-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    color: #334155;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.em-gsc-table th a {
    color: #334155 !important;
    text-decoration: none !important;
}

.em-gsc-table tbody tr:last-child td {
    border-bottom: 0;
}

.em-gsc-table tbody tr:hover td {
    background: #fbfdff;
}

.em-gsc-product {
    min-width: 350px;
}

.em-gsc-product strong {
    display: block;
    margin-bottom: 6px;
    color: var(--em-shell-ink);
    font-size: 13px;
    line-height: 1.35;
}

.em-gsc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.em-gsc-badges span {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 999px;
    background: #edf5fb;
    color: var(--em-shell-accent);
    font-size: 9px;
    font-weight: 750;
}

.em-gsc-url {
    display: block;
    max-width: 500px;
    margin-top: 7px;
    overflow: hidden;
    color: var(--em-shell-accent) !important;
    font-size: 10px;
    text-decoration: none !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.em-gsc-queries {
    min-width: 310px;
}

.em-gsc-queries summary {
    color: var(--em-shell-accent);
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.em-gsc-queries table {
    width: 100%;
    margin-top: 7px;
    border-collapse: collapse;
}

.em-gsc-queries th,
.em-gsc-queries td {
    position: static;
    padding: 5px;
    font-size: 10px;
    letter-spacing: normal;
    text-transform: none;
}

/* ==========================================================================
 * Pagination
 * ========================================================================== */

.em-intel-pagination {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 14px;
}

.em-intel-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid var(--em-shell-border);
    border-radius: 9px;
    background: #fff;
    color: var(--em-shell-accent) !important;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none !important;
}

.em-intel-pagination .page-numbers.current {
    border-color: var(--em-shell-topbar);
    background: var(--em-shell-topbar);
    color: #fff !important;
}

/* ==========================================================================
 * Inline WordPress login
 * ========================================================================== */

.em-intel-login {
    display: grid;
    place-items: center;
    width: 100vw;
    min-height: 100vh;
    margin: 0 calc(50% - 50vw);
    padding: 28px 18px;
    background: var(--em-shell-bg);
}

.em-intel-login-card {
    width: min(520px, 100%);
    padding: 24px;
    border: 1px solid var(--em-shell-border);
    border-radius: var(--em-shell-radius);
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .12);
}

.em-intel-login-card h1 {
    margin: 7px 0 !important;
    color: var(--em-shell-ink);
    font-size: 28px !important;
}

.em-intel-login-card p {
    color: var(--em-shell-muted);
}

.em-intel-login-card label {
    display: block;
    margin-bottom: 5px;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}

.em-intel-login-card input[type="text"],
.em-intel-login-card input[type="password"] {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #cbd5df;
    border-radius: 11px;
    background: #f8fafc;
    font: inherit;
}

.em-intel-login-card input[type="submit"] {
    width: 100%;
    min-height: 42px;
    padding: 9px 14px;
    border: 0;
    border-radius: 11px;
    background: var(--em-shell-topbar);
    color: #fff;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

/* ==========================================================================
 * Responsive behavior
 * ========================================================================== */

@media (max-width: 1180px) {
    .em-intel-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .em-intel-card-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .em-intel-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .em-intel-user span {
        display: none;
    }
}

@media (max-width: 900px) {
    .em-intel-menu-toggle {
        display: inline-flex;
    }

    .em-intel-header-inner {
        flex-wrap: wrap;
        width: 100%;
        padding: 10px 12px;
    }

    .em-intel-brand {
        min-width: 0;
        flex: 1;
    }

    .em-intel-primary-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        order: 10;
        padding-top: 4px;
    }

    .em-intel-primary-nav.is-open {
        display: flex;
    }

    .em-intel-nav-link {
        justify-content: flex-start;
        width: 100%;
    }

    .em-intel-user {
        display: none;
    }

    .em-intel-main {
        width: 100%;
        padding: 16px 12px 38px;
    }

    .em-intel-page-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .em-gsc-filters label,
    .em-gsc-search {
        min-width: calc(50% - 6px) !important;
        flex: 1 1 calc(50% - 6px);
    }
}

@media (max-width: 782px) {
    .admin-bar .em-intel-header {
        top: 46px;
    }
}

@media (max-width: 640px) {
    .em-intel-brand > span:last-child {
        display: block;
    }

    .em-intel-brand strong,
    .em-intel-brand small {
        display: block;
    }

    .em-intel-card-grid,
    .em-intel-card-grid--compact,
    .em-intel-metrics {
        grid-template-columns: 1fr;
    }

    .em-gsc-filters label,
    .em-gsc-search,
    .em-gsc-filters .em-intel-button {
        width: 100%;
        min-width: 100% !important;
        flex-basis: 100%;
    }

    .em-intel-subnav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .em-intel-subnav-link {
        flex: 0 0 auto;
    }
}

@media print {
    body.em-intel-console-page .wp-admin-bar,
    .em-intel-header,
    .em-intel-subnav,
    .em-gsc-filters,
    .em-intel-user {
        display: none !important;
    }

    .em-intel-console,
    .em-intel-main {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .em-intel-card,
    .em-intel-page-head,
    .em-gsc-table-wrap {
        box-shadow: none !important;
    }
}


/* ==========================================================================
 * 7C_FRONTEND_CONSOLE_CENTERING_0_2_1
 * Keep the shortcode console centered regardless of Elementor container width.
 * ========================================================================== */

body.em-intel-console-page .elementor-widget-shortcode,
body.em-intel-console-page .elementor-widget-shortcode > .elementor-widget-container,
body.em-intel-console-page .elementor-shortcode,
body:has(.em-intel-console[data-em-intelligence-console="1"]) .elementor-widget-shortcode,
body:has(.em-intel-console[data-em-intelligence-console="1"]) .elementor-widget-shortcode > .elementor-widget-container,
body:has(.em-intel-console[data-em-intelligence-console="1"]) .elementor-shortcode {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.em-intel-console[data-em-intelligence-console="1"] {
    position: relative;
    left: 50%;
    width: min(1600px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    margin-right: 0;
    margin-left: 0;
    transform: translateX(-50%);
}

@media (max-width: 782px) {
    .em-intel-console[data-em-intelligence-console="1"] {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
    }
}

/* ==========================================================================
 * 7C_FRONTEND_CONSOLE_VIEWPORT_CENTERING_0_2_2
 *
 * Elementor constrains the shortcode widget inside its own content column.
 * left:50% was therefore relative to that column, not to the browser viewport.
 * This full-bleed formula centers the console against the real viewport.
 * ========================================================================== */

.em-intel-console[data-em-intelligence-console="1"] {
    position: relative !important;
    left: auto !important;
    width: calc(100vw - 32px) !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: calc(50% - 50vw + 16px) !important;
    transform: none !important;
}

@media (max-width: 782px) {
    .em-intel-console[data-em-intelligence-console="1"] {
        width: calc(100vw - 16px) !important;
        margin-left: calc(50% - 50vw + 8px) !important;
    }
}


/* ==========================================================================
 * 7C_FRONTEND_ANALYTICS_FULL_ROLLOUT_0_3_0
 *
 * Compatibility layer for the read-only backend report renderers.
 * No wp-admin navigation, settings form or write control is exposed.
 * ========================================================================== */

.em-intel-backend-report {
    width: 100%;
    min-width: 0;
}

.em-intel-backend-report .wrap,
.em-intel-backend-report .sevenc-client-analytics,
.em-intel-backend-report .sevenc-email-performance,
.em-intel-backend-report .sevenc-ga4-analytics,
.em-intel-backend-report .sevenc-hub-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.em-intel-backend-report .sevenc-car-header,
.em-intel-backend-report .sevenc-ep-header,
.em-intel-backend-report .sevenc-ga4-header,
.em-intel-backend-report .sevenc-hub-page-header,
.em-intel-backend-report .sevenc-ep-tabs,
.em-intel-backend-report .sevenc-ga4-tabs,
.em-intel-backend-report .sevenc-hub-primary-nav,
.em-intel-backend-report .sevenc-hub-secondary-nav {
    display: none !important;
}

.em-intel-backend-report .nav-tab-wrapper,
.em-intel-backend-report .sevenc-car-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 18px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--em-border);
}

.em-intel-backend-report .nav-tab {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin: 0;
    padding: 7px 11px;
    border: 1px solid var(--em-border);
    border-radius: 999px;
    background: #fff;
    color: var(--em-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.em-intel-backend-report .nav-tab:hover,
.em-intel-backend-report .nav-tab:focus,
.em-intel-backend-report .nav-tab-active {
    border-color: var(--em-navy);
    background: var(--em-navy);
    color: #fff;
}

.em-intel-backend-report .button,
.em-intel-backend-report input[type="submit"],
.em-intel-backend-report button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 36px;
    padding: 7px 13px;
    border: 1px solid var(--em-navy);
    border-radius: 6px;
    background: #fff;
    color: var(--em-navy);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.em-intel-backend-report .button-primary,
.em-intel-backend-report input[type="submit"].button-primary,
.em-intel-backend-report .button.button-primary {
    background: var(--em-navy);
    color: #fff;
}

.em-intel-backend-report .button.disabled,
.em-intel-backend-report .button[disabled] {
    opacity: .45;
    pointer-events: none;
}

.em-intel-backend-report input[type="date"],
.em-intel-backend-report input[type="search"],
.em-intel-backend-report input[type="text"],
.em-intel-backend-report input[type="number"],
.em-intel-backend-report select {
    min-height: 38px;
    max-width: 100%;
    padding: 7px 9px;
    border: 1px solid #bdc9d4;
    border-radius: 5px;
    background: #fff;
    color: var(--em-text);
}

.em-intel-backend-report select[multiple] {
    min-height: 118px;
}

.em-intel-backend-report .widefat,
.em-intel-backend-report table {
    border-collapse: collapse;
}

.em-intel-backend-report .widefat {
    width: 100%;
    background: #fff;
}

.em-intel-backend-report .widefat th,
.em-intel-backend-report .widefat td {
    padding: 10px;
    border: 1px solid #dcdcde;
    text-align: left;
    vertical-align: top;
}

.em-intel-backend-report .widefat thead th,
.em-intel-backend-report .widefat tfoot th {
    background: #f6f7f7;
    color: var(--em-navy);
    font-weight: 700;
}

.em-intel-backend-report .striped tbody tr:nth-child(odd) {
    background: #f8fafc;
}

.em-intel-backend-report .notice {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid var(--em-border);
    border-left: 4px solid var(--em-blue);
    border-radius: 6px;
    background: #fff;
}

.em-intel-backend-report .notice-error {
    border-left-color: #b42318;
}

.em-intel-backend-report .description {
    color: var(--em-muted);
}

.em-intel-backend-report .dashicons {
    display: inline-block;
    width: 20px;
    height: 20px;
    font-family: dashicons;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    text-decoration: inherit;
    vertical-align: top;
}

.em-intel-backend-report .tablenav-pages ul,
.em-intel-backend-report .page-numbers {
    list-style: none;
}

.em-intel-backend-report .page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.em-intel-backend-report .page-numbers li {
    margin: 0;
}

.em-intel-backend-report .page-numbers a,
.em-intel-backend-report .page-numbers span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 34px;
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid var(--em-border);
    border-radius: 5px;
    background: #fff;
    color: var(--em-blue);
    text-decoration: none;
}

.em-intel-backend-report .page-numbers .current {
    border-color: var(--em-blue);
    background: var(--em-blue);
    color: #fff;
}

.em-intel-backend-report .sevenc-hub-table-scroll,
.em-intel-backend-report .sevenc-car-table-scroll,
.em-intel-backend-report .sevenc-ep-table-scroll,
.em-intel-backend-report .sevenc-ga4-table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 782px) {
    .em-intel-backend-report .sevenc-ep-grid-2,
    .em-intel-backend-report .sevenc-ga4-two-column,
    .em-intel-backend-report .sevenc-hub-quality-grid {
        grid-template-columns: 1fr;
    }

    .em-intel-backend-report .sevenc-ep-filter,
    .em-intel-backend-report .sevenc-ga4-filter,
    .em-intel-backend-report .sevenc-car-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .em-intel-backend-report .sevenc-ep-presets,
    .em-intel-backend-report .sevenc-ga4-presets {
        margin-left: 0;
    }
}


/* ========================================================================== 
 * 7C_FRONTEND_CAMPAIGNS_STRUCTURE_0_7_0
 * ========================================================================== */

.em-intel-subnav--secondary {
    margin-top: -7px;
    background: #f8fafc;
}

.em-intel-backend-report--calendar {
    min-width: 0;
}

.em-intel-backend-report--calendar .sevenc-ai-progress-summary {
    margin-top: 20px;
}

.em-intel-backend-report--calendar .sevenc-calendar-programs,
.em-intel-backend-report--calendar .sevenc-calendar-occurrences {
    min-width: 1040px;
}

.em-intel-backend-report--calendar .sevenc-calendar-actions {
    min-width: 250px;
}

@media (max-width: 1100px) {
    .em-intel-header-inner {
        gap: 8px;
    }

    .em-intel-brand {
        min-width: 190px;
    }

    .em-intel-nav-link {
        padding-inline: 9px;
        font-size: 12px;
    }
}
