/* ============================================
   IZISCAR CG - Design Backend Premium 2025
   ============================================ */

/* Variables */
:root {
	/* Couleurs Principales */
	--primary: #6366f1;
	--primary-light: #818cf8;
	--primary-dark: #4f46e5;
	--primary-bg: rgba(99, 102, 241, 0.1);
	
	--secondary: #0ea5e9;
	--secondary-light: #38bdf8;
	
	/* Sidebar */
	--sidebar-bg: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
	--sidebar-width: 280px;
	--sidebar-collapsed: 80px;
	
	/* Backgrounds */
	--bg-main: #f1f5f9;
	--bg-card: #ffffff;
	--bg-hover: #f8fafc;
	--bg-active: #e0e7ff;
	
	/* Textes */
	--text-primary: #1e293b;
	--text-secondary: #475569;
	--text-muted: #94a3b8;
	--text-light: #cbd5e1;
	--text-white: #ffffff;
	
	/* Borders */
	--border: #e2e8f0;
	--border-light: #f1f5f9;
	
	/* Status */
	--success: #10b981;
	--success-bg: #d1fae5;
	--warning: #f59e0b;
	--warning-bg: #fef3c7;
	--error: #ef4444;
	--error-bg: #fee2e2;
	--info: #3b82f6;
	--info-bg: #dbeafe;
	
	/* Shadows */
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
	--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
	
	/* Radius */
	--radius-sm: 6px;
	--radius: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--radius-xl: 24px;
	
	/* Transitions */
	--transition: all 0.2s ease;
	--transition-slow: all 0.3s ease;
}

/* Reset */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 14px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: var(--bg-main);
	color: var(--text-primary);
	line-height: 1.6;
	overflow-x: hidden;
}

/* ============================================
   APP LAYOUT
   ============================================ */

.app {
	display: flex;
	min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	width: var(--sidebar-width);
	background: var(--sidebar-bg);
	display: flex;
	flex-direction: column;
	z-index: 1000;
	transition: var(--transition-slow);
}

/* Brand */
.sidebar-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 24px 24px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
	width: 48px;
	height: 48px;
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
	border-radius: var(--radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	color: white;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.sidebar-brand-text {
	display: flex;
	flex-direction: column;
}

.sidebar-brand-name {
	font-size: 20px;
	font-weight: 700;
	color: var(--text-white);
	letter-spacing: -0.5px;
}

.sidebar-brand-sub {
	font-size: 13px;
	font-weight: 600;
	color: var(--primary-light);
	letter-spacing: 2px;
}

/* Navigation */
.sidebar-nav {
	flex: 1;
	overflow-y: auto;
	padding: 20px 0;
}

.sidebar-section {
	margin-bottom: 24px;
}

.sidebar-section-label {
	padding: 0 24px;
	margin-bottom: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	color: rgba(255, 255, 255, 0.35);
}

.sidebar-menu {
	list-style: none;
}

.sidebar-menu li {
	margin: 4px 12px;
}

.sidebar-menu a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	color: rgba(255, 255, 255, 0.65);
	text-decoration: none;
	border-radius: var(--radius);
	font-weight: 500;
	font-size: 14px;
	transition: var(--transition);
	position: relative;
}

.sidebar-menu a i {
	font-size: 18px;
	width: 24px;
	text-align: center;
	transition: var(--transition);
}

.sidebar-menu a:hover {
	background: rgba(255, 255, 255, 0.06);
	color: var(--text-white);
}

.sidebar-menu a.active {
	background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.05) 100%);
	color: var(--text-white);
}

.sidebar-menu a.active::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 4px;
	height: 24px;
	background: var(--primary);
	border-radius: 0 4px 4px 0;
}

.sidebar-menu a.active i {
	color: var(--primary-light);
}

.sidebar-badge {
	margin-left: auto;
	background: var(--primary);
	color: white;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 10px;
	min-width: 22px;
	text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
	padding: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	align-items: center;
	gap: 12px;
}

.sidebar-user {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 12px;
	background: rgba(255, 255, 255, 0.04);
	border-radius: var(--radius);
}

