/* Admin Panel Styles */

:root {
    --admin-primary: #007bff;
    --admin-secondary: #6c757d;
    --admin-success: #28a745;
    --admin-danger: #dc3545;
    --admin-warning: #ffc107;
    --admin-info: #17a2b8;
    --admin-light: #f8f9fa;
    --admin-dark: #343a40;
}

/* Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.admin-sidebar {
    width: 250px;
    min-width: 250px;
    background-color: var(--admin-dark);
    color: white;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.admin-content {
    flex: 1;
    padding: 20px;
    margin-left: 250px;
    background-color: var(--admin-light);
    min-height: 100vh;
    width: calc(100% - 250px);
}

.admin-brand {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-brand h5 {
    margin: 0;
    font-weight: 600;
}

/* Sidebar Navigation */
.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border-radius: 0;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-sidebar .nav-link.active {
    color: white;
    background-color: var(--admin-primary);
}

.admin-sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Dashboard Cards */
.admin-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.admin-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.admin-card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Statistics Cards */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--admin-primary);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.border-left-primary {
    border-left-color: var(--admin-primary);
}

.stat-card.border-left-success {
    border-left-color: var(--admin-success);
}

.stat-card.border-left-info {
    border-left-color: var(--admin-info);
}

.stat-card.border-left-warning {
    border-left-color: var(--admin-warning);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-dark);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--admin-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Tables */
.admin-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-table th {
    background-color: var(--admin-light);
    font-weight: 600;
    border-bottom: 2px solid var(--admin-primary);
}

.admin-table td {
    vertical-align: middle;
}

.admin-table .table-actions {
    white-space: nowrap;
}

/* Forms */
.admin-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-form .form-label {
    font-weight: 600;
    color: var(--admin-dark);
}

.admin-form .form-control:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Buttons */
.btn-admin-primary {
    background-color: var(--admin-primary);
    border-color: var(--admin-primary);
    color: white;
}

.btn-admin-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
}

/* Alerts */
.admin-alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.admin-alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--admin-success);
}

.admin-alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--admin-danger);
}

.admin-alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--admin-warning);
}

.admin-alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--admin-info);
}

/* Charts */
.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--admin-primary);
    background-color: rgba(0, 123, 255, 0.05);
}

.file-upload-area.dragover {
    border-color: var(--admin-success);
    background-color: rgba(40, 167, 69, 0.05);
}

/* Progress Bars */
.admin-progress {
    height: 10px;
    border-radius: 5px;
    background-color: var(--admin-light);
}

.admin-progress-bar {
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* Dashboard Specific Styles */
.dashboard-stats {
    margin-bottom: 2rem;
}

.dashboard-stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid var(--admin-primary);
    transition: all 0.3s ease;
    height: 100%;
}

.dashboard-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.dashboard-stat-card.border-left-primary { border-left-color: var(--admin-primary); }
.dashboard-stat-card.border-left-success { border-left-color: var(--admin-success); }
.dashboard-stat-card.border-left-info { border-left-color: var(--admin-info); }
.dashboard-stat-card.border-left-warning { border-left-color: var(--admin-warning); }

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-dark);
    margin: 0;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--admin-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.dashboard-chart-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.dashboard-chart-header {
    padding: 1.5rem 1.5rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.5rem;
}

.dashboard-chart-body {
    padding: 0 1.5rem 1.5rem;
}

/* Mobile sidebar toggle button */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: var(--admin-dark);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
        width: 100%;
        padding: 60px 15px 15px;
    }
    
    .mobile-sidebar-toggle {
        display: block;
    }
    
    .dashboard-stat-card {
        margin-bottom: 20px;
    }
    
    .admin-form {
        padding: 20px;
    }
}

/* Light Mode Enhancement */
.admin-content {
    background-color: var(--light-color);
    color: var(--text-color);
}

.admin-card,
.admin-form,
.chart-container {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.admin-table th {
    background-color: var(--light-color);
    color: var(--text-color);
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px;
    border: 2px solid var(--admin-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}