/* style.css — Dark Theme */
.news-ticker {
    height: 30px;
    overflow: hidden;
    background-color: #1a1f35;
    color: #e0e6f0;
    font-size: 20px;
    line-height: 30px;
    white-space: nowrap;
    box-sizing: border-box;
    padding: 10px;
}

.ticker {
    margin-bottom: 0px;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border: 1px solid #2a3050;
    padding: 8px;
    text-align: left;
    color: #e0e6f0;
}

th {
    background-color: #151a2e;
    color: #e0e6f0;
}

@keyframes green-blink {

    0%,
    100% {
        color: #e0e6f0;
        background-color: #0a0e1a;
    }

    50% {
        color: #e0e6f0;
        background-color: rgba(34, 197, 94, 0.3);
    }
}

@keyframes red-blink {

    0%,
    100% {
        color: #e0e6f0;
        background-color: #0a0e1a;
    }

    50% {
        color: #e0e6f0;
        background-color: rgba(239, 68, 68, 0.3);
    }
}

.bg-green {
    animation: green-blink 1s infinite;
    text-align: center;
}

.bg-red {
    animation: red-blink 1s infinite;
    text-align: center;
}

.bg-default {
    background-color: transparent;
    text-align: center;
}

h1,
h2,
h3 {
    text-align: center;
    color: #e0e6f0;
}

.text-red {
    color: #ff6b6b;
}

.text-green {
    color: #00d4aa;
}

.text-black {
    color: #e0e6f0;
}

a {
    color: #60a5fa;
    text-decoration: none;
}

.small-button {
    width: 80px;
    height: 30px;
    line-height: 30px;
    font-weight: bold;
    border-radius: 50px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #2a3050;
    background-color: #1a1f35;
    color: #e0e6f0;
    text-decoration: none;
    margin: 10px;
    padding: 0;
    display: inline-block;
}

.button-group {
    display: flex;
    justify-content: center;
    align-items: center;
}

.status-page {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.content {
    background: #1a1f35;
    padding: 2em;
    height: 220px;
    position: relative;
    z-index: 2;
    border-radius: 0 5px 5px 5px;
    box-shadow: 0 -2px 3px -2px rgba(0, 0, 0, .5);
    color: #e0e6f0;
}

.content1 {
    background: #1a1f35;
    height: 220px;
    position: relative;
    z-index: 2;
    border-radius: 0 5px 5px 5px;
    box-shadow: 0 -2px 3px -2px rgba(0, 0, 0, .5);
    color: #e0e6f0;
}

select#plot-options {
    width: 200px;
    height: 40px;
    font-size: 18px;
    background-color: #1a1f35;
    color: #e0e6f0;
    border: 1px solid #2a3050;
}

.popup {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #2a3050;
    background-color: #1a1f35;
    color: #e0e6f0;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}

#reading-btn {
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    line-height: 30px;
    padding: -4px 0;
}

/* ============================================
   GLOBAL DARK MODE OVERRIDES
   Catches any elements not explicitly styled
   ============================================ */

/* Force dark on ALL elements */
*,
*::before,
*::after {
    border-color: #2a3050 !important;
}

/* Body & root */
html,
body {
    background-color: #0a0e1a !important;
    color: #e0e6f0 !important;
}

/* All divs, sections, articles, main, aside, nav, header, footer */
div,
section,
article,
main,
aside,
header,
footer,
fieldset,
legend {
    background-color: inherit;
    color: inherit;
}

/* Tables */
table,
thead,
tbody,
tfoot,
tr {
    background-color: transparent !important;
    color: #e0e6f0 !important;
}

th {
    background-color: #151a2e !important;
    color: #e0e6f0 !important;
}

td {
    background-color: transparent !important;
    color: #e0e6f0 !important;
}

tr:nth-child(even) td {
    background-color: #12162a !important;
}

tr:hover td {
    background-color: #1e2540 !important;
}

/* Form elements */
input,
select,
textarea,
button {
    background-color: #1a1f35 !important;
    color: #e0e6f0 !important;
    border-color: #2a3050 !important;
}

