/* ============================================================================
   reports-advanced-v1.css — v1.0.0
   Styles for the "Rapports avancés" injector (reports-advanced-v1.js).
   Everything is scoped under .advrep-root, except the single rule that hides
   the old React /reports page while the takeover is active.
   Palette: bg #f6f7fb · card #fff · text #0f172a · muted #64748b ·
   accent #e65100 · positive #16a34a · negative #dc2626.
   ============================================================================ */

/* hide ONLY the React page node while the advanced reports UI is mounted */
html.advrep-on .main-content > .page { display: none !important; }

.advrep-root {
  position: relative;
  padding: 18px 22px 60px;
  max-width: 1440px;
  margin: 0 auto;
  color: #0f172a;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  box-sizing: border-box;
}
.advrep-root *, .advrep-root *::before, .advrep-root *::after { box-sizing: border-box; }
.advrep-root button { font-family: inherit; }

/* ------------------------------------------------------------------ header */
.advrep-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.advrep-titles h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.advrep-titles p { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.advrep-range { color: #e65100; font-weight: 600; }

.advrep-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.advrep-chip {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.advrep-chip:hover { border-color: #e65100; color: #e65100; }
.advrep-chip.on {
  background: #e65100;
  border-color: #e65100;
  color: #fff;
  box-shadow: 0 4px 12px rgba(230, 81, 0, .25);
}
.advrep-dates { display: inline-flex; align-items: center; gap: 6px; }
.advrep-dates .sep { color: #94a3b8; font-size: 12px; }
.advrep-in {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 13px;
  font-family: inherit;
}
.advrep-in:focus { outline: none; border-color: #e65100; }
.advrep-apply {
  border: 0;
  background: #0f172a;
  color: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.advrep-apply:hover { background: #1e293b; }

/* -------------------------------------------------------------------- tabs */
.advrep-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 14px;
  padding: 5px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
  margin-bottom: 18px;
  width: fit-content;
  max-width: 100%;
}
.advrep-tab {
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.advrep-tab:hover { color: #0f172a; background: #f6f7fb; }
.advrep-tab.on {
  background: #e65100;
  color: #fff;
  box-shadow: 0 4px 12px rgba(230, 81, 0, .28);
}

/* -------------------------------------------------------------------- body */
.advrep-body { display: flex; flex-direction: column; gap: 16px; }

.advrep-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
  padding: 18px 20px;
}
.advrep-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.advrep-card-sub { color: #64748b; font-size: 12.5px; margin-top: 3px; }
.advrep-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.advrep-card-head.bare { margin-bottom: 0; align-items: center; }
.advrep-card-head.bare .advrep-card-title { font-size: 17px; }
.advrep-count {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: 2px;
}
.advrep-tag {
  display: inline-block;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: 2px;
}
.advrep-subtitle {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #94a3b8;
  margin: 12px 0 8px;
}
.advrep-foot {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 11.5px;
}

/* --------------------------------------------------------------- KPI tiles */
.advrep-grid-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.advrep-kpi {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
  padding: 15px 17px;
  min-width: 0;      /* grid blowout guard */
  overflow: hidden;
}
.advrep-kpi-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.advrep-kpi-value {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}
.advrep-kpi-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  min-height: 18px;
}
.advrep-kpi-sub { color: #94a3b8; font-size: 11.5px; }

.advrep-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.advrep-badge.up { background: #dcfce7; color: #16a34a; }
.advrep-badge.down { background: #fee2e2; color: #dc2626; }
.advrep-badge.flat { background: #f1f5f9; color: #94a3b8; }

/* ------------------------------------------------------------------ charts */
.advrep-chart { margin-top: 6px; }
.advrep-svg { width: 100%; height: auto; display: block; }
.advrep-gl { stroke: #eef2f7; stroke-width: 1; }
.advrep-ax { fill: #94a3b8; font-size: 11px; font-family: inherit; }
.advrep-dot { fill: #fff; stroke: #e65100; stroke-width: 2; }
.advrep-spark { width: 110px; height: 30px; display: block; }
.advrep-nospark { color: #cbd5e1; }

.advrep-gran {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  flex: none;
}
.advrep-gbtn {
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.advrep-gbtn.on { background: #fff; color: #e65100; box-shadow: 0 2px 6px rgba(15, 23, 42, .08); }

/* tooltip */
.advrep-tip {
  position: absolute;
  z-index: 50;
  pointer-events: none;
  background: #0f172a;
  color: #fff;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: pre-line;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .25);
  max-width: 260px;
}
.advrep-tip[hidden] { display: none; }

/* --------------------------------------------------- expenses tab specifics */
.advrep-root .advrep-hotdot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #dc2626;
  margin-right: 5px;
  vertical-align: baseline;
}
.advrep-root .advrep-podium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 12px 0 14px;
}
.advrep-root .advrep-pod {
  position: relative;
  border-radius: 14px;
  padding: 15px 16px 13px;
  min-width: 0;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.advrep-root .advrep-pod.p1 { background: #fff7ed; border-color: #fed7aa; }
.advrep-root .advrep-pod.p2 { background: #f8fafc; border-color: #e2e8f0; }
.advrep-root .advrep-pod.p3 { background: #fefce8; border-color: #fde68a; }
.advrep-root .advrep-pod-rank {
  position: absolute;
  top: 10px; right: 12px;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
  background: #94a3b8;
}
.advrep-root .advrep-pod.p1 .advrep-pod-rank { background: #e65100; }
.advrep-root .advrep-pod.p3 .advrep-pod-rank { background: #d97706; }
.advrep-root .advrep-pod-amt {
  font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-right: 30px;
}
.advrep-root .advrep-pod-who {
  margin-top: 3px; font-weight: 700; font-size: 13.5px; color: #334155;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.advrep-root .advrep-pod-sub { margin-top: 2px; color: #94a3b8; font-size: 11.5px; }

.advrep-root .advrep-anoms { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.advrep-root .advrep-anom {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.advrep-root .advrep-anom.high { background: #fef2f2; border-color: #fecaca; }
.advrep-root .advrep-anom.medium { background: #fffbeb; border-color: #fde68a; }
.advrep-root .advrep-anom-sev {
  flex: none;
  margin-top: 1px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: #e2e8f0; color: #475569;
}
.advrep-root .advrep-anom.high .advrep-anom-sev { background: #dc2626; color: #fff; }
.advrep-root .advrep-anom.medium .advrep-anom-sev { background: #d97706; color: #fff; }
.advrep-root .advrep-anom .m { flex: 1; min-width: 0; }
.advrep-root .advrep-anom .n { font-weight: 800; font-size: 13.5px; color: #0f172a; }
.advrep-root .advrep-anom .s { color: #64748b; font-size: 12.5px; margin-top: 2px; }

/* --------------------------------------------------------------- mix cards */
.advrep-mixrow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.advrep-mixbody {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}
.advrep-donutwrap { flex: none; width: 130px; }
.advrep-donutsvg { width: 130px; height: 130px; display: block; }
.advrep-donut-v { fill: #0f172a; font-size: 19px; font-weight: 800; font-family: inherit; }
.advrep-donut-l { fill: #94a3b8; font-size: 11px; font-weight: 600; font-family: inherit; }
.advrep-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.advrep-lg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.advrep-lg-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.advrep-lg-l {
  color: #0f172a; font-weight: 600; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.advrep-lg-r { color: #64748b; white-space: nowrap; font-variant-numeric: tabular-nums; }

.advrep-hbars { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.advrep-hbar { cursor: default; }
.advrep-hbar-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  margin-bottom: 4px;
}
.advrep-hbar-top span:first-child {
  font-weight: 600; color: #0f172a; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.advrep-hbar-top span:last-child { color: #64748b; white-space: nowrap; font-variant-numeric: tabular-nums; }
.advrep-hbar-track { height: 8px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.advrep-hbar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e65100, #ff8a3d);
}

/* ------------------------------------------------------------------ tables */
.advrep-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.advrep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 10px;
  min-width: 640px;
}
.advrep-table th {
  text-align: left;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
  white-space: nowrap;
}
.advrep-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #f5f7fa;
  vertical-align: middle;
}
.advrep-table tr:last-child td { border-bottom: 0; }
.advrep-table tr:hover td { background: #fafbfd; }
.advrep-table th.num, .advrep-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.advrep-table td.strong { font-weight: 700; color: #0f172a; }
.advrep-table td.mut { color: #64748b; }

/* ----------------------------------------------------------- 2-col layouts */
.advrep-cols2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.advrep-cols2.tight { gap: 20px; margin-top: 12px; }

/* generic small lists */
.advrep-list { display: flex; flex-direction: column; }
.advrep-li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 2px;
  border-bottom: 1px solid #f5f7fa;
  font-size: 13px;
}
.advrep-li:last-child { border-bottom: 0; }
.advrep-li .n {
  font-weight: 600; color: #0f172a; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.advrep-li .n em { font-style: normal; color: #94a3b8; font-weight: 500; font-size: 11.5px; }
.advrep-li b { color: #475569; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------- trends specific */
.advrep-bucketrow {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 2px 6px;
  -webkit-overflow-scrolling: touch;
}
.advrep-bucket {
  flex: 0 0 220px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 13px 14px;
}
.advrep-bucket-label { font-weight: 800; font-size: 13px; color: #0f172a; }
.advrep-bucket-sub { color: #64748b; font-size: 11.5px; margin: 3px 0 8px; }
.advrep-bucket ol { margin: 0; padding: 0 0 0 18px; }
.advrep-bucket li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  padding: 3px 0;
  list-style-position: outside;
}
.advrep-bucket li span {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #334155; font-weight: 600;
}
.advrep-bucket li b { color: #e65100; font-variant-numeric: tabular-nums; }
.advrep-bucket li.none { color: #94a3b8; list-style: none; }

.advrep-moves { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.advrep-move {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
}
.advrep-move .n {
  flex: 1; min-width: 0; font-weight: 700; color: #0f172a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.advrep-move .q { color: #64748b; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12px; }

/* ----------------------------------------------------- availability styles */
.advrep-banner {
  background: linear-gradient(90deg, #fff7ed, #fffbf5);
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 13px;
}
.advrep-banner b { color: #7c2d12; }
.advrep-okline {
  margin-top: 10px;
  background: #f0fdf4;
  color: #16a34a;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 13px;
}
.advrep-offlist, .advrep-timeline { display: flex; flex-direction: column; margin-top: 10px; }
.advrep-offitem, .advrep-ev {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 2px;
  border-bottom: 1px solid #f5f7fa;
}
.advrep-offitem:last-child, .advrep-ev:last-child { border-bottom: 0; }
.advrep-dotb { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.advrep-dotb.off { background: #dc2626; box-shadow: 0 0 0 3px #fee2e2; }
.advrep-dotb.on { background: #16a34a; box-shadow: 0 0 0 3px #dcfce7; }
.advrep-offitem .m, .advrep-ev .m { flex: 1; min-width: 0; }
.advrep-offitem .n, .advrep-ev .n {
  font-weight: 700; font-size: 13px; color: #0f172a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.advrep-offitem .s, .advrep-ev .s { color: #94a3b8; font-size: 11.5px; margin-top: 1px; }
.advrep-offitem .hh { font-weight: 800; color: #dc2626; white-space: nowrap; font-variant-numeric: tabular-nums; }
.advrep-ev .d { color: #94a3b8; font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.advrep-state {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 800;
}
.advrep-state.on { background: #dcfce7; color: #16a34a; }
.advrep-state.off { background: #fee2e2; color: #dc2626; }

/* ----------------------------------------------------------------- heatmap */
.advrep-heat {
  display: grid;
  grid-template-columns: 44px repeat(24, minmax(22px, 1fr));
  gap: 3px;
  min-width: 680px;
  margin-top: 12px;
}
.advrep-heat-corner {}
.advrep-heat-h {
  text-align: center;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  align-self: end;
  padding-bottom: 2px;
}
.advrep-heat-d {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
}
.advrep-heat-c { aspect-ratio: 1 / 1; border-radius: 4px; min-height: 18px; }
.advrep-heat-c.off { background: #f1f5f9; }

/* ------------------------------------------------------------------- pairs */
.advrep-pairs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.advrep-pair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}
.advrep-pair i { font-style: normal; color: #e65100; font-weight: 800; }
.advrep-pair b {
  background: #e65100;
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ stock orders */
.advrep-stock-kpis { display: flex; gap: 28px; margin-top: 12px; }
.advrep-stock-kpis > div { display: flex; align-items: baseline; gap: 7px; }
.advrep-stock-kpis b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.advrep-stock-kpis span { color: #64748b; font-size: 12.5px; }

/* ----------------------------------------------------------------- servers */
.advrep-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  background: #0f172a;
  border-radius: 16px;
  padding: 16px 20px;
  color: #fff;
}
.advrep-strip .cell { min-width: 0; overflow: hidden; } /* grid blowout guard */
.advrep-strip .cell span {
  display: block;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.advrep-strip .cell b {
  display: block;
  font-size: 20px;
  font-weight: 800;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.advrep-strip .cell.best b { color: #ff8a3d; }
.advrep-strip .cell i { display: block; font-style: normal; color: #cbd5e1; font-size: 12px; margin-top: 2px; }

.advrep-srv-grid {
  display: grid;
  /* 360px min => at most 3 wide cards per row on a 1440px page, so the stat
     values always have room inside their boxes */
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}
.advrep-srv {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
}
.advrep-srv.qr { background: #f8fafc; border: 1px dashed #cbd5e1; box-shadow: none; }
.advrep-srv-top { display: flex; align-items: center; gap: 11px; }
.advrep-ava {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e65100, #ff8a3d);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.advrep-ava.qr { background: linear-gradient(135deg, #334155, #64748b); }
.advrep-srv-id { flex: 1; min-width: 0; }
.advrep-srv-name {
  font-weight: 800; font-size: 15px; color: #0f172a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.advrep-role {
  display: inline-block;
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 3px;
  background: #f1f5f9;
  color: #64748b;
}
.advrep-role.r-server { background: #eff6ff; color: #2563eb; }
.advrep-role.r-caissier { background: #f0fdf4; color: #16a34a; }
.advrep-role.r-admin, .advrep-role.r-patron { background: #fff7ed; color: #e65100; }
.advrep-role.r-chef, .advrep-role.r-cuisinier { background: #faf5ff; color: #9333ea; }
.advrep-srv-share {
  background: #fff7ed;
  color: #e65100;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.advrep-srv-stats {
  display: grid;
  /* 2 boxes per row: money values like "2 971,59 DH" can't wrap (non-breaking
     spaces), so give each box half the card — they always fit */
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.advrep-srv-stats.two { grid-template-columns: repeat(2, 1fr); }
.advrep-srv-stats .st {
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 0; /* grid blowout guard: never grow wider than the track */
}
.advrep-srv-stats .st span {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.advrep-srv-stats .st b {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.advrep-srv-chart { margin-top: 12px; }
.advrep-srv-best { color: #64748b; font-size: 12px; margin-top: 8px; }
.advrep-srv-best b { color: #0f172a; }

/* ------------------------------------------- empty / error / skeleton bits */
.advrep-empty {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
  padding: 52px 20px;
  text-align: center;
}
.advrep-empty.small {
  background: transparent;
  box-shadow: none;
  padding: 18px 8px;
  color: #94a3b8;
  font-size: 13px;
}
.advrep-empty-ico {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #f1f5f9;
  position: relative;
}
.advrep-empty-ico::after {
  content: '';
  position: absolute;
  inset: 15px;
  border: 2.5px solid #cbd5e1;
  border-radius: 4px;
  border-bottom-width: 6px;
}
.advrep-empty-t { font-weight: 800; font-size: 15px; color: #334155; }
.advrep-empty-s { color: #94a3b8; font-size: 12.5px; margin-top: 4px; }
.advrep-error {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
  padding: 46px 20px;
  text-align: center;
}
.advrep-retry {
  margin-top: 14px;
  border: 0;
  background: #e65100;
  color: #fff;
  border-radius: 10px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.advrep-retry:hover { background: #cf4a00; }

.advrep-skel {
  border-radius: 16px;
  background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 50%, #eef1f6 75%);
  background-size: 200% 100%;
  animation: advrep-shimmer 1.3s ease-in-out infinite;
}
.advrep-skel.tile { height: 104px; }
.advrep-skel.block { height: 320px; }
.advrep-skel.half { height: 230px; }
@keyframes advrep-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .advrep-srv-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .advrep-root { padding: 14px 12px 60px; }
  .advrep-titles h1 { font-size: 20px; }
  .advrep-head { align-items: stretch; flex-direction: column; }
  .advrep-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .advrep-tab { padding: 9px 12px; font-size: 12.5px; }
  .advrep-grid-kpi { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .advrep-kpi-value { font-size: 19px; }
  .advrep-mixrow, .advrep-cols2, .advrep-srv-grid { grid-template-columns: 1fr; }
  .advrep-mixbody { flex-direction: column; align-items: stretch; }
  .advrep-donutwrap { margin: 0 auto; }
  .advrep-card { padding: 15px 14px; }
  .advrep-strip { grid-template-columns: 1fr 1fr; }
  .advrep-dates { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .advrep-strip { grid-template-columns: 1fr; }
  .advrep-srv-stats { grid-template-columns: repeat(2, 1fr); }
}
