/**
 * Raven Theme — Deep navy / electric blue
 * The new default premium theme for the Valhalla widget dashboard.
 * Applied via class `widget-theme-raven` on `#landing-grid`.
 *
 * Color palette:
 *   bg-primary:    #0a0f1a  (deep navy)
 *   bg-secondary:  #111827  (slightly lighter navy)
 *   bg-card:       #141c2e  (elevated surfaces)
 *   bg-card-hover: #1a2540  (hover state)
 *   accent:        #3b82f6  (blue — primary)
 *   accent-light:  #60a5fa  (lighter blue — emphasis)
 *   green:         #10b981  (emerald — positive)
 *   text-primary:  #f1f5f9  (off-white)
 *   text-secondary:#94a3b8  (light gray)
 *   border:        rgba(59, 130, 246, 0.12)
 *   border-hover:  rgba(59, 130, 246, 0.3)
 */

/* ============================================
   GRID BACKGROUND — signature Raven look
   Subtle 60px blue grid lines + ambient glow zones
   ============================================ */

/* Grid pattern is applied to body (see GLOBAL BACKGROUND section below) */

/* ============================================
   CORE WIDGET STYLING
   ============================================ */

.widget-theme-raven .landing-widget {
    background: linear-gradient(145deg, #0a0f1a 0%, #111827 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.12) !important;
    box-shadow:
        0 4px 20px rgba(59, 130, 246, 0.08),
        0 0 40px rgba(59, 130, 246, 0.03) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}

/* Hover — border brightens, subtle lift */
.widget-theme-raven .landing-widget:hover {
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    box-shadow:
        0 8px 32px rgba(59, 130, 246, 0.14),
        0 0 60px rgba(59, 130, 246, 0.06) !important;
    transform: translateY(-2px) !important;
}

/* ============================================
   WIDGET HEADER
   ============================================ */

.widget-theme-raven .landing-widget .widget-header {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, #111827 60%, #111827 100%) !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2) !important;
}

/* ============================================
   WIDGET TITLE
   ============================================ */

.widget-theme-raven .landing-widget .widget-title {
    color: #60a5fa !important;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3) !important;
}

/* ============================================
   WIDGET CONTENT — text defaults
   ============================================ */

.widget-theme-raven .widget-content {
    color: #f1f5f9 !important;
}

/* Positive / negative value overrides */
.widget-theme-raven .widget-content .text-green-400,
.widget-theme-raven .widget-content .text-green-500,
.widget-theme-raven .widget-content td.text-green-400,
.widget-theme-raven .widget-content td.text-green-500 {
    color: #10b981 !important;
}

.widget-theme-raven .widget-content .text-red-400,
.widget-theme-raven .widget-content .text-red-500,
.widget-theme-raven .widget-content td.text-red-400,
.widget-theme-raven .widget-content td.text-red-500 {
    color: #ef4444 !important;
}

/* ============================================
   SCROLLBARS — within widgets
   ============================================ */

.widget-theme-raven .landing-widget ::-webkit-scrollbar {
    width: 4px !important;
    height: 4px !important;
}

.widget-theme-raven .landing-widget ::-webkit-scrollbar-track {
    background: transparent !important;
}

.widget-theme-raven .landing-widget ::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3) !important;
    border-radius: 2px !important;
}

.widget-theme-raven .landing-widget ::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5) !important;
}

/* ============================================
   WIDGET DRAWER
   ============================================ */

body.app-theme-raven #landing-widget-drawer {
    background: linear-gradient(145deg, #0a0f1a 0%, #111827 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1) !important;
}

body.app-theme-raven #landing-widget-drawer .widget-header {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, #111827 60%) !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2) !important;
}

body.app-theme-raven #landing-widget-drawer .widget-title {
    color: #60a5fa !important;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3) !important;
}

/* ============================================
   GLOBAL BACKGROUND
   ============================================ */

body.app-theme-raven {
    background-color: #0a0f1a !important;
    position: relative !important;
    /* Static grid lines — always visible as base layer when no ambient effect */
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px) !important;
    background-size: 60px 60px !important;
}
/* Hide static grid when ambient effect is active (overlay provides its own) */
body.app-theme-raven.raven-has-glow {
    background-image: none !important;
}

