:root {
    --primary-blue: #0A2647;
    --accent-blue: #144272;
    --navy-light: #205295;
    --gold: #FFD700;
    --gold-light: #FFE066;
    --light-bg: #F0F2F5;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --white: #ffffff;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    padding: 25px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
}

.sidebar .brand {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    letter-spacing: -0.5px;
    text-align: center;
}

.sidebar .brand img {
    margin: 0 auto 15px;
    display: block;
}

.sidebar .brand span:first-of-type {
    color: var(--white);
    font-size: 1.2rem;
}

.sidebar .brand span:last-of-type {
    font-size: 0.75rem;
    color: var(--gold);
    font-weight: 500;
}

.sidebar .nav-menu {
    list-style: none !important;
    padding: 0;
}

.sidebar .nav-item {
    margin-bottom: 8px;
    list-style: none !important;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Submenu Styling */
.sidebar .submenu {
    list-style: none !important;
    padding-left: 48px;
    margin-top: 5px;
    display: none;
    padding-bottom: 10px;
}

.sidebar .submenu.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.sidebar .submenu li {
    list-style: none !important;
    margin-bottom: 2px;
}

.sidebar .submenu a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.sidebar .submenu a:hover,
.sidebar .submenu a.active-sub {
    color: var(--white);
}

.submenu-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.3s;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    padding: 0;
    min-width: 0;
    transition: margin 0.3s ease;
}

/* Top Header */
.header {
    height: 80px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .search-bar {
    background: #F3F4F6;
    border-radius: 14px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    width: 400px;
    transition: all 0.2s;
}

.header .search-bar input {
    background: transparent;
    border: none;
    outline: none;
    padding-left: 12px;
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
}

.header .user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header .user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Responsive Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    display: block;
}

.content-wrapper {
    padding: 40px;
    animation: fadeIn 0.5s ease-out;
}

.section-header {
    margin-bottom: 25px;
}

.card {
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

/* Table Container for Responsiveness */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .table-responsive table {
        min-width: 600px;
    }
}

/* Mobile Responsiveness Improvements */
@media (max-width: 1200px) {
    .grid-2-col {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .sidebar.mobile-show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .header {
        padding: 0 20px;
    }

    .mobile-toggle {
        display: block;
    }

    .header .search-bar {
        display: none;
        /* Hide search on small mobile to save space, or make it toggle */
    }

    .hide-mobile {
        display: none !important;
    }

    .content-wrapper {
        padding: 20px;
    }

    .grid-2-col {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .card {
        padding: 15px;
        border-radius: 16px;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .header {
        height: 70px;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.stat-card .value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-blue);
}

/* Table styling */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

table th {
    padding: 15px 20px;
    text-align: left;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

table td {
    padding: 20px;
    background: #F9FAFB;
}

table tr td:first-child {
    border-radius: 15px 0 0 15px;
}

table tr td:last-child {
    border-radius: 0 15px 15px 0;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    background: #F3F4F6;
    color: var(--text-muted);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 38, 71, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.show {
    display: flex;
}

.modal-card {
    background: var(--white);
    width: 90%;
    max-width: 400px;
    padding: 35px;
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-card {
    transform: translateY(0);
}

.modal-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
}

.icon-success {
    background: #D1FAE5;
    color: #10B981;
}

.icon-error {
    background: #FEE2E2;
    color: #EF4444;
}

.icon-warning {
    background: #FEF3C7;
    color: #F59E0B;
}