/* Global Dark Theme */
body.dark-theme {
    background-color: #0f172a;
    color: #e2e8f0;
    font-family: 'Segoe UI', sans-serif;
}

/* Card Styling */
.card {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    color: #e2e8f0;
}

/* Inputs */
.form-control {
    background-color: #0f172a;
    border: 1px solid #334155;
    color: #e2e8f0;
}

.form-control:focus {
    background-color: #0f172a;
    color: #fff;
    border-color: #3b82f6;
    box-shadow: none;
}

/* Labels */
label {
    color: #cbd5f5;
}

/* Button */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}


/* Alerts */
.custom-alert {
    border-radius: 8px;
}

/* Center card shadow */
.card.shadow-lg {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Sidebar */
.sidebar {
    width: 230px;
    min-height: 100vh;
    background-color: #020617;
    border-right: 1px solid #1e293b;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1000;
}

/* Sidebar header */
.sidebar-header {
    border-bottom: 1px solid #1e293b;
}

.logo-text {
    color: #fff;
    font-weight: bold;
}

/* Nav links */
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px; /* perfect alignment */
    color: #cbd5f5;
    padding: 8px 12px;
    margin: 2px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

/* Icons */
.sidebar .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Text */
.menu-text {
    white-space: nowrap;
}

/* Hover */
.sidebar .nav-link:hover {
    background-color: #1e293b;
    color: #fff;
}

/* Active */
.sidebar .nav-link.active {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
}

/* Collapsed sidebar */
.sidebar.collapsed {
    width: 70px;
}

/* Hide text when collapsed */
.sidebar.collapsed .menu-text {
    display: none;
}

/* Center icons when collapsed */
.sidebar.collapsed .nav-link {
    justify-content: center;
}

/* Main content */
.main-content {
    flex: 1;
    background-color: #0f172a;
    min-height: 100vh;
    transition: all 0.3s ease;
    /* margin-top: 60px; */
}

/* Navbar */
.navbar {
    background-color: #020617;
    border-bottom: 1px solid #1e293b;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Overlay (mobile) */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    z-index: 900;
}

#overlay.active {
    display: block;
}

/* Mobile */
@media (max-width: 768px) {

    .sidebar {
        position: fixed;
        left: -230px;
        top: 0;
    }

    .sidebar.active {
        left: 0;
    }
}

/* DataTable dark fix */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: #cbd5f5;
}

.table-dark {
    --bs-table-bg: #1e293b;
}

.dataTables_filter {
    display: none !important;
}