.sidebar-user-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--primary), var(--secondary));
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-weight: 600;
	font-size: 14px;
}

.sidebar-user-info {
	flex: 1;
	min-width: 0;
}

.sidebar-user-name {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-white);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sidebar-user-role {
	font-size: 11px;
	color: rgba(255, 255, 255, 0.45);
}

.sidebar-logout {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.5);
	background: rgba(255, 255, 255, 0.04);
	border-radius: var(--radius);
	text-decoration: none;
	transition: var(--transition);
}

.sidebar-logout:hover {
	background: rgba(239, 68, 68, 0.15);
	color: var(--error);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main {
	flex: 1;
	margin-left: var(--sidebar-width);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Header */
.header {
	position: sticky;
	top: 0;
	height: 72px;
	background: var(--bg-card);
	border-bottom: 1px solid var(--border);
	padding: 0 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 100;
	box-shadow: var(--shadow-sm);
}

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

.sidebar-toggle {
	display: none;
	width: 40px;
	height: 40px;
	border: none;
	background: var(--bg-hover);
	color: var(--text-secondary);
	border-radius: var(--radius);
	cursor: pointer;
	font-size: 18px;
}

.header-title h1 {
	font-size: 22px;
	font-weight: 700;
	color: var(--text-primary);
	letter-spacing: -0.5px;
}

.header-right {
	display: flex;
	align-items: center;
	gap: 16px;
}

.header-search {
	position: relative;
	width: 280px;
}

.header-search input {
	width: 100%;
	padding: 10px 16px 10px 44px;
	background: var(--bg-main);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	font-size: 14px;
	color: var(--text-primary);
	transition: var(--transition);
}

.header-search input:focus {
	outline: none;
	border-color: var(--primary);
	background: var(--bg-card);
	box-shadow: 0 0 0 4px var(--primary-bg);
}

.header-search input::placeholder {
	color: var(--text-muted);
}

.header-search i {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-muted);
	font-size: 14px;
}

.header-action {
	position: relative;
	width: 44px;
	height: 44px;
	border: none;
	background: var(--bg-main);
	color: var(--text-secondary);
	border-radius: var(--radius-md);
	cursor: pointer;
	font-size: 16px;
	transition: var(--transition);
}

.header-action:hover {
	background: var(--primary-bg);
	color: var(--primary);
}

.header-badge {
	position: absolute;
	top: 6px;
	right: 6px;
	background: var(--error);
	color: white;
	font-size: 10px;
	font-weight: 600;
	padding: 2px 6px;
	border-radius: 10px;
	min-width: 18px;
}

/* Content Area */
.content {
	flex: 1;
	padding: 32px;
}

.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0;
}

/* ============================================
   CARDS
   ============================================ */

.card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: var(--shadow);
	transition: var(--transition);
}

.card:hover {
	box-shadow: var(--shadow-md);
}

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

.card-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--text-primary);
	margin: 0;
}

.card-subtitle {
	font-size: 13px;
	color: var(--text-muted);
	margin-top: 4px;
}

.card-icon {
	width: 48px;
	height: 48px;
	border-radius: var(--radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}

.card-icon.primary { background: var(--primary-bg); color: var(--primary); }
.card-icon.success { background: var(--success-bg); color: var(--success); }
.card-icon.warning { background: var(--warning-bg); color: var(--warning); }
.card-icon.error { background: var(--error-bg); color: var(--error); }

/* ============================================
   KPI STATS
   ============================================ */

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
	margin-bottom: 32px;
}

.stat-card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 24px;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	box-shadow: var(--shadow);
	transition: var(--transition);
	position: relative;
	overflow: hidden;
}

.stat-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--primary), var(--secondary));
	opacity: 0;
	transition: var(--transition);
}

.stat-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
	opacity: 1;
}

.stat-content {
	flex: 1;
}

