/* ============================================
   SHELL THEME — light app frame, purple brand accent
   Loaded after every shared stylesheet so it
   retints the common tokens and the AdminLTE
   frame (navbar, page background, cards,
   tables, primary buttons) on every page.
   Pairs with sidebar.css.
   ============================================ */
:root {
    /* Page accent. Defaults to teal; the inline script in the layout swaps
       these per page so each section gets its own colour. */
    --accent:      #6b35a8;
    --accent-d:    #552a8a;
    --accent-deep: #33174f;
    --accent-rgb:  107 53 168;
    --lp-primary:  var(--accent);
    --lp-primary2: var(--accent-d);
    --lp-dark:     #0f172a;
    --lp-dark2:    var(--accent-deep);
    --f-violet:    var(--accent);
    --f-violet-dk: var(--accent-d);
    --app-indigo:  var(--accent);
    --st-head:     var(--accent-deep);   /* table header band */
    --st-page:     #f4f6fa;
}

body,
.content-wrapper { background: var(--st-page) !important; }

/* ── Top bar: same colour as the page, no edge ── */
.main-header.navbar {
    background: var(--st-page) !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    border-radius: 0;
}
.main-header .nav-link { color: #334155; }
.main-header .nav-link:hover { color: var(--lp-primary); }

/* ── Cards: floating white panels ── */
.content-wrapper .card {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 1px 10px rgba(15,23,42,0.06);
}
.content-wrapper .card-header {
    background: #fff;
    border-bottom: 1px solid #eef1f5;
    font-weight: 600;
    color: #1e293b;
}
.content-wrapper .card-primary:not(.card-outline) > .card-header {
    background: var(--st-head);
    color: #fff;
}

/* ── Tables: dark purple header band, like a data grid ── */
.content-wrapper .table thead th:first-child { border-top-left-radius: 8px; }
.content-wrapper .table thead th:last-child  { border-top-right-radius: 8px; }
.content-wrapper .table-striped tbody tr:nth-of-type(odd) { background: #f8fafc; }
.content-wrapper .table-hover tbody tr:hover { background: rgb(var(--accent-rgb) / 0.06); }

/* ── Primary actions ── */
.content-wrapper .btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-d));
    border-color: transparent;
    box-shadow: 0 2px 8px rgb(var(--accent-rgb) / 0.28);
}
.content-wrapper .btn-primary:hover,
.content-wrapper .btn-primary:focus {
    background: linear-gradient(135deg, var(--accent-d), #3f1f6b);
    border-color: transparent;
}
.content-wrapper .btn-outline-primary { color: var(--accent); border-color: var(--accent); }
.content-wrapper .btn-outline-primary:hover { background: var(--accent); color: #fff; }

/* ── Pagination / nav pills ── */
.content-wrapper .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
}
.content-wrapper .nav-pills .nav-link.active,
.content-wrapper .nav-pills .show > .nav-link {
    background: var(--accent);
}
.content-wrapper .nav-tabs .nav-link.active { border-top: 2px solid var(--accent); }

/* ── Focus ring ── */
.content-wrapper .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.15);
}

/* ============================================
   HERO / PAGE HEADER — white, not dark
   ============================================ */
