@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================
   Global Typography & Colors
   ========================================================== */
body {
    font-family: 'Inter', sans-serif !important;
    background-color: #f4f6f9;
    color: #333333;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.nav-label {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600;
}

/* ==========================================================
   Sidebar & Header Enhancements (Dark Mode Slate)
   ========================================================== */
.page-sidebar {
    background-color: #1e293b !important;
    /* Dark Slate */
    transition: all 0.3s ease;
}

.page-sidebar .side-menu li a {
    color: #cbd5e1 !important;
    transition: all 0.2s ease;
}

.page-sidebar .side-menu li a:hover,
.page-sidebar .side-menu li.active>a {
    background-color: #334155 !important;
    color: #ffffff !important;
    border-radius: 4px;
    margin: 0 8px;
}

.page-sidebar .heading {
    color: #64748b !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 11px;
}

/* Header Branding / Logo */
.header .page-brand {
    background-color: #1e293b !important;
    transition: all 0.3s ease;
    text-align: center;
}

.header .page-brand img {
    max-height: 40px;
    transition: all 0.3s ease;
    margin-top: 5px;
}

/* ==========================================================
   Sidebar Toggle Fix (body.active / page-sidebar.intro)
   ========================================================== */
/* When sidebar is collapsed */
body.active .page-sidebar {
    width: 70px !important;
    overflow: hidden;
}

body.active .page-brand {
    width: 70px !important;
}

/* Hide logo text/large image and just show icon if possible, or shrink */
body.active .page-brand img {
    max-height: 30px;
    width: auto;
}

/* Hide labels and headings */
body.active .page-sidebar .nav-label,
body.active .page-sidebar .heading,
body.active .page-sidebar .arrow {
    display: none !important;
}

/* Center sidebar icons */
body.active .page-sidebar .side-menu li a {
    text-align: center;
    padding: 15px 0 !important;
    justify-content: center;
}

body.active .page-sidebar .side-menu li a .sidebar-item-icon {
    font-size: 20px;
    margin: 0 !important;
    display: block;
}

/* Adjust main content wrapper when sidebar is collapsed */
body.active .content-wrapper,
body.active .header .flexbox {
    margin-left: 70px !important;
}

/* Ensure desktop defaults are maintained when NOT collapsed */
@media (min-width: 992px) {

    body:not(.active) .content-wrapper,
    body:not(.active) .header .flexbox {
        margin-left: 250px;
        /* Default sidebar width */
    }

    body:not(.active) .page-sidebar,
    body:not(.active) .page-brand {
        width: 250px;
    }
}

/* ==========================================================
   Card & Element Polish
   ========================================================== */
.ibox {
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: none;
}

.ibox-head {
    border-bottom: 1px solid #e2e8f0;
    background-color: #ffffff;
    border-radius: 8px 8px 0 0;
}

.ibox-title {
    color: #1e293b;
    font-weight: 600;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* DataTables Styling Overrides */
table.dataTable {
    font-size: 14px;
}

table.dataTable thead th {
    background-color: #f8FAFC;
    color: #475569;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0 !important;
}