/* ============================================
   PRESSING PRO — Design System 2.0
   Modern · Professional · Mobile-first
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* Brand */
  --primary:       #1B4FD8;
  --primary-light: #EEF3FF;
  --primary-dark:  #1239A5;
  --primary-glow:  rgba(27,79,216,0.18);

  /* Surfaces */
  --bg:       #F0F2F8;
  --card:     #FFFFFF;
  --card-alt: #F8FAFC;

  /* Text */
  --text:       #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  /* Borders */
  --border:        rgba(15,23,42,0.08);
  --border-strong: rgba(15,23,42,0.14);

  /* Semantic */
  --green:  #059669; --green-bg:  #ECFDF5; --green-border:  #6EE7B7;
  --amber:  #D97706; --amber-bg:  #FFFBEB; --amber-border:  #FCD34D;
  --red:    #DC2626; --red-bg:    #FEF2F2; --red-border:    #FCA5A5;
  --blue:   #2563EB; --blue-bg:   #EFF6FF; --blue-border:   #93C5FD;
  --purple: #7C3AED; --purple-bg: #F5F3FF; --purple-border: #C4B5FD;
  --teal:   #0D9488; --teal-bg:   #F0FDFA; --teal-border:   #5EEAD4;
  --coral:  #E11D48; --coral-bg:  #FFF1F2; --coral-border:  #FDA4AF;

  /* Typography */
  --font:      'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'DM Mono', 'Fira Code', monospace;

  /* Shape */
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow:    0 1px 4px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.12);
  --shadow-inset: inset 0 1px 2px rgba(0,0,0,0.06);

  /* Layout */
  --sidebar-width:  248px;
  --topbar-height:  64px;
  --bottom-nav-h:   68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   LAYOUT
   ============================================ */
.app-wrapper { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 2px 0 20px rgba(0,0,0,0.15);
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-logo .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), #3B82F6);
  border-radius: 12px;
  font-size: 20px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(27,79,216,0.4);
}
.sidebar-logo h1 { font-size: 17px; font-weight: 600; letter-spacing: -0.3px; color: #fff; }
.sidebar-logo p  { font-size: 11px; color: rgba(255,255,255,0.38); margin-top: 2px; }

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 16px 10px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.15s;
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.9); }
.nav-item.active {
  background: linear-gradient(90deg, var(--primary), #3B82F6);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(27,79,216,0.35);
}
.nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.8; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(220,38,38,0); }
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.user-info { display:flex;align-items:center;gap:10px;padding:8px;border-radius:9px;cursor:pointer;transition:background 0.15s; }
.user-info:hover { background: rgba(255,255,255,0.07); }
.user-avatar { width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,var(--primary),#3B82F6);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:#fff; }
.user-name { font-size:13px;font-weight:500;color:#fff; }
.user-role { font-size:11px;color:rgba(255,255,255,0.38); }

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}

/* ── TOPBAR ── */
.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1.5px solid var(--border-strong);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}
.mobile-menu-btn:hover { background: var(--bg); color: var(--text); }
.topbar-title { font-size: 17px; font-weight: 600; color: var(--text); letter-spacing: -0.2px; }
.topbar-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 1px; text-transform: capitalize; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Notification bell */
.notif-bell {
  position: relative;
  background: var(--amber-bg);
  border: 1.5px solid var(--amber-border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--amber);
  font-weight: 500;
  transition: all 0.15s;
  animation: bell-ring 3s ease-in-out infinite;
}
.notif-bell:hover { background: var(--amber); color: #fff; }
.notif-count { font-size: 12px; font-weight: 700; }
@keyframes bell-ring {
  0%,90%,100% { transform: rotate(0); }
  92% { transform: rotate(-8deg); }
  94% { transform: rotate(8deg); }
  96% { transform: rotate(-5deg); }
  98% { transform: rotate(5deg); }
}

/* ── PAGE CONTENT ── */
.page-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* ── BOTTOM NAV MOBILE ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 300;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  justify-content: space-around;
  align-items: center;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  transition: all 0.15s;
  flex: 1;
  min-width: 0;
}
.bottom-nav-item svg { width: 22px; height: 22px; stroke-width: 1.8; }
.bottom-nav-item span { font-size: 10px; font-family: var(--font); }
.bottom-nav-item:hover, .bottom-nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
}
.bottom-nav-item.active svg { stroke-width: 2.2; }

