/* Admin Dashboard Styles */
.admin-dashboard {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #f8fafc;
    display: flex;
    font-family: var(--font-family);
}

/* Admin Sidebar */
.admin-sidebar {
    width: 280px;
    background: #1f2937;
    color: white;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #374151;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.sidebar-logo img {
    height: 35px;
}

.sidebar-logo small {
    font-size: 12px;
    opacity: 0.7;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 12px;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 0 20px 10px;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.menu-item {
    margin: 2px 0;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item a:hover {
    background: #374151;
    color: white;
}

.menu-item.active a {
    background: #2563eb;
    color: white;
    border-left-color: #60a5fa;
}

.menu-badge {
    background: #374151;
    color: #9ca3af;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}

.menu-badge.warning {
    background: #f59e0b;
    color: white;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #374151;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.admin-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-details {
    flex: 1;
}

.admin-details strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.admin-details span {
    font-size: 12px;
    color: #9ca3af;
}

/* Admin Main Content */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

/* Admin Header */
.admin-header {
    background: white;
    padding: 0 30px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-header .header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #f3f4f6;
    color: #374151;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

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

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #6b7280;
}

.search-box input {
    padding: 8px 12px 8px 35px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 250px;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.admin-dropdown {
    position: relative;
}

.admin-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #374151;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.admin-menu-btn:hover {
    background: #f3f4f6;
}

.admin-menu-btn img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.admin-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.admin-dropdown:hover .admin-dropdown-menu {
    display: block;
}

.admin-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.admin-dropdown-menu a:hover {
    background: #f3f4f6;
    color: #2563eb;
}

/* Admin Content */
.admin-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Quick Stats */
.quick-stats {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-icon.primary { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.stat-icon.success { background: linear-gradient(135deg, #10b981, #34d399); }
.stat-icon.warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.stat-icon.info { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }

.stat-info h3 {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive { color: #10b981; }
.stat-change.negative { color: #ef4444; }

/* Admin Charts */
.admin-charts {
    margin-bottom: 30px;
}

.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 18px;
    color: #111827;
    margin: 0;
    font-weight: 600;
}

.chart-filter {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    color: #374151;
    font-size: 14px;
}

.chart-container {
    height: 300px;
    position: relative;
}

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

.grid-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 18px;
    color: #111827;
    margin: 0;
    font-weight: 600;
}

.view-all {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.activity-item:hover {
    background: #f9fafb;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-icon.success { background: #d1fae5; color: #065f46; }
.activity-icon.warning { background: #fef3c7; color: #92400e; }
.activity-icon.info { background: #dbeafe; color: #1e40af; }
.activity-icon.primary { background: #e0e7ff; color: #3730a3; }

.activity-content p {
    margin: 0 0 4px 0;
    font-weight: 500;
    color: #374151;
}

.activity-content span {
    font-size: 12px;
    color: #6b7280;
}

/* Pending Actions */
.pending-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.pending-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.pending-info span {
    font-size: 12px;
    color: #6b7280;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
}

/* System Status */
.system-status {
    margin-bottom: 30px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.status-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.status-card h3 {
    font-size: 18px;
    color: #111827;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.status-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
}

.status-item i {
    color: #6b7280;
    width: 16px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
}

.status-item.online .status-dot { background: #10b981; }
.status-item.offline .status-dot { background: #ef4444; }
.status-item.warning .status-dot { background: #f59e0b; }

.system-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    font-weight: 500;
    color: #374151;
}

.info-item .value {
    color: #111827;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-sidebar {
        position: fixed;
        left: -280px;
        height: 100vh;
    }
    
    .admin-sidebar.active {
        left: 0;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .chart-row {
        grid-template-columns: 1fr;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-header {
        padding: 0 20px;
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
        gap: 15px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .admin-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .chart-card {
        padding: 15px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .status-items {
        grid-template-columns: 1fr;
    }
}