* {
    font-family: 'Cairo', sans-serif;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4caf50;
    --danger-color: #f72585;
    --warning-color: #ff9e00;
    --info-color: #00b4d8;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --sidebar-width: 280px;
    --header-height: 70px;
}

body {
    background: #f5f7fa;
    overflow-x: hidden;
}

/* Main Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Main Content */
.main-wrapper {
    flex: 1;
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    transition: margin 0.3s ease;
    position: relative;
    width: calc(100% - var(--sidebar-width));
}

/* Header */
.header-new {
    position: fixed;
    top: 0;
    left: 0;
    right: var(--sidebar-width);
    height: var(--header-height);
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    z-index: 999;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    transition: right 0.3s ease;
}

/* Content Area */
.content-wrapper {
    padding: 24px;
    padding-top: calc(var(--header-height) + 24px);
    min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background: white;
}

.card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px 24px;
    font-weight: 600;
}

/* Stat Cards */
.stat-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #4361ee, #3f37c9) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #4caf50, #2e7d32) !important;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #00b4d8, #0288d1) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ff9e00, #f57c00) !important;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}

/* Form Controls */
.form-control,
.form-select {
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
    outline: none;
}

/* Progress Bar */
.progress {
    height: 10px;
    border-radius: 10px;
    background: #e2e8f0;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Badge */
.badge {
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MOBILE STYLES */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    .main-wrapper {
        margin-right: 0 !important;
        width: 100% !important;
    }

    .header-new {
        right: 0 !important;
        padding: 0 16px;
    }

    .content-wrapper {
        padding: 16px;
        padding-top: calc(var(--header-height) + 16px);
    }

    .menu-toggle {
        display: flex !important;
    }

    .header-search {
        display: none !important;
    }

    .user-name {
        display: none !important;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .card-header {
        padding: 16px;
    }

    .card-body {
        padding: 16px;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --sidebar-width: 280px;
    }

    .content-wrapper {
        padding: 20px;
        padding-top: calc(var(--header-height) + 20px);
    }
}