/* ============================================
   COMPONENTS
   ============================================ */

/* ── CARDS ── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.card-title    { font-size: 15px; font-weight: 600; color: var(--text); }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.card-body     { padding: 18px 22px; }

/* ── STAT CARDS ── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #3B82F6);
  opacity: 0;
  transition: opacity 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.stat-value.green  { color: var(--green); }
.stat-value.red    { color: var(--red); }
.stat-value.blue   { color: var(--primary); }
.stat-value.amber  { color: var(--amber); }
.stat-sub { font-size: 11px; color: var(--text-light); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn svg { width: 14px; height: 14px; }
.btn:active { transform: scale(0.97); }

.btn-primary  { background: linear-gradient(135deg, var(--primary), #3B82F6); color: #fff; box-shadow: 0 2px 8px rgba(27,79,216,0.3); }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); box-shadow: 0 4px 14px rgba(27,79,216,0.4); transform: translateY(-1px); }
.btn-secondary{ background: #fff; color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg); border-color: var(--border-strong); }
.btn-danger   { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success  { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.btn-success:hover { background: var(--green); color: #fff; }

.btn-sm  { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.btn-lg  { padding: 11px 22px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }

/* Bouton pulse */
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(27,79,216,0.4); } 50% { box-shadow: 0 0 0 6px rgba(27,79,216,0); } }
.pulse { animation: pulse 1s infinite; }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
}
.badge-green  { background: var(--green-bg);  color: var(--green);  border: 1px solid var(--green-border); }
.badge-amber  { background: var(--amber-bg);  color: var(--amber);  border: 1px solid var(--amber-border); }
.badge-red    { background: var(--red-bg);    color: var(--red);    border: 1px solid var(--red-border); }
.badge-blue   { background: var(--blue-bg);   color: var(--blue);   border: 1px solid var(--blue-border); }
.badge-purple { background: var(--purple-bg); color: var(--purple); border: 1px solid var(--purple-border); }
.badge-gray   { background: var(--card-alt);  color: var(--text-muted); border: 1px solid var(--border-strong); }

