@import url('https://fonts.cdnfonts.com/css/glacial-indifference-2');

body {
    font-family: 'Glacial Indifference', sans-serif;
    background-color: #f0f0f0;
    /* Light gray background */
    color: #004d57;
    /* Dark teal text */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: #4b8892;
    /* Medium teal headings */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Button Overrides */
.btn-primary {
    background-color: #ef4621;
    /* Orange accent */
    border-color: #ef4621;
    font-weight: bold;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #ae232d !important;
    /* Dark red hover */
    border-color: #ae232d !important;
}

.btn-outline-danger {
    color: #ae232d;
    border-color: #ae232d;
    font-weight: bold;
}

.btn-outline-danger:hover {
    background-color: #ae232d;
    color: white;
}

.btn-success {
    background-color: #4b8892 !important;
    /* Medium Teal */
    border-color: #4b8892 !important;
}

.btn-success:hover {
    background-color: #004d57 !important;
    /* Dark Teal hover */
    border-color: #004d57 !important;
}

.btn-info {
    background-color: #004d57 !important;
    /* Dark Teal */
    border-color: #004d57 !important;
    color: white !important;
}

.btn-info span,
.btn-info:visited {
    color: white !important;
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active {
    background-color: #4b8892 !important;
    /* Medium Teal hover */
    border-color: #4b8892 !important;
    color: white !important;
}

.btn-info:hover span,
.btn-info:focus span,
.btn-info:active span {
    color: white !important;
}

.btn-secondary {
    background-color: #004d57 !important;
    border-color: #004d57 !important;
}

.btn-secondary:hover {
    background-color: #ef4621 !important;
    border-color: #ef4621 !important;
}

/* DataTables Overrides */
.table-responsive {
    overflow-x: auto;
}

/* Custom Top Scrollbar */
.top-scrollbar-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    height: 15px;
    /* height of standard scrollbar */
    margin-bottom: 5px;
}

.top-scrollbar-dummy {
    height: 15px;
}

.table {
    color: #004d57;
    font-size: 0.9rem;
    /* One size lower */
    white-space: nowrap;
    /* Prevent text wrapping for horizontal scrolling */
}

/* Ensure header stays sticky when scrolling vertically */
.table thead th {
    background-color: #a9c4bb !important;
    /* Sage green headers */
    color: white !important;
    font-weight: 700;
    border-bottom: 3px solid #4b8892 !important;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: rgba(169, 196, 187, 0.15) !important;
}

.table-hover>tbody>tr:hover>* {
    background-color: rgba(239, 70, 33, 0.08) !important;
    /* Light orange hover */
}

/* Input Fields */
.form-control {
    border-color: #a9c4bb;
    color: #004d57;
}

.form-control:focus {
    border-color: #4b8892;
    box-shadow: 0 0 0 0.2rem rgba(75, 136, 147, 0.25);
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 77, 87, 0.08);
    /* Soft teal shadow */
}

/* Login Page Specific */
.login-wrapper {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 8px 24px rgba(0, 77, 87, 0.15);
    border-top: 6px solid #ef4621;
    /* Orange top border */
}

/* =========================================
   DARK MODE - PREMIUM UI SYSTEM
   ========================================= */
body {
    transition: background-color 0.4s ease, color 0.4s ease;
}

.card,
th,
td,
.form-control,
.btn {
    transition: all 0.3s ease;
}

body.dark-mode {
    background-color: #0b0f19;
    /* Deep indigo-black */
    color: #e2e8f0;
}

/* Typography & Headings inside Dark Mode */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #ef4621;
    /* Orange */
    text-shadow: 0 0 15px rgba(239, 70, 33, 0.2);
}

