/* Base Styles */
:root {
    --primary-color: #3a86ff;
    --primary-light: #e9f0ff;
    --secondary-color: #5e60ce;
    --accent-color: #48bfe3;
    --success-color: #64dfdf;
    --warning-color: #ffbe0b;
    --danger-color: #ff5a5f;
    --text-color: #333;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --bg-dark: #252836;
    --bg-sidebar: #1b1b25;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.08);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow-x: hidden;
}

/* Layout */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    align-items: stretch;
}

/* Sidebar Styles */
.sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--bg-sidebar);
    color: #fff;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

    .sidebar.collapsed {
        margin-left: -250px;
    }

    .sidebar .sidebar-header {
        padding: 20px;
        background: rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
    }

        .sidebar .sidebar-header h3 {
            color: #fff;
            font-size: 1.4rem;
            margin: 0;
            font-weight: 600;
        }

        .sidebar .sidebar-header .logo-icon {
            margin-right: 10px;
            color: var(--primary-color);
        }

    .sidebar ul.components {
        padding: 0;
        list-style: none;
        flex-grow: 1;
    }

    .sidebar ul li a {
        padding: 15px 20px;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        color: rgba(255, 255, 255, 0.7);
        text-decoration: none;
        transition: all 0.3s;
        border-left: 3px solid transparent;
    }

        .sidebar ul li a:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.05);
            border-left-color: var(--primary-color);
        }

        .sidebar ul li a.active {
            color: #fff;
            background: rgba(58, 134, 255, 0.15);
            border-left-color: var(--primary-color);
        }

        .sidebar ul li a i {
            margin-right: 10px;
            font-size: 1.1rem;
            width: 25px;
            text-align: center;
        }

.sidebar-footer {
    padding: 15px 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Content */
.content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    margin-left: 250px;
}

    .content.full-width {
        margin-left: 0;
    }

/* Navbar */
.top-navbar {
    background: #fff;
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-toggler {
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-color);
}

    .navbar-toggler:focus {
        outline: none;
    }

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .user-info .user-avatar {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        background-color: var(--primary-light);
        color: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
    }

/* Cards */
.card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 0.75rem 1.5rem;
}

/* Stat Cards */
.stat-card {
    border-radius: var(--radius-md);
    border: none;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

    .stat-card.purple-card {
        border-left: 4px solid var(--secondary-color);
    }

    .stat-card.blue-card {
        border-left: 4px solid var(--primary-color);
    }

    .stat-card.green-card {
        border-left: 4px solid var(--success-color);
    }

    .stat-card.orange-card {
        border-left: 4px solid var(--warning-color);
    }

    .stat-card .card-body {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.5rem;
    }

    .stat-card .stat-title {
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.85rem;
        font-weight: 500;
        letter-spacing: 0.5px;
        margin-bottom: 0.5rem;
    }

    .stat-card .stat-value {
        font-size: 2rem;
        font-weight: 700;
        line-height: 1;
        margin-bottom: 0.5rem;
    }

    .stat-card .stat-icon {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: rgba(0,0,0,0.03);
        color: var(--text-muted);
        font-size: 1.5rem;
    }

.purple-card .stat-icon {
    color: var(--secondary-color);
    background-color: rgba(94, 96, 206, 0.1);
}

.blue-card .stat-icon {
    color: var(--primary-color);
    background-color: rgba(58, 134, 255, 0.1);
}

.green-card .stat-icon {
    color: var(--success-color);
    background-color: rgba(100, 223, 223, 0.1);
}

.orange-card .stat-icon {
    color: var(--warning-color);
    background-color: rgba(255, 190, 11, 0.1);
}

.stat-card .card-footer {
    background-color: transparent;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 0.75rem 1.5rem;
}

    .stat-card .card-footer a {
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
    }

        .stat-card .card-footer a:hover {
            color: var(--primary-color);
        }

        .stat-card .card-footer a i {
            margin-left: 0.5rem;
        }

/* Table Styles */
.table {
    width: 100%;
    margin-bottom: 0;
}

    .table thead th {
        background-color: rgba(0,0,0,0.01);
        color: var(--text-muted);
        font-weight: 500;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
        padding: 0.75rem 1rem;
        border-top: none;
        border-bottom: 1px solid var(--border-color);
    }

    .table tbody td {
        padding: 1rem;
        vertical-align: middle;
        border-top: none;
        border-bottom: 1px solid var(--border-color);
    }

    .table tbody tr:last-child td {
        border-bottom: none;
    }

    .table tbody tr:hover {
        background-color: rgba(0,0,0,0.01);
    }

/* Button Styles */
.btn {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: #3078e6;
        border-color: #3078e6;
    }

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-outline-primary:hover {
        background-color: var(--primary-color);
        color: white;
    }

/* Form Controls */
.form-control {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.25rem rgba(58, 134, 255, 0.25);
    }

.form-select {
    padding: 0.75rem 2.25rem 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

    .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.25rem rgba(58, 134, 255, 0.25);
    }

/* Utilities */
.content-wrapper {
    padding: 1.5rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 20px;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-light);
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--text-muted);
    max-width: 300px;
    margin-bottom: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-up {
    animation: slideInUp 0.3s ease-in-out;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3a86ff 0%, #5e60ce 100%);
}

.login-card {
    max-width: 490px;
    width: 100%;
    border-radius: var(--radius-lg);    
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background-color: white;
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 2rem;
}

.login-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-body {
    padding: 2rem;
}

.login-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(58, 134, 255, 0.1);
    border-radius: 50%;
    border-top: 3px solid var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Add to your site.css file */
@keyframes rotating {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotating 1s linear;
}

/* Add to your site.css file */
.chart-container {
    position: relative;
    height: 300px;
    max-height: 300px;
    width: 100%;
    overflow: hidden;
}

.card-equal-height {
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .card-equal-height .card-body {
        flex: 1 1 auto;
        overflow: auto;
    }

.table-container {
    max-height: 300px;
    overflow-y: auto;
}

.submenu {
    list-style-type: none;
    padding-left: 20px;
    display: none;
}

.nav-item:hover .submenu {
    display: block;
}