:root {
    --primary-color: #137fec;
    --secondary-color: #2563eb;
    --primary-dark: #0056b3;
    --background-light: #f6f7f8;
    --background-dark: #101922;
    --white: #ffffff;
    --border-radius: 1rem;
    --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

/* Base resets handled by Tailwind */

/* Admin Panel Styles */
.admin-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--background-light);
    z-index: 1000;
    display: flex;
}

.dark .admin-container {
    background-color: var(--background-dark);
}

.sidebar {
    width: 280px;
    background-color: var(--white);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 1100;
    transition: transform 0.3s ease-in-out;
}

.dark .sidebar {
    background-color: #1a2632;
    border-right: 1px solid #22303c;
}

.sidebar-header {
    padding: 2rem;
    border-bottom: 1px solid #f1f5f9;
}

.dark .sidebar-header {
    border-bottom-color: #22303c;
}

.sidebar-header h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
}

.nav-item {
    background: none;
    border: none;
    text-align: left;
    padding: 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #484b50;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-item:hover {
    background-color: #f8fafc;
    color: var(--primary-color);
}
.nav-item.active {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
}
.nav-item.active:hover {
    color: white !important;
}

.dark .nav-item:hover {
    background-color: #22303c;
}

.nav-item.active {
    /* Styles handled by Tailwind in dashboard.js */
}

.dark .nav-item.active {
    /* Styles handled by Tailwind in dashboard.js */
}

.nav-item.logout {
    margin-top: auto;
    color: #ef4444;
}

.admin-main {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

.admin-section {
    animation: fadeIn 0.4s ease-out;
}

.admin-section.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
}

.dark .stat-card {
    background: #1a2632;
    border-color: #22303c;
}

.stat-card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1e293b;
    letter-spacing: -0.025em;
}

.dark .stat-value {
    color: #f8fafc;
}

/* Responsive Admin: Mobile Hamburger Implementation */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        /* Hidden by default */
        width: 80%;
        max-width: 300px;
    }

    .sidebar.open {
        transform: translateX(0);
        /* Shown when open */
    }

    .sidebar-header {
        display: block;
        /* Show header in slide-over menu */
        padding: 1.5rem;
    }

    .sidebar-nav {
        flex-direction: column;
        padding: 1rem;
        gap: 0.25rem;
    }

    .admin-main {
        padding: 1rem;
        flex: 1;
    }
}

/* Utility Overrides requested by user */
.space-y-16 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))) !important;
    margin-bottom: calc(0rem * var(--tw-space-y-reverse)) !important;
}

.space-y-32 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse))) !important;
    margin-bottom: calc(0rem * var(--tw-space-y-reverse)) !important;
}

.grid.grid-cols-1.md\:grid-cols-3.gap-12 {
    padding-top: 2rem !important;
}

.text-gray-400 {
    --tw-text-opacity: 1 !important;
    color: #484b50 !important;
}

.text-gray-500 {
    --tw-text-opacity: 1 !important;
    color: #484b50 !important;
}

.pb-2 {
    padding-top: 1rem !important;
    padding-bottom: 2.5rem !important;
}

@media (max-width: 768px) {
    .fixed.bottom-8.right-8 {
        right: 1.5rem !important;
        bottom: 2rem !important;
    }
}

@media (min-width: 768px) {
    .md\:right-8 {
        bottom: 3rem !important;
        right: 6rem !important;
    }
}
