/* Admin Panel Hybrid Layout */
:root {
    --sidebar-width: 260px;
}

/* Base Layout */
.admin-grid {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

/* Mobile Sidebar Drawer */
.sidebar {
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 20px;
    position: fixed;
    top: 0;
    left: -260px;
    height: 100vh;
    width: var(--sidebar-width);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
}

.sidebar.show { left: 0; }

/* Mobile sidebar backdrop — toggled alongside .sidebar via toggleSidebar() in js/admin.js */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

@media (min-width: 901px) {
    .sidebar {
        position: sticky;
        left: 0;
    }
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.sidebar-item {
    padding: 14px 16px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    color: var(--dark);
}

.sidebar-item:hover { background: var(--bg); color: var(--primary); }
.sidebar-item.active { background: var(--primary); color: white; }

/* Dashboard Content */
.admin-content {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 1024px) {
    .admin-content { padding: 40px; }
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Responsive Table Styling */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 768px) {
    .data-table thead {
        display: none;
    }
    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }
    .data-table tr {
        background: var(--white);
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 16px;
        box-shadow: var(--shadow);
        border: 1px solid var(--border);
    }
    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid var(--bg);
    }
    .data-table td:last-child {
        border-bottom: none;
        margin-top: 10px;
    }
    .data-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--gray);
        font-size: 12px;
    }
}

