/* Mangenius Dark Theme */
body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation */
.navbar {
    background-color: #000000 !important;
    border-bottom: 2px solid #28a745;
}

.navbar-brand {
    color: #28a745 !important;
    font-size: 1.5rem;
    padding: 0.5rem 0;
    margin-right: 2rem;
    margin-left: 0 !important; /* Remove any left margin */
}

.navbar-brand img {
    max-height: 120px;
    width: auto;
    height: auto;
}

/* Move navbar content to far left */
.navbar .container {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #28a745 !important;
}

.navbar-text {
    color: #cccccc !important;
}

/* Cards */
.card {
    background-color: #1a1a1a;
    border: 1px solid #28a745;
    color: #ffffff;
}

.card-header {
    background-color: #28a745;
    color: #000000;
    font-weight: bold;
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid #28a745;
}

.nav-tabs .nav-link {
    background-color: #2a2a2a;
    border: 1px solid #444444;
    color: #ffffff;
    margin-right: 2px;
}

.nav-tabs .nav-link:hover {
    background-color: #3a3a3a;
    border-color: #28a745;
    color: #28a745;
}

.nav-tabs .nav-link.active {
    background-color: #28a745;
    border-color: #28a745;
    color: #000000;
    font-weight: bold;
}

.tab-content {
    border: none;
}

/* Buttons */
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: #000000;
    font-weight: bold;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: #ffffff;
}

/* Forms */
.form-control {
    background-color: #2a2a2a;
    border: 1px solid #28a745;
    color: #ffffff;
}

.form-control:focus {
    background-color: #2a2a2a;
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    color: #ffffff;
}

.form-label {
    color: #ffffff;
    font-weight: 500;
}

/* Tables - FIXED: Ensure all text is white on dark backgrounds */
.table {
    color: #ffffff !important;
    --bs-table-bg: transparent;
}

/* Force white text on all table cells */
.table td, 
.table th,
.table tbody tr td,
.table tbody tr th,
.table thead tr td,
.table thead tr th {
    color: #ffffff !important;
    border-color: #444444;
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
}

.table-striped > tbody > tr:nth-of-type(even) > td,
.table-striped > tbody > tr:nth-of-type(even) > th {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
    background-color: #3a3a3a !important;
    color: #ffffff !important;
}

.table thead th {
    background-color: #28a745;
    color: #000000 !important;
    border-color: #28a745;
    font-weight: bold;
}

/* Badges for better visibility */
.badge {
    font-size: 0.75em;
    font-weight: 600;
}

.bg-success {
    background-color: #28a745 !important;
    color: #000000 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

/* Text colors for probability highlighting */
.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* DataTables Styling */
.dataTables_wrapper {
    color: #ffffff;
}

.dataTables_length select,
.dataTables_filter input {
    background-color: #2a2a2a;
    border: 1px solid #28a745;
    color: #ffffff;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
}

.dataTables_length select:focus,
.dataTables_filter input:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    outline: 0;
}

.dataTables_info,
.dataTables_length label,
.dataTables_filter label {
    color: #ffffff;
}

.page-link {
    background-color: #2a2a2a;
    border-color: #28a745;
    color: #28a745;
}

.page-link:hover {
    background-color: #28a745;
    border-color: #28a745;
    color: #000000;
}

.page-item.active .page-link {
    background-color: #28a745;
    border-color: #28a745;
    color: #000000;
}

.page-item.disabled .page-link {
    background-color: #1a1a1a;
    border-color: #333333;
    color: #666666;
}

/* Alerts */
.alert-danger {
    background-color: #721c24;
    border-color: #f5c6cb;
    color: #f8d7da;
}

.alert-info {
    background-color: #0c5460;
    border-color: #b6d4fe;
    color: #b6effb;
}

/* Plotly Chart Styling */
.plotly-graph-div {
    background-color: #1a1a1a !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .navbar-brand img {
        max-height: 80px;
    }
    
    /* Ensure mobile navbar also starts from left edge */
    .navbar .container {
        padding-left: 0.5rem !important;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        max-height: 60px;
    }
    
    .navbar .container {
        padding-left: 0.25rem !important;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #218838;
}

/* Loading states */
.dataTables_processing {
    background-color: rgba(0, 0, 0, 0.8) !important;
    color: #28a745 !important;
}