/* Ambient glow zones: blue top-left, green bottom-right */
body.app-theme-raven::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background:
        radial-gradient(ellipse 55% 40% at 15% 15%, rgba(59, 130, 246, 0.07) 0%, transparent 70%),
        radial-gradient(ellipse 45% 35% at 85% 85%, rgba(16, 185, 129, 0.05) 0%, transparent 70%) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* ============================================
   RAVEN EFFECTS — glow styles + logo glow
   ============================================ */

/* Show the effects panel only when Raven is active */
body.app-theme-raven #raven-glow-setting {
    display: block !important;
}

/* --- Glow Overlay (real div, not pseudo-element) --- */
#raven-glow-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
}

/* All views and footer sit above the glow overlay */
body.app-theme-raven #landing-view,
body.app-theme-raven #analysis-view,
body.app-theme-raven #liveflow-view,
body.app-theme-raven #querybuilder-view,
body.app-theme-raven #alerts-view,
body.app-theme-raven #settings-view,
body.app-theme-raven #handbook-view,
body.app-theme-raven #shieldmaiden-view,
body.app-theme-raven #income-view,
body.app-theme-raven #news-events-view,
body.app-theme-raven > footer {
    position: relative;
    z-index: 1;
}

/* Scanner inactive tabs need opaque background */
body.app-theme-raven .swing-inner-tab {
    background-color: #111827;
}
body.app-theme-raven .swing-inner-tab:hover {
    background-color: #1f2937;
}

/* --- STYLE 1: Grid Pulse --- */
#raven-glow-overlay.raven-glow-grid {
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.10) 1px, transparent 1px);
    background-size: 60px 60px;
    will-change: opacity;
    animation: ravenGridPulse 8s ease-in-out infinite;
}
@keyframes ravenGridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.85; }
}

/* --- STYLE 2: Energy Flow --- */
#raven-glow-overlay.raven-glow-energy {
    top: -85px; left: -85px; right: -85px; bottom: -85px;
    background:
        repeating-linear-gradient(
            45deg,
            transparent 0px, transparent 96px,
            rgba(59, 130, 246, 0.06) 96px,
            rgba(59, 130, 246, 0.14) 99px,
            rgba(59, 130, 246, 0.06) 102px,
            transparent 102px, transparent 120px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent 0px, transparent 96px,
            rgba(16, 185, 129, 0.05) 96px,
            rgba(16, 185, 129, 0.10) 99px,
            rgba(16, 185, 129, 0.05) 102px,
            transparent 102px, transparent 120px
        );
    will-change: transform;
    animation: ravenEnergyFlow 24s linear infinite;
}
@keyframes ravenEnergyFlow {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(85px, 85px); }
}

/* --- STYLE 3: Spectrum Shift (color orbs that breathe and cycle through spectrum) --- */
#raven-glow-overlay.raven-glow-spectrum {
    background:
        radial-gradient(circle 400px at 15% 20%, rgba(59, 130, 246, 0.20) 0%, transparent 70%),
        radial-gradient(circle 350px at 85% 25%, rgba(16, 185, 129, 0.18) 0%, transparent 70%),
        radial-gradient(circle 300px at 50% 85%, rgba(139, 92, 246, 0.16) 0%, transparent 70%),
        radial-gradient(circle 250px at 8% 75%, rgba(6, 182, 212, 0.14) 0%, transparent 70%);
    will-change: transform, opacity;
    animation: ravenSpectrumShift 16s ease-in-out infinite;
}
@keyframes ravenSpectrumShift {
    0%   { opacity: 0.5; transform: scale(1); }
    20%  { opacity: 0.9; transform: scale(1.05); }
    40%  { opacity: 0.6; transform: scale(0.95); }
    60%  { opacity: 1;   transform: scale(1.08); }
    80%  { opacity: 0.7; transform: scale(0.98); }
    100% { opacity: 0.5; transform: scale(1); }
}

