/* admin.css - Main Admin Styles */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #C8E6C9;
    --secondary-color: #2196F3;
    --danger-color: #F44336;
    --warning-color: #FF9800;
    --success-color: #4CAF50;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 8px;
}

[data-theme="dark"] {
    --primary-color: #66BB6A;
    --primary-dark: #4CAF50;
    --primary-light: #1B5E20;
    --secondary-color: #64B5F6;
    --danger-color: #EF5350;
    --warning-color: #FFB74D;
    --success-color: #66BB6A;
    --text-dark: #E0E0E0;
    --text-light: #B0B0B0;
    --bg-light: #121212;
    --bg-white: #1E1E1E;
    --border-color: #333333;
    --shadow: 0 2px 10px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: background-color 0.3s, color 0.3s;
}

/* Sidebar */
.sidebar {
    width: 250px;
    height: 100vh;
    background-color: var(--bg-white);
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.logo i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.logo h2 {
    font-size: 18px;
    color: var(--text-dark);
}

.nav-links {
    flex: 1;
    padding: 20px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.nav-link span {
    flex: 1;
}

.nav-link .badge {
    background-color: var(--danger-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.user-info {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-details {
    flex: 1;
}

.user-details .name {
    font-weight: 600;
    color: var(--text-dark);
}

.user-details .email {
    font-size: 12px;
    color: var(--text-light);
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.logout-btn:hover {
    background-color: var(--bg-light);
    color: var(--danger-color);
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 20px;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.top-bar h1 {
    font-size: 24px;
    color: var(--text-dark);
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.theme-toggle {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.theme-toggle:hover {
    transform: rotate(15deg);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #D32F2F;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

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

.stat-card h3 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-card .stat-change {
    font-size: 12px;
    color: var(--text-light);
}

/* Recent Activity */
.recent-activity {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.recent-activity h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--bg-light);
    border-radius: var(--radius);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.activity-details {
    flex: 1;
}

.activity-details p {
    margin-bottom: 5px;
    color: var(--text-dark);
}

.activity-details .time {
    font-size: 12px;
    color: var(--text-light);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-white);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: var(--radius);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background-color: var(--bg-light);
    color: var(--danger-color);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-light);
}

.loading i {
    font-size: 32px;
    margin-bottom: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .logo h2,
    .nav-link span,
    .user-details,
    .logout-btn span {
        display: none;
    }
    
    .nav-link {
        justify-content: center;
        padding: 15px;
    }
    
    .nav-link i {
        margin-right: 0;
        font-size: 18px;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}