.lp-header {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 0 10px;
    padding: 14px 0 6px;
}
.lp-header::before,
.lp-header::after { display: none !important; }
.lp-breadcrumb,
.lp-breadcrumb a { color: #94a3b8; }
.lp-breadcrumb a:hover { color: var(--lp-primary); }
.lp-bc-active { color: #475569; }
.lp-title { color: #1e293b; }
.lp-subtitle { color: #64748b; }

/* Header buttons: light chips, teal primary */
.lp-header-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    backdrop-filter: none;
}
.lp-header-btn:hover { background: #f1f5f9; border-color: #cbd5e1; color: #1e293b; }
.lp-header-btn--primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-d));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgb(var(--accent-rgb) / 0.30);
}
.lp-header-btn--primary:hover {
    background: linear-gradient(135deg, var(--accent-d), #3f1f6b);
    box-shadow: 0 4px 14px rgb(var(--accent-rgb) / 0.40);
    color: #fff;
}

/* Card title bars were the same dark navy as the hero */
.lp-card-header {
    background: #fff;
    border-bottom: 1px solid #eef1f5;
}
.lp-card-title { color: #1e293b; }
.lp-card-title i { color: var(--lp-primary); }
.lp-card-badge { background: rgb(var(--accent-rgb) / 0.12); color: var(--accent-d); }

/* ============================================
   TABLES — dark purple header band, everywhere
   ============================================ */
.lp-table thead th,
.f-table thead th,
.cl-table thead th,
.dp-table thead th,
.pref-table thead th,
.fb-table thead th,
.ed-table thead th,
.bl-scope thead th,
.content-wrapper table.dataTable thead th,
.content-wrapper .table thead th {
    background: var(--st-head) !important;
    color: #fff !important;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-color: transparent !important;
    box-shadow: none !important;
    vertical-align: middle;
}
.cl-table thead tr,
.dp-table thead tr,
.pref-table thead tr,
.fb-table thead tr { background: var(--st-head) !important; }

.lp-table thead th:first-child,
.f-table thead th:first-child,
.content-wrapper .table thead th:first-child { border-top-left-radius: 10px; }
.lp-table thead th:last-child,
.f-table thead th:last-child,
.content-wrapper .table thead th:last-child  { border-top-right-radius: 10px; }

/* Sort arrows and links inside a dark header must stay readable */
.content-wrapper table thead th a,
.content-wrapper table thead th i { color: #fff; }

.lp-table tbody tr:hover,
.f-table tbody tr:hover { background: rgb(var(--accent-rgb) / 0.05); }
.lp-card, .lp-table-wrap { border-radius: 12px; }

/* Page-specific tables that carry their own class (deal approvals etc.) */
.da-table thead th {
    background: var(--st-head) !important;
    color: #fff !important;
    border-bottom: 0 !important;
}
.da-table thead th:first-child { border-top-left-radius: 10px; }
.da-table thead th:last-child  { border-top-right-radius: 10px; }
.da-tabs { margin-top: 14px; }

/* ============================================
   Page-specific dark heroes / card bars -> light
   (preferences, configure list, data point,
   reports, leaderboard, fb analytics)
   ============================================ */

body .pref-header { background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; padding: 14px 0 6px !important; margin: 0 0 10px !important; }
body .pref-header::before, body .pref-header::after { display: none !important; }
body .pref-breadcrumb, body .pref-breadcrumb a { color: #94a3b8 !important; }
body .pref-breadcrumb a:hover { color: var(--accent) !important; }
body .pref-bc-active { color: #475569 !important; }
body .pref-title { color: #1e293b !important; }
body .pref-subtitle { color: #64748b !important; }
body .pref-card-header { background: #fff !important; border-bottom: 1px solid #eef1f5 !important; }
body .pref-card-title { color: #1e293b !important; }
body .pref-card-title i { color: var(--accent) !important; }
body .pref-header-btn { background: linear-gradient(135deg, var(--accent), var(--accent-d)) !important; border-color: transparent !important; color: #fff !important; backdrop-filter: none !important; box-shadow: 0 2px 8px rgb(var(--accent-rgb) / .30); }
body .pref-header-btn:hover { background: linear-gradient(135deg, var(--accent-d), #3f1f6b) !important; color: #fff !important; }

body .cl-header { background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; padding: 14px 0 6px !important; margin: 0 0 10px !important; }
body .cl-header::before, body .cl-header::after { display: none !important; }
body .cl-breadcrumb, body .cl-breadcrumb a { color: #94a3b8 !important; }
body .cl-breadcrumb a:hover { color: var(--accent) !important; }
body .cl-bc-active { color: #475569 !important; }
body .cl-title { color: #1e293b !important; }
body .cl-subtitle { color: #64748b !important; }
body .cl-card-header { background: #fff !important; border-bottom: 1px solid #eef1f5 !important; }
body .cl-card-title { color: #1e293b !important; }
body .cl-card-title i { color: var(--accent) !important; }
body .cl-header-btn { background: linear-gradient(135deg, var(--accent), var(--accent-d)) !important; border-color: transparent !important; color: #fff !important; backdrop-filter: none !important; box-shadow: 0 2px 8px rgb(var(--accent-rgb) / .30); }
body .cl-header-btn:hover { background: linear-gradient(135deg, var(--accent-d), #3f1f6b) !important; color: #fff !important; }

body .dp-header { background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; padding: 14px 0 6px !important; margin: 0 0 10px !important; }
body .dp-header::before, body .dp-header::after { display: none !important; }
body .dp-breadcrumb, body .dp-breadcrumb a { color: #94a3b8 !important; }
body .dp-breadcrumb a:hover { color: var(--accent) !important; }
body .dp-bc-active { color: #475569 !important; }
body .dp-title { color: #1e293b !important; }
body .dp-subtitle { color: #64748b !important; }
body .dp-card-header { background: #fff !important; border-bottom: 1px solid #eef1f5 !important; }
body .dp-card-title { color: #1e293b !important; }
body .dp-card-title i { color: var(--accent) !important; }

body .rp-header { background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; padding: 14px 0 6px !important; margin: 0 0 10px !important; }
body .rp-header::before, body .rp-header::after { display: none !important; }
body .rp-breadcrumb, body .rp-breadcrumb a { color: #94a3b8 !important; }
body .rp-breadcrumb a:hover { color: var(--accent) !important; }
body .rp-bc-active { color: #475569 !important; }
body .rp-title { color: #1e293b !important; }
body .rp-subtitle { color: #64748b !important; }
body .rp-card-header { background: #fff !important; border-bottom: 1px solid #eef1f5 !important; }
body .rp-card-title { color: #1e293b !important; }
body .rp-card-title i { color: var(--accent) !important; }

body .ld-header { background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; padding: 14px 0 6px !important; margin: 0 0 10px !important; }
body .ld-header::before, body .ld-header::after { display: none !important; }
body .ld-breadcrumb, body .ld-breadcrumb a { color: #94a3b8 !important; }
body .ld-breadcrumb a:hover { color: var(--accent) !important; }
body .ld-bc-active { color: #475569 !important; }
body .ld-title { color: #1e293b !important; }
body .ld-subtitle { color: #64748b !important; }
body .ld-card-header { background: #fff !important; border-bottom: 1px solid #eef1f5 !important; }
body .ld-card-title { color: #1e293b !important; }
body .ld-card-title i { color: var(--accent) !important; }

body .fb-header { background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; padding: 14px 0 6px !important; margin: 0 0 10px !important; }
body .fb-header::before, body .fb-header::after { display: none !important; }
body .fb-breadcrumb, body .fb-breadcrumb a { color: #94a3b8 !important; }
body .fb-breadcrumb a:hover { color: var(--accent) !important; }
body .fb-bc-active { color: #475569 !important; }
body .fb-title { color: #1e293b !important; }
body .fb-subtitle { color: #64748b !important; }
body .fb-card-header { background: #fff !important; border-bottom: 1px solid #eef1f5 !important; }
body .fb-card-title { color: #1e293b !important; }
body .fb-card-title i { color: var(--accent) !important; }

/* ============================================
   Hourly / Daily performance (hp-*)
   ============================================ */
body .hp-header { background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 14px 0 6px !important; margin: 0 0 10px !important; overflow: visible !important; }
body .hp-header::before { display: none !important; }
body .hp-breadcrumb a, body .hp-breadcrumb span { color: #94a3b8 !important; }
body .hp-breadcrumb a:hover { color: var(--accent) !important; }
body .hp-breadcrumb .hp-bc-active { color: #475569 !important; }
body .hp-title { color: #1e293b !important; }
body .hp-subtitle { color: #64748b !important; }
body .hp-sub-nav ul li a { color: #475569 !important; background: #fff !important; border: 1px solid #e2e8f0 !important; }
body .hp-sub-nav ul li a:hover { background: rgb(var(--accent-rgb) / .08) !important; color: var(--accent-d) !important; border-color: rgb(var(--accent-rgb) / .4) !important; }
body .hp-sub-nav ul li.active a { background: var(--accent) !important; color: #fff !important; border-color: transparent !important; }
body .hp-card-header { background: #fff !important; }
body .hp-th { background: var(--st-head) !important; color: #fff !important; border-bottom: 0 !important; }
body .hp-th--sticky { background: #2a1244 !important; border-right-color: rgba(255,255,255,.1) !important; }
body .hp-th--total { background: var(--accent-d) !important; }
body .hp-td--total { background: #f6f0fc !important; }
body .hp-row:nth-child(even) .hp-td--total { background: #ede2f8 !important; }
body .hp-row:hover .hp-td--total { background: #e3d3f4 !important; }
body .hp-row:hover .hp-td--agent { background: #f9f5fd !important; }

/* ============================================
   Admin dashboard hero (ed-*) -> light
   ============================================ */
body .ed-hero { background: transparent !important; padding: 14px 4px 0 !important; margin: 0 0 14px !important; }
body .ed-hero::before { display: none !important; }
body .ed-hero-greeting { background: #fff !important; border: 1px solid #e2e8f0 !important; color: #475569 !important; backdrop-filter: none !important; }
body .ed-hero-title { color: #1e293b !important; }
body .ed-hero-sub { color: #64748b !important; }
body .ed-hero-stats { background: #fff !important; border: 1px solid #eef1f5 !important; box-shadow: 0 1px 10px rgba(15,23,42,.06); backdrop-filter: none !important; }
body .ed-hero-stat-num { color: #1e293b !important; }
body .ed-hero-stat-label { color: #94a3b8 !important; }
body .ed-hero-stat-div { background: #e8edf3 !important; }
body .ed-hero-filter { background: #fff !important; border: 1px solid #eef1f5 !important; border-radius: 12px; margin: 18px 0 0 !important; box-shadow: 0 1px 10px rgba(15,23,42,.06); }
body .ed-hero-filter-label { color: #94a3b8 !important; }
body .ed-pill-btn { background: #f8fafc !important; border: 1px solid #e2e8f0 !important; color: #334155 !important; }
body .ed-pill-btn:hover { background: #f1f5f9 !important; border-color: #cbd5e1 !important; color: #1e293b !important; }
body .ed-pill-btn.ed-pill-active { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }
body .ed-pill-btn i:first-child { color: #94a3b8 !important; }
body .ed-pill-btn.ed-pill-active i:first-child { color: rgba(255,255,255,.85) !important; }
body .ed-pill-caret { color: #94a3b8 !important; }
body .ed-pill-badge { background: rgba(255,255,255,.3) !important; }
body .ed-hero-reset-link { color: #94a3b8 !important; }
body .ed-hero-reset-link:hover { color: #475569 !important; }
body .ed-drop-panel { background: #fff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 12px 32px rgba(15,23,42,.14) !important; backdrop-filter: none !important; }
body .ed-drop-search-wrap { border-bottom-color: #eef1f5 !important; }
body .ed-drop-search-wrap i { color: #94a3b8 !important; }
body .ed-drop-search { background: #f8fafc !important; border-color: #e2e8f0 !important; color: #1e293b !important; }
body .ed-drop-search::placeholder { color: #94a3b8 !important; }
body .ed-drop-item:hover { background: rgb(var(--accent-rgb) / .07) !important; }
body .ed-drop-check { border-color: #cbd5e1 !important; background: #fff !important; }
body .ed-drop-text { color: #334155 !important; }
body .ed-drop-item input:checked ~ .ed-drop-text,
body .ed-drop-item input:checked ~ .ed-drop-check + .ed-drop-text { color: var(--accent-d) !important; }
body .ed-drop-list::-webkit-scrollbar-thumb { background: #cbd5e1 !important; }

/* ============================================
   ONE GUTTER — hero, KPI row, filter card and
   table card all start and end on the same
   left / right edge on every page.
   ============================================ */
:root { --pg: 20px; }
body .lp-wrapper { margin: 0 !important; padding: 0 var(--pg) 48px !important; background: transparent !important; }
body .lp-header { padding-left: 0 !important; padding-right: 0 !important; }
body .lp-header-inner, body .lp-kpi-row, body .lp-toolbar, body .lp-content, body .lp-alert { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
body .lp-filter-card { background: #fff !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 1px 10px rgba(15,23,42,.06) !important; padding: 16px 20px !important; margin: 0 0 14px !important; }
body .dp-wrapper { margin: 0 !important; padding: 0 var(--pg) 48px !important; background: transparent !important; min-height: 0 !important; }
body .dp-header { padding-left: 0 !important; padding-right: 0 !important; }
body .dp-header-inner, body .dp-filter-inner, body .dp-content { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
body .dp-filter-card { background: #fff !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 1px 10px rgba(15,23,42,.06) !important; padding: 16px 20px !important; margin: 0 0 14px !important; }
body .pref-wrapper { margin: 0 !important; padding: 0 var(--pg) 48px !important; background: transparent !important; min-height: 0 !important; }
body .pref-header { padding-left: 0 !important; padding-right: 0 !important; }
body .pref-header-inner, body .pref-filter-inner, body .pref-content { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
body .pref-filter-card { background: #fff !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 1px 10px rgba(15,23,42,.06) !important; padding: 16px 20px !important; margin: 0 0 14px !important; }
body .cl-wrapper { margin: 0 !important; padding: 0 var(--pg) 48px !important; background: transparent !important; min-height: 0 !important; }
body .cl-header { padding-left: 0 !important; padding-right: 0 !important; }
body .cl-header-inner, body .cl-filter-inner, body .cl-content { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
body .cl-filter-card { background: #fff !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 1px 10px rgba(15,23,42,.06) !important; padding: 16px 20px !important; margin: 0 0 14px !important; }
body .rp-wrapper { margin: 0 !important; padding: 0 var(--pg) 48px !important; background: transparent !important; min-height: 0 !important; }
body .rp-header { padding-left: 0 !important; padding-right: 0 !important; }
body .rp-header-inner, body .rp-filter-inner, body .rp-content { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
body .rp-filter-card { background: #fff !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 1px 10px rgba(15,23,42,.06) !important; padding: 16px 20px !important; margin: 0 0 14px !important; }
body .ld-wrapper { margin: 0 !important; padding: 0 var(--pg) 48px !important; background: transparent !important; min-height: 0 !important; }
body .ld-header { padding-left: 0 !important; padding-right: 0 !important; }
body .ld-header-inner, body .ld-filter-inner, body .ld-content { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
body .ld-filter-card { background: #fff !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 1px 10px rgba(15,23,42,.06) !important; padding: 16px 20px !important; margin: 0 0 14px !important; }
body .fb-wrapper { margin: 0 !important; padding: 0 var(--pg) 48px !important; background: transparent !important; min-height: 0 !important; }
body .fb-header { padding-left: 0 !important; padding-right: 0 !important; }
body .fb-header-inner, body .fb-filter-inner, body .fb-content { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
body .fb-filter-card { background: #fff !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 1px 10px rgba(15,23,42,.06) !important; padding: 16px 20px !important; margin: 0 0 14px !important; }
body .dp-stats { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
body .hp-wrapper { margin: 0 !important; padding: 0 var(--pg) 48px !important; background: transparent !important; min-height: 0 !important; }
body .hp-header { padding-left: 0 !important; padding-right: 0 !important; }
body .hp-filter-card { background: #fff !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 1px 10px rgba(15,23,42,.06) !important; padding: 16px 20px !important; margin: 0 0 14px !important; }
body .hp-card { margin: 0 0 14px !important; }
body .tk-bar, body .us-bar { padding-left: 0 !important; padding-right: 0 !important; }

/* Stat cards sat directly on the filter card below them */
body .dp-stats { margin-bottom: 14px !important; }