input::placeholder,
textarea::placeholder {
    color: #5a6478 !important;
}

input[type="range"] {
    background-color: transparent !important;
}

/* Cards, panels, containers */
.container:not([class*="fp-"]),
.card:not([class*="fp-"]),
.panel:not([class*="fp-"]),
.box:not([class*="fp-"]),
.wrapper:not([class*="fp-"]),
.module:not([class*="fp-"]),
[class*="card"]:not([class*="fp-"]),
[class*="panel"]:not([class*="fp-"]),
[class*="box"]:not([class*="fp-"]),
[class*="modal"]:not([class*="fp-"]),
[class*="dash"]:not([class*="fp-"]),
[id*="output"] {
    background-color: #1a1f35 !important;
    color: #e0e6f0 !important;
    border-color: #2a3050 !important;
}

/* Override any inline white backgrounds on common wrapper elements */
.content,
.content1,
.main-content,
.page-content {
    background-color: #1a1f35 !important;
}

/* DataTables overrides */
.dataTables_wrapper,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: #8892a8 !important;
    background-color: transparent !important;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: #1a1f35 !important;
    color: #e0e6f0 !important;
    border: 1px solid #2a3050 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #8892a8 !important;
    background: transparent !important;
    border: 1px solid #2a3050 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    color: #00d4aa !important;
    background: #1a1f35 !important;
    border-color: #00d4aa !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: #e0e6f0 !important;
    background: #1e2540 !important;
    border-color: #3a4060 !important;
}

table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
    background-color: #0a0e1a !important;
}

table.dataTable.stripe tbody tr.even,
table.dataTable.display tbody tr.even {
    background-color: #12162a !important;
}

table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
    background-color: #1e2540 !important;
}

table.dataTable thead th,
table.dataTable thead td {
    border-bottom: 1px solid #2a3050 !important;
}

table.dataTable.no-footer {
    border-bottom: 1px solid #2a3050 !important;
}

table.dataTable tbody th,
table.dataTable tbody td {
    border-top: none !important;
}

/* Sorting icons for DataTables */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-color: #151a2e !important;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0e1a;
}

::-webkit-scrollbar-thumb {
    background: #2a3050;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a4060;
}

/* Links */
a {
    color: #60a5fa;
}

a:hover {
    color: #93bbfc;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #e0e6f0 !important;
}

/* Pre/code */
pre,
code {
    background-color: #12162a !important;
    color: #e0e6f0 !important;
    border-color: #2a3050 !important;
}

/* HR */
hr {
    border-color: #2a3050 !important;
}

/* Plotly chart overrides (legend, axis text) */
.js-plotly-plot .plotly .main-svg {
    background: transparent !important;
}

/* Badge overrides */
.badge:not([class*="fp-"]),
[class*="badge"]:not([class*="fp-"]) {
    border-color: #2a3050 !important;
}

/* Don't override sidebar - it has its own styling */
.sgpt-sidebar,
.sgpt-sidebar * {
    border-color: inherit !important;
}

.sgpt-sidebar input,
.sgpt-sidebar select,
.sgpt-sidebar button {
    background-color: inherit !important;
    color: inherit !important;
    border-color: inherit !important;
}

/* Don't break colored backgrounds (green/red indicators) */
.bg-green,
.bg-red,
.bg-default,
[style*="background-color: rgb(0, 128, 0)"],
[style*="background-color: rgb(255, 0, 0)"],
[style*="background-color: green"],
[style*="background-color: red"] {
    background-color: inherit !important;
}



/* Ensure positive/negative colors stay visible */
.text-green,
.positive,
.profit {
    color: #00d4aa !important;
}

.text-red,
.negative,
.loss {
    color: #ff6b6b !important;
}

/* Tab bar dark mode */
.tab-bar,
#tabs {
    background-color: #0a0e1a !important;
    border-bottom-color: #2a3050 !important;
}

#tabs li a {
    color: #e0e6f0 !important;
}

#tabs li#current>a {
    background-color: #1e2540 !important;
    color: #00d4aa !important;
}