/* ============================================================
   TANSIFT ACCESSOIRES - Design System
   ============================================================ */

:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --primary-dark: #0f2240;
  --accent: #e8760a;
  --accent-light: #ff9a3c;
  --accent-dark: #c45d00;
  --bg: #f5f6fa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f0f0f5;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --sidebar-width: 240px;
  --sidebar-collapsed: 60px;
  --topbar-height: 56px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --transition: all 0.2s ease;
  --font: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="sombre"] {
  --primary: #2a5a8c;
  --primary-light: #3a7abe;
  --primary-dark: #1a3a5c;
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --text: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-light: #6b7280;
  --border: #2d3142;
  --border-light: #252836;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.4);
}

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

html { font-size: 14px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--accent); }

.hidden { display: none !important; }

/* ==================== SPLASH ==================== */
#splash {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--primary); display: flex; align-items: center; justify-content: center;
  animation: fadeOut 0.5s ease 1.5s forwards;
}
.splash-content { text-align: center; color: #fff; }
.splash-icon {
  width: 80px; height: 80px; margin: 0 auto 1rem;
  background: var(--accent); border-radius: 20px;
  font-size: 40px; font-weight: 900; line-height: 80px; text-align: center;
  animation: pulse 1s ease infinite;
}
.splash-content h1 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; }
.splash-content p { color: rgba(255,255,255,0.7); margin-top: 0.25rem; }
.splash-loader { width: 200px; height: 3px; background: rgba(255,255,255,0.2); border-radius: 3px; margin: 1.5rem auto 0; overflow: hidden; }
.splash-bar { height: 100%; background: var(--accent); width: 0; animation: loadBar 1.5s ease forwards; }

@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }
@keyframes loadBar { to { width: 100%; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ==================== LOGIN ==================== */
#login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 1rem;
}
.login-card {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg); text-align: center;
}
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 1rem;
  background: var(--accent); border-radius: 16px;
  color: #fff; font-size: 32px; font-weight: 900; line-height: 64px;
}
.login-card h2 { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.login-subtitle { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.9rem; }
.login-card .form-group { text-align: left; margin-bottom: 1rem; }
.login-card label { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); display: block; margin-bottom: 0.3rem; }
.login-card input {
  width: 100%; padding: 0.65rem 0.9rem; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: 0.95rem; background: var(--bg);
  transition: var(--transition);
}
.login-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,118,10,0.15); }
.login-error { color: var(--danger); font-size: 0.85rem; margin-bottom: 0.75rem; padding: 0.5rem; background: rgba(239,68,68,0.1); border-radius: var(--radius); }
.login-hint { margin-top: 1rem; font-size: 0.75rem; color: var(--text-light); }

/* ==================== LAYOUT ==================== */
#mainLayout { display: flex; min-height: 100vh; }

/* Sidebar */
#sidebar {
  width: var(--sidebar-width); min-height: 100vh; position: fixed; left: 0; top: 0;
  background: var(--primary); color: #fff; z-index: 100;
  display: flex; flex-direction: column; transition: var(--transition);
}
#sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; height: var(--topbar-height); border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo {
  font-size: 1.3rem; font-weight: 900; background: var(--accent); color: #fff;
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  text-decoration: none; flex-shrink: 0;
}
.sidebar-toggle {
  background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 0.8rem;
  padding: 4px; border-radius: 4px; transition: var(--transition);
}
.sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,0.1); }
#sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.5rem 0; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.nav-section-label {
  padding: 0.75rem 1rem 0.3rem; font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(255,255,255,0.4); font-weight: 500;
}
#sidebar.collapsed .nav-section-label { display: none; }

