/* ============================================================
   KTS ADMIN — DARK THEME v2.0  (CSS-only, no PHP/JS touched)
   Palette:
     --bg-base:    #0f1117   (deepest background)
     --bg-surface: #1a1d27   (cards, sidebar, navbar)
     --bg-raised:  #22263a   (elevated panels, table headers)
     --bg-hover:   #2c3050   (hover states)
     --border:     #2e3148   (subtle borders)
     --text-base:  #e2e4f0   (primary text)
     --text-muted: #8b8fa8   (secondary / muted text)
     --accent:     #6366f1   (indigo-blue accent)
     --accent-h:   #818cf8   (accent hover / lighter variant)
     --accent-glow:rgba(99,102,241,0.35) (accent glow)
   ============================================================ */

/* ── CUSTOM SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f1117; }
::-webkit-scrollbar-thumb { background: #2e3148; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6366f1; }

/* ── BASE BODY ─────────────────────────────────────────────── */
body {
    background-color: #0f1117;
    color: #e2e4f0;
    font-family: 'Inter', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    letter-spacing: 0.15px !important;
}

h1, h2, h3, h4, h5, h6, .page-title h3 {
    font-family: 'Inter', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: -0.2px !important;
    color: #eef0fb !important;
}

div, h1, h2, h3, h4, h5, h6, label, p, span { color: inherit; }

a, a:hover { color: #818cf8; transition: color 0.2s; }
a:hover { color: #a5b4fc; }

/* ── NAVBAR ────────────────────────────────────────────────── */
.navbar {
    background: linear-gradient(180deg, #1e2235 0%, #1a1d27 100%);
    border-bottom: 2px solid #6366f1;
    box-shadow: 0 2px 16px rgba(99, 102, 241, 0.2);
}

.navbar .nav > li > a {
    color: #c5c8e8 !important;
    transition: background 0.2s, color 0.2s;
}
.navbar .nav > li > a:hover, .navbar .nav > li > a:focus {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #ffffff !important;
}

.navbar .nav li.dropdown.active > .dropdown-toggle,
.navbar .nav li.dropdown.open.active > .dropdown-toggle,
.navbar .nav li.dropdown.open > .dropdown-toggle,
.navbar .nav > li:active,
.navbar .toggle-sidebar:active {
    color: #fff;
    background: rgba(99, 102, 241, 0.25);
}

/* ── DROPDOWN MENUS ────────────────────────────────────────── */
.dropdown-menu {
    background-color: #1e2235 !important;
    border: 1px solid #2e3148 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}
.dropdown-menu > li > a {
    color: #c5c8e8 !important;
    transition: background 0.15s, color 0.15s;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #fff !important;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
    background-color: #6366f1 !important;
    color: #fff !important;
}

.dropdown-menu.extended li p {
    background-color: #22263a;
    color: #eef0fb;
    border-bottom: 1px solid #2e3148;
}
.dropdown-menu.extended li {
    border-bottom: 1px solid #2e3148;
}
.dropdown-menu.extended li.footer a {
    background-color: #1a1d27;
    color: #8b8fa8;
    padding: 8px;
    transition: all 0.2s;
}
.dropdown-menu.extended li.footer a:hover {
    background-color: rgba(99, 102, 241, 0.2);
    color: #fff;
}

@media (max-width: 767px) {
    .navbar .container .nav > li > .dropdown-menu.extended > li.footer > a {
        background-color: #6366f1;
        color: #fff;
    }
}

/* ── SIDEBAR ───────────────────────────────────────────────── */
#sidebar { background-color: #1a1d27; color: #8b8fa8; }
#sidebar-content { background: #1a1d27; }

#sidebar ul#nav li { border-top: 1px solid #22263a; }
#sidebar ul#nav li:first-child { border-top: none !important; }

#sidebar ul#nav li a,
#sidebar ul#nav li a i {
    color: #9094b0;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
}

#sidebar ul#nav li a:hover,
#sidebar ul#nav li a:hover > #sidebar ul#nav li a i {
    background-color: rgba(99, 102, 241, 0.12);
    color: #eef0fb;
    padding-left: 24px;
}

#sidebar ul#nav li.current,
#sidebar ul#nav li.open {
    background: rgba(99, 102, 241, 0.08);
    font-size: 13px;
}
#sidebar ul#nav li.current a:hover,
#sidebar ul#nav li.open a:hover { background: rgba(99, 102, 241, 0.15); }

#sidebar .selected { background-image: url(../images/sidebar-menu-arrow_mediumorchid.png); }

#sidebar ul#nav > li.current > a {
    border-left: 3px solid #6366f1;
    color: #fff !important;
    box-shadow: inset 4px 0 12px rgba(99, 102, 241, 0.3);
}

