:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #8b5cf6;
    --secondary: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input,
select {
    width: 100%;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.math-display {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.result-highlight {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4ade80;
}

.item-row {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Charts and Data */
.chart-container {
    position: relative;
    height: 300px;
}

.summary-card {
    text-align: center;
}

.summary-value {
    font-size: 2rem;
    font-weight: 800;
    margin: 10px 0;
}

/* Role badge */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: bold;
}

.badge-admin {
    background: #ef4444;
    color: white;
}

.badge-seller {
    background: #3b82f6;
    color: white;
}

/* Sidebar Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    border-right: var(--glass-border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    backdrop-filter: blur(10px);
    z-index: 100;
    overflow-y: auto;
    /* Fix for cutting off content */
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 20px;
    width: calc(100% - 260px);
}

.sidebar-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
}

.nav-link i {
    margin-right: 12px;
    font-size: 1.1rem;
}

.nav-section {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #64748b;
    margin: 20px 0 10px 10px;
    font-weight: 600;
}

/* Mobile Toggle Button */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
}

/* Responsive Table Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 10px;
    }

    .container {
        padding: 5px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Force grids to single column */
    .grid,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr !important;
    }

    h1 {
        font-size: 1.8rem;
    }

    .glass-card {
        padding: 15px;
    }

    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
}

/* Mobile Table Accordion Utilities */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile-row {
        display: inline-block;
    }

    .cursor-pointer {
        cursor: pointer;
    }

    .mobile-indicator {
        display: inline-block;
        font-size: 0.8rem;
        color: var(--text-muted);
        margin-top: 5px;
    }

    .mobile-details-row {
        background: rgba(255, 255, 255, 0.02);
    }
}

@media (min-width: 769px) {
    .mobile-details-row {
        display: none !important;
    }

    .mobile-indicator {
        display: none;
    }

    .show-mobile-row {
        display: none;
    }
}