.nav-item {
  display: flex; align-items: center; padding: 0.6rem 1rem; color: rgba(255,255,255,0.7);
  text-decoration: none; transition: var(--transition); border-left: 3px solid transparent;
  font-size: 0.9rem; gap: 0.75rem;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-item.active { color: #fff; background: rgba(255,255,255,0.12); border-left-color: var(--accent); }
.nav-icon { font-size: 1.1rem; width: 24px; text-align: center; flex-shrink: 0; }
#sidebar.collapsed .nav-label { display: none; }
#sidebar.collapsed .nav-item { justify-content: center; padding: 0.6rem 0; }
#sidebar.collapsed .nav-icon { margin: 0; }

.sidebar-footer {
  padding: 0.75rem 1rem; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-user { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.7rem; color: rgba(255,255,255,0.5); }
#sidebar.collapsed .user-info { display: none; }
#sidebar.collapsed .sidebar-user { justify-content: center; }
.btn-logout { background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 1.1rem; padding: 4px; transition: var(--transition); }
.btn-logout:hover { color: var(--danger); }

/* Main Content */
#mainContent {
  flex: 1; margin-left: var(--sidebar-width); transition: var(--transition);
  min-height: 100vh; display: flex; flex-direction: column;
}
#sidebar.collapsed + #mainContent { margin-left: var(--sidebar-collapsed); }

/* Topbar */
#topbar {
  height: var(--topbar-height); background: var(--bg-card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; position: sticky; top: 0; z-index: 50;
}
.breadcrumb { display: flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; }
.breadcrumb-item { color: var(--text-secondary); }
.breadcrumb-item:last-child { color: var(--text); font-weight: 500; }
.breadcrumb-item + .breadcrumb-item::before { content: '›'; margin-right: 0.3rem; color: var(--text-light); }

.topbar-right { display: flex; align-items: center; gap: 0.75rem; }
.search-box { position: relative; }
.search-input {
  width: 220px; padding: 0.45rem 0.9rem 0.45rem 2.2rem;
  border: 1.5px solid var(--border); border-radius: 20px; font-family: var(--font); font-size: 0.85rem;
  background: var(--bg); transition: var(--transition);
}
.search-input:focus { outline: none; border-color: var(--accent); width: 300px; box-shadow: 0 0 0 3px rgba(232,118,10,0.1); }
.search-icon { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); font-size: 0.9rem; pointer-events: none; }
.search-results {
  position: absolute; top: calc(100% + 4px); right: 0; width: 350px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 300px; overflow-y: auto; z-index: 200;
}
.search-results .sr-item { padding: 0.6rem 0.8rem; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; border-bottom: 1px solid var(--border-light); transition: var(--transition); }
.search-results .sr-item:last-child { border-bottom: none; }
.search-results .sr-item:hover { background: var(--bg); }
.search-results .sr-ref { font-weight: 600; color: var(--primary); font-size: 0.8rem; }
.search-results .sr-name { font-size: 0.85rem; flex: 1; }
.search-results .sr-stock { font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; }
.search-results .sr-stock.ok { background: rgba(16,185,129,0.1); color: var(--success); }
.search-results .sr-stock.warn { background: rgba(245,158,11,0.1); color: var(--warning); }
.search-results .sr-stock.danger { background: rgba(239,68,68,0.1); color: var(--danger); }

.topbar-btn { background: none; border: none; cursor: pointer; font-size: 1.1rem; padding: 6px; border-radius: 6px; color: var(--text-secondary); transition: var(--transition); position: relative; }
.topbar-btn:hover { background: var(--bg); color: var(--text); }
.notif-badge { position: absolute; top: 0; right: 0; background: var(--danger); color: #fff; font-size: 0.6rem; padding: 1px 5px; border-radius: 10px; font-weight: 700; }
.notif-dropdown {
  position: absolute; top: calc(100% + 4px); right: 0; width: 320px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 200; max-height: 400px; overflow-y: auto;
}
.notif-header { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.9rem; }
.notif-list { padding: 0.5rem 0; }
.notif-item { padding: 0.6rem 1rem; cursor: pointer; transition: var(--transition); border-bottom: 1px solid var(--border-light); }
.notif-item:hover { background: var(--bg); }
.notif-item .notif-msg { font-size: 0.85rem; }
.notif-item .notif-time { font-size: 0.7rem; color: var(--text-light); }
.notif-empty { text-align: center; padding: 1rem; color: var(--text-light); font-size: 0.85rem; }

/* Page Content */
#pageContent { padding: 1.5rem; flex: 1; }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.5rem 1rem; font-family: var(--font); font-size: 0.85rem; font-weight: 500;
  border: 1.5px solid transparent; border-radius: var(--radius); cursor: pointer;
  transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: 0.9; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn-lg { padding: 0.7rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ==================== CARDS ==================== */
.card {
  background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border);
  padding: 1.25rem; box-shadow: var(--shadow);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-header h2 { font-size: 1.1rem; font-weight: 600; }
.card-header h3 { font-size: 0.95rem; font-weight: 600; }
.card-actions { display: flex; gap: 0.5rem; }

/* ==================== GRID ==================== */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

/* KPI Cards */
.kpi-card { padding: 1.2rem; text-align: center; }
.kpi-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.kpi-value { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.kpi-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }
.kpi-trend { font-size: 0.75rem; margin-top: 0.3rem; }
.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 0.85rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.25rem; }
.form-control, .form-select, .form-textarea {
  width: 100%; padding: 0.5rem 0.75rem; font-family: var(--font); font-size: 0.9rem;
  border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--bg-card);
  color: var(--text); transition: var(--transition);
}
.form-control:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,118,10,0.1); }
.form-textarea { min-height: 80px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 0.25rem; }
.form-hint { color: var(--text-light); font-size: 0.75rem; margin-top: 0.25rem; }

