* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background: #f0f2f5; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: 240px; background: #1e293b; color: #fff; position: fixed;
    height: 100vh; padding: 20px 0; transition: all 0.3s; z-index: 50;
    overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 20px 30px; }
.brand .logo { width: 40px; height: 40px; background: #f59e0b; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #1e293b; }
.nav-link { display: block; padding: 12px 20px; color: #94a3b8; text-decoration: none; transition: 0.2s; border-left: 3px solid transparent; }
.nav-link:hover { color: #fff; background: #334155; }
.nav-link.active { color: #fff; background: #33415533; border-left-color: #f59e0b; }
.nav-link .icon { margin-right: 10px; }

/* Main content */
.main { margin-left: 240px; padding: 25px; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; flex-wrap: wrap; gap: 12px; }
.header h1 { font-size: 24px; color: #1e293b; }
.user-info { display: flex; align-items: center; gap: 20px; }
.user-badge { background: #fff; padding: 8px 16px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 10px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stat-card .label { color: #64748b; font-size: 13px; margin-bottom: 8px; }
.stat-card .value { font-size: 24px; font-weight: 700; color: #1e293b; }
.stat-card .trend { font-size: 12px; margin-top: 5px; }
.trend.up { color: #16a34a; }
.trend.down { color: #dc2626; }

/* Panels */
.panel-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 25px; }
.panel { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.panel h3 { color: #334155; margin-bottom: 15px; font-size: 16px; }

/* Table */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #e2e8f0; font-size: 14px; }
th { color: #64748b; font-weight: 600; font-size: 12px; text-transform: uppercase; }
td { color: #334155; }

/* Badges */
.badge { padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; display: inline-block; }
.badge.green { background: #dcfce7; color: #16a34a; }
.badge.orange { background: #ffedd5; color: #ea580c; }
.badge.red { background: #fee2e2; color: #dc2626; }
.badge.blue { background: #dbeafe; color: #2563eb; }
.badge.purple { background: #f3e8ff; color: #9333ea; }
.badge.gray { background: #f1f5f9; color: #64748b; }

/* Activity */
.activity-list { list-style: none; }
.activity-item { padding: 10px 0; border-bottom: 1px solid #f1f5f9; display: flex; gap: 12px; align-items: flex-start; }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.activity-text { font-size: 14px; color: #334155; }
.activity-time { font-size: 12px; color: #94a3b8; margin-top: 3px; }

/* Progress */
.progress-bar { width: 100%; height: 8px; background: #e2e8f0; border-radius: 4px; margin-top: 5px; overflow: hidden; }
.progress-fill { height: 100%; background: #f59e0b; border-radius: 4px; }

/* Buttons */
.btn { display: inline-block; padding: 9px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; font-weight: 600; transition: 0.2s; }
.btn-primary { background: #f59e0b; color: #1e293b; }
.btn-primary:hover { background: #d97706; }
.btn-outline { background: #fff; color: #1e293b; border: 1px solid #cbd5e1; }
.btn-outline:hover { background: #f1f5f9; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }

/* Form */
.form-row { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 15px; }
.form-group { flex: 1; min-width: 180px; }
.form-group label { display: block; font-size: 13px; color: #64748b; margin-bottom: 6px; font-weight: 600; }
.form-group input, .form-group select {
    width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; background: #fff;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: #f59e0b; }

/* Toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.filter-group { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-group input, .filter-group select { padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }

/* Tabs */
.tabs { display: flex; gap: 5px; margin-bottom: 20px; border-bottom: 2px solid #e2e8f0; flex-wrap: wrap; }
.tab { padding: 10px 18px; cursor: pointer; color: #64748b; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab:hover { color: #1e293b; }
.tab.active { color: #f59e0b; border-bottom-color: #f59e0b; }

/* Charts placeholder */
.chart-demo { width: 100%; height: 220px; background: #f8fafc; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #64748b; border: 1px dashed #cbd5e1; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 25px; width: 90%; max-width: 500px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.modal h3 { margin-bottom: 15px; color: #1e293b; }

/* KPI list */
.kpi-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 15px; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .brand span, .sidebar .nav-link span.label { display: none; }
    .main { margin-left: 60px; padding: 15px; }
    .panel-grid { grid-template-columns: 1fr; }
}
