/* ==========================================
   🚀 1. THE ROOT VARIABLES 
   ========================================== */
:root {
    --ink-dark: #0F172A;
    --agency-accent: #D97706;
    --paper-sheet: #F1F5F9;
    --grid-border: #1E293B;
}

body {
    background-color: var(--paper-sheet);
    font-family: system-ui, -apple-system, sans-serif;
}

/* ==========================================
   🚀 2. THE DOWNBEAT: CLASSIC TYPOGRAPHY
   ========================================== */
.trading-title {
    /* 🚀 THE PIVOT: Injecting a classic, high-readability Serif */
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -1px;
    line-height: 1.1;
    color: #000000; /* Stark black for maximum contrast on the light background */
}

.trading-subtext {
    font-size: 1.2rem;
    font-weight: 500;
    color: #475569;
    max-width: 700px;
}

.font-black {
    font-weight: 900;
}

.font-bold {
    font-weight: 700;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.highlight {
    color: #D97706;
}

/* ==========================================
   🚀 3. THE PULSE: LIVE INDICATOR
   ========================================== */
.live-badge {
    background-color: var(--ink-dark);
    color: white;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0.25rem 0.75rem;
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-radius: 4px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background-color: #10B981;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* ==========================================
   🚀 4. THE VAULT: TERMINAL BOOTH GEOMETRY
   ========================================== */
.terminal-booth {
    background-color: var(--ink-dark);
    border: 2px solid var(--ink-dark);
    border-radius: 6px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    color: white;
    overflow: hidden;
}

.terminal-header {
    background-color: #0B1120; /* Deepest black-blue for the filter bar */
    border-bottom: 1px solid var(--grid-border);
}

.terminal-input {
    background-color: #1E293B !important;
    color: white !important;
    border: 1px solid #334155 !important;
    font-weight: 500;
    border-radius: 4px !important;
}

    .terminal-input:focus {
        background-color: #0F172A !important;
        color: var(--agency-accent) !important;
        border-color: var(--agency-accent) !important;
        box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2) !important;
    }

.terminal-badge {
    background-color: transparent;
    border: 1px solid #475569;
    padding: 0.3rem 0.6rem;
    color: #E2E8F0;
    font-weight: 600;
    border-radius: 4px;
}

/* ==========================================
   🚀 5. KINETIC BUTTONS
   ========================================== */
.ledger-btn {
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    cursor: pointer;
}

.ledger-btn-accent {
    background-color: var(--agency-accent);
    color: white;
    font-weight: 800;
}

    .ledger-btn-accent:hover:not(:disabled) {
        background-color: #B45309; /* Deepen on hover */
        transform: translateY(-1px);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

.ledger-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================
   🚀 6. GRID OVERRIDES (DARK MODE)
   ========================================== */
.brutal-terminal-grid {
    border: none !important;
}

    .brutal-terminal-grid .e-gridheader {
        background-color: var(--ink-dark) !important;
        border-bottom: 1px solid var(--grid-border) !important;
    }

    .brutal-terminal-grid .e-headercell {
        background-color: var(--ink-dark) !important;
        color: #94a3b8 !important;
        font-weight: 700 !important;
        text-transform: uppercase;
        font-size: 0.85rem !important;
        letter-spacing: 1px;
        border-color: var(--grid-border) !important;
    }

    .brutal-terminal-grid .e-rowcell {
        background-color: var(--ink-dark) !important;
        color: #F8FAFC !important;
        border-color: var(--grid-border) !important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .brutal-terminal-grid .e-altrow .e-rowcell {
        background-color: #111827 !important; /* Alternating row contrast */
    }

/* ==========================================
   🚀 7. THE URGENCY MATRIX (High Demand)
   ========================================== */
.urgency-fire {
    color: #ef4444 !important; /* Stark Blood Red */
    text-shadow: 0px 0px 8px rgba(239, 68, 68, 0.5);
    display: inline-flex;
    align-items: center;
    animation: urgentPulse 1.5s infinite;
}

@keyframes urgentPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================
   🚀 8. THE PAGINATION VAULT (Overrides)
   ========================================== */
/* 1. Obliterate the White Backgrounds and All Vertical Borders */
.brutal-terminal-grid .e-gridpager,
.brutal-terminal-grid .e-pager,
.brutal-terminal-grid .e-pagercontainer,
.brutal-terminal-grid .e-pagercontainer div,
.brutal-terminal-grid .e-pagercontainer a,
.brutal-terminal-grid .e-pagercontainer span {
    background-color: var(--ink-dark) !important;
    border: none !important;
    color: #94a3b8 !important;
}

    /* 2. 🚀 THE ICON FIX: Protect the e-icons font family */
    .brutal-terminal-grid .e-pager .e-icons {
        font-family: 'e-icons' !important;
        color: #94a3b8 !important;
    }

    /* 3. Force all individual buttons into the shadows */
    .brutal-terminal-grid .e-pager .e-numericitem,
    .brutal-terminal-grid .e-pager .e-nextpage,
    .brutal-terminal-grid .e-pager .e-prevpage,
    .brutal-terminal-grid .e-pager .e-firstpage,
    .brutal-terminal-grid .e-pager .e-lastpage,
    .brutal-terminal-grid .e-pager .e-link {
        background-color: var(--ink-dark) !important;
        color: #94a3b8 !important;
        border-radius: 4px !important;
        padding: 2px 6px !important; /* Proper spacing to prevent icon cutoff */
    }

    /* 4. The Active Page (Electric Orange) */
    .brutal-terminal-grid .e-pager .e-currentitem,
    .brutal-terminal-grid .e-pager .e-currentitem:hover {
        background-color: var(--agency-accent) !important;
        color: white !important;
        font-weight: 900 !important;
    }

    /* 5. Hover States for Numbers and Arrows */
    .brutal-terminal-grid .e-pager .e-numericitem:hover,
    .brutal-terminal-grid .e-pager .e-nextpage:hover,
    .brutal-terminal-grid .e-pager .e-prevpage:hover,
    .brutal-terminal-grid .e-pager .e-nextpage:hover .e-icons,
    .brutal-terminal-grid .e-pager .e-prevpage:hover .e-icons {
        background-color: #1E293B !important;
        color: white !important;
    }

    /* 6. Disabled States (Ghosting) */
    .brutal-terminal-grid .e-pager .e-nextpagedisabled,
    .brutal-terminal-grid .e-pager .e-prevpagedisabled,
    .brutal-terminal-grid .e-pager .e-firstpagedisabled,
    .brutal-terminal-grid .e-pager .e-lastpagedisabled,
    .brutal-terminal-grid .e-pager .e-nextpagedisabled .e-icons,
    .brutal-terminal-grid .e-pager .e-prevpagedisabled .e-icons {
        background-color: var(--ink-dark) !important;
        color: #94a3b8 !important;
        opacity: 0.2 !important;
        cursor: not-allowed !important;
    }

    /* 7. The "1 of X pages" summary text */
    .brutal-terminal-grid .e-pager .e-parentmsgbar {
        color: #94a3b8 !important;
        font-weight: 600 !important;
    }

/* ==========================================
   🚀 9. THE TICKER TAPE
   ========================================== */
.stock-ticker-vault {
    background-color: var(--ink-dark);
    border-top: 1px solid var(--grid-border);
    border-bottom: 1px solid var(--grid-border);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.ticker-payload {
    display: inline-block;
    padding-left: 100%; /* Start off-screen right */
    animation: scrollTicker 25s linear infinite;
    color: #10B981; /* Terminal Green */
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

    .ticker-payload span {
        margin-right: 50px;
    }

.ticker-pulse {
    color: var(--agency-accent);
}

@keyframes scrollTicker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* 🚀 THE DEFCON OVERRIDE CLASSES */
.ticker-vault-standard {
    background-color: var(--ink-dark);
    border-top: 1px solid var(--grid-border);
    border-bottom: 1px solid var(--grid-border);
    transition: all 0.8s ease-out; /* Smooth cooldown */
}

/* 🚀 UPGRADED DEFCON OVERRIDE: Neon Threat Crimson */
.ticker-vault-alert {
    background-color: #2b0505; /* Deep, abyssal red background */
    border-top: 1px solid #FF003C; /* Neon Crimson */
    border-bottom: 1px solid #FF003C;
    box-shadow: 0 0 25px rgba(255, 0, 60, 0.4) inset;
    transition: all 0.1s ease-in;
}

.ticker-text-standard {
    color: #10B981; /* Terminal Green */
    transition: color 0.8s ease-out;
}

.ticker-text-alert {
    color: #FF003C; /* Neon Crimson */
    font-weight: 900;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 0, 60, 0.8), 0 0 20px rgba(255, 0, 60, 0.4);
    transition: color 0.1s ease-in;
}


/* ================================================================= */
/* 🚀 THE UNIVERSAL MOBILE CARD MORPH (SYNCFUSION GRIDS)             */
/* ================================================================= */
@media (max-width: 767.98px) {
    /* 1. Vaporize the Desktop Table Headers */
    .brutal-mobile-card-grid .e-gridheader {
        display: none !important;
    }

    /* 2. Break the Table Architecture & Morph into Block Cards */
    .brutal-mobile-card-grid .e-table,
    .brutal-mobile-card-grid .e-content table,
    .brutal-mobile-card-grid tbody {
        display: block !important;
        width: 100% !important;
    }

    /* 🚀 THE DEEP SLATE & ELECTRIC ORANGE GLOBAL CARD */
    .brutal-mobile-card-grid .e-row {
        display: flex !important;
        flex-direction: column !important;
        border: 6px solid var(--agency-accent) !important;
        box-shadow: 6px 6px 0px rgba(0,0,0,0.9) !important;
        margin-bottom: 2rem !important;
        background-color: var(--ink-dark) !important;
        padding: 1.25rem !important;
    }

    /* 3. Universal Cell Formatting & Atmospheric Buffer */
    .brutal-mobile-card-grid .e-rowcell {
        display: block !important;
        width: 100% !important;
        border: none !important;
        padding: 0.5rem 0 !important;
        text-align: left !important;
        color: white !important;
    }

        /* 4. Action Button Centering */
        .brutal-mobile-card-grid .e-rowcell:last-child {
            text-align: center !important;
            margin-top: 1rem !important;
        }

    /* 🚀 5. UNIVERSAL MULTI-LINE TRUNCATION */
    .brutal-mobile-card-grid .text-truncate {
        max-width: 100% !important;
        white-space: normal !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        color: #f8fafc !important;
    }
}


/* ================================================================= */
/* 🚀 THE TOP NAVIGATION AIRLOCK (Responsive Auth Strip)             */
/* ================================================================= */
.auth-strip-container {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    border: 3px solid var(--ink-dark);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.8);
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    height: 48px; /* Desktop standard orbit */
}

.strip-divider {
    width: 2px;
    background-color: var(--ink-dark);
    opacity: 0.2;
}

@media (max-width: 767.98px) {
    .auth-strip-container {
        top: 1rem;
        right: 1rem;
        width: calc(100vw - 2rem); /* Span the mobile screen */
        height: auto; /* 🚀 OVERRIDE: Allow container to expand vertically */
        flex-wrap: wrap; /* 🚀 OVERRIDE: Allow items to stack */
    }

        /* 1. Force the Email/Profile to the bottom row */
        .auth-strip-container .strip-profile {
            order: 3 !important;
            width: 100% !important; /* Force full width */
            border-top: 2px dashed #cbd5e1 !important; /* Separate from top buttons */
            text-align: center !important;
            justify-content: center !important;
            padding: 0.75rem !important;
        }

        /* 2. Anchor the Vault to the top left */
        .auth-strip-container .strip-vault {
            order: 1 !important;
            flex-grow: 1 !important; /* Take up remaining space next to logout */
            text-align: center !important;
            justify-content: center !important;
        }

        /* 3. Anchor the Logout to the top right */
        .auth-strip-container .strip-logout {
            order: 2 !important;
            border-left: 2px solid rgba(15, 23, 42, 0.2) !important;
        }

        /* 4. Hide the desktop vertical dividers */
        .auth-strip-container .desktop-divider {
            display: none !important;
        }
}


/* 🚀 ILLUMINATE THE GHOST TEXT */
.terminal-input::placeholder {
    color: #94a3b8 !important; /* Muted Slate to differentiate from active typed text */
    opacity: 1 !important; /* Overrides Firefox's default placeholder transparency */
}

/* For legacy browser support */
.terminal-input::-webkit-input-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.terminal-input::-moz-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.terminal-input:-ms-input-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}


/* 🚀 THE DYNAMIC SELECT PLACEHOLDER */
.terminal-placeholder {
    color: #94a3b8 !important; /* Muted Slate */
}

/* Ensure the options inside the dropdown remain highly visible */
.terminal-input option {
    color: white !important;
    background-color: var(--ink-dark);
}

/* Force the default empty option to remain gray in the list */
.terminal-input option[value=""] {
    color: #94a3b8 !important;
}

/* 🚀 FOOTER LEGAL LINKS */
.footer-legal-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal-link:hover {
    color: var(--agency-accent);
    text-decoration: none;
}


/* ======================================================= */
/* 🚀 THE FOCUS VAPORIZER (Kill Syncfusion Blue Ring)      */
/* ======================================================= */
.brutal-terminal-grid.e-grid .e-rowcell.e-focus,
.brutal-terminal-grid.e-grid .e-rowcell.e-active,
.brutal-terminal-grid.e-grid .e-focused,
.brutal-terminal-grid.e-grid .e-table:focus {
    outline: none !important;
    box-shadow: none !important;
    background-color: inherit !important;
}

.brutal-terminal-grid.e-grid .e-rowcell.e-selectionbackground {
    background-color: transparent !important;
}

/* ======================================================= */
/* 🚀 THE HOVER & SELECTION SEPARATION MATRIX              */
/* ======================================================= */

/* 1. Set Syncfusion Native Variables to separated tiers */
.brutal-terminal-grid.e-grid {
    --color-sf-selection-bg: #1E293B !important; /* Deep Slate (Selected) */
    --color-sf-hover-bg: #334155 !important; /* Lighter Slate (Hover) */
}

/* 2. The Highlight (Hover) State: Elevated & Noticeable */
.brutal-terminal-grid.e-grid .e-row:hover .e-rowcell,
.brutal-terminal-grid.e-grid .e-altrow:hover .e-rowcell,
.brutal-terminal-grid.e-grid .e-active:hover .e-rowcell {
    background-color: #334155 !important;
    color: inherit !important;
}

/* 3. The Selection (Click) State: Heavy & Locked */
.brutal-terminal-grid.e-grid .e-row[aria-selected="true"] .e-rowcell,
.brutal-terminal-grid.e-grid .e-row[aria-selected="true"],
.brutal-terminal-grid.e-grid .e-row.e-selectionbackground .e-rowcell {
    background-color: #1E293B !important;
    color: inherit !important;
}

/* 4. Smooth Kinetic Transitions */
.brutal-terminal-grid.e-grid .e-row *,
.brutal-terminal-grid.e-grid .e-altrow * {
    transition: background-color 0.15s ease-in-out;
}
}
