@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary:       #1F4E79;
  --primary-light: #2E75B6;
  --primary-xlight:#D6E4F0;
  --accent:        #C55A11;
  --success:       #1D6A3A;
  --sidebar-w:     260px;
  --header-h:      60px;
  --radius:        10px;
  --shadow:        0 2px 12px rgba(31,78,121,.10);
  --shadow-lg:     0 8px 32px rgba(31,78,121,.16);
  --transition:    .22s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: #F0F4F8;
  color: #1a202c;
  line-height: 1.6;
}

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

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #1F4E79 0%, #163959 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 1040;
  overflow-y: auto;
  transition: transform var(--transition);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

.sidebar-brand {
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.sidebar-brand img.brand-logo {
  width: 64px; height: 64px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,.15);
  padding: 4px;
}
.sidebar-brand .brand-text { color: #fff; width: 100%; }
.sidebar-brand .brand-text strong {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}
.sidebar-brand .brand-text span { font-size: .68rem; opacity: .65; }

.sidebar-nav { flex: 1; padding: 10px 0; }
.nav-section-title {
  color: rgba(255,255,255,.45);
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 14px 20px 4px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: #90CAF9;
  border-radius: 0 3px 3px 0;
}
.sidebar-nav a i { width: 18px; text-align: center; font-size: .9rem; opacity: .8; }

/* Submenu */
.has-submenu > a .arrow {
  margin-left: auto;
  transition: transform var(--transition);
  font-size: .7rem;
}
.has-submenu.open > a .arrow { transform: rotate(90deg); }
.submenu {
  display: none;
  background: rgba(0,0,0,.18);
  padding: 4px 0;
}
.has-submenu.open .submenu { display: block; }
.submenu a {
  padding: 7px 20px 7px 46px;
  font-size: .8rem;
  font-weight: 400;
}

/* TOPBAR */
.topbar {
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  z-index: 1030;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar .page-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  flex: 1;
}
.topbar .topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar .btn-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: #F0F4F8;
  color: #4A5568;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.topbar .btn-icon:hover { background: var(--primary-xlight); color: var(--primary); }

.user-avatar-sm {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-xlight);
}
.user-info-topbar { font-size: .78rem; text-align: right; }
.user-info-topbar .u-name { font-weight: 600; color: #1a202c; }
.user-info-topbar .u-role { color: #718096; font-size: .72rem; }

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  padding: 24px;
  min-height: calc(100vh - var(--header-h));
  flex: 1;
}

/* CARDS */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #E2E8F0;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header .card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}
.card-header .ms-auto { margin-left: auto !important; }
.card-body { padding: 20px; }

/* STAT CARDS */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #E2E8F0;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-icon.blue   { background: #EBF8FF; color: #2B6CB0; }
.stat-icon.green  { background: #F0FFF4; color: #276749; }
.stat-icon.orange { background: #FFFAF0; color: #C05621; }
.stat-icon.red    { background: #FFF5F5; color: #C53030; }
.stat-icon.purple { background: #FAF5FF; color: #6B46C1; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: #1a202c; line-height: 1; }
.stat-label { font-size: .78rem; color: #718096; margin-top: 3px; }

/* TABLES */
.table-wrapper { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table th {
  background: var(--primary);
  color: #fff;
  padding: 11px 14px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  font-size: .8rem;
}
.table td {
  padding: 10px 14px;
  border-bottom: 1px solid #EDF2F7;
  vertical-align: middle;
}
.table tbody tr:hover { background: #F7FAFC; }
.table tbody tr:nth-child(even) { background: #FAFBFC; }
.table tbody tr:nth-child(even):hover { background: #F7FAFC; }

/* BUTTONS */
.btn { border-radius: 7px; font-weight: 500; font-size: .84rem; transition: all var(--transition); border: none; cursor: pointer; padding: 8px 16px; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-light); color: #fff; }
.btn-success  { background: #276749; color: #fff; }
.btn-success:hover  { background: #22543D; color: #fff; }
.btn-danger   { background: #C53030; color: #fff; }
.btn-danger:hover   { background: #9B2C2C; color: #fff; }
.btn-warning  { background: #C05621; color: #fff; }
.btn-warning:hover  { background: #9C4221; color: #fff; }
.btn-secondary{ background: #718096; color: #fff; }
.btn-secondary:hover{ background: #4A5568; color: #fff; }
.btn-outline-primary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 5px 11px; font-size: .78rem; border-radius: 6px; }
.btn-xs { padding: 3px 8px;  font-size: .72rem; border-radius: 5px; }
.btn-group { display: inline-flex; gap: 4px; }

/* FORMS */
.form-label { font-size: .83rem; font-weight: 500; color: #4A5568; margin-bottom: 5px; display: block; }
.form-control, .form-select {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #CBD5E0;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  background: #fff;
  color: #1a202c;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(46,117,182,.15);
}
.form-control.is-invalid { border-color: #E53E3E; }
.invalid-feedback { color: #E53E3E; font-size: .75rem; margin-top: 3px; }
.form-group { margin-bottom: 16px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }

/* BADGES */
.badge { padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600; display: inline-block; letter-spacing: .01em; }

/* Couleurs douces pour usage hors badges (alerts, tags légers) */
.bg-success   { background: #C6F6D5; color: #276749; }
.bg-danger    { background: #FED7D7; color: #9B2C2C; }
.bg-warning   { background: #FEFCBF; color: #744210; }
.bg-secondary { background: #EDF2F7; color: #4A5568; }
.bg-info      { background: #BEE3F8; color: #2C5282; }
.bg-primary   { background: #EBF8FF; color: #1F4E79; }

/* Badges statut — couleurs solides et lisibles */
.badge.bg-success   { background: #276749 !important; color: #fff !important; }
.badge.bg-danger    { background: #C53030 !important; color: #fff !important; }
.badge.bg-warning   { background: #C05621 !important; color: #fff !important; }
.badge.bg-secondary { background: #4A5568 !important; color: #fff !important; }
.badge.bg-info      { background: #2B6CB0 !important; color: #fff !important; }
.badge.bg-primary   { background: #1F4E79 !important; color: #fff !important; }

/* FILTERS BAR */
.filters-bar {
  background: #F7FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.filters-bar .form-group { margin-bottom: 0; }
.filters-bar .form-label { font-size: .76rem; }
.filters-bar .form-control,
.filters-bar .form-select { font-size: .8rem; padding: 6px 10px; }

/* PAGINATION */
.pagination { display: flex; gap: 4px; list-style: none; }
.page-item .page-link {
  padding: 6px 12px;
  border: 1.5px solid #CBD5E0;
  border-radius: 6px;
  color: var(--primary);
  font-size: .82rem;
  text-decoration: none;
  transition: all var(--transition);
}
.page-item.active .page-link { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-item .page-link:hover { background: var(--primary-xlight); }

/* MODALS */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; animation: fadeIn .2s; }
.modal-box {
  background: #fff;
  border-radius: 14px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .25s;
}
.modal-box.modal-lg { max-width: 900px; }
.modal-box.modal-xl { max-width: 1100px; }
.modal-header {
  background: var(--primary);
  color: #fff;
  padding: 16px 20px;
  border-radius: 14px 14px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-header .modal-title { font-weight: 600; font-size: .95rem; }
.modal-header .btn-close-modal {
  margin-left: auto;
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid #E2E8F0; display: flex; gap: 10px; justify-content: flex-end; }

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

/* LIGNE SAISIE TABLE */
.table-lignes { border-radius: var(--radius); overflow: hidden; border: 1.5px solid #CBD5E0; }
.table-lignes th { background: #2E75B6; font-size: .78rem; }
.table-lignes .form-control-sm { padding: 5px 8px; font-size: .8rem; border-radius: 5px; }
.table-lignes td.actions { white-space: nowrap; }
.btn-add-ligne {
  background: #EBF8FF;
  color: var(--primary);
  border: 2px dashed var(--primary-light);
  width: 100%;
  padding: 9px;
  border-radius: 7px;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-add-ligne:hover { background: var(--primary-xlight); }

/* PRINT */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin: 0 !important; padding: 0 !important; }
  body { background: #fff; }
  .print-doc { padding: 20px; }
}
.print-header { display: flex; align-items: center; gap: 20px; border-bottom: 3px solid var(--primary); padding-bottom: 12px; margin-bottom: 16px; }
.print-header img { width: 70px; height: 70px; object-fit: contain; }
.print-header .dg-info h2 { font-size: 1.1rem; color: var(--primary); font-weight: 700; }
.print-header .dg-info p  { font-size: .8rem; color: #555; margin: 0; }
.print-footer { border-top: 2px solid var(--primary); padding-top: 10px; margin-top: 20px; display: flex; justify-content: space-between; font-size: .75rem; color: #555; }

/* AUTH PAGES */
.auth-wrapper { min-height: 100vh; background: linear-gradient(135deg, #1F4E79 0%, #2E75B6 60%, #90CAF9 100%); display: flex; align-items: center; justify-content: center; }
.auth-card { background: #fff; border-radius: 16px; width: 400px; max-width: 95vw; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; }
.auth-card-header { background: linear-gradient(135deg, #1F4E79, #2E75B6); padding: 28px 32px; text-align: center; }
.auth-card-header img { width: 60px; height: 60px; object-fit: contain; margin-bottom: 10px; }
.auth-card-header h1 { color: #fff; font-size: 1.3rem; font-weight: 700; }
.auth-card-header p  { color: rgba(255,255,255,.7); font-size: .82rem; }
.auth-card-body { padding: 28px 32px; }

/* TOAST */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast-msg {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 500;
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  animation: slideLeft .3s;
}
@keyframes slideLeft { from { transform: translateX(120%); } to { transform: translateX(0); } }
.toast-msg.success { background: #F0FFF4; color: #276749; border-left: 4px solid #276749; }
.toast-msg.error   { background: #FFF5F5; color: #9B2C2C; border-left: 4px solid #C53030; }
.toast-msg.warning { background: #FFFAF0; color: #744210; border-left: 4px solid #C05621; }
.toast-msg.info    { background: #EBF8FF; color: #2C5282; border-left: 4px solid #2B6CB0; }
.toast-msg .close-toast { margin-left: auto; cursor: pointer; opacity: .6; background: none; border: none; font-size: 1rem; }

/* MISC */
.divider { height: 1px; background: #E2E8F0; margin: 16px 0; }
.text-muted { color: #718096 !important; }
.fw-600 { font-weight: 600; }
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: .85rem; border-left: 4px solid; }
.alert-danger  { background: #FFF5F5; color: #9B2C2C; border-color: #C53030; }
.alert-success { background: #F0FFF4; color: #276749; border-color: #276749; }
.alert-warning { background: #FFFAF0; color: #744210; border-color: #C05621; }
.alert-info    { background: #EBF8FF; color: #2C5282; border-color: #2B6CB0; }
.stock-alert   { color: #C53030; font-weight: 600; }
.stock-ok      { color: #276749; }
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.6); z-index: 9998; display: flex; align-items: center; justify-content: center; }
.spinner { width: 40px; height: 40px; border: 4px solid #E2E8F0; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { display: none; position: absolute; right: 0; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 180px; z-index: 3000; border: 1px solid #E2E8F0; overflow: hidden; }
.dropdown.open .dropdown-menu { display: block; animation: fadeIn .15s; }
.dropdown-item { display: flex; align-items: center; gap: 8px; padding: 10px 16px; color: #4A5568; font-size: .83rem; text-decoration: none; cursor: pointer; border: none; background: none; width: 100%; transition: background var(--transition); }
.dropdown-item:hover { background: #F7FAFC; color: var(--primary); }
.dropdown-divider { height: 1px; background: #E2E8F0; margin: 4px 0; }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar { left: 0; }
}

/* ═══════════════════════════════════════════════════════
   DASHBOARD V2 — ANIMATIONS & ENRICHISSEMENT
   ═══════════════════════════════════════════════════════ */

/* ── LOGO ANIMATION ─────────────────────────────────── */
.brand-logo-wrap {
  position: relative;
  width: 70px; height: 70px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.logo-pulse {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  animation: logoPulse 2.8s ease-in-out infinite;
}
.logo-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(255,255,255,.85);
  border-right-color: rgba(255,255,255,.35);
  animation: logoSpin 2.8s linear infinite;
}
.logo-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-bottom-color: rgba(144,202,249,.7);
  border-left-color: rgba(144,202,249,.25);
  animation: logoSpin 1.6s linear infinite reverse;
}
.brand-logo-img {
  width: 64px; height: 64px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,.18);
  padding: 5px;
  position: relative;
  z-index: 1;
}
.brand-logo-icon {
  width: 64px; height: 64px;
  border-radius: 12px;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  position: relative;
  z-index: 1;
}
@keyframes logoSpin  { to { transform: rotate(360deg); } }
@keyframes logoPulse { 0%,100% { transform:scale(1); opacity:.7; } 50% { transform:scale(1.18); opacity:.15; } }

/* ── ENTRANCE ANIMATIONS ────────────────────────────── */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(28px); }
  to   { opacity:1; transform:translateY(0);    }
}
@keyframes fadeInScale {
  from { opacity:0; transform:scale(.92); }
  to   { opacity:1; transform:scale(1);   }
}
.anim-in { animation: fadeInUp .48s cubic-bezier(.22,1,.36,1) both; }
.anim-scale { animation: fadeInScale .4s cubic-bezier(.22,1,.36,1) both; }
.anim-d1  { animation-delay:.04s; }
.anim-d2  { animation-delay:.10s; }
.anim-d3  { animation-delay:.16s; }
.anim-d4  { animation-delay:.22s; }
.anim-d5  { animation-delay:.28s; }
.anim-d6  { animation-delay:.34s; }
.anim-d7  { animation-delay:.40s; }
.anim-d8  { animation-delay:.46s; }

/* ── WELCOME BANNER ─────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(120deg, #1F4E79 0%, #2563a8 60%, #3b82c4 100%);
  border-radius: 16px;
  padding: 22px 28px;
  color: #fff;
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  box-shadow: 0 6px 24px rgba(31,78,121,.28);
  position: relative; overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute; top:-40px; right:-40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.welcome-banner::after {
  content: '';
  position: absolute; bottom:-50px; left:40%;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.wb-left  { position:relative; z-index:1; }
.wb-emoji { font-size: 1.8rem; margin-bottom: 4px; }
.wb-title { font-size: 1.15rem; font-weight: 700; }
.wb-sub   { font-size: .82rem; opacity:.82; margin-top:2px; }
.wb-right {
  position:relative; z-index:1;
  text-align:right;
  background:rgba(255,255,255,.12);
  border-radius:12px; padding:12px 18px;
  flex-shrink:0;
}
.wb-day   { font-size: 1.9rem; font-weight: 800; line-height:1; }
.wb-date  { font-size: .75rem; opacity:.85; margin-top:3px; }

/* ── STAT CARDS V2 — compact & couleurs douces ──────── */
.stat-card-v2 {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .22s, box-shadow .22s;
  position: relative;
  overflow: hidden;
}
.stat-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.10);
}
.stat-card-v2::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.stat-card-v2.sc-blue::before   { background: #3B82F6; }
.stat-card-v2.sc-green::before  { background: #10B981; }
.stat-card-v2.sc-orange::before { background: #F59E0B; }
.stat-card-v2.sc-purple::before { background: #8B5CF6; }
.stat-card-v2.sc-teal::before   { background: #06B6D4; }

.sc-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.sc-blue   .sc-icon { background: #DBEAFE; color: #2563EB; }
.sc-green  .sc-icon { background: #D1FAE5; color: #059669; }
.sc-orange .sc-icon { background: #FEF3C7; color: #D97706; }
.sc-purple .sc-icon { background: #EDE9FE; color: #7C3AED; }
.sc-teal   .sc-icon { background: #CFFAFE; color: #0891B2; }

.sc-body { flex: 1; min-width: 0; }
.sc-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: #1a202c;
  line-height: 1;
  letter-spacing: -.03em;
}
.sc-label {
  font-size: .74rem;
  color: #718096;
  margin-top: 3px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-trend {
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
  align-self: flex-start;
}
.sc-blue   .sc-trend { background:#DBEAFE; color:#2563EB; }
.sc-green  .sc-trend { background:#D1FAE5; color:#059669; }
.sc-orange .sc-trend { background:#FEF3C7; color:#D97706; }
.sc-purple .sc-trend { background:#EDE9FE; color:#7C3AED; }

.sc-header { display: none; } /* plus nécessaire dans ce layout */
.sc-bar { height:3px; background:#F1F5F9; border-radius:99px; margin-top:7px; }
.sc-bar-fill { height:100%; border-radius:99px; transition:width 1s .3s; }
.sc-blue   .sc-bar-fill { background:#3B82F6; }
.sc-green  .sc-bar-fill { background:#10B981; }
.sc-orange .sc-bar-fill { background:#F59E0B; }
.sc-purple .sc-bar-fill { background:#8B5CF6; }

/* ── USER PROFILE CARD ──────────────────────────────── */
.user-profile-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 20px rgba(31,78,121,.10);
  overflow: hidden;
  height: 100%;
  display: flex; flex-direction: column;
}
.upc-cover {
  height: 80px;
  background: linear-gradient(120deg,#1F4E79 0%,#2E75B6 60%,#90CAF9 100%);
  position: relative; flex-shrink:0;
}
.upc-cover-dots {
  position:absolute; inset:0;
  background-image: radial-gradient(rgba(255,255,255,.15) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
}
.upc-avatar-wrap {
  display:flex; justify-content:center;
  margin-top:-32px; position:relative; z-index:1;
}
.upc-avatar {
  width:68px; height:68px; border-radius:50%;
  border:4px solid #fff;
  object-fit:cover;
  background:var(--primary);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:1.65rem; font-weight:700;
  box-shadow:0 3px 14px rgba(0,0,0,.18);
  flex-shrink:0;
}
.upc-body {
  padding:10px 20px 20px;
  text-align:center; flex:1;
  display:flex; flex-direction:column;
}
.upc-name  { font-size:1rem; font-weight:700; color:#1a202c; }
.upc-sub   { font-size:.75rem; color:#718096; margin-top:2px; }
.upc-badge {
  display:inline-block; margin:8px auto 0;
  background:var(--primary-xlight); color:var(--primary);
  padding:3px 14px; border-radius:99px; font-size:.72rem; font-weight:700;
  letter-spacing:.02em;
}
.upc-divider { height:1px; background:#EDF2F7; margin:14px 0; }
.upc-meta { display:flex; gap:4px; }
.upc-meta-item {
  flex:1; padding:10px 6px; border-radius:10px;
  background:#F7FAFC; text-align:center;
}
.upc-meta-item .val { font-size:1rem; font-weight:700; color:var(--primary); }
.upc-meta-item .lbl { font-size:.65rem; color:#718096; margin-top:1px; }
.upc-footer { margin-top:auto; padding-top:14px; }
.upc-last-login { font-size:.72rem; color:#a0aec0; text-align:center; margin-bottom:10px; }

/* ── QUICK ACTIONS ──────────────────────────────────── */
.quick-actions { display:flex; flex-wrap:wrap; gap:10px; }
.qa-btn {
  flex:1; min-width:100px;
  display:flex; flex-direction:column; align-items:center; gap:7px;
  padding:14px 8px;
  border-radius:12px;
  background:#F7FAFC; border:1.5px solid #E2E8F0;
  text-decoration:none; color:var(--primary);
  font-size:.75rem; font-weight:600;
  transition:all .2s cubic-bezier(.4,0,.2,1);
  cursor:pointer;
}
.qa-btn:hover { background:var(--primary); color:#fff; border-color:var(--primary); transform:translateY(-3px); box-shadow:0 6px 18px rgba(31,78,121,.22); }
.qa-btn i { font-size:1.3rem; }

/* ── ALERT STOCK ITEMS ──────────────────────────────── */
.alert-stock-item {
  display:flex; align-items:center; gap:12px;
  padding:11px 16px; border-bottom:1px solid #EDF2F7;
  transition:background .15s;
}
.alert-stock-item:last-child { border-bottom:none; }
.alert-stock-item:hover { background:#FAFBFC; }
.asi-icon {
  width:34px; height:34px; border-radius:9px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:.9rem;
}
.asi-icon.empty { background:#FED7D7; color:#C53030; }
.asi-icon.low   { background:#FEFCBF; color:#744210; }
.asi-code { font-size:.73rem; color:#718096; }
.asi-name { font-size:.83rem; font-weight:600; color:#1a202c; }
.asi-stock{ margin-left:auto; }
.asi-progress { width:60px; height:5px; background:#EDF2F7; border-radius:99px; margin-top:4px; overflow:hidden; }
.asi-progress .p-fill { height:100%; border-radius:99px; }
.p-fill.danger  { background:#C53030; }
.p-fill.warning { background:#C05621; }

/* ── MOUVEMENT ROWS ─────────────────────────────────── */
.mvt-item {
  display:flex; align-items:center; gap:12px;
  padding:10px 16px; border-bottom:1px solid #EDF2F7; transition:background .15s;
}
.mvt-item:last-child { border-bottom:none; }
.mvt-item:hover { background:#F7FAFC; }
.mvt-icon {
  width:36px; height:36px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  font-size:.9rem; flex-shrink:0;
}
.mvt-icon.in  { background:#F0FFF4; color:#276749; }
.mvt-icon.out { background:#FFF5F5; color:#C53030; }
.mvt-art  { font-size:.83rem; font-weight:600; color:#1a202c; flex:1; }
.mvt-ref  { font-size:.72rem; color:#718096; }
.mvt-qty  { font-size:.85rem; font-weight:700; color:#1a202c; text-align:right; }
.mvt-date { font-size:.7rem; color:#a0aec0; text-align:right; }

/* ── SECTION HEADER ─────────────────────────────────── */
.section-header {
  display:flex; align-items:center; gap:8px;
  padding:14px 18px; border-bottom:1px solid #EDF2F7;
}
.section-header .sh-icon {
  width:30px; height:30px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  font-size:.85rem;
}
.section-header .sh-title { font-size:.92rem; font-weight:700; color:var(--primary); }
.section-header .sh-count { margin-left:auto; }
