:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-bg: #1a1c23;
    --light-bg: #f8f9fc;
    --card-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light-bg);
    color: #5a5c69;
    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.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1030;
}

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

#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--dark-bg);
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
    position: fixed;
    z-index: 1040;
    overflow-y: auto;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.1);
}

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

#sidebar ul li a {
    padding: 12px 25px;
    font-size: 1rem;
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: 0.3s;
}

#sidebar ul li a:hover, #sidebar ul li.active > a {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left: 4px solid var(--primary-color);
}

#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

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

.top-bar {
    background: #fff;
    padding: 15px 30px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    margin-bottom: 30px;
}

@media (max-width: 991.98px) {
    #sidebar {
        margin-left: -250px;
    }
    #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: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
}

.summary-card {
    border-left: 0.25rem solid;
    transition: transform 0.2s;
}

.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-color: var(--primary-color);
    border-color: var(--primary-color);
}

.table thead th {
    background-color: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
    color: #4e73df;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* 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;
    }
}
