/**
 * CheckPoint futuristic shell — Pipeline black / Manning red look.
 * Loaded always; EXSPEEDITE overrides live in theme-exspeedite.css.
 * SME [2026-07-14] Darker Pipeline-matched page shells + tables/cards
 * SME [2026-07-14] Aggressive deck-wide red remaps for leftover teal/cyan brand
 * SME [2026-07-14] Stronger red brand overrides for leftover green Bootstrap/CTAs
 * SME [2026-07-13] Futuristic dark glass shell aligned to Pipeline
 */

html[data-theme="futuristic"],
html[data-theme="futuristic"] body,
body.cp-theme-futuristic {
    color: var(--cp-text);
    background: var(--cp-portal-bg) !important;
    font-family: var(--cp-font);
}

/* Page shells used across Settings / Reports / Lookup / Ops */
html[data-theme="futuristic"] .shell,
html[data-theme="futuristic"] .page-shell,
html[data-theme="futuristic"] .content-shell,
html[data-theme="futuristic"] main.cp-main,
body.cp-theme-futuristic .shell,
body.cp-theme-futuristic .page-shell {
    position: relative;
    z-index: 1;
}

html[data-theme="futuristic"] .card,
html[data-theme="futuristic"] .panel,
html[data-theme="futuristic"] .hero,
html[data-theme="futuristic"] .mt-panel,
html[data-theme="futuristic"] .glass-card,
body.cp-theme-futuristic .card,
body.cp-theme-futuristic .panel,
body.cp-theme-futuristic .hero {
    background: linear-gradient(160deg, rgba(8,12,22,.94), rgba(4,6,12,.90)) !important;
    border-color: rgba(219, 17, 31, .22) !important;
    color: var(--cp-text);
    box-shadow: 0 22px 64px rgba(0,0,0,.45), 0 0 28px rgba(219,17,31,.08);
}

html[data-theme="futuristic"] .table,
html[data-theme="futuristic"] table.table,
html[data-theme="futuristic"] .table-dark,
body.cp-theme-futuristic .table,
body.cp-theme-futuristic table.table {
    --bs-table-bg: rgba(6, 8, 15, 0.72);
    --bs-table-color: #e2e8f0;
    --bs-table-border-color: rgba(148, 163, 184, 0.12);
    --bs-table-striped-bg: rgba(219, 17, 31, 0.06);
    --bs-table-hover-bg: rgba(219, 17, 31, 0.10);
    color: #e2e8f0 !important;
    background-color: rgba(6, 8, 15, 0.72) !important;
}

html[data-theme="futuristic"] .form-control,
html[data-theme="futuristic"] .form-select,
html[data-theme="futuristic"] input[type="text"],
html[data-theme="futuristic"] input[type="email"],
html[data-theme="futuristic"] input[type="password"],
html[data-theme="futuristic"] input[type="date"],
html[data-theme="futuristic"] input[type="number"],
html[data-theme="futuristic"] select,
html[data-theme="futuristic"] textarea,
body.cp-theme-futuristic .form-control,
body.cp-theme-futuristic .form-select {
    background: rgba(4, 6, 12, 0.88) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    color: #f1f5f9 !important;
}

html[data-theme="futuristic"] .modal-content,
html[data-theme="futuristic"] .dropdown-menu,
body.cp-theme-futuristic .modal-content,
body.cp-theme-futuristic .dropdown-menu {
    background: #0a0e18 !important;
    border-color: rgba(219, 17, 31, 0.28) !important;
    color: #e2e8f0 !important;
}

body.cp-body--auth.cp-theme-futuristic,
html[data-theme="futuristic"] body.cp-body--auth {
    background: var(--cp-auth-bg);
}

body.cp-theme-futuristic::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--cp-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--cp-grid) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 75%);
}

/* Shared accent helpers */
.cp-accent-text { color: var(--cp-accent-hover); }
.cp-accent-fill { background: var(--cp-accent); color: #fff; }
.cp-btn-primary,
.btn-login,
button.cp-btn-primary {
    background: linear-gradient(135deg, var(--cp-accent) 0%, #ff3d4d 100%);
    border: 0;
    color: #fff;
    box-shadow: 0 8px 24px var(--cp-accent-glow);
}
.cp-btn-primary:hover,
.btn-login:hover {
    background: linear-gradient(135deg, var(--cp-accent-dark) 0%, var(--cp-accent) 100%);
    filter: brightness(1.05);
}

.checkpoint-header {
    background: rgba(4, 6, 12, 0.90) !important;
    backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(219, 17, 31, 0.28) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    overflow: visible !important;
    z-index: 4000 !important;
}

.checkpoint-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--cp-accent-line);
    opacity: 0.55;
    pointer-events: none;
}