/* --- Logo Glow (when any ambient effect is active) --- */
body.app-theme-raven.raven-has-glow header a[href="/"] {
    color: #60a5fa !important;
    text-shadow:
        0 0 10px rgba(59, 130, 246, 0.8),
        0 0 25px rgba(59, 130, 246, 0.5),
        0 0 50px rgba(59, 130, 246, 0.3) !important;
    animation: ravenLogoGlow 4s ease-in-out infinite !important;
}
@keyframes ravenLogoGlow {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(59, 130, 246, 0.5),
            0 0 25px rgba(59, 130, 246, 0.3);
    }
    50% {
        text-shadow:
            0 0 15px rgba(59, 130, 246, 1),
            0 0 35px rgba(59, 130, 246, 0.6),
            0 0 60px rgba(59, 130, 246, 0.3);
    }
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

body.app-theme-raven header {
    background: #111827 !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15) !important;
}

body.app-theme-raven header a,
body.app-theme-raven header button,
body.app-theme-raven header span {
    color: #f1f5f9 !important;
}

body.app-theme-raven header .view-toggle-btn {
    color: #94a3b8 !important;
}

body.app-theme-raven header .view-toggle-btn.active,
body.app-theme-raven header .view-toggle-btn:hover {
    color: #60a5fa !important;
    background: rgba(59, 130, 246, 0.12) !important;
}

/* ============================================
   NAVIGATION CONTAINER & FOOTER
   ============================================ */

body.app-theme-raven .navigation-container {
    background: #111827 !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
}

body.app-theme-raven footer {
    background: #111827 !important;
    border-top: 1px solid rgba(59, 130, 246, 0.12) !important;
}

body.app-theme-raven footer,
body.app-theme-raven footer a,
body.app-theme-raven footer span {
    color: #94a3b8 !important;
}

/* ============================================
   CARDS & PANELS (bg-gray-* overrides)
   ============================================ */

body.app-theme-raven .bg-gray-800,
body.app-theme-raven .bg-gray-900,
body.app-theme-raven .dark\:bg-gray-800,
body.app-theme-raven .dark\:bg-gray-900 {
    background: #141c2e !important;
    border-color: rgba(59, 130, 246, 0.12) !important;
}

/* ============================================
   TABLES
   ============================================ */

body.app-theme-raven table {
    background: #111827 !important;
}

body.app-theme-raven thead,
body.app-theme-raven th {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, #111827 100%) !important;
    color: #60a5fa !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

body.app-theme-raven tbody tr {
    border-color: rgba(59, 130, 246, 0.08) !important;
}

body.app-theme-raven tbody tr:hover {
    background: #1a2540 !important;
}

body.app-theme-raven td {
    border-color: rgba(59, 130, 246, 0.07) !important;
}

/* ============================================
   TABS & SUB-NAVIGATION
   ============================================ */

body.app-theme-raven .tab-container,
body.app-theme-raven [role="tablist"] {
    background: #111827 !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

body.app-theme-raven .tab-button,
body.app-theme-raven [role="tab"] {
    color: #94a3b8 !important;
}

body.app-theme-raven .tab-button.active,
body.app-theme-raven .tab-button:hover,
body.app-theme-raven [role="tab"][aria-selected="true"],
body.app-theme-raven [role="tab"]:hover {
    color: #60a5fa !important;
    background: rgba(59, 130, 246, 0.12) !important;
}

body.app-theme-raven .scanner-tabs,
body.app-theme-raven .scanner-tab {
    background: #111827 !important;
}

body.app-theme-raven .scanner-tab.active {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}

/* ============================================
   INPUTS & FORM CONTROLS
   ============================================ */

body.app-theme-raven input:not([type="checkbox"]):not([type="radio"]),
body.app-theme-raven select,
body.app-theme-raven textarea {
    background: #111827 !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: #f1f5f9 !important;
}

body.app-theme-raven input:focus,
body.app-theme-raven select:focus,
body.app-theme-raven textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

body.app-theme-raven input::placeholder {
    color: #94a3b8 !important;
}

/* Stock card & chart ticker inputs */
body.app-theme-raven #sc-ticker-input,
body.app-theme-raven #stock-chart-input {
    color: #60a5fa !important;
}

body.app-theme-raven #sc-ticker-input::placeholder,
body.app-theme-raven #stock-chart-input::placeholder {
    color: rgba(148, 163, 184, 0.5) !important;
}

