/* MULTISHOP DESIGN SYSTEM — MultiShop Manager BF */
:root {
  --ms-primary: #1B4F72;
  --ms-primary-dark: #154060;
  --ms-primary-light: #E8F0F7;
  --ms-accent: #E67E22;
  --ms-accent-light: #FDF2E9;
  --ms-success: #1A7A4A;
  --ms-success-light: #E8F5EE;
  --ms-warning: #D68910;
  --ms-warning-light: #FEF9E7;
  --ms-danger: #C0392B;
  --ms-danger-light: #FEF2F2;
  --ms-info: #2471A3;
  --ms-info-light: #EAF2FB;
  --mod-stock: #1B4F72;
  --mod-restaurant: #D85A30;
  --mod-hotel: #7D3C98;
  --mod-credits: #BA7517;
  --mod-fac: #1A7A4A;
  --mod-prestations: #185FA5;
  --mod-production: #6B3A2A;
  --ms-gray-900: #111827;
  --ms-gray-800: #1F2937;
  --ms-gray-700: #374151;
  --ms-gray-600: #4B5563;
  --ms-gray-500: #6B7280;
  --ms-gray-400: #9CA3AF;
  --ms-gray-300: #D1D5DB;
  --ms-gray-200: #E5E7EB;
  --ms-gray-100: #F3F4F6;
  --ms-gray-50: #F9FAFB;
  --sidebar-width: 240px;
  --sidebar-width-icons: 56px;
  --topbar-height: 56px;
  --content-max-width: 1280px;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --transition: all .2s ease;
  --transition-sidebar: width .25s cubic-bezier(.4,0,.2,1);
  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--ms-gray-700);
  background: var(--ms-gray-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  margin: 0;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; }
