/* ============================================================================
   V2 DASHBOARD — SHARED STYLES (MASTER)
   Design tokens + styles shared across every V2 page (card/table primitives,
   data alignment). Page-specific layouts — including the sidebar, which is
   only meant to apply on V2 pages — have been split into their own files
   and are pulled in below via @import, so any page that already links this
   file continues to get everything it did before.

    I just got overwhelmed trying to keep track of everything as I was building out these pages
   ============================================================================ */


/* This was getting large, so I started breaking it up to the best of my ability. */
@import url("v2-sidebar.css");
@import url("v2-index.css");
@import url("v2-budget-months-panel.css");
@import url("v2-analytics-dashboard.css");
@import url("v2-ga4-source-medium.css");
@import url("v2-ga4-events.css");
@import url("v2-inventory.css");
@import url("v2-inaudience.css");
@import url("v2-ai-analysis.css");
@import url("v2-print-ready.css");
@import url("v2-ai-search.css");
@import url("v2-deepsignal.css");
@import url("v2-dealerio.css");
@import url("v2-accountmanagement.css");
@import url("v2-asset-library.css");
@import url("v2-targeting.css");
@import url("v2-coop-documents.css");
@import url("v2-attribution.css");
@import url("v2-auth.css");
@import url("v2-users.css");
@import url("serviceclicks.css");
@import url("v2-scorecard.css");

:root {
    --fp-accent: #2f5bff;
    --fp-accent-soft: #eef1ff;
    --fp-ink: #1f2138;
    --fp-ink-soft: #63647d;
    --fp-border: #dfe2f0;
    --fp-surface: #ffffff;
    --fp-track: #f1f2fa;
    --fp-radius: 10px;
    --fp-ease: 160ms cubic-bezier(.4,0,.2,1);
}


/* ============================================================================
   V2 SHARED BTN
   ============================================================================ */


.btn-v2-primary {
    display: inline-flex;
    align-items: center;
    background: var(--fp-accent);
    border: none;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    padding: 6px 16px;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--fp-ease);
}

    .btn-v2-primary:hover {
        background: #1d43cc;
        color: #fff;
    }

    .btn-v2-primary:focus,
    .btn-v2-primary:focus-visible {
        box-shadow: 0 0 0 0.2rem rgba(47, 91, 255, 0.25);
        outline: none;
    }


/* 
    Analytics container wound up being used in everything. Should probably rename it
*/
#analytics-container {
    background: #FBFBFE;
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ============================================================================
   V2 SHARED CARD + TABLE PRIMITIVES
   Generic building blocks for v2 pages
   ============================================================================ */

.v2-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 1.4rem 1.5rem 1.2rem 1.5rem;
}

.v2-card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.v2-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.15rem;
}

.v2-card-subtitle {
    font-size: 0.78rem;
    color: #6c757d;
    margin: 0;
}

.v2-year-badge {
    display: inline-flex;
    align-items: center;
    background: var(--fp-accent-soft);
    color: var(--fp-accent);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    white-space: nowrap;
}

/* Table treatment shared by the yearly snapshot grid + rep-summary grid */
.v2-table-wrapper {
    overflow-x: auto;
}

.v2-table thead th {
    background: var(--fp-track) !important;
    color: var(--fp-ink-soft) !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.68rem;
    font-weight: 700;
    border-bottom: 1px solid var(--fp-border) !important;
    white-space: nowrap;
}

.v2-table tbody td {
    font-size: 0.85rem;
    color: #1a1a2e;
    vertical-align: middle;
}

.v2-table tbody tr:hover {
    background: var(--fp-accent-soft);
}

.v2-table tbody tr.row-selected {
    background: var(--fp-accent-soft);
    box-shadow: inset 3px 0 0 var(--fp-accent);
}

.v2-table a.link-rep-clients {
    color: var(--fp-accent);
    font-weight: 600;
    text-decoration: none;
}

    .v2-table a.link-rep-clients:hover {
        text-decoration: underline;
    }

/* Sort icons: unfortunately d ataTables' own icon markup collides with this theme's
   existing icon set on some pages, producing multiple stacked arrows.
    It looked bad.
   Suppress every native source and render a new one */
.v2-table thead th.sorting,
.v2-table thead th.sorting_asc,
.v2-table thead th.sorting_desc,
.v2-table thead th.sorting_asc_disabled,
.v2-table thead th.sorting_desc_disabled {
    background-image: none !important;
}

    .v2-table thead th.sorting:before,
    .v2-table thead th.sorting:after,
    .v2-table thead th.sorting_asc:before,
    .v2-table thead th.sorting_asc:after,
    .v2-table thead th.sorting_desc:before,
    .v2-table thead th.sorting_desc:after {
        content: none !important;
        display: none !important;
    }

.v2-table thead th .dt-column-order {
    display: none !important;
}

    .v2-table thead th .dt-column-order:before,
    .v2-table thead th .dt-column-order:after {
        content: none !important;
        display: none !important;
    }

.v2-table thead th[aria-sort] {
    position: relative;
    cursor: pointer;
    padding-right: 22px !important;
}

    .v2-table thead th[aria-sort]:after {
        content: "\25BC" !important;
        display: inline-block !important;
        font-size: 0.6rem;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--fp-accent) !important;
        opacity: 1 !important;
    }

.v2-table thead th[aria-sort="ascending"]:after {
    content: "\25B2" !important;
}


/* ============================================================================
   DATA ALIGNMENT — KEEP CARD DATA LEFT-ALIGNED
   ============================================================================ */

.kpi-card,
.kpi-label,
.kpi-value,
.kpi-sub-text,
.kpi-cost-row {
    text-align: left !important;
}

.kpi-card-header {
    justify-content: flex-start;
}

.hero-stat-card,
.hero-stat-card .stat-label,
.hero-stat-card .stat-value,
.hero-stat-card .stat-note {
    text-align: left !important;
}

.vdp-stat-mini,
.vdp-stat-mini .mini-label,
.vdp-stat-mini .mini-value,
.vdp-stat-mini .mini-sub {
    text-align: left !important;
}

.assist-stat-item,
.assist-stat-label,
.assist-stat-value,
.assist-stat-sub {
    text-align: left !important;
}

.insight-card,
.insight-card-title,
.insight-card-subtitle,
.insight-item,
.insight-item-title,
.insight-item-body {
    text-align: left !important;
}

.mc-row-label,
.mc-row-prior {
    text-align: left !important;
}

.v2-card,
.v2-card-title,
.v2-card-subtitle {
    text-align: left !important;
}

.v2-table tbody td,
.v2-table thead th {
    text-align: left !important;
}

/** Excel stuff */
.export-excel-wrap {
    position: relative;
}

.export-excel-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    width: 290px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 14px;
}

.export-excel-popover-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #111827;
    margin-bottom: 6px;
}

.export-excel-popover-text {
    font-size: 12.5px;
    line-height: 1.5;
    color: #4B5563;
    margin-bottom: 12px;
}

    .export-excel-popover-text strong {
        color: #111827;
    }

.export-excel-popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
