:root {
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-bg: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
    --light-bg: #f8fafc;
    --card-shadow: 0 15px 40px rgba(0,0,0,0.08);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light-bg);
    color: #333;
    overflow-x: hidden;
}

/* Custom Scrollbar for better visibility on mobile */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}
.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1030;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

/* Sidebar Styles */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: var(--dark-bg);
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
    position: fixed;
    z-index: 1040;
    overflow-y: auto;
    box-shadow: 5px 0 30px rgba(0,0,0,0.1);
}

#sidebar .sidebar-header {
    padding: 25px 20px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 14px 25px;
    font-size: 0.95rem;
    font-weight: 500;
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

#sidebar ul li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left: 3px solid var(--primary-color);
    padding-left: 30px;
}

#sidebar ul li.active > a {
    color: #fff;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, transparent 100%);
    border-left: 3px solid var(--primary-color);
}

#sidebar ul li a i {
    margin-right: 12px;
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
}

#content {
    width: calc(100% - 260px);
    margin-left: 260px;
    min-height: 100vh;
    transition: all 0.3s;
}

.top-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 15px 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

@media (max-width: 991.98px) {
    #sidebar {
        margin-left: -260px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
        margin-left: 0;
        overflow-x: hidden;
    }
    #content.active {
        overflow: hidden;
    }

    #overlay {
        position: fixed;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1035;
        display: none;
    }
    #overlay.active {
        display: block;
    }
}

/* Mobile specific spacing */
@media (max-width: 575.98px) {
    .top-bar {
        padding: 10px 15px;
    }
    .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .card-body {
        padding: 1.25rem !important;
    }
    h1 {
        font-size: 1.5rem !important;
    }
    .card {
        border-radius: 15px;
    }
    .summary-card {
        border-left-width: 0.2rem;
    }
    .btn-primary {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

.card {
    border: none;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.4s ease;
    background: #fff;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.12);
}

.summary-card {
    border-left: 0.3rem solid;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-color, var(--primary-color));
}

.summary-card:active {
    transform: scale(0.98);
}

.chart-area, .chart-pie {
    position: relative;
    height: 350px;
    width: 100%;
}

@media (max-width: 767.98px) {
    .chart-area, .chart-pie {
        height: 300px;
    }
}

.nav-link {
    font-weight: 500;
    color: var(--secondary-color);
}

.nav-link.active {
    color: var(--primary-color) !important;
}

.btn-primary {
    background: var(--gradient-1);
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
    background: var(--gradient-1);
    color: white;
}

.table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    font-weight: 600;
    border: none;
}

/* Glassmorphism for login/register cards */
.auth-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Responsive Utilities */
.table-responsive {
    border: none !important;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

@media (max-width: 767.98px) {
    .chart-container {
        height: 250px;
    }
    .table-responsive table {
        min-width: 800px; /* Force scrollbar on mobile */
    }
}

@media print {
    .no-print {
        display: none !important;
    }
}
