/* Aïcha Market — espaces de gestion (propriétaire et développeur) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');
:root {
  --vert-foret: #063a14; --vert-marche: #167c1d; --vert-pousse: #5fa30a; --vert-clair: #e8f3e1;
  --orange: #f8850a; --orange-texte: #b45309; --orange-clair: #fff1df; --jaune: #fdb813;
  --creme: #fcf7e8; --gris: #4f5e52; --bordure: #e6dfcb; --bordure-champ: #7d8a80;
  --erreur: #b42318; --erreur-clair: #fdecea; --bleu: #124f82; --bleu-clair: #e3f0fb;
  --side: #063a14; --side-hover: #0d4a1e; --side-active: #167c1d;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.area-dev { --side: #10231a; --side-hover: #1b3528; --side-active: #2b5a40; }
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.55; color: var(--vert-foret); background: #f5f3ec; }
a { color: var(--vert-marche); text-decoration: none; }
a:hover { color: var(--vert-foret); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
code { background: var(--creme); padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--vert-foret); outline-offset: 2px; }
.muted { color: var(--gris); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ic { flex-shrink: 0; }

/* Mise en page */
.layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: #dbe7dc; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-logo { padding: 20px 20px 14px; display: flex; align-items: center; gap: 10px; }
.side-logo img { height: 44px; width: auto; }
.side-logo span { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--jaune); font-weight: 600; line-height: 1.3; }
.side nav { padding: 6px 12px 16px; flex: 1; }
.side .grp { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: #8fb397; margin: 16px 10px 6px; font-weight: 600; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); color: #e3ede4; font-weight: 500; font-size: 13.5px; }
.side nav a:hover { background: var(--side-hover); color: #fff; }
.side nav a.active { background: var(--side-active); color: #fff; }
.side nav a .pill { margin-left: auto; background: var(--orange); color: var(--vert-foret); font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; min-width: 20px; text-align: center; }
.side-foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }
.side-foot b { color: #fff; display: block; }
.side-foot a { color: #c6dcc9; display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; margin-right: 12px; }
.side-foot a:hover { color: var(--jaune); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--bordure); padding: 12px 28px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 20; }
.topbar h1 { margin: 0; font-size: 19px; flex: 1; }
.topbar .tb-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.burger { display: none; background: none; border: 0; cursor: pointer; color: var(--vert-foret); padding: 4px; }
.content { padding: 24px 28px 48px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 16px; border-radius: var(--r-md); border: 1.5px solid var(--vert-marche); background: #fff; color: var(--vert-marche); font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--vert-clair); color: var(--vert-foret); }
.btn-primary { background: var(--vert-marche); color: #fff; }
.btn-primary:hover { background: var(--vert-foret); border-color: var(--vert-foret); color: #fff; }
.btn-promo { background: var(--orange); border-color: var(--orange); color: var(--vert-foret); }
.btn-danger { border-color: var(--erreur); color: var(--erreur); }
.btn-danger:hover { background: var(--erreur-clair); color: var(--erreur); }
.btn-ghost { border-color: transparent; color: var(--vert-foret); }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { min-height: 48px; font-size: 15px; padding: 10px 22px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--bordure); background: #fff; color: var(--vert-foret); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--vert-marche); color: var(--vert-marche); }

/* Cartes, grilles */
.card { background: #fff; border: 1px solid var(--bordure); border-radius: var(--r-lg); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kpi { background: #fff; border: 1px solid var(--bordure); border-radius: var(--r-lg); padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .k { font-size: 12px; color: var(--gris); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 24px; font-weight: 700; margin-top: 4px; line-height: 1.2; }
.kpi .d { font-size: 12px; margin-top: 4px; }
.kpi .up { color: var(--vert-marche); font-weight: 600; }
.kpi .down { color: var(--erreur); font-weight: 600; }
.kpi.accent { background: var(--vert-foret); color: #fff; border-color: var(--vert-foret); }
.kpi.accent .k, .kpi.accent .d { color: #c6dcc9; }
.kpi.warn { background: var(--orange-clair); border-color: #f6dcb8; }
.kpi .ico { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 10px; background: var(--vert-clair); color: var(--vert-marche); display: grid; place-items: center; }
.kpi.accent .ico { background: rgba(255,255,255,.1); color: var(--jaune); }
.kpi.warn .ico { background: #fff; color: var(--orange-texte); }

/* Tableaux */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--gris); font-weight: 600; padding: 10px; border-bottom: 1.5px solid var(--bordure); white-space: nowrap; }
.t td { padding: 10px; border-bottom: 1px solid #f1ede2; vertical-align: middle; }
.t tr:hover td { background: #fcfbf6; }
.t .thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--creme); object-fit: contain; display: block; }
.t .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.t tfoot td { font-weight: 700; border-top: 1.5px solid var(--bordure); border-bottom: 0; }
.row-link { color: inherit; font-weight: 600; }
.empty-row { text-align: center; color: var(--gris); padding: 32px !important; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.b-green { background: var(--vert-clair); color: var(--vert-marche); }
.b-orange { background: var(--orange-clair); color: var(--orange-texte); }
.b-yellow { background: var(--jaune); color: var(--vert-foret); }
.b-red { background: var(--erreur-clair); color: var(--erreur); }
.b-blue { background: var(--bleu-clair); color: var(--bleu); }
.b-grey { background: #eeeae0; color: var(--gris); }
.b-dark { background: var(--vert-foret); color: #fff; }
.st-nouvelle { background: var(--jaune); color: var(--vert-foret); }
.st-confirmee { background: var(--orange-clair); color: var(--orange-texte); }
.st-preparation { background: #fde8c8; color: #8a4a06; }
.st-en_livraison { background: var(--bleu-clair); color: var(--bleu); }
.st-livree { background: var(--vert-clair); color: var(--vert-marche); }
.st-annulee { background: var(--erreur-clair); color: var(--erreur); }

/* Formulaires */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: block; font-size: 13px; font-weight: 500; }
label > input, label > select, label > textarea { margin-top: 5px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search], input[type=date], input[type=datetime-local], input[type=time], input[type=month], input[type=url], select, textarea { width: 100%; min-height: 40px; padding: 8px 12px; border: 1.5px solid var(--bordure-champ); border-radius: var(--r-sm); background: #fff; font: inherit; color: var(--vert-foret); }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--vert-marche); box-shadow: 0 0 0 3px rgba(22,124,29,.15); }
.hint { font-size: 12px; color: var(--gris); font-weight: 400; margin-top: 3px; display: block; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--vert-marche); margin: 0; }
fieldset { border: 1px solid var(--bordure); border-radius: var(--r-lg); padding: 16px 18px; margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0 6px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters > * { flex: 0 0 auto; }
.filters input[type=search] { width: 240px; }
.filters select, .filters input { min-height: 38px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--bordure); }
.tabs a { padding: 9px 14px; color: var(--gris); font-weight: 600; font-size: 13px; border-bottom: 2.5px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.active { color: var(--vert-marche); border-bottom-color: var(--vert-marche); }
.tabs a .n { background: #eeeae0; color: var(--gris); font-size: 11px; border-radius: 99px; padding: 0 7px; }
.tabs a.active .n { background: var(--vert-clair); color: var(--vert-marche); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.img-preview { width: 160px; height: 160px; border-radius: var(--r-lg); background: var(--creme); border: 1.5px dashed var(--bordure-champ); display: grid; place-items: center; overflow: hidden; }
.img-preview img { width: 100%; height: 100%; object-fit: contain; }

/* Alertes */
.alert { padding: 11px 14px; border-radius: var(--r-md); margin-bottom: 14px; font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.alert-success { background: var(--vert-clair); color: var(--vert-foret); }
.alert-error { background: var(--erreur-clair); color: var(--erreur); }
.alert-info { background: #fff; border: 1px solid var(--bordure); }
.alert-warning { background: var(--orange-clair); color: var(--orange-texte); }

/* Graphique en barres */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 20px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; position: relative; }
.chart .bar i { display: block; width: 100%; max-width: 34px; background: var(--vert-marche); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.chart .bar.today i { background: var(--orange); }
.chart .bar span { font-size: 10.5px; color: var(--gris); margin-top: 6px; white-space: nowrap; }
.chart .bar:hover::after { content: attr(data-v); position: absolute; bottom: calc(100% - 10px); background: var(--vert-foret); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.hbar { display: grid; grid-template-columns: 140px 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.hbar .track { height: 10px; background: #f1ede2; border-radius: 99px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--vert-marche); border-radius: 99px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid #f1ede2; }
.list li:last-child { border: 0; }
.list .grow { flex: 1; min-width: 0; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; margin: 0; }
.dl dt { color: var(--gris); }
.dl dd { margin: 0; font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 0 0 12px 18px; border-left: 2px solid var(--bordure); position: relative; margin-left: 6px; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--vert-marche); border: 2px solid #fff; }
.timeline small { color: var(--gris); display: block; }
.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center; background: #fff; border: 1px solid var(--bordure); color: var(--vert-foret); font-weight: 600; font-size: 13px; }
.pagination .current { background: var(--vert-marche); color: #fff; border-color: var(--vert-marche); }
.pagination .dots { border: 0; background: none; }

/* Caisse */
.pos { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.pos-search { position: relative; }
.pos-search input { min-height: 52px; font-size: 16px; padding-left: 44px; }
.pos-search .ic { position: absolute; left: 14px; top: 16px; color: var(--gris); }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; max-height: calc(100vh - 260px); overflow-y: auto; padding: 2px; }
.pos-item { background: #fff; border: 1px solid var(--bordure); border-radius: var(--r-md); padding: 8px; text-align: left; cursor: pointer; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 4px; }
.pos-item:hover { border-color: var(--vert-marche); box-shadow: 0 4px 14px rgba(6,58,20,.1); }
.pos-item img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--creme); border-radius: 8px; }
.pos-item b { font-size: 12.5px; line-height: 1.3; }
.pos-item span { font-size: 12px; color: var(--vert-marche); font-weight: 700; }
.pos-item small { font-size: 11px; color: var(--gris); }
.pos-item[disabled] { opacity: .45; cursor: not-allowed; }
.ticket { position: sticky; top: 76px; }
.tline { display: grid; grid-template-columns: 1fr auto auto 28px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f1ede2; font-size: 13px; }
.tline .q { display: inline-flex; align-items: center; border: 1px solid var(--bordure-champ); border-radius: 6px; }
.tline .q button { width: 26px; height: 28px; border: 0; background: none; cursor: pointer; font-weight: 700; color: var(--vert-foret); }
.tline .q span { min-width: 24px; text-align: center; font-weight: 600; }
.tline .x { border: 0; background: none; color: var(--gris); cursor: pointer; }
.ticket-total { font-size: 26px; font-weight: 700; display: flex; justify-content: space-between; padding: 12px 0; }
.rendu { background: var(--vert-clair); border-radius: var(--r-md); padding: 10px 12px; display: flex; justify-content: space-between; font-weight: 600; margin: 10px 0; }
.pay-modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0; }
.pay-modes label { border: 1.5px solid var(--bordure); border-radius: 8px; padding: 8px; text-align: center; cursor: pointer; font-weight: 600; font-size: 12.5px; }
.pay-modes input { display: none; }
.pay-modes label:has(input:checked) { border-color: var(--vert-marche); background: var(--vert-clair); color: var(--vert-marche); }

/* Connexion */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--creme); }
.auth-page.area-dev { background: #10231a; }
.auth-card { background: #fff; border-radius: 18px; padding: 32px; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(6,58,20,.12); }
.auth-wide { max-width: 860px; }
.auth-logo { height: 64px; width: auto; margin-bottom: 14px; }
.auth-card .tag { display: inline-block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; color: var(--vert-marche); margin-bottom: 8px; }
.checklist { padding-left: 18px; line-height: 2; }

/* Impression des listes */
@media print { .side, .topbar .tb-act, .filters, .no-print { display: none !important; } .layout { display: block; } .content { padding: 0; } }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos { grid-template-columns: minmax(0, 1fr); }
  .g-main, .pos { grid-template-columns: minmax(0, 1fr); }
  .ticket { position: static; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .burger { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .content { padding: 16px 16px 40px; }
  .g2, .g3, .form-grid, .form-grid.g3 { grid-template-columns: minmax(0, 1fr); }
  .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .form-grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .topbar { flex-wrap: wrap; gap: 8px 12px; }
  .topbar h1 { font-size: 17px; flex: 1 1 0; min-width: 0; }
  .topbar .tb-act { flex-basis: 100%; order: 3; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .topbar .tb-act .btn { min-height: 36px; padding: 6px 12px; font-size: 12.5px; }
  .kpi { padding: 14px; }
  .kpi .v { font-size: 19px; word-break: break-word; }
  .kpi .ico { display: none; }
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .chart { gap: 3px; height: 160px; }
  .chart .bar span { font-size: 9px; }
  .chart .bar:nth-child(even) span { visibility: hidden; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tabs a { white-space: nowrap; }
  .pos-grid { max-height: 52vh; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .pos-item b { font-size: 12px; }
  .ticket { position: static; }
  .tline { grid-template-columns: minmax(0, 1fr) auto auto 24px; }
  .side-foot a { margin-right: 8px; }
  .filters input[type=search] { width: 100%; }
  .filters > * { flex: 1 1 140px; }
  .hbar { grid-template-columns: 100px 1fr auto; }
}
[hidden] { display: none !important; }

/* Alertes de nouvelles commandes */
.tb-bell { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--bordure, #e6dfcb); background: #fff; color: var(--vert-foret, #063a14); display: inline-grid; place-items: center; cursor: pointer; }
.tb-bell.on { background: var(--vert-clair, #e8f3e1); border-color: var(--vert-marche, #167c1d); }
.tb-bell-n { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--orange, #f8850a); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-sizing: border-box; }
.notif-pop { position: fixed; right: 20px; top: 76px; z-index: 300; display: flex; gap: 10px; align-items: flex-start; background: #063a14; color: #fcf7e8; border-radius: 16px; padding: 14px 16px; box-shadow: 0 18px 40px rgba(6, 58, 20, .3); max-width: 360px; animation: notifIn .3s ease; }
.notif-pop[hidden] { display: none; }
.notif-pop a { color: #fcf7e8; display: grid; gap: 2px; text-decoration: none; }
.notif-pop a b { color: #fdb813; }
.notif-pop a span { font-size: 13px; opacity: .9; }
.notif-pop button { border: 0; background: transparent; color: #fcf7e8; font-size: 20px; cursor: pointer; line-height: 1; }
@keyframes notifIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Tableau de bord */
.db-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.db-hello { display: block; font-size: 20px; }
.db-periods { display: flex; gap: 4px; background: #fff; border: 1px solid var(--bordure); border-radius: 12px; padding: 4px; flex-wrap: wrap; }
.db-periods a { padding: 7px 14px; border-radius: 9px; color: var(--gris); font-weight: 500; font-size: 13px; }
.db-periods a.active { background: var(--vert-foret); color: #fff; }
.db-chart { width: 100%; height: auto; display: block; }
.db-chart .db-grid { stroke: #ece6d4; stroke-width: 1; }
.db-chart .db-axis { fill: var(--gris); font-size: 11px; font-family: var(--font); }
.db-chart .db-col { fill: var(--vert-marche); }
.db-chart .db-col.now { fill: var(--orange); }
.db-chart g:hover .db-col { fill: var(--vert-foret); }
.db-pipe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.db-pipe-i { border: 1px solid var(--bordure); border-radius: 12px; padding: 14px; display: grid; gap: 2px; color: var(--vert-foret); }
.db-pipe-i b { font-size: 26px; line-height: 1; }
.db-pipe-i span { font-size: 12.5px; color: var(--gris); }
.db-pipe-i.hot { background: var(--orange-clair); border-color: #f6dcb8; }
.db-pipe-i:hover { border-color: var(--vert-marche); }
.db-bar { margin-bottom: 12px; }
.db-bar-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 5px; }
.db-track { height: 8px; border-radius: 99px; background: #f0ebdc; overflow: hidden; }
.db-track i { display: block; height: 100%; background: var(--vert-marche); border-radius: 99px; }
.db-rank { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 10px; }
.db-rank li { counter-increment: r; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; font-size: 13.5px; }
.db-rank li::before { content: counter(r); grid-row: 1 / span 2; width: 24px; height: 24px; border-radius: 8px; background: var(--vert-clair); color: var(--vert-marche); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.db-rank li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-rank li small { grid-column: 2; color: var(--gris); font-size: 12px; }
.db-rank li b { grid-row: 1; grid-column: 3; }
@media (max-width: 760px) { .db-periods { width: 100%; overflow-x: auto; flex-wrap: nowrap; } .db-periods a { white-space: nowrap; } }

/* ===== Seller Center : coque de l'espace de gestion ===== */
body { background: #f4f5f2; }
.area-admin .side { background: #fff; color: var(--vert-foret); border-right: 1px solid #e7e7e1; }
.area-admin .side-logo { border-bottom: 1px solid #efefea; padding: 16px 18px; }
.side-logo span { display: grid; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--orange-texte); font-weight: 600; line-height: 1.35; }
.side-logo span b { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--vert-foret); }
.area-dev .side-logo span b { color: #fff; }
.side-logo img { height: 40px; }
.area-admin .side .grp { color: #8a948c; }
.area-admin .side nav a { color: #34423a; font-weight: 500; position: relative; }
.area-admin .side nav a .ic { color: #6c7a70; }
.area-admin .side nav a:hover { background: #f4f6f1; color: var(--vert-foret); }
.area-admin .side nav a.active { background: var(--orange-clair); color: var(--vert-foret); font-weight: 600; }
.area-admin .side nav a.active .ic { color: var(--orange); }
.area-admin .side nav a.active::before { content: ''; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 4px; border-radius: 0 4px 4px 0; background: var(--orange); }
.side nav a .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side nav a .pill { color: #fff; }
.side-shop { margin: 0 14px 16px; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 10px; border-radius: 10px; background: var(--vert-foret); color: #fff; font-weight: 600; font-size: 13px; }
.side-shop:hover { background: var(--vert-marche); color: #fff; }
.area-dev .side-shop { background: rgba(255,255,255,.1); }
.side-veil { display: none; }

.topbar { padding: 10px 28px; gap: 14px; height: 64px; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.tb-search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 10px; background: #f4f5f2; border: 1px solid #e3e3dc; border-radius: 12px; padding: 0 12px; height: 42px; color: #6c7a70; }
.tb-search:focus-within { background: #fff; border-color: var(--vert-marche); box-shadow: 0 0 0 3px var(--vert-clair); }
.tb-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--vert-foret); outline: none; height: 100%; }
.tb-search kbd { font: 600 11px var(--font); border: 1px solid #d9d9d0; border-radius: 6px; padding: 1px 7px; color: #8a948c; background: #fff; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tb-user { position: relative; }
.tb-user summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 12px; }
.tb-user summary::-webkit-details-marker { display: none; }
.tb-user summary:hover { background: #f4f5f2; }
.tb-user .av { width: 36px; height: 36px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.tb-user .who { display: grid; line-height: 1.2; }
.tb-user .who b { font-size: 13px; }
.tb-user .who small { font-size: 11.5px; color: var(--gris); }
.tb-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid #e7e7e1; border-radius: 12px; box-shadow: 0 14px 34px rgba(6,58,20,.14); padding: 6px; min-width: 210px; z-index: 40; }
.tb-menu a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--vert-foret); font-size: 13.5px; }
.tb-menu a:hover { background: #f4f5f2; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 28px 0; }
.page-head h1 { margin: 2px 0 0; font-size: 22px; }
.crumbs { font-size: 12.5px; color: #8a948c; }
.crumbs a { color: #8a948c; }
.crumbs span { margin: 0 4px; }
.page-head .tb-act { display: flex; gap: 8px; flex-wrap: wrap; }
.content { padding-top: 18px; }

/* Onglets de statut façon marketplace */
.tabs { background: #fff; border: 1px solid #e7e7e1; border-radius: 14px; padding: 0 8px; gap: 0; }
.tabs a { padding: 14px 14px 12px; border-bottom-width: 3px; }
.tabs a.active { color: var(--vert-foret); border-bottom-color: var(--orange); }
.tabs a.active .n { background: var(--orange); color: #fff; }
.kpi { border-radius: 14px; }
.card { border-color: #e7e7e1; }

/* Tâches du jour */
.todo { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.todo a { background: #fff; border: 1px solid #e7e7e1; border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; color: var(--vert-foret); position: relative; }
.todo a:hover { border-color: var(--orange); box-shadow: 0 6px 18px rgba(248,133,10,.12); }
.todo a b { font-size: 26px; line-height: 1.1; }
.todo a span { font-size: 12.5px; color: var(--gris); font-weight: 500; }
.todo a.hot { border-color: #f6c58a; background: linear-gradient(180deg, #fff7ec, #fff); }
.todo a.hot b { color: var(--orange-texte); }
.todo a.zero b { color: #a7b0a9; }
.todo a .go { position: absolute; right: 12px; top: 14px; color: #c3c9c4; }

/* Actions groupées sur les commandes */
.bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bulk select { min-height: 34px; border: 1px solid var(--bordure-champ); border-radius: 8px; padding: 4px 8px; font: inherit; font-size: 13px; }
.t td.ck, .t th.ck { width: 34px; }
.t input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--vert-marche); }
.age { font-size: 12px; color: var(--gris); }
.age.late { color: var(--erreur); font-weight: 600; }
tr.is-late td { background: #fffaf3; }

/* Recherche globale */
.sr-grp + .sr-grp { margin-top: 16px; }
.sr-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #f0efe8; }
.sr-item:first-of-type { border-top: 0; }
.sr-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: var(--creme); }
.sr-item .grow { flex: 1; min-width: 0; }

@media (max-width: 1280px) { .todo { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .topbar { height: auto; padding: 8px 12px; flex-wrap: nowrap; }
  .tb-user .who, .tb-search kbd { display: none; }
  .tb-search { height: 40px; }
  .page-head { padding: 16px 16px 0; }
  .page-head h1 { font-size: 19px; }
  .page-head .tb-act { flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .page-head .tb-act .btn { min-height: 36px; padding: 6px 12px; font-size: 12.5px; }
  .side.open { box-shadow: none; }
  .side.open + .side-veil { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 45; }
  .todo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs { padding: 0 4px; }
}
@media print { .page-head .tb-act, .tb-search, .tb-right, .bulk, .ck { display: none !important; } }
.perf-score { --v: 0; width: 132px; height: 132px; margin: 4px auto 0; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(closest-side, #fff 78%, transparent 79%), conic-gradient(var(--vert-marche) calc(var(--v) * 1%), #efece2 0); }
.perf-score b { font-size: 34px; line-height: 1; }
.perf-score span { font-size: 12px; color: var(--gris); }
.perf { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.perf li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed #ece8db; }
.perf li:last-child { border-bottom: 0; }
.perf .down { color: var(--erreur); }

/* QR code de paiement marchand (Wave / Orange Money / Free Money) */
.payqr { display: flex; gap: 18px; align-items: center; background: #fff; border-radius: 16px; padding: 14px; margin: 0 0 14px; border: 2px solid #1dc8ff; }
.payqr-orange_money { border-color: #ff7900; }
.payqr-free_money { border-color: #cd1e25; }
.payqr-code { flex: 0 0 168px; width: 168px; aspect-ratio: 1; background: #fff; border-radius: 10px; overflow: hidden; display: grid; place-items: center; }
.payqr-code img, .payqr-code svg, .payqr-code > div { width: 100%; height: 100%; object-fit: contain; display: block; }
.payqr-txt { display: grid; gap: 6px; min-width: 0; }
.payqr-txt b { font-size: 17px; }
.payqr-txt strong { font-size: 22px; color: #063a14; white-space: nowrap; }
.payqr-btn { justify-self: start; margin-top: 4px; }
.payqr-xl { flex-direction: column; text-align: center; border-width: 3px; }
.payqr-xl .payqr-code { flex-basis: auto; width: min(320px, 70vw); }
.payqr-xl .payqr-txt { justify-items: center; }
.payqr-xl .payqr-btn { display: none; }
@media (max-width: 560px) { .payqr { flex-direction: column; text-align: center; } .payqr-txt { justify-items: center; } .payqr-btn { justify-self: center; } }
@media (hover: hover) and (pointer: fine) { .payqr-btn { display: none; } }
.qr-set { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.qr-set-i { border: 1px solid var(--bordure); border-radius: 12px; padding: 12px; display: grid; gap: 8px; align-content: start; }
.qr-set-i label { display: grid; gap: 4px; }
.qr-set-i input[type=file] { font-size: 12px; max-width: 100%; }
.qr-prev { aspect-ratio: 1; border-radius: 10px; background: #f6f5ef; display: grid; place-items: center; overflow: hidden; text-align: center; color: var(--gris); font-size: 12px; }
.qr-prev img, .qr-prev svg, .qr-prev > div { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-over { position: fixed; inset: 0; z-index: 500; background: rgba(6,58,20,.72); display: grid; place-items: center; padding: 16px; }
.qr-over[hidden] { display: none !important; }
.qr-over-box { position: relative; background: #fff; border-radius: 22px; padding: 24px; width: min(440px, 100%); max-height: 96vh; overflow: auto; text-align: center; }
.qr-over-x { position: absolute; right: 10px; top: 6px; border: 0; background: none; font-size: 30px; cursor: pointer; color: var(--vert-foret); }
.qr-over-amt { display: grid; font-size: 13px; color: var(--gris); margin-bottom: 12px; }
.qr-over-amt b { font-size: 34px; color: var(--vert-foret); }
@media (max-width: 860px) { .qr-set { grid-template-columns: minmax(0, 1fr); } }
.filters { background: #fff; border: 1px solid #e7e7e1; border-radius: 14px; padding: 12px; }
.filters select { width: auto; min-width: 150px; }
.filters label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gris); }
.filters input[type=date] { width: auto; }
.bulk select { width: auto; min-width: 230px; min-height: 34px; }
@media (max-width: 860px) { .filters select, .filters input[type=date], .bulk select { width: 100%; min-width: 0; } .filters label { flex-wrap: wrap; } }
