/* assets/css/style.css */
:root {
    --primary-color: #0b0e14;
    /* Deep Charcoal/Black */
    --secondary-color: #1a1e26;
    --accent-color: #fbb03b;
    /* BoA Gold */
    --sidebar-bg: #0b111a;
    --sidebar-hover: #1e293b;
    --light-bg: #f8fafc;
    --card-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-bg);
    color: #1e293b;
    margin: 0;
}

.d-flex {
    display: flex;
}

/* Sidebar Styling */
#sidebar {
    min-width: 280px;
    max-width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: sticky;
    top: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
}

#sidebar .sidebar-header {
    padding: 24px;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#sidebar.active {
    margin-left: -280px;
}

#sidebar ul.components {
    padding: 15px 0;
    flex-grow: 1;
}

#sidebar ul li a {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    color: #94a3b8;
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.95rem;
}

#sidebar ul li a:hover,
#sidebar ul li.active>a {
    color: #fff;
    background: var(--sidebar-hover);
    border-left: 4px solid var(--accent-color);
}

#sidebar ul li a i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Content Area */
#content {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header / Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Avatar */
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Main Content Padding */
.main-content {
    padding: 2rem;
    flex-grow: 1;
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    margin-bottom: 1.5rem;
    background: #fff;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
}

/* Stats Cards */
.stat-card {
    padding: 1.5rem;
}

.stat-card .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 600;
    border-radius: 8px;
}

/* Datatables */
.table thead th {
    background: #f8fafc;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #64748b;
    border-top: none !important;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    #sidebar {
        position: fixed;
        margin-left: -280px;
        box-shadow: 10px 0 15px rgba(0, 0, 0, 0.1);
    }

    #sidebar.show {
        margin-left: 0;
    }

    .main-content {
        padding: 1.25rem;
    }

    .navbar {
        padding: 0.75rem 1rem;
    }
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    top: 0;
    left: 0;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    display: block;
}

/* Card Adjustments for Small Screens */
@media (max-width: 576px) {

    .h3,
    h3 {
        font-size: 1.4rem;
    }

    .card-header {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .stat-card {
        padding: 1.25rem;
    }
}

/* Stat Cards Branding */
.stat-card {
    transition: transform 0.2s;
    border-left: 5px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.primary {
    border-left-color: var(--accent-color);
}

.stat-card.success {
    border-left-color: #10b981;
}

.stat-card.warning {
    border-left-color: #f59e0b;
}

.stat-card.danger {
    border-left-color: #ef4444;
}

.stat-card .icon-box {
    background: #f8fafc;
    color: var(--primary-color);
}

/* Responsive Header Stack */
@media (max-width: 768px) {
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .d-flex.justify-content-between.align-items-center .btn {
        width: 100%;
    }

    .stat-card {
        margin-bottom: 1rem;
    }
}

/* Fix for Tablets */
@media (min-width: 768px) and (max-width: 1200px) {
    .col-md-3 {
        width: 50%;
        flex: 0 0 50%;
    }
}

/* Fix for Very Small Screens */
@media (max-width: 400px) {
    .row.g-3>div {
        width: 100% !important;
    }

    .form-label {
        text-align: center;
        display: block;
    }
}