/* ── AVATAR ── */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── TABLE ── */
.table-wrapper {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
thead { background: linear-gradient(90deg, #F8FAFC, #F1F5F9); }
th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: #F8FAFC; }
.td-mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.td-name { font-weight: 500; color: var(--text); }

/* ── FILTERS BAR ── */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-wrap svg {
  position: absolute;
  left: 10px;
  width: 15px; height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }

/* ── FORMS ── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-group textarea { min-height: 80px; resize: vertical; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: grid; gap: 12px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── MODAL ── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s;
}
.modal-backdrop.open { display: flex; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.modal-box {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUp { from { opacity:0; transform:translateY(20px) scale(0.97); } to { opacity:1; transform:none; } }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.modal-title { font-size: 17px; font-weight: 600; }
.modal-close { background:none;border:none;font-size:22px;cursor:pointer;color:var(--text-muted);transition:color 0.15s;line-height:1;padding:4px;border-radius:6px; }
.modal-close:hover { color:var(--text);background:var(--bg); }
.modal-body   { padding: 20px 24px; }
.modal-footer { display:flex;justify-content:flex-end;gap:10px;padding:16px 0 0;border-top:1px solid var(--border);margin-top:16px; }

/* ── ALERTS ── */
.alert {
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid;
  margin-bottom: 14px;
}
.alert-info    { background: var(--blue-bg);  color: var(--blue);  border-color: var(--blue-border); }
.alert-success { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.alert-danger  { background: var(--red-bg);   color: var(--red);   border-color: var(--red-border); }

/* ── PROGRESS ── */
.progress {
  height: 7px;
  background: var(--bg);
  border-radius: 20px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #3B82F6);
  border-radius: 20px;
  transition: width 0.5s ease;
}
.progress-bar.green  { background: linear-gradient(90deg, #059669, #10B981); }
.progress-bar.amber  { background: linear-gradient(90deg, #D97706, #F59E0B); }

/* ── TOASTS ── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  color: #fff;
  min-width: 220px;
  max-width: 360px;
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  backdrop-filter: blur(8px);
}
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:none; } }
.toast.success { background: linear-gradient(135deg, #059669, #10B981); }
.toast.error   { background: linear-gradient(135deg, #DC2626, #EF4444); }
.toast.info    { background: linear-gradient(135deg, #2563EB, #3B82F6); }

/* ── PRESENCE TABLE ── */
.presence-table td { text-align: center; }
.presence-table .nom-col { text-align: left; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 52px; height: 52px; margin: 0 auto 14px; display: block; opacity: 0.25; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; }

/* ── SIDEBAR OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: 150;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* ── DASHBOARD GRID ── */
.dashboard-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.today-livraisons .item { display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--border); }
.today-livraisons .item:last-child { border-bottom:none; }

/* ── QUICK ACTIONS ── */
.quick-actions { display:grid;grid-template-columns:1fr 1fr;gap:10px; }
.quick-btn {
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;
  padding:14px 10px;border-radius:12px;background:var(--bg);border:1.5px solid var(--border);
  text-decoration:none;color:var(--text-muted);font-size:12px;font-weight:500;
  transition:all 0.15s;text-align:center;
}
.quick-btn svg { width:22px;height:22px;color:var(--primary); }
.quick-btn:hover { background:var(--primary-light);color:var(--primary);border-color:var(--primary);transform:translateY(-2px); }

/* ── LOGIN PAGE ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #1B4FD8 100%);
  padding: 20px;
}
.login-box {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
.login-logo { text-align:center;margin-bottom:28px; }
.login-logo .logo-mark { width:56px;height:56px;border-radius:16px;font-size:26px;margin:0 auto 12px; }
.login-logo h1 { font-size:22px;font-weight:700;color:var(--text); }
.login-logo p  { font-size:13px;color:var(--text-muted);margin-top:4px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  :root { --topbar-height: 56px; }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: none;
    box-shadow: var(--shadow-lg);
  }

  .main-content { margin-left: 0; }
  .page-content { padding: 14px 14px calc(var(--bottom-nav-h) + 14px); }

  .topbar { padding: 0 14px; }
  .mobile-menu-btn { display: flex; }
  .topbar-title { font-size: 15px; }
  .topbar-subtitle { display: none; }

  /* Bottom nav visible sur mobile */
  .bottom-nav { display: flex; }

  /* Grid adaptations */
  .stats-grid       { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dashboard-grid   { grid-template-columns: 1fr; }
  .form-row-2       { grid-template-columns: 1fr; }
  .form-row-3       { grid-template-columns: 1fr; }

  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }

  .modal-box { max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; position: fixed; bottom: 0; left: 0; right: 0; margin: 0; max-height: 90vh; }
  .modal-backdrop { align-items: flex-end; padding: 0; }

  .filters-bar { gap: 8px; }
  .quick-actions { grid-template-columns: 1fr 1fr; }

  /* Toast au centre mobile */
  #toast-container { bottom: calc(var(--bottom-nav-h) + 10px); right: 12px; left: 12px; }
  .toast { min-width: auto; }

  /* Stats plus compactes */
  .stat-card { padding: 14px 16px; }
  .stat-value { font-size: 22px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .btn-sm { padding: 5px 9px; font-size: 11px; }
}

/* ── PRINT ── */
@media print {
  .sidebar, .topbar, .filters-bar, .btn, .bottom-nav { display: none !important; }
  .main-content { margin-left: 0; }
  .page-content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* ── FILTER BAR INPUTS (champs de filtre) ── */
.filter-input {
  padding: 8px 12px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #0F172A;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
}
.filter-input:focus {
  border-color: #3B5BDB;
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.15);
}
.filter-input:hover {
  border-color: #94A3B8;
}