.stat-label {
	font-size: 13px;
	font-weight: 500;
	color: var(--text-muted);
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.stat-value {
	font-size: 32px;
	font-weight: 700;
	color: var(--text-primary);
	line-height: 1.2;
	margin-bottom: 8px;
}

.stat-trend {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 500;
	padding: 4px 10px;
	border-radius: 20px;
}

.stat-trend.up {
	background: var(--success-bg);
	color: var(--success);
}

.stat-trend.down {
	background: var(--error-bg);
	color: var(--error);
}

.stat-icon {
	width: 56px;
	height: 56px;
	border-radius: var(--radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
}

.stat-icon.primary { 
	background: linear-gradient(135deg, var(--primary-bg), rgba(99, 102, 241, 0.2)); 
	color: var(--primary); 
}
.stat-icon.success { 
	background: linear-gradient(135deg, var(--success-bg), rgba(16, 185, 129, 0.2)); 
	color: var(--success); 
}
.stat-icon.warning { 
	background: linear-gradient(135deg, var(--warning-bg), rgba(245, 158, 11, 0.2)); 
	color: var(--warning); 
}
.stat-icon.error { 
	background: linear-gradient(135deg, var(--error-bg), rgba(239, 68, 68, 0.2)); 
	color: var(--error); 
}
.stat-icon.info { 
	background: linear-gradient(135deg, var(--info-bg), rgba(59, 130, 246, 0.2)); 
	color: var(--info); 
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow);
}

.table-header {
	padding: 20px 24px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

.table-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--text-primary);
}

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

.table-wrapper {
	overflow-x: auto;
}

.table {
	width: 100%;
	border-collapse: collapse;
}

.table thead {
	background: var(--bg-main);
}

.table th {
	padding: 14px 20px;
	text-align: left;
	font-weight: 600;
	font-size: 12px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

.table td {
	padding: 16px 20px;
	border-bottom: 1px solid var(--border-light);
	color: var(--text-primary);
	vertical-align: middle;
}

.table tbody tr {
	transition: var(--transition);
}

.table tbody tr:hover {
	background: var(--bg-hover);
}

.table tbody tr:last-child td {
	border-bottom: none;
}

.table-wrap {
	max-height: 500px;
	overflow: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: var(--radius);
	border: none;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: var(--transition);
	text-decoration: none;
	white-space: nowrap;
}

.btn-primary {
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: white;
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
	background: var(--bg-card);
	border-color: var(--primary);
	color: var(--primary);
}

.btn-success {
	background: linear-gradient(135deg, var(--success), #059669);
	color: white;
}

.btn-danger {
	background: linear-gradient(135deg, var(--error), #dc2626);
	color: white;
}

.btn-sm {
	padding: 7px 14px;
	font-size: 13px;
}

.btn-lg {
	padding: 14px 28px;
	font-size: 15px;
}

.btn-icon {
	width: 40px;
	height: 40px;
	padding: 0;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
	margin-bottom: 20px;
}

.form-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: var(--text-primary);
	font-size: 14px;
}

.form-label.required::after {
	content: '*';
	color: var(--error);
	margin-left: 4px;
}

.input, select, textarea {
	width: 100%;
	padding: 12px 16px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 14px;
	color: var(--text-primary);
	transition: var(--transition);
}

.input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 4px var(--primary-bg);
}

.input::placeholder {
	color: var(--text-muted);
}

textarea {
	min-height: 120px;
	resize: vertical;
	font-family: inherit;
}

.form-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.form-row > * {
	flex: 1;
	min-width: 200px;
}

.form-help {
	margin-top: 6px;
	font-size: 12px;
	color: var(--text-muted);
}

/* ============================================
   STATUS BADGES
   ============================================ */

.status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
}

.status::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}

.status.pending {
	background: var(--warning-bg);
	color: #b45309;
}

.status.in_progress {
	background: var(--info-bg);
	color: #1d4ed8;
}

.status.completed {
	background: var(--success-bg);
	color: #047857;
}

.status.missing, .status.rejected {
	background: var(--error-bg);
	color: #b91c1c;
}

.status.approved {
	background: var(--success-bg);
	color: #047857;
}