body.app-theme-raven *:has(> #stock-chart-input) {
    background: #111827 !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

body.app-theme-raven *:has(> #stock-chart-input) svg {
    stroke: #94a3b8 !important;
}

/* ============================================
   DROPDOWNS & MENUS
   ============================================ */

body.app-theme-raven [class*="dropdown"],
body.app-theme-raven .dropdown-menu,
body.app-theme-raven [class*="menu"] {
    background: #141c2e !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

/* ============================================
   MODALS & OVERLAYS
   ============================================ */

body.app-theme-raven .modal-content,
body.app-theme-raven [class*="modal"] > div {
    background: linear-gradient(145deg, #0a0f1a 0%, #111827 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(59, 130, 246, 0.06) !important;
}

body.app-theme-raven #mimir-guide-popup > .qc-modal-content {
    background: linear-gradient(145deg, #0a0f1a 0%, #111827 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7) !important;
}

body.app-theme-raven #mimir-guide-popup .qc-modal-body div,
body.app-theme-raven #mimir-guide-popup .qc-modal-body table,
body.app-theme-raven #mimir-guide-popup .qc-modal-body td,
body.app-theme-raven #mimir-guide-popup .qc-modal-body tr {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ============================================
   TOOLTIPS
   ============================================ */

body.app-theme-raven [class*="tooltip"],
body.app-theme-raven .tippy-box {
    background: #141c2e !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    color: #f1f5f9 !important;
}

/* ============================================
   REGIME BANNER
   ============================================ */

body.app-theme-raven #regime-banner {
    background: linear-gradient(90deg, #0f1729 0%, #111827 100%) !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15) !important;
}

/* ============================================
   MOBILE ACTIONS
   ============================================ */

body.app-theme-raven #landing-mobile-actions button {
    background: #111827 !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    color: #94a3b8 !important;
}

body.app-theme-raven #landing-mobile-actions button:hover {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #60a5fa !important;
}

body.app-theme-raven #landing-mobile-actions-menu {
    background: #141c2e !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

body.app-theme-raven #landing-mobile-actions-menu button {
    color: #94a3b8 !important;
}

body.app-theme-raven #landing-mobile-actions-menu button:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #60a5fa !important;
}

/* ============================================
   BORDERS & TEXT UTILITIES
   ============================================ */

body.app-theme-raven .border-gray-700,
body.app-theme-raven .border-gray-600,
body.app-theme-raven .border-gray-800 {
    border-color: rgba(59, 130, 246, 0.12) !important;
}

body.app-theme-raven .text-gray-400,
body.app-theme-raven .text-gray-500 {
    color: #94a3b8 !important;
}

body.app-theme-raven .text-gray-300,
body.app-theme-raven .text-gray-200,
body.app-theme-raven .text-white {
    color: #f1f5f9 !important;
}

/* ============================================
   EARNINGS SIDEBAR
   ============================================ */

body.app-theme-raven #earnings-sidebar {
    background: linear-gradient(145deg, #0a0f1a 0%, #111827 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.08) !important;
}

body.app-theme-raven #earnings-sidebar-col h2 {
    color: #60a5fa !important;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3) !important;
}

body.app-theme-raven #earnings-sidebar-calendar-btn {
    background: #111827 !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: #94a3b8 !important;
}

body.app-theme-raven #earnings-sidebar-calendar-btn:hover {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #60a5fa !important;
}

body.app-theme-raven #earnings-sidebar .hover\:bg-gray-700\/50:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

body.app-theme-raven #earnings-sidebar .text-blue-400 {
    color: #60a5fa !important;
}

/* ============================================
   SAFETY OVERRIDES — elements that must keep
   their default colors regardless of theme
   ============================================ */

/* Exit Draw buttons must stay red */
body.app-theme-raven #exit-drawing-btn,
body.app-theme-raven .pane-exit-draw-btn {
    color: #f44336 !important;
    border-color: #f44336 !important;
    background: transparent !important;
}

