:root {
    --primary: #6366f1;
    --bg-dark: #0f172a;
    --bg-panel: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background: var(--bg-dark); color: var(--text-main); display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: 0.3s;
    position: fixed;
    height: 100%;
    z-index: 100;
}
.sidebar-header { padding: 25px; border-bottom: 1px solid var(--border); }
.sidebar-header h2 { font-size: 1.4rem; color: var(--primary); }
.sidebar-menu { padding: 20px 0; flex: 1; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 25px; color: var(--text-muted); text-decoration: none;
    transition: 0.2s; border-left: 3px solid transparent;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(99, 102, 241, 0.1); color: var(--primary); border-left-color: var(--primary);
}

/* Main Content */
.main-content { flex: 1; margin-left: 260px; padding: 20px; transition: 0.3s; }
.top-bar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; background: var(--bg-panel); padding: 15px 25px;
    border-radius: 12px; border: 1px solid var(--border);
}
.menu-toggle { display: none; background: none; border: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; }
.admin-profile { display: flex; align-items: center; gap: 10px; color: var(--primary); }

/* Stats Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card {
    background: var(--bg-panel); padding: 25px; border-radius: 12px; border: 1px solid var(--border);
    display: flex; align-items: center; gap: 20px;
}
.stat-card i { font-size: 2.5rem; opacity: 0.8; }
.stat-card.blue i { color: #3b82f6; }
.stat-card.green i { color: #10b981; }
.stat-card.purple i { color: #8b5cf6; }
.stat-card h3 { font-size: 2rem; margin-bottom: 5px; }
.stat-card p { color: var(--text-muted); font-size: 0.9rem; }

/* Tables */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.table-container { background: var(--bg-panel); border-radius: 12px; border: 1px solid var(--border); overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.data-table th, .data-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { background: rgba(99, 102, 241, 0.1); color: var(--primary); font-weight: 600; }
.data-table tr:hover { background: rgba(255,255,255,0.02); }

/* Buttons & Inputs */
.btn-primary {
    background: var(--primary); color: white; border: none; padding: 10px 20px;
    border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.2s;
}
.btn-primary:hover { background: #4f46e5; }
.btn-danger { background: var(--danger); color: white; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.btn-edit { background: var(--primary); color: white; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; margin-right: 5px; }
.btn-full { width: 100%; padding: 12px; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); display: none; justify-content: center; align-items: center; z-index: 1000;
}
.modal-overlay.active { display: flex; }
.modal-box { background: var(--bg-panel); width: 500px; max-width: 90%; border-radius: 15px; padding: 25px; border: 1px solid var(--border); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px; background: var(--bg-dark); border: 1px solid var(--border);
    border-radius: 8px; color: white; outline: none;
}
.form-group input:focus { border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* Sections Logic */
.content-section { display: none; animation: fadeIn 0.3s; }
.content-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Toast */
.toast {
    position: fixed; bottom: 20px; right: 20px; background: var(--success); color: white;
    padding: 12px 25px; border-radius: 8px; transform: translateY(100px); transition: 0.3s; z-index: 2000;
}
.toast.show { transform: translateY(0); }

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar { left: -260px; }
    .sidebar.active { left: 0; }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .form-row { grid-template-columns: 1fr; }
}