#sidebar ul#nav li.current a,
#sidebar ul#nav li.current i,
#sidebar ul#nav li.open a,
#sidebar ul#nav li.open i { color: #eef0fb; }

#sidebar ul#nav ul.sub-menu { background: #0f1117; }
#sidebar ul#nav ul.sub-menu li { border-top: 0; }
#sidebar ul#nav ul.sub-menu li a,
#sidebar ul#nav ul.sub-menu li i { color: #8b8fa8; transition: color 0.2s, background 0.2s; }
#sidebar ul#nav ul.sub-menu li.current { background: rgba(99, 102, 241, 0.15); color: #fff; }
#sidebar ul#nav ul.sub-menu li.current a,
#sidebar ul#nav ul.sub-menu li.current i { color: #a5b4fc; }
#sidebar ul#nav ul.sub-menu li a:hover,
#sidebar ul#nav ul.sub-menu li.open { background: rgba(99, 102, 241, 0.1); }
#sidebar ul#nav ul.sub-menu li a:hover { color: #eef0fb; }

#sidebar .sidebar-title {
    background-color: #22263a;
    color: #9094b0;
    border-top: 1px solid #2e3148;
    border-bottom: 1px solid #2e3148;
}

#sidebar .sidebar-search .input-box { border-bottom-color: #2e3148 !important; }
#sidebar .sidebar-search .submit,
#sidebar .sidebar-search input {
    background-color: #22263a !important;
    color: #9094b0;
}

#sidebar ul#nav li a {
    font-family: 'Inter', 'Open Sans', sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
}

/* ── CONTENT AREA ──────────────────────────────────────────── */
#content { background-color: #0f1117; color: #e2e4f0; }