/* ============================================
   DROPDOWN
   ============================================ */

.dropdown {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	min-width: 320px;
	box-shadow: var(--shadow-xl);
	z-index: 1000;
}

.dropdown-header {
	padding: 14px 16px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
	color: var(--text-primary);
}

.dropdown-header a {
	font-size: 12px;
	color: var(--primary);
	text-decoration: none;
}

.dropdown-list {
	list-style: none;
	max-height: 320px;
	overflow-y: auto;
}

.dropdown-list li {
	padding: 12px 16px;
	border-bottom: 1px solid var(--border-light);
	cursor: pointer;
	transition: var(--transition);
}

.dropdown-list li:hover {
	background: var(--bg-hover);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
	padding: 16px 20px;
	border-radius: var(--radius-md);
	margin-bottom: 20px;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	font-size: 14px;
}

.alert-icon {
	font-size: 18px;
}

.alert-success {
	background: var(--success-bg);
	border: 1px solid var(--success);
	color: #047857;
}

.alert-warning {
	background: var(--warning-bg);
	border: 1px solid var(--warning);
	color: #b45309;
}

.alert-error {
	background: var(--error-bg);
	border: 1px solid var(--error);
	color: #b91c1c;
}

.alert-info {
	background: var(--info-bg);
	border: 1px solid var(--info);
	color: #1d4ed8;
}

/* ============================================
   GRID
   ============================================ */

.grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 24px;
}

.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

/* ============================================
   UTILITIES
   ============================================ */

.mono {
	font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

.pre {
	background: #1e293b;
	color: #e2e8f0;
	padding: 16px 20px;
	border-radius: var(--radius-md);
	overflow-x: auto;
	font-family: 'JetBrains Mono', Consolas, monospace;
	font-size: 13px;
	line-height: 1.7;
}

.kv {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 12px 20px;
	align-items: start;
}

.kv > div:nth-child(odd) {
	font-weight: 500;
	color: var(--text-muted);
}

.badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: var(--bg-main);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb {
	background: var(--text-muted);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--text-secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
	.sidebar {
		transform: translateX(-100%);
	}
	
	.sidebar.open {
		transform: translateX(0);
	}
	
	.main {
		margin-left: 0;
	}
	
	.sidebar-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.header-search {
		display: none;
	}
}

@media (max-width: 768px) {
	.content {
		padding: 20px 16px;
	}
	
	.header {
		padding: 0 16px;
	}
	
	.stats-grid {
		grid-template-columns: 1fr;
	}
	
	.col-3, .col-4, .col-6, .col-8, .col-9 {
		grid-column: span 12;
	}
	
	.kv {
		grid-template-columns: 1fr;
	}
	
	.form-row {
		flex-direction: column;
	}
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.card, .stat-card, .table-container {
	animation: fadeIn 0.3s ease-out;
}

/* ============================================
   LEGACY COMPATIBILITY
   ============================================ */

/* Pour le layout sans sidebar (tester.php, login, etc.) */
body:not(:has(.sidebar)) .main {
	margin-left: 0;
}

body:not(:has(.sidebar)) {
	padding: 32px;
}

/* Ancienne topbar (pages standalone) */
.topbar:not(.header) {
	background: var(--bg-card);
	padding: 16px 24px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: -32px -32px 32px -32px;
	border-radius: 0;
}

.topbar .brand {
	font-size: 20px;
	font-weight: 700;
	color: var(--primary);
}

.topbar .menu {
	display: flex;
	gap: 24px;
}

.topbar .menu a {
	color: var(--text-secondary);
	text-decoration: none;
	font-weight: 500;
}

.topbar .menu a:hover {
	color: var(--primary);
}

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

.bell {
	background: none;
	border: none;
	cursor: pointer;
	position: relative;
	color: var(--text-secondary);
	font-size: 20px;
}

/* KPI legacy */
.kpi {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.kpi .value {
	font-size: 28px;
	font-weight: 700;
	color: var(--text-primary);
}

.kpi .label {
	font-size: 13px;
	color: var(--text-muted);
}
