:root {
    --admin-bg: #f6f8ff;
    --admin-sidebar: #0f1e4d;
    --admin-accent: #f9c80e;
    --admin-text: #1c2240;
    --admin-border: rgba(15, 30, 77, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--admin-bg);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

.admin-layout {
    min-height: 100vh;
    display: flex;
    background-color: var(--admin-bg);
}

/* Sidebar Styles */
.admin-sidebar {
    width: 280px;
    min-width: 280px;
    background: linear-gradient(180deg, #111f52 0%, #070c25 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.admin-brand i {
    font-size: 1.75rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    margin-top: 0;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
}

.admin-nav a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.admin-nav a:hover {
    background: rgba(249, 200, 14, 0.15);
    color: var(--admin-accent);
    transform: translateX(4px);
}

.admin-nav a.active {
    background: rgba(249, 200, 14, 0.25);
    color: var(--admin-accent);
    font-weight: 600;
}

.admin-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--admin-accent);
    border-radius: 0 4px 4px 0;
}

.admin-sidebar > div:last-child {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* Main Content */
.admin-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem 2.5rem;
    min-height: 100vh;
    width: calc(100% - 280px);
}

/* Topbar - Desktop Hidden, Mobile Visible */
.admin-topbar {
    display: none !important;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 999;
    margin: 0;
    border-radius: 0;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(15, 30, 77, 0.1);
    border: none;
    color: var(--admin-sidebar);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-nav-toggle:hover {
    background: rgba(15, 30, 77, 0.15);
    transform: scale(1.05);
}

.mobile-nav-toggle i {
    font-size: 1.25rem;
}

.admin-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--admin-sidebar);
}

.admin-topbar-brand i {
    color: var(--admin-accent);
    font-size: 1.5rem;
}

.admin-topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--admin-text);
    font-weight: 500;
}

/* Stat Cards */
.stat-card {
    border-radius: 1.25rem;
    padding: 1.75rem;
    background: #fff;
    box-shadow: 0 4px 20px rgba(11, 13, 54, 0.08);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--admin-border);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(11, 13, 54, 0.12);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 30, 77, 0.1);
    color: var(--admin-sidebar);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-sidebar);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: rgba(12, 16, 44, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

/* Table Styles */
.table-modern {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
}

.table-modern thead th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(12, 16, 44, 0.6);
    border-bottom: 2px solid var(--admin-border);
    font-weight: 600;
    padding: 1rem;
    background: #f8f9fa;
}

.table-modern tbody tr {
    vertical-align: middle;
    transition: background 0.2s ease;
}

.table-modern tbody tr:hover {
    background: rgba(15, 30, 77, 0.02);
}

.table-modern tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--admin-border);
}

/* Button Styles */
.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    transform: translateY(-2px);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Styles */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }

    .admin-content {
        margin-left: 0;
        padding: 1rem;
    }

    .admin-topbar {
        display: flex !important;
        margin: -1rem -1rem 1.5rem -1rem;
        padding: 1rem;
        border-radius: 0;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .table-modern {
        font-size: 0.9rem;
    }

    .table-modern thead th,
    .table-modern tbody td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .admin-content {
        padding: 0.75rem;
    }

    .admin-topbar {
        margin: -0.75rem -0.75rem 1rem -0.75rem;
        padding: 0.75rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-card h2 {
        font-size: 1.75rem;
    }

    .table-modern {
        font-size: 0.85rem;
    }
}

/* Animations */
@keyframes fadeInSidebar {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scrollbar Styles */
.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