/* Pane reorder arrows — keep chart-UI neutral styling */
body.app-theme-raven .pane-reorder-arrows button {
    background: #2a2e39 !important;
    border: 1px solid #363a45 !important;
    color: #d1d4dc !important;
}

body.app-theme-raven .pane-reorder-arrows button:hover {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #fff !important;
}

/* ============================================
   SECTOR HEATMAP TILES — blue border accent
   ============================================ */

.widget-theme-raven .landing-widget .widget-content > .grid > div {
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
    box-shadow: inset 0 1px 0 rgba(59, 130, 246, 0.08) !important;
}

/* ============================================
   WELCOME MODAL
   ============================================ */

body.app-theme-raven #welcome-modal .welcome-modal-container {
    background: rgba(10, 15, 26, 0.92) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(59, 130, 246, 0.06) !important;
}
/* Reset Raven on containers without inline styles */
body.app-theme-raven #welcome-modal .text-center:not([style]),
body.app-theme-raven #welcome-modal .grid:not([style]),
body.app-theme-raven #welcome-modal .welcome-feature-card:not([style]),
body.app-theme-raven #welcome-modal .flex:not([style]) {
    border: none !important;
    background: transparent !important;
}
/* Feature card icon containers - use revert to respect inline styles */
body.app-theme-raven #welcome-modal .welcome-feature-card > div.rounded-xl {
    border: revert !important;
    background: revert !important;
    border-radius: 0.75rem !important;
}
body.app-theme-raven #welcome-modal .text-white { color: #f1f5f9 !important; }
body.app-theme-raven #welcome-modal .text-gray-400 { color: #94a3b8 !important; }
body.app-theme-raven #welcome-modal .text-gray-500 { color: #94a3b8 !important; }
body.app-theme-raven #welcome-modal .text-gray-600 { color: #64748b !important; }
body.app-theme-raven #welcome-modal .text-blue-400 { color: #60a5fa !important; }
body.app-theme-raven #welcome-modal .text-green-400 { color: #10b981 !important; }
body.app-theme-raven #welcome-modal .text-orange-400 { color: #f97316 !important; }
body.app-theme-raven #welcome-modal .text-purple-400 { color: #a78bfa !important; }
body.app-theme-raven #welcome-modal .welcome-cta-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
}

/* ============================================
   SCANNER PANELS & VIEW CONTAINERS — clean bg
   ============================================ */

body.app-theme-raven [id^="panel-"] > div,
body.app-theme-raven #news-events-content > div:nth-child(2) > div:nth-child(1) > div,
body.app-theme-raven #news-events-content > div:nth-child(2) > div:nth-child(2) > div,
body.app-theme-raven #alerts-view .bg-gray-800,
body.app-theme-raven #alerts-view .dark\:bg-gray-800,
body.app-theme-raven #alerts-view .bg-white,
body.app-theme-raven #settings-content > div:nth-child(1),
body.app-theme-raven #settings-content > div:nth-child(2),
body.app-theme-raven #stock-card-content {
    background: #141c2e !important;
}

/* ============================================
   STOCK CARD TICKER INPUT CONTAINER
   ============================================ */

body.app-theme-raven #stock-card-content .flex.items-center.bg-gray-700 {
    background: rgba(59, 130, 246, 0.08) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

/* ============================================
   VIEW-SPECIFIC BACKGROUNDS (transparent)
   ============================================ */

body.app-theme-raven #liveflow-view,
body.app-theme-raven #alerts-view,
body.app-theme-raven #news-events-view,
body.app-theme-raven #settings-view,
body.app-theme-raven #handbook-view,
body.app-theme-raven #shieldmaiden-view,
body.app-theme-raven #income-view,
body.app-theme-raven #querybuilder-view {
    background: transparent !important;
}

/* ============================================
   GENERAL BUTTONS
   ============================================ */

body.app-theme-raven button:not(.view-toggle-btn):not([class*="text-"]) {
    background: #111827 !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: #94a3b8 !important;
}
body.app-theme-raven button:not(.view-toggle-btn):hover {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #60a5fa !important;
}