::selection { background: var(--ms-primary-light); color: var(--ms-primary); }
.ms-layout { display: flex; min-height: 100vh; position: relative; }
.ms-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 39; }
.ms-overlay.active { display: block; }
.ms-sidebar {
  width: var(--sidebar-width); min-width: var(--sidebar-width); height: 100vh;
  position: fixed; top: 0; left: 0; background: var(--ms-primary);
  display: flex; flex-direction: column; overflow: hidden; z-index: 40;
  transition: var(--transition-sidebar), transform .25s ease;
}
.ms-sidebar.icons-only { width: var(--sidebar-width-icons); min-width: var(--sidebar-width-icons); }
.ms-sidebar.closed { transform: translateX(-100%); }
.sb-header {
  display: flex; align-items: center; gap: 10px; padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.1); min-height: var(--topbar-height); flex-shrink: 0;
}
.sb-logo {
  width: 32px; height: 32px; border-radius: var(--radius); background: var(--ms-accent);
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sb-brand-name { font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; transition: opacity .2s, width .2s; line-height: 1.2; }
.sb-brand-sub { font-size: 10px; color: rgba(255,255,255,.5); white-space: nowrap; overflow: hidden; transition: opacity .2s; }
.ms-sidebar.icons-only .sb-brand-name, .ms-sidebar.icons-only .sb-brand-sub { opacity: 0; width: 0; }
.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent; }
.sb-nav::-webkit-scrollbar { width: 3px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }
.sb-section { padding: 2px 0; }
.sb-section-label {
  font-size: 10px; font-weight: 600; color: rgba(255,255,255,.35); text-transform: uppercase;
  letter-spacing: .08em; padding: 10px 16px 4px; white-space: nowrap; overflow: hidden; transition: opacity .2s;
}
.ms-sidebar.icons-only .sb-section-label { opacity: 0; height: 0; padding: 0; }
.sb-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 16px; color: rgba(255,255,255,.7);
  border-left: 3px solid transparent; transition: var(--transition); cursor: pointer; min-height: 42px;
  position: relative; text-decoration: none; white-space: nowrap; overflow: hidden;
}
.sb-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.sb-item.active { background: rgba(255,255,255,.12); color: #fff; border-left-color: var(--ms-accent); }
.sb-item i { font-size: 18px; width: 20px; text-align: center; flex-shrink: 0; }
.sb-item-label { font-size: 13px; transition: opacity .2s, width .2s; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ms-sidebar.icons-only .sb-item-label { opacity: 0; width: 0; }
.sb-badge { background: var(--ms-accent); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; flex-shrink: 0; transition: opacity .2s; }
.ms-sidebar.icons-only .sb-badge { opacity: 0; width: 0; }
.sb-item .sb-tooltip {
  display: none; position: absolute; left: calc(var(--sidebar-width-icons) + 6px); top: 50%;
  transform: translateY(-50%); background: var(--ms-gray-900); color: #fff; font-size: 12px;
  padding: 5px 10px; border-radius: var(--radius); white-space: nowrap; z-index: 100; pointer-events: none; box-shadow: var(--shadow-md);
}
.ms-sidebar.icons-only .sb-item:hover .sb-tooltip { display: block; }
.sb-sep { height: 1px; background: rgba(255,255,255,.08); margin: 6px 0; }
.sb-footer { padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.sb-pdv-pill {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius);
  background: rgba(255,255,255,.07); cursor: pointer; transition: var(--transition);
}
.sb-pdv-pill:hover { background: rgba(255,255,255,.12); }
.sb-pdv-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.sb-pdv-info { overflow: hidden; transition: opacity .2s, width .2s; }
.sb-pdv-name { font-size: 12px; color: #fff; font-weight: 500; white-space: nowrap; }
.sb-pdv-ville { font-size: 10px; color: rgba(255,255,255,.5); white-space: nowrap; }
.ms-sidebar.icons-only .sb-pdv-info { opacity: 0; width: 0; }
.ms-topbar {
  height: var(--topbar-height); background: #fff; border-bottom: 1px solid var(--ms-gray-200);
  display: flex; align-items: center; gap: 10px; padding: 0 16px; position: sticky; top: 0; z-index: 30; box-shadow: var(--shadow-sm);
}
.tb-toggle-btn {
  width: 36px; height: 36px; border-radius: var(--radius); border: 1px solid var(--ms-gray-200);
  background: transparent; display: flex; align-items: center; justify-content: center; color: var(--ms-gray-500); flex-shrink: 0; transition: var(--transition);
}
.tb-toggle-btn:hover { background: var(--ms-gray-100); color: var(--ms-gray-700); }
.tb-breadcrumb { font-size: 13px; color: var(--ms-gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.tb-breadcrumb .current { color: var(--ms-gray-900); font-weight: 500; }
.tb-breadcrumb .sep { margin: 0 6px; color: var(--ms-gray-300); }
.tb-search-btn {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--radius);
  border: 1px solid var(--ms-gray-200); background: var(--ms-gray-50); color: var(--ms-gray-500); font-size: 13px; cursor: pointer; white-space: nowrap; transition: var(--transition);
}
.tb-search-btn:hover { border-color: var(--ms-primary); color: var(--ms-primary); }
@media (max-width: 480px) { .tb-search-btn span { display: none; } }
.tb-spacer { flex: 1; }
.tb-icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius); border: 1px solid var(--ms-gray-200); background: #fff;
  display: flex; align-items: center; justify-content: center; color: var(--ms-gray-500); cursor: pointer; position: relative; flex-shrink: 0; transition: var(--transition);
}
.tb-icon-btn:hover { background: var(--ms-gray-50); color: var(--ms-gray-700); }
.tb-notif-badge { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--ms-danger); border: 2px solid #fff; }
.tb-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--ms-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0; transition: var(--transition); border: none;
}
.tb-avatar:hover { opacity: .85; }
.tb-module-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.ms-wrapper { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; min-width: 0; transition: margin-left var(--transition-sidebar); }
.ms-wrapper.sidebar-icons { margin-left: var(--sidebar-width-icons); }
.ms-wrapper.sidebar-closed { margin-left: 0; }
.ms-content { flex: 1; padding: 20px; max-width: 100%; overflow-x: hidden; background: var(--ms-gray-50); }
@media (min-width: 1024px) { .ms-content { padding: 24px 28px; } }
@media (max-width: 599px) { .ms-content { padding: 12px; } }
.ms-page-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.ms-page-title { font-size: var(--text-xl); font-weight: 700; color: var(--ms-gray-900); line-height: 1.2; margin: 0; }
.ms-page-subtitle { font-size: var(--text-sm); color: var(--ms-gray-500); margin-top: 3px; }
.ms-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 16px;
  border-radius: var(--radius); border: 1px solid transparent; font-size: var(--text-base); font-weight: 500;
  font-family: inherit; cursor: pointer; transition: var(--transition); white-space: nowrap; min-height: 36px; line-height: 1; text-decoration: none;
}
.btn i { font-size: 16px; }
.btn-primary { background: var(--ms-primary); color: #fff; border-color: var(--ms-primary); }
.btn-primary:hover { background: var(--ms-primary-dark); }
.btn-accent { background: var(--ms-accent); color: #fff; border-color: var(--ms-accent); }
.btn-outline { background: #fff; color: var(--ms-gray-700); border-color: var(--ms-gray-300); }
.btn-outline:hover { background: var(--ms-gray-50); }
.btn-sm { padding: 5px 10px; font-size: var(--text-sm); min-height: 30px; }
.btn-full { width: 100%; }
.card { background: #fff; border: 1px solid var(--ms-gray-200); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.card-body { padding: 16px; }
.stat-card { background: #fff; border: 1px solid var(--ms-gray-200); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.stat-card .stat-value { font-size: 24px; font-weight: 700; color: var(--ms-gray-900); }
.stat-card .stat-label { font-size: var(--text-xs); color: var(--ms-gray-500); text-transform: uppercase; letter-spacing: .04em; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius); font-size: 13px; }
.alert-success { background: var(--ms-success-light); color: var(--ms-success); border: 1px solid rgba(26,122,74,.2); }
.alert-warning { background: var(--ms-warning-light); color: var(--ms-warning); border: 1px solid rgba(214,137,16,.2); }
.alert-danger { background: var(--ms-danger-light); color: var(--ms-danger); border: 1px solid rgba(192,57,43,.2); }
.alert-info { background: var(--ms-info-light); color: var(--ms-info); border: 1px solid rgba(36,113,163,.2); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: var(--text-xs); font-weight: 600; }
.badge-success { background: var(--ms-success-light); color: var(--ms-success); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
@media (min-width: 1024px) { .ms-sidebar { transform: none !important; } .ms-overlay { display: none !important; } }
@media (min-width: 600px) and (max-width: 1023px) {
  .ms-sidebar { width: var(--sidebar-width-icons); }
  .ms-sidebar.expanded { width: var(--sidebar-width); }
  .ms-wrapper { margin-left: var(--sidebar-width-icons); }
  .ms-wrapper.sidebar-expanded { margin-left: var(--sidebar-width); }
}
@media (max-width: 599px) {
  .ms-sidebar { transform: translateX(-100%); width: var(--sidebar-width); }
  .ms-sidebar.open { transform: translateX(0); }
  .ms-wrapper { margin-left: 0 !important; }
}
.mod-stock .sb-item.active { border-left-color: var(--mod-stock); }
.mod-restaurant .sb-item.active { border-left-color: var(--mod-restaurant); }
.mod-hotel .sb-item.active { border-left-color: var(--mod-hotel); }
.mod-dashboard .sb-item.active { border-left-color: var(--ms-accent); }
@media print { .ms-sidebar, .ms-topbar { display: none !important; } .ms-wrapper { margin-left: 0 !important; } }