/* ==================== TABLES ==================== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead th {
  text-align: left; padding: 0.65rem 0.75rem; font-weight: 600; font-size: 0.8rem;
  color: var(--text-secondary); border-bottom: 2px solid var(--border);
  background: var(--bg); white-space: nowrap;
}
tbody td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border-light); }
tbody tr:hover { background: var(--bg); }
.table-actions { display: flex; gap: 0.3rem; }

/* ==================== BADGES & STATUS ==================== */
.badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 12px; font-size: 0.7rem; font-weight: 600;
}
.badge-success { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.1); color: var(--danger); }
.badge-info { background: rgba(59,130,246,0.1); color: var(--info); }
.badge-neutral { background: rgba(107,114,128,0.1); color: var(--text-secondary); }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.3rem; }
.status-dot.green { background: var(--success); }
.status-dot.yellow { background: var(--warning); }
.status-dot.red { background: var(--danger); }
.status-dot.gray { background: var(--text-light); }

/* ==================== MODAL ==================== */
#modalOverlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  backdrop-filter: blur(2px);
}
.modal-content {
  background: var(--bg-card); border-radius: var(--radius-lg); max-width: 700px; width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalSlide 0.2s ease;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 1.1rem; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text-secondary); padding: 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.5rem; }

@keyframes modalSlide { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ==================== TOASTS ==================== */
#toastContainer { position: fixed; top: 1rem; right: 1rem; z-index: 5000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; animation: toastIn 0.3s ease; max-width: 350px;
  border-left: 4px solid var(--accent);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }

/* ==================== TABS ==================== */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1rem; gap: 0; }
.tab {
  padding: 0.6rem 1.2rem; cursor: pointer; font-size: 0.85rem; font-weight: 500;
  color: var(--text-secondary); border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: var(--transition); background: none; border-top: none; border-left: none; border-right: none; font-family: var(--font);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ==================== SKELETON ==================== */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px;
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-h2 { height: 24px; width: 60%; margin-bottom: 1rem; }
.skeleton-card { height: 100px; }

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ==================== PAGE SPECIFICS ==================== */
.page-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; }

.filters-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.filters-bar .form-control, .filters-bar .form-select { width: auto; min-width: 150px; }

.empty-state { text-align: center; padding: 3rem; color: var(--text-secondary); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; }

.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat-item { flex: 1; min-width: 120px; padding: 1rem; background: var(--bg); border-radius: var(--radius); text-align: center; }
.stat-value { font-size: 1.3rem; font-weight: 700; }
.stat-label { font-size: 0.75rem; color: var(--text-secondary); }

/* Document status flow */
.status-flow { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.5rem 0; }
.status-step { padding: 0.3rem 0.6rem; border-radius: 4px; font-size: 0.75rem; font-weight: 500; background: var(--bg); color: var(--text-light); }
.status-step.done { background: rgba(16,185,129,0.1); color: var(--success); }
.status-step.current { background: var(--accent); color: #fff; }
.status-arrow { color: var(--text-light); font-size: 0.8rem; }

/* Autocomplete */
.autocomplete-wrap { position: relative; display: flex; gap: 0.3rem; align-items: end; }
.autocomplete-wrap .autocomplete-input { flex: 1; }
.autocomplete-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 300; margin-top: 2px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  max-height: 220px; overflow-y: auto; box-shadow: var(--shadow-lg); display: none;
}
.autocomplete-results.show { display: block; }
.autocomplete-item { padding: 0.5rem 0.75rem; cursor: pointer; font-size: 0.82rem; border-bottom: 1px solid var(--border-light); }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.highlight { background: var(--bg); }
.autocomplete-item .ref { font-weight: 600; }
.autocomplete-item .des { color: var(--text-secondary); font-size: 0.78rem; }
.autocomplete-item .price { color: var(--accent); font-weight: 500; font-size: 0.78rem; }
.autocomplete-item .stock-info { color: var(--text-light); font-size: 0.75rem; }

/* Scanner */
.scanner-container { position: relative; width: 100%; max-width: 400px; margin: 0 auto; }
.scanner-container video { width: 100%; border-radius: var(--radius); background: #000; }
.scanner-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 60%; height: 40%; border: 2px solid var(--accent); border-radius: 8px; pointer-events: none; }

/* Label preview */
.label-preview { border: 1px dashed var(--border); padding: 1rem; text-align: center; border-radius: var(--radius); }
.label-preview canvas { max-width: 100%; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  #sidebar { width: var(--sidebar-collapsed); }
  #sidebar .nav-label, #sidebar .sidebar-user .user-info, #sidebar .nav-section-label { display: none; }
  #sidebar .nav-item { justify-content: center; padding: 0.6rem 0; }
  #sidebar .nav-icon { margin: 0; }
  #mainContent { margin-left: var(--sidebar-collapsed); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .search-input { width: 140px; }
  .search-input:focus { width: 200px; }
  #pageContent { padding: 1rem; }
  .filters-bar { flex-direction: column; }
  .filters-bar .form-control, .filters-bar .form-select { width: 100%; }
}

/* ==================== PRINT ==================== */
@media print {
  #sidebar, #topbar, .btn, .table-actions, .filters-bar, .card-actions { display: none !important; }
  #mainContent { margin-left: 0 !important; }
  #pageContent { padding: 0 !important; }
  .card { box-shadow: none; border: none; }
}