/* Ensure text-white and text-white-50 are respected on headings in dark mode */
body.dark-mode h1.text-white,
body.dark-mode h2.text-white,
body.dark-mode h3.text-white,
body.dark-mode h4.text-white,
body.dark-mode h5.text-white,
body.dark-mode h6.text-white,
body.dark-mode .text-white h1,
body.dark-mode .text-white h2,
body.dark-mode .text-white h3,
body.dark-mode .text-white h4,
body.dark-mode .text-white h5,
body.dark-mode .text-white h6 {
    color: #ffffff !important;
}

body.dark-mode h6.text-white-50,
body.dark-mode .text-white-50 h6 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Card & Glassmorphism UI */
body.dark-mode .card {
    background: rgba(30, 41, 59, 0.7);
    /* Translucent slate */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: #e2e8f0;
}

/* Tables */
body.dark-mode .table,
body.dark-mode .table td,
body.dark-mode .table th,
body.dark-mode .table tr,
body.dark-mode table.dataTable tbody tr {
    color: #f8fafc !important;
    /* Force bright white/gray for readability */
    --bs-table-color: #f8fafc;
    --bs-table-striped-color: #f8fafc;
    --bs-table-hover-color: #ffffff;
}

body.dark-mode .table thead th {
    background-color: #1e293b !important;
    border-bottom: 2px solid #ef4621 !important;
    color: #f8fafc !important;
    letter-spacing: 1px;
}

/* Table Body Rows */
body.dark-mode .table tbody tr,
body.dark-mode .table tbody td,
body.dark-mode table.dataTable tbody tr,
body.dark-mode table.dataTable tbody td {
    background-color: #0b0f19 !important;
    /* Force pure dark background */
    color: #f8fafc !important;
    /* Force stark white text */
}

body.dark-mode .table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: #161e2e !important;
    /* Slightly lighter stripe */
    color: #f8fafc !important;
}

body.dark-mode .table-hover>tbody>tr:hover>*,
body.dark-mode table.dataTable.hover tbody tr:hover,
body.dark-mode table.dataTable.display tbody tr:hover {
    background-color: rgba(56, 189, 248, 0.15) !important;
}

body.dark-mode .table td {
    border-color: #334155 !important;
}

/* Forms & Inputs */
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode input[type="search"],
body.dark-mode input[type="text"] {
    background-color: rgba(15, 23, 42, 0.9) !important;
    color: #f8fafc !important;
    border: 1px solid #334155;
}

body.dark-mode .form-control:focus {
    background-color: #0f172a !important;
    border-color: #ef4621 !important;
    /* Match orange */
    box-shadow: 0 0 0 0.25rem rgba(239, 70, 33, 0.25) !important;
    color: #ffffff !important;
}

body.dark-mode .form-control::placeholder {
    color: #64748b;
}

/* Buttons */
body.dark-mode .btn-outline-secondary {
    color: #cbd5e1;
    border-color: #475569;
    background: transparent;
}

body.dark-mode .btn-outline-secondary:hover {
    background-color: #38bdf8;
    color: #0b0f19;
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

body.dark-mode .btn-outline-danger {
    color: #fb7185;
    border-color: #fb7185;
}

body.dark-mode .btn-outline-danger:hover {
    background-color: #fb7185;
    color: #0b0f19;
    box-shadow: 0 0 10px rgba(251, 113, 133, 0.4);
}

/* DataTables Specifics */
body.dark-mode .dataTables_info,
body.dark-mode .dataTables_length label,
body.dark-mode .dataTables_filter label {
    color: #94a3b8 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #cbd5e1 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #334155 !important;
    color: white !important;
    border-color: #334155 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #38bdf8 !important;
    /* Blue active page */
    color: #0b0f19 !important;
    border-color: #38bdf8 !important;
    font-weight: bold;
}

/* Dropdown Filters (Bootstrap Select) */
body.dark-mode .bootstrap-select .dropdown-toggle {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .dropdown-menu {
    background-color: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
}

body.dark-mode .dropdown-item {
    color: #cbd5e1;
}

body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item.active,
body.dark-mode .dropdown-item:active {
    background-color: #38bdf8;
    color: #0b0f19;
}