/* ── BREADCRUMBS ───────────────────────────────────────────── */
.breadcrumb, .crumbs {
    background-color: #1a1d27 !important;
    border-color: #2e3148 !important;
    border-bottom: 1px solid #2e3148 !important;
}
.crumbs .breadcrumb li a { color: #8b8fa8 !important; transition: color 0.2s; }
.crumbs .breadcrumb li a:hover { color: #a5b4fc !important; }
.crumbs .breadcrumb li i { color: #6366f1; }
.crumbs .crumb-buttons > li > a {
    color: #9094b0 !important;
    border-left-color: #2e3148;
    border-right-color: #2e3148;
    transition: background 0.2s, color 0.2s;
}
.crumbs .crumb-buttons > li > a:hover { background: rgba(99, 102, 241, 0.1) !important; color: #fff !important; }

/* ── PAGE TITLE ────────────────────────────────────────────── */
.page-title h3 { color: #eef0fb !important; }
.page-title span { color: #8b8fa8 !important; }

/* ── CARDS / PORTLETS / WIDGETS ────────────────────────────── */
.box, .panel, .portlet-body, .widget, .widget-box, .widget-content {
    background-color: #1a1d27 !important;
    color: #e2e4f0 !important;
    border: 1px solid #2e3148 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}
.box-title, .panel-heading, .portlet-title, .widget-title {
    background-color: #22263a !important;
    color: #eef0fb !important;
    border-color: #2e3148 !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid #2e3148 !important;
}
.portlet > .portlet-title { border-bottom: 1px solid #2e3148; }
.portlet.box > .portlet-body { background-color: #1a1d27; padding: 12px; }

/* ── MODALS ────────────────────────────────────────────────── */
.modal-content, .modal-header, .modal-body, .modal-footer {
    background-color: #1a1d27 !important;
    color: #e2e4f0 !important;
    border-color: #2e3148 !important;
}
.modal-header {
    background-color: #22263a !important;
    border-bottom: 1px solid #2e3148 !important;
    border-top-left-radius: 6px !important;
    border-top-right-radius: 6px !important;
}
.modal-header .close { color: #8b8fa8 !important; text-shadow: none !important; opacity: 0.8; }
.modal-header .close:hover { color: #fff !important; opacity: 1; }
.modal-footer { border-top: 1px solid #2e3148 !important; }

/* ── TABLES ────────────────────────────────────────────────── */
.table, table.dataTable {
    background-color: #1a1d27 !important;
    color: #e2e4f0 !important;
    border: 1px solid #2e3148 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}
.table td, .table th,
table.dataTable td, table.dataTable th {
    border-color: #2e3148 !important;
    color: #e2e4f0 !important;
    background-color: transparent !important;
    padding: 10px 14px !important;
    vertical-align: middle !important;
}
.table thead th, table.dataTable thead th {
    background-color: #22263a !important;
    color: #c5c8e8 !important;
    font-weight: 600 !important;
    letter-spacing: 0.4px !important;
    text-transform: uppercase !important;
    font-size: 11.5px !important;
    border-bottom: 2px solid #6366f1 !important;
}

/* Table striping */
.table-striped > tbody > tr:nth-child(odd) > td,
.table-striped > tbody > tr:nth-child(odd) > th {
    background-color: #1a1d27 !important;
}
.table-striped > tbody > tr:nth-child(even) > td,
.table-striped > tbody > tr:nth-child(even) > th {
    background-color: #1e2235 !important;
}

/* Table hover */
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th,
table.dataTable tbody tr:hover td {
    background-color: rgba(99, 102, 241, 0.1) !important;
}

/* ── FORM CONTROLS & INPUTS ────────────────────────────────── */
input, textarea, select, .form-control {
    background-color: #22263a !important;
    color: #e2e4f0 !important;
    border: 1px solid #3a3f5c !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
input:focus, textarea:focus, select:focus, .form-control:focus {
    border-color: #6366f1 !important;
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}
input[disabled], input[readonly],
select[disabled], select[readonly],
textarea[disabled], textarea[readonly] {
    background-color: #181b28 !important;
    color: #555878 !important;
    cursor: not-allowed;
}
.input-group-addon {
    background-color: #22263a !important;
    border-color: #3a3f5c !important;
    color: #8b8fa8 !important;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn, .btn-default {
    background-color: #2c3050 !important;
    color: #c5c8e8 !important;
    border: 1px solid #3a3f5c !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    font-size: 13px !important;
    padding: 7px 14px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25) !important;
    text-shadow: none !important;
}
.btn:hover, .btn-default:hover {
    background-color: #353a60 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}
.btn:active, .btn-default:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.btn.red {
    background-color: #7f1d1d !important;
    border-color: #991b1b !important;
    color: #fff !important;
}
.btn.red:hover, .btn.red:focus, .btn.red:active { background-color: #991b1b !important; }

.btn.blue {
    background-color: #1e3a5e !important;
    border-color: #1d4ed8 !important;
    color: #fff !important;
}
.btn.blue:hover, .btn.blue:focus, .btn.blue:active { background-color: #1d4ed8 !important; }

.btn.green {
    background-color: #14532d !important;
    border-color: #166534 !important;
    color: #fff !important;
}
.btn.green:hover, .btn.green:focus, .btn.green:active { background-color: #166534 !important; }

.btn.purple {
    background-color: #4c1d95 !important;
    border-color: #6d28d9 !important;
    color: #fff !important;
}
.btn.purple:hover, .btn.purple:focus, .btn.purple:active { background-color: #6d28d9 !important; }

.btn.yellow {
    background-color: #78350f !important;
    border-color: #92400e !important;
    color: #fff !important;
}
.btn.yellow:hover, .btn.yellow:focus, .btn.yellow:active { background-color: #92400e !important; }

.btn.black {
    background-color: #1a1d27 !important;
    border-color: #2e3148 !important;
    color: #e2e4f0 !important;
}
.btn.black:hover, .btn.black:focus, .btn.black:active { background-color: #22263a !important; }

/* ── PAGINATION ────────────────────────────────────────────── */
.pagination > .active > a,
.pagination > .active > a:focus,
.pagination > .active > a:hover,
.pagination > .active > span,
.pagination > .active > span:focus,
.pagination > .active > span:hover {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #fff !important;
}
.pagination > li > a, .pagination > li > span {
    background-color: #1a1d27 !important;
    border-color: #2e3148 !important;
    color: #9094b0 !important;
    transition: all 0.2s;
}
.pagination > li > a:hover { background-color: #22263a !important; color: #fff !important; }

/* ── DATATABLES ────────────────────────────────────────────── */
div.dataTables_filter input,
div.dataTables_length select {
    background-color: #22263a !important;
    color: #e2e4f0 !important;
    border: 1px solid #3a3f5c !important;
    border-radius: 5px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: #1a1d27 !important;
    color: #9094b0 !important;
    border: 1px solid #2e3148 !important;
    border-radius: 4px !important;
    transition: all 0.2s;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #22263a !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #6366f1 !important;
    color: #fff !important;
    border-color: #6366f1 !important;
}
div.dataTables_info, .dataTables_wrapper .dataTables_info { color: #8b8fa8; }

/* ── SELECT2 ───────────────────────────────────────────────── */
.select2-container .select2-choice,
.select2-container .select2-choices,
.select2-drop,
.select2-search input {
    background-color: #22263a !important;
    background-image: none !important;
    color: #e2e4f0 !important;
    border-color: #3a3f5c !important;
    border-radius: 6px !important;
}
.select2-container .select2-choice > .select2-chosen,
.select2-container .select2-choice { color: #e2e4f0 !important; }
.select2-results { background-color: #1e2235 !important; color: #e2e4f0 !important; }
.select2-results .select2-highlighted {
    background-color: #6366f1 !important;
    color: #fff !important;
}
.select2-drop-active { border: 1px solid #6366f1 !important; box-shadow: 0 4px 12px rgba(99,102,241,0.3) !important; }
.select2-container-active .select2-choice { border-color: #6366f1 !important; }

/* ── ALERTS ────────────────────────────────────────────────── */
.alert-success { background-color: #14532d !important; border-color: #166534 !important; color: #bbf7d0 !important; }
.alert-info    { background-color: #1e3a5e !important; border-color: #1d4ed8 !important; color: #bfdbfe !important; }
.alert-warning { background-color: #78350f !important; border-color: #92400e !important; color: #fde68a !important; }
.alert-danger  { background-color: #7f1d1d !important; border-color: #991b1b !important; color: #fecaca !important; }

/* ── RIGHT MENU (top tab navigation) ──────────────────────── */
.right_menu {
    background: transparent !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35) !important;
    display: inline-block !important;
}
.right_menu ul {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}
.right_menu ul li {
    border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
}
.right_menu ul li:last-child { border-right: none !important; }
.right_menu ul li a {
    padding: 11px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    line-height: normal !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: background 0.25s ease !important;
    display: block !important;
    font-family: 'Inter', 'Open Sans', sans-serif !important;
    letter-spacing: 0.3px !important;
}
.right_menu ul li a:hover {
    background-color: rgba(255, 255, 255, 0.18) !important;
}

/* ── ROW BACKGROUND HELPERS ────────────────────────────────── */
.row-bg {
    background-color: #1a1d27;
    border-top: 1px solid #2e3148;
    border-bottom: 1px solid #2e3148;
}

/* ── FORM ACTIONS ──────────────────────────────────────────── */
.form-actions {
    background-color: #1a1d27 !important;
    border-top: 1px solid #2e3148 !important;
}

/* ── LABELS / BADGES ───────────────────────────────────────── */
.label-default, .badge { background-color: #2c3050; color: #c5c8e8; }
.label-primary { background-color: #6366f1; }
.label-success { background-color: #166534; }
.label-info    { background-color: #1d4ed8; }
.label-warning { background-color: #92400e; }
.label-danger  { background-color: #991b1b; }

/* ── PROGRESS BARS ─────────────────────────────────────────── */
.progress { background-color: #22263a; border-radius: 4px; }
.progress .progress-bar { background-color: #6366f1; }
.progress .progress-bar-success { background-color: #22c55e; }
.progress .progress-bar-warning { background-color: #f59e0b; }
.progress .progress-bar-danger  { background-color: #ef4444; }

/* ── PORTLET COLORS ────────────────────────────────────────── */
.portlet.box.blue > .portlet-title    { background-color: #1d4ed8 !important; }
.portlet.box.red > .portlet-title     { background-color: #991b1b !important; }
.portlet.box.green > .portlet-title   { background-color: #166534 !important; }
.portlet.box.purple > .portlet-title  { background-color: #6d28d9 !important; }
.portlet.box.yellow > .portlet-title  { background-color: #92400e !important; }
.portlet.box.grey > .portlet-title    { background-color: #374151 !important; }
.portlet.box.light-grey > .portlet-title { background-color: #4b5563 !important; }

/* ── NOTIFICATION DROPDOWN ─────────────────────────────────── */
.navbar .dropdown-menu {
    background-color: #1e2235 !important;
    border: 1px solid #2e3148 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
    border-radius: 6px !important;
}

/* ── PORTLET TITLE DIVIDER ─────────────────────────────────── */
.portlet > .portlet-title { border-bottom: 1px solid #2e3148 !important; }

/* ── INLINE BACKGROUND OVERRIDES ──────────────────────────── */

/* Green */
[style*="background-color:#abdcc2"], [style*="background-color: #abdcc2"],
[style*="background:#abdcc2"], [style*="background: #abdcc2"] {
    background-color: #14532d !important; color: #bbf7d0 !important;
}
[style*="background-color:#5aa55a"], [style*="background-color: #5aa55a"],
[style*="background:#5aa55a"], [style*="background: #5aa55a"] {
    background-color: #166534 !important; color: #bbf7d0 !important;
}

/* Red/Pink */
[style*="background-color:#ffb6c1"], [style*="background-color: #ffb6c1"],
[style*="background:#ffb6c1"], [style*="background: #ffb6c1"] {
    background-color: #4c1d1d !important; color: #fecaca !important;
}
[style*="background-color:#df919c"], [style*="background-color: #df919c"],
[style*="background:#df919c"], [style*="background: #df919c"] {
    background-color: #5c2020 !important; color: #fecaca !important;
}
[style*="background-color:#CC6699"], [style*="background-color: #CC6699"],
[style*="background:#CC6699"], [style*="background: #CC6699"] {
    background-color: #5c1f40 !important; color: #fecaca !important;
}
[style*="background-color:#FF0000"], [style*="background-color: #FF0000"],
[style*="background:#FF0000"], [style*="background: #FF0000"],
[style*="background-color:#ff0000"], [style*="background-color: #ff0000"],
[style*="background:#ff0000"], [style*="background: #ff0000"] {
    background-color: #7f1d1d !important; color: #fff !important;
}

/* Blue */
[style*="background-color:#428bca"], [style*="background-color: #428bca"],
[style*="background:#428bca"], [style*="background: #428bca"] {
    background-color: #1e3a5e !important; color: #bfdbfe !important;
}
[style*="background:#477bbd"], [style*="background: #477bbd"],
[style*="background-color:#477bbd"], [style*="background-color: #477bbd"] {
    background-color: #1e3a5e !important; color: #bfdbfe !important;
}

/* Yellow/Orange */
[style*="background-color:#FFEB3B"], [style*="background-color: #FFEB3B"],
[style*="background:#FFEB3B"], [style*="background: #FFEB3B"] {
    background-color: #78350f !important; color: #fde68a !important;
}
[style*="background-color:#FF9900"], [style*="background-color: #FF9900"],
[style*="background:#FF9900"], [style*="background: #FF9900"],
[style*="background-color:#ff9900"], [style*="background-color: #ff9900"],
[style*="background:#ff9900"], [style*="background: #ff9900"] {
    background-color: #78350f !important; color: #fde68a !important;
}

/* White/Grey → dark */
[style*="background-color:#F2F2F2"], [style*="background-color: #F2F2F2"],
[style*="background:#F2F2F2"], [style*="background: #F2F2F2"],
[style*="background-color:#f2f2f2"], [style*="background-color: #f2f2f2"],
[style*="background:#f2f2f2"], [style*="background: #f2f2f2"],
[style*="background-color:#FFFFFF"], [style*="background-color: #FFFFFF"],
[style*="background:#FFFFFF"], [style*="background: #FFFFFF"],
[style*="background-color:#ffffff"], [style*="background-color: #ffffff"],
[style*="background:#ffffff"], [style*="background: #ffffff"],
[style*="background-color:#fff"], [style*="background-color: #fff"],
[style*="background:#fff"], [style*="background: #fff"],
[style*="background-color:#FFF"], [style*="background-color: #FFF"],
[style*="background:#FFF"], [style*="background: #FFF"] {
    background-color: #1e2235 !important; color: #e2e4f0 !important;
}

/* HTML bgcolor attribute */
[bgcolor="#FFFFFF"], [bgcolor="#ffffff"] { background-color: #1a1d27 !important; color: #e2e4f0 !important; border-color: #2e3148 !important; }
[bgcolor="#FFFF00"], [bgcolor="#ffff00"] { background-color: #78350f !important; color: #fde68a !important; }
[bgcolor="#FF0000"], [bgcolor="#ff0000"] { background-color: #7f1d1d !important; color: #fecaca !important; }

/* Text color fixes */
[style*="color: blue"], [style*="color:blue"],
[style*="color: #0000ff"], [style*="color:#0000ff"],
[style*="color:#0000FF"], [style*="color: #0000FF"] { color: #93c5fd !important; }
[style*="color: red"], [style*="color:red"],
[style*="color: #ff0000"], [style*="color:#ff0000"],
[style*="color:#FF0000"], [style*="color: #FF0000"] { color: #fca5a5 !important; }

/* ── manage_study_project.php specific row colors ──────────── */
.table td[style*="background-color:#ffa1a1"], .table td[style*="background-color: #ffa1a1"],
[style*="background-color:#ffa1a1"], [style*="background-color: #ffa1a1"] {
    background-color: #4c1d1d !important; color: #fecaca !important;
}
.table td[style*="background-color:#FFFFE0"], .table td[style*="background-color: #FFFFE0"],
[style*="background-color:#FFFFE0"], [style*="background-color: #FFFFE0"] {
    background-color: #3d3005 !important; color: #fde68a !important;
}
.table td[style*="background-color:#FED8B1"], .table td[style*="background-color: #FED8B1"],
[style*="background-color:#FED8B1"], [style*="background-color: #FED8B1"] {
    background-color: #451f00 !important; color: #fed7aa !important;
}

/* Stat text color corrections */
[style*="color: #fb6767"], [style*="color:#fb6767"] { color: #fca5a5 !important; }
[style*="color: #6ba92d"], [style*="color:#6ba92d"] { color: #86efac !important; }

/* ── UTILITY COLOR HELPERS (green, red class spans) ─────────── */
span.green { color: #4ade80 !important; }
span.red   { color: #f87171 !important; }
.bg_purple { color: #c084fc !important; }

/* ── MISC UX ───────────────────────────────────────────────── */
.crumbs .crumb-buttons > li > a:active { background: #22263a !important; }

/* Divider in sidebar */
#sidebar #divider {
    background: #1a1d27;
    border-left: 1px solid #2e3148;
    border-right: 1px solid #2e3148;
}

/* Portlet body when used as box */
.portlet.box > .portlet-body { background-color: #1a1d27 !important; }

/* Tooltip */
.tooltipster-content { background: #22263a; color: #e2e4f0; border: 1px solid #3a3f5c; }
.tooltipster-default { border: 1px solid #3a3f5c !important; background: #22263a !important; }