.logo-point {
    color: var(--cp-accent) !important;
}

/* Bootstrap leftovers that still painted the deck green/teal */
html[data-theme="futuristic"] .btn-success,
body.cp-theme-futuristic .btn-success,
html[data-theme="futuristic"] .checkpoint-admin-actions .btn-success,
body.cp-theme-futuristic .checkpoint-admin-actions .btn-success {
    background: linear-gradient(135deg, #db111f 0%, #ff3d4d 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(219, 17, 31, 0.45) !important;
}

html[data-theme="futuristic"] .btn-outline-info,
body.cp-theme-futuristic .btn-outline-info {
    color: #ff4d5a !important;
    border-color: rgba(219, 17, 31, 0.55) !important;
}

html[data-theme="futuristic"] .btn-outline-info:hover,
body.cp-theme-futuristic .btn-outline-info:hover {
    background: rgba(219, 17, 31, 0.16) !important;
    color: #fff !important;
}

html[data-theme="futuristic"] .text-success,
body.cp-theme-futuristic .text-success {
    color: #ff4d5a !important;
}

/* ---- Deck-wide brand remaps (pages that still use teal/cyan as "accent") ---- */
html[data-theme="futuristic"] .kicker,
html[data-theme="futuristic"] .hero-kicker,
html[data-theme="futuristic"] .panel-kicker,
html[data-theme="futuristic"] .section-kicker,
body.cp-theme-futuristic .kicker,
body.cp-theme-futuristic .hero-kicker,
body.cp-theme-futuristic .panel-kicker,
body.cp-theme-futuristic .section-kicker {
    color: var(--cp-accent-hover, #ff4d5a) !important;
}

html[data-theme="futuristic"] a.tab.is-active,
html[data-theme="futuristic"] .tabs a.is-active,
html[data-theme="futuristic"] .report-tabs a.is-active,
html[data-theme="futuristic"] .nav-pills .nav-link.active,
body.cp-theme-futuristic .report-tabs a.is-active {
    background: linear-gradient(135deg, #db111f 0%, #ff3d4d 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(219, 17, 31, 0.45) !important;
}

html[data-theme="futuristic"] .metric strong,
html[data-theme="futuristic"] .metrics strong,
html[data-theme="futuristic"] .stat strong,
html[data-theme="futuristic"] .kpi strong,
body.cp-theme-futuristic .metric strong {
    color: var(--cp-accent-hover, #ff4d5a) !important;
}

html[data-theme="futuristic"] th,
body.cp-theme-futuristic th {
    color: var(--cp-accent-hover, #ff4d5a) !important;
}

html[data-theme="futuristic"] .form-label,
html[data-theme="futuristic"] label.kicker-label,
body.cp-theme-futuristic .form-label {
    color: var(--cp-accent-hover, #ff4d5a) !important;
}

html[data-theme="futuristic"] input:focus,
html[data-theme="futuristic"] select:focus,
html[data-theme="futuristic"] textarea:focus,
html[data-theme="futuristic"] .form-control:focus,
body.cp-theme-futuristic input:focus,
body.cp-theme-futuristic select:focus,
body.cp-theme-futuristic textarea:focus,
body.cp-theme-futuristic .form-control:focus {
    border-color: var(--cp-accent, #db111f) !important;
    box-shadow: 0 0 0 3px var(--cp-accent-glow, rgba(219, 17, 31, 0.35)) !important;
}

html[data-theme="futuristic"] .btn-primary,
html[data-theme="futuristic"] button[type="submit"]:not(.btn-dev):not(.btn-outline-light):not(.checkpoint-logout-btn),
body.cp-theme-futuristic .btn-primary {
    background: linear-gradient(135deg, #db111f 0%, #ff3d4d 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(219, 17, 31, 0.35) !important;
}

html[data-theme="futuristic"] a:not(.checkpoint-nav-link):not(.btn):not(.logo-point):not(.checkpoint-brand-wrap),
body.cp-theme-futuristic main a:not(.btn):not(.report-tabs a) {
    color: var(--cp-accent-hover, #ff4d5a);
}

html[data-theme="futuristic"] a:not(.checkpoint-nav-link):not(.btn):not(.logo-point):hover,
body.cp-theme-futuristic main a:not(.btn):not(.report-tabs a):hover {
    color: #ff8a94;
}
