:root {
    --bg-main: #f8fafc;
    --sidebar-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --brand-green: #10b981;
    --brand-green-dark: #059669;
    --brand-red: #ef4444;
    --shadow-soft: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.01);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; background-color: var(--bg-main); color: var(--text-primary); }

.admin-layout { display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar { width: 280px; background: var(--sidebar-bg); display: flex; flex-direction: column; border-right: 1px solid var(--border-color); z-index: 10; }
.logo { padding: 2rem; font-size: 1.4rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border-color); }

.nav-menu { padding: 1.5rem 1rem; flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;}
.nav-menu a { display: flex; align-items: center; padding: 0.8rem 1rem; color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; font-weight: 500; border-radius: 8px; transition: all 0.2s; }
.nav-menu a:hover { background: #f3f4f6; color: var(--text-primary); }
.nav-menu a.active { background: #f0fdf4; color: var(--brand-green); font-weight: 600; }

.back-home { padding: 1.5rem; border-top: 1px solid var(--border-color); }
.back-home a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.back-home a:hover { color: var(--text-primary); }

/* Main Content */
.main-content { flex-grow: 1; display: flex; flex-direction: column; overflow-y: auto; }
.topbar { height: 70px; background: white; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; padding: 0 3rem; position: sticky; top: 0; z-index: 5; }
.topbar h2 { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.user-profile { font-weight: 600; color: var(--text-secondary); font-size: 0.9rem; background: #f3f4f6; padding: 0.5rem 1rem; border-radius: 20px; }

.content-wrapper { padding: 2.5rem 3rem; max-width: 1600px; margin: 0 auto; width: 100%; }
.content-section { display: none; }
.content-section.active { display: block; animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Cards & Layouts */
.grid-layout { display: grid; gap: 1.5rem; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.stat-card { background: white; border: none; border-radius: 16px; padding: 1.5rem; box-shadow: var(--shadow-soft); transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-2px); }
.stat-card h3 { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem; }
.stat-card .value { font-size: 2.2rem; font-weight: 800; color: var(--text-primary); margin-bottom: 0.25rem; letter-spacing: -1px; }
.stat-card .subtitle { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.mini-stat { background: #f8fafc; padding: 1rem; border-radius: 12px; text-align: center; border: 1px solid var(--border-color); }
.mini-stat b { display: block; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.25rem; font-weight: 700;}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: 16px; overflow: hidden; border: none; box-shadow: var(--shadow-soft); font-size: 0.95rem; }
.data-table th, .data-table td { padding: 1.2rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border-color); font-weight: 500; }
.data-table th { background: #f8fafc; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background-color: #f9fafb; }

/* Badges */
.badge { padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.red { background: #fee2e2; color: #991b1b; }
.badge.yellow { background: #fef9c3; color: #854d0e; }
.badge.blue { background: #dbeafe; color: #1e40af; }

/* Forms & Buttons */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 0.5rem; }
.form-input { width: 100%; padding: 0.8rem 1rem; border: 2px solid transparent; background: #f1f5f9; border-radius: 10px; font-family: inherit; font-size: 0.95rem; outline: none; transition: all 0.2s; font-weight: 500;}
.form-input:focus { background: white; border-color: var(--brand-green); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }
.btn { background: white; color: var(--text-primary); border: 1px solid var(--border-color); padding: 0.75rem 1.5rem; border-radius: 10px; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.btn:hover { background: #f8fafc; border-color: #cbd5e1; transform: translateY(-1px); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-primary { background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark)); color: white; border: none; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2); }
.btn-primary:hover { background: linear-gradient(135deg, #34d399, var(--brand-green)); border: none; transform: translateY(-1px); }
.btn-danger { background: white; color: var(--brand-red); border-color: #fca5a5; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 24, 39, 0.5); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: white; padding: 2.5rem; border-radius: 16px; width: 500px; max-width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); animation: slideUp 0.2s ease-out; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