/* ============================================
   ALERT ITEMS & CARDS
   ============================================ */

body.app-theme-raven .alert-item,
body.app-theme-raven .alert-card {
    background: linear-gradient(145deg, #0a0f1a 0%, #111827 100%) !important;
    border-color: rgba(59, 130, 246, 0.15) !important;
}

/* ============================================
   NEWS ITEMS & CARDS
   ============================================ */

body.app-theme-raven .news-item,
body.app-theme-raven .news-card {
    background: linear-gradient(145deg, #0a0f1a 0%, #111827 100%) !important;
    border-color: rgba(59, 130, 246, 0.15) !important;
}

/* ============================================
   GLOBAL SCROLLBARS (page-wide)
   ============================================ */

body.app-theme-raven ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
body.app-theme-raven ::-webkit-scrollbar-track {
    background: rgba(10, 15, 26, 0.5);
}
body.app-theme-raven ::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
}
body.app-theme-raven ::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* ============================================
   EARNINGS SIDEBAR — detailed rows & labels
   ============================================ */

/* Day header rows */
body.app-theme-raven #earnings-sidebar > div > div:first-child {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, #111827 100%) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}
/* Day name text */
body.app-theme-raven #earnings-sidebar > div > div:first-child span.text-gray-300 {
    color: #60a5fa !important;
}
body.app-theme-raven #earnings-sidebar > div > div:first-child span.text-gray-400 {
    color: #94a3b8 !important;
}
body.app-theme-raven #earnings-sidebar > div > div:first-child span.text-gray-500 {
    color: #64748b !important;
}

/* Column header labels (Ticker, MCap, Est, Actual) */
body.app-theme-raven #earnings-sidebar .text-gray-500.font-medium {
    color: #3b82f6 !important;
}

/* Section dividers */
body.app-theme-raven #earnings-sidebar .border-gray-700,
body.app-theme-raven #earnings-sidebar .border-t {
    border-color: rgba(59, 130, 246, 0.12) !important;
}
body.app-theme-raven #earnings-sidebar .border-gray-700\/50 {
    border-color: rgba(59, 130, 246, 0.08) !important;
}

/* Ticker rows - hover with blue */
body.app-theme-raven #earnings-sidebar .hover\:bg-gray-700\/50:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

/* Ticker symbol text */
body.app-theme-raven #earnings-sidebar .text-white {
    color: #f1f5f9 !important;
}
body.app-theme-raven #earnings-sidebar .group-hover\:text-blue-400:hover {
    color: #60a5fa !important;
}

/* MCap and secondary text */
body.app-theme-raven #earnings-sidebar .text-gray-400 {
    color: #94a3b8 !important;
}
body.app-theme-raven #earnings-sidebar .text-gray-500 {
    color: #64748b !important;
}

/* "+N more" link */
body.app-theme-raven #earnings-sidebar .text-blue-400 {
    color: #60a5fa !important;
}
body.app-theme-raven #earnings-sidebar .hover\:text-blue-300:hover {
    color: #93c5fd !important;
}

/* ============================================
   EARNINGS CALENDAR MODAL (#news-calendar-modal)
   ============================================ */

/* Full calendar modal — navy gradient, blue border, blue glow */
body.app-theme-raven #news-calendar-modal {
    background: linear-gradient(145deg, #0a0f1a 0%, #111827 100%) !important;
    border: 2px solid rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(59, 130, 246, 0.08) !important;
    position: fixed !important;
}

/* Modal header bar */
body.app-theme-raven #news-calendar-modal > div:first-child {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, #111827 100%) !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2) !important;
}
body.app-theme-raven #news-calendar-modal > div:first-child span {
    color: #60a5fa !important;
}
body.app-theme-raven #news-calendar-modal > div:first-child svg {
    color: #94a3b8 !important;
}
body.app-theme-raven #news-calendar-modal > div:first-child button {
    color: #94a3b8 !important;
}

/* Calendar sub-tabs (Earnings, IPOs, Splits, Economic) */
body.app-theme-raven #news-calendar-modal > div:nth-child(2) {
    border-bottom: 1px solid rgba(59, 130, 246, 0.2) !important;
    background: transparent !important;
}
body.app-theme-raven #news-calendar-modal .calendar-type-tab {
    background: #111827 !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: #94a3b8 !important;
}
body.app-theme-raven #news-calendar-modal .calendar-type-tab.active {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4), 0 0 8px rgba(59, 130, 246, 0.15) !important;
}

/* Scrollable content area */
body.app-theme-raven #news-calendar-modal > div:nth-child(3) {
    background: transparent !important;
}

/* Calendar month title */
body.app-theme-raven #earnings-calendar-mini .text-lg.font-bold {
    color: #60a5fa !important;
}
/* Earnings count subtitle */
body.app-theme-raven #earnings-calendar-mini .text-xs.text-gray-400 {
    color: #64748b !important;
}

/* Calendar table cells */
body.app-theme-raven #earnings-calendar-mini td {
    border-color: rgba(59, 130, 246, 0.12) !important;
    background: rgba(10, 15, 26, 0.4) !important;
}
body.app-theme-raven #earnings-calendar-mini td:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}
/* Today's cell highlight — blue glow */
body.app-theme-raven #earnings-calendar-mini td.bg-blue-900\/30 {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}
body.app-theme-raven #earnings-calendar-mini .text-blue-400.font-bold {
    color: #60a5fa !important;
}

/* Day of week headers */
body.app-theme-raven #earnings-calendar-mini thead th {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, #111827 100%) !important;
    color: #3b82f6 !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

/* Navigation arrows */
body.app-theme-raven #earnings-calendar-mini .hover\:bg-gray-700 {
    color: #94a3b8 !important;
}
body.app-theme-raven #earnings-calendar-mini .hover\:bg-gray-700:hover {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #60a5fa !important;
}

/* View toggle buttons */
body.app-theme-raven #earnings-calendar-mini .border-gray-600 {
    border-color: rgba(59, 130, 246, 0.3) !important;
}
body.app-theme-raven #earnings-calendar-mini .bg-blue-500 {
    background: rgba(59, 130, 246, 0.4) !important;
    color: #60a5fa !important;
}

/* "+N more" links in calendar cells */
body.app-theme-raven #earnings-calendar-mini .text-blue-400.cursor-pointer {
    color: #60a5fa !important;
}

/* Backdrop */
body.app-theme-raven #news-calendar-backdrop {
    background: rgba(10, 15, 26, 0.7) !important;
}

/* ============================================
   EARNINGS DAY MODAL (#day-earnings-modal)
   ============================================ */

/* Modal inner container — navy gradient, blue border, blue glow */
body.app-theme-raven #day-earnings-modal > div {
    background: linear-gradient(145deg, #0a0f1a 0%, #111827 100%) !important;
    border: 2px solid rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.08), 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}

/* Modal header */
body.app-theme-raven #day-earnings-modal .border-b {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, #111827 100%) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}
body.app-theme-raven #day-earnings-modal h3 {
    color: #60a5fa !important;
}

/* Modal body */
body.app-theme-raven #day-earnings-modal .overflow-y-auto {
    background: transparent !important;
}

/* Modal table header */
body.app-theme-raven #day-earnings-modal thead {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, #111827 100%) !important;
}
body.app-theme-raven #day-earnings-modal th {
    color: #3b82f6 !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    background: transparent !important;
}

/* Modal table rows */
body.app-theme-raven #day-earnings-modal tbody tr {
    border-color: rgba(59, 130, 246, 0.08) !important;
}
body.app-theme-raven #day-earnings-modal tbody tr:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

/* Modal footer */
body.app-theme-raven #day-earnings-modal .border-t {
    border-color: rgba(59, 130, 246, 0.15) !important;
    background: transparent !important;
    color: #64748b !important;
}

/* Close button */
body.app-theme-raven #day-earnings-modal button {
    color: #94a3b8 !important;
    background: transparent !important;
    border: none !important;
}
body.app-theme-raven #day-earnings-modal button:hover {
    color: #60a5fa !important;
    background: rgba(59, 130, 246, 0.1) !important;
}
