/* MERXIS 27 — styles propres à la nouvelle version (le reste vient du thème actuel) */
.layout-sidebar { width: 260px; flex: none; transition: max-width .2s; }
.layout-sidebar.compact { max-width: 80px; }
.layout-sidebar .sidebar-content { height: 100vh; }
.layout-content { flex: 1 1 auto; min-width: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }

/* tableau de bord (repris de la page actuelle) */
.afd-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 14px; margin-bottom: 14px; }
.afd-card { background: #fff; border: 1px solid var(--af-line); border-radius: 16px; overflow: hidden; }
.afd-head { display: flex; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--af-line); }
.afd-head h3 { font-size: 15.5px; font-weight: 600; margin: 0; color: var(--af-ink); }
.afd-head a { margin-left: auto; color: var(--af-acc); font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; }
#afd_chart, #afd_clients { height: 300px; }
.afd-pill { display: inline-flex; gap: 4px; background: #eaeef3; border-radius: 11px; padding: 4px; }
.afd-pill span { padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 13px; color: #475569; cursor: pointer; white-space: nowrap; }
.afd-pill span.on { background: #fff; color: var(--af-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.afd-trend.up { color: #15803d; } .afd-trend.down { color: #b91c1c; }
.afd-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #f0f3f7; color: var(--af-ink); text-decoration: none; }
.afd-row:last-child { border-bottom: 0; }
a.afd-row:hover { background: #f8fbff; color: var(--af-ink); }
.afd-row b { font-size: 13.5px; } .afd-row small { display: block; color: var(--af-mut); font-size: 12px; }
.afd-row .afd-amt { margin-left: auto; font-weight: 600; white-space: nowrap; font-size: 13.5px; }
.afd-row .afd-go { margin-left: auto; color: var(--af-acc); font-weight: 600; font-size: 13px; white-space: nowrap; }
.afd-ref { min-width: 130px; }
.afd-empty { padding: 24px; text-align: center; color: var(--af-mut); font-size: 13px; }
.afd-legend { display: flex; gap: 16px; font-size: 12.5px; color: #475569; margin: 0 0 4px 46px; }
.afd-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.afd-tc { display: flex; align-items: center; gap: 12px; padding: 9px 2px; color: var(--af-ink); text-decoration: none; }
.afd-tc:hover { color: var(--af-ink); background: #f8fbff; border-radius: 10px; }
.afd-tc-n { width: 26px; height: 26px; border-radius: 8px; background: var(--af-acc-soft); color: #1d5fd1; font-weight: 700; font-size: 12.5px; display: flex; align-items: center; justify-content: center; flex: none; }
.afd-tc-m { flex: 1; min-width: 0; }
.afd-tc-m b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afd-tc-bar { display: block; height: 6px; background: #eef2f6; border-radius: 4px; margin-top: 6px; }
.afd-tc-bar i { display: block; height: 100%; background: #4E97FD; border-radius: 4px; }
.afd-tc-v { font-weight: 600; font-size: 13px; white-space: nowrap; }
.afd-tc-v small { color: var(--af-mut); font-size: 11px; }
@media (max-width: 1199px) { .afd-grid { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .afd-row.afd-sale { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "ref amt" "cli st"; column-gap: 10px; row-gap: 3px; padding: 11px 14px; }
  .afd-sale .afd-ref { grid-area: ref; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .afd-sale .afd-ref small { display: inline; white-space: nowrap; }
  .afd-sale .afd-cli { grid-area: cli; min-width: 0; }
  .afd-sale .afd-cli b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; color: #475569; }
  .afd-sale .afd-amt { grid-area: amt; margin-left: 0; text-align: right; }
  .afd-sale .afd-stb { grid-area: st; margin-left: 0 !important; justify-self: end; }
}

/* téléphone : le menu s'ouvre par-dessus la page */
@media (max-width: 991px) {
  .layout-sidebar { max-width: 0 !important; overflow: hidden; }
  body.af-mob-side .layout-sidebar { max-width: 280px !important; width: 280px; position: fixed; left: 0; top: 0; bottom: 0; z-index: 1050; overflow: visible; }
  body.af-mob-side::after { content: ''; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1040; }
  .layout-content { height: auto; min-height: 100vh; overflow: visible; }
  .compact-layout { height: auto; overflow: visible; }
}

/* menus déroulants */
.mx-dd { position: relative; display: inline-flex; }
.mx-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 1060; min-width: 230px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; box-shadow: 0 14px 36px -12px rgba(15,23,42,.35); padding: 6px; }
.mx-menu.mx-right { left: auto; right: 0; }
.mx-dd.open > .mx-menu { display: block; }
.mx-menu .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; font-size: 14px; color: #1f2937; }
.mx-menu .dropdown-item:hover { background: #f1f6ff; color: #1d4ed8; }
.mx-menu .af-menu-h { padding: 8px 12px 10px; border-bottom: 1px solid #f0f3f7; margin-bottom: 4px; }
.mx-menu .af-menu-h b, .mx-menu .af-menu-h small { display: block; } .mx-menu .af-menu-h small { color: var(--af-mut); }
.mx-range { padding: 14px; min-width: 250px; }
.mx-range label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: #475569; margin-bottom: 10px; }
.mx-range input { border: 1px solid var(--af-line); border-radius: 8px; padding: 6px 8px; font-size: 14px; }
.mx-range .af-btn { width: 100%; justify-content: center; }
.mx-weak { border: 1px solid #f1c7c7; background: #fdf3f3; color: #7f1d1d; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.5; }
.af-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* raccourcis du vendeur */
.af-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.af-q { background: #fff; border: 1px solid var(--af-line, #e8edf3); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; color: var(--af-ink, #0f172a); text-decoration: none; }
.af-q:hover { border-color: #c7dcfb; color: var(--af-ink, #0f172a); }
.af-q svg { width: 26px; height: 26px; color: #2563eb; margin-bottom: 6px; }
.af-q b { font-size: 15px; font-weight: 700; } .af-q small { color: #64748b; font-size: 12.5px; }
.af-q-main { background: #2563eb; border-color: #2563eb; color: #fff; } .af-q-main svg, .af-q-main small { color: #fff; } .af-q-main:hover { color: #fff; }
@media (max-width: 767px) { .af-quick { grid-template-columns: 1fr 1fr; gap: 8px; } .af-q { padding: 13px; } .af-q-main { grid-column: 1 / -1; } }
#mx-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: #0f172a; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 2000; max-width: 90vw; }
#mx-toast.on { opacity: 1; transform: translateX(-50%); }
@media print { .af-copy { display: none !important; } }
.af-copy { display: inline-block; background: #f59e0b; color: #fff !important; font-size: 10px; font-weight: 800; line-height: 1.5; border-radius: 4px; padding: 0 6px; margin-left: 6px; letter-spacing: .5px; vertical-align: middle; white-space: nowrap; }
.dt-buttons .mx-menu { min-width: 140px; }
.dt-buttons .mx-menu .dropdown-item { cursor: pointer; }
.modal-backdrop.show { opacity: .5; }
.ls-info { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 16px; font-size: 13px; margin-bottom: 14px; }
.ls-red { color: #b91c1c; font-weight: 700; }
.ls-min input { width: 110px; display: inline-block; }
.ls-table td { vertical-align: middle; }
  .pu-top { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:12px; }
  .pu-info { background:#f8fafc; border:1px solid #e5e7eb; border-radius:12px; padding:12px 16px; font-size:13px; color:#374151; margin-bottom:12px; }
  .pu-tabs { display:flex; gap:6px; flex-wrap:wrap; }
  .pu-tab { border:1px solid #e5e7eb; background:#fff; border-radius:999px; padding:5px 12px; font-size:13px; cursor:pointer; color:#374151; }
  .pu-tab.on { background:#111827; border-color:#111827; color:#fff; }
  .pu-tab b { font-weight:600; margin-left:4px; opacity:.75; }
  .pu-q { flex:1; min-width:200px; border:1px solid #e5e7eb; border-radius:10px; padding:7px 12px; font-size:13.5px; }
  .pu-tb { width:100%; font-size:13.5px; }
  .pu-tb th { font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:#6b7280; background:#f8fafc; padding:8px 10px; text-align:left; position:sticky; top:0; z-index:1; }
  .pu-tb td { padding:7px 10px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
  .pu-tb tr.cat td { background:#fbfbfd; font-size:12px; font-weight:600; color:#6b7280; text-transform:uppercase; letter-spacing:.03em; padding-top:12px; }
  .pu-tb select { border:1px solid #e5e7eb; border-radius:8px; padding:4px 8px; font-size:13px; background:#fff; min-width:120px; }
  .pu-tb select.chg { border-color:#2563eb; color:#1d4ed8; background:#eff6ff; font-weight:600; }
  .pu-old { color:#6b7280; white-space:nowrap; }
  .pu-old.gone { color:#b91c1c; }
  .pu-why { font-size:11.5px; color:#9ca3af; white-space:nowrap; }
  .pu-ok { color:#16a34a; font-size:12px; white-space:nowrap; }
  .pu-bar { position:sticky; bottom:0; background:#fff; border-top:1px solid #e5e7eb; padding:10px 14px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; z-index:5; border-radius:0 0 14px 14px; }
  .pu-bar .sum { margin-right:auto; font-size:13.5px; color:#374151; }
  .pu-bar select { border:1px solid #e5e7eb; border-radius:10px; padding:6px 10px; font-size:13px; }
  .pu-bar .btn { border-radius:10px; }
  .pu-wrap { max-height:calc(100vh - 330px); overflow:auto; }
  @media (max-width:767px) {
    .pu-wrap { max-height:none; }
    .pu-tb .hide-sm { display:none; }
    .pu-tb td, .pu-tb th { padding:6px; }
    .pu-tb select { min-width:0; width:110px; font-size:16px; }
    .pu-bar { padding:8px 10px; gap:8px; }
    .pu-bar .lbl { display:none; }
    .pu-bar .sum { flex:1 1 100%; font-size:13px; }
    .pu-bar select { flex:1; }
  }
  .mg-tabs { display:flex; gap:8px; margin-bottom:14px; }
  .mg-tabs a { padding:8px 16px; border-radius:20px; border:1px solid #d1d5db; color:#374151; font-weight:600; cursor:pointer; text-decoration:none; }
  .mg-tabs a.on { background:#4f46e5; border-color:#4f46e5; color:#fff; }
  .mg-grid { display:grid; grid-template-columns:1fr 60px 1fr; gap:12px; align-items:start; }
  @media (max-width: 900px) { .mg-grid { grid-template-columns:1fr; } .mg-swap { justify-self:center; } }
  .mg-col { border-radius:12px; padding:14px; }
  .mg-keep { background:#ecfdf5; border:2px solid #10b981; }
  .mg-dup { background:#fef2f2; border:2px solid #ef4444; }
  .mg-col h6 { font-weight:800; margin-bottom:8px; }
  .mg-pick { position:relative; }
  .mg-res { position:absolute; z-index:20; left:0; right:0; background:#fff; border:1px solid #d1d5db; border-radius:8px; max-height:300px; overflow:auto; box-shadow:0 6px 18px rgba(0,0,0,.12); }
  .mg-res div { padding:8px 10px; border-bottom:1px solid #f1f5f9; cursor:pointer; font-size:13px; }
  .mg-res div:hover { background:#eef2ff; }
  .mg-card { background:#fff; border-radius:10px; padding:10px 12px; margin-top:8px; font-size:13px; }
  .mg-card b.n { font-size:15px; }
  .mg-card .k { color:#6b7280; }
  .mg-swap { margin-top:60px; }
  .mg-go { margin-top:14px; }
  .mg-sug { border:1px solid #e5e7eb; border-radius:10px; padding:10px 12px; margin-bottom:10px; background:#fff; }
  .mg-sug table { width:100%; font-size:13px; }
  .mg-sug td { padding:4px 6px; border-bottom:1px solid #f8fafc; }
  .mg-why { font-size:11px; font-weight:700; color:#92400e; background:#fffbeb; border-radius:6px; padding:1px 8px; }
  .iv-info { background:#f0f6ff; border:1px solid #dbe8fd; border-radius:12px; padding:12px 16px; font-size:13px; color:#334155; margin-bottom:12px; line-height:1.55; }
  .iv-info ol { margin:4px 0 0 18px; padding:0; }
  .iv-top { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:12px; }
  .iv-top select, .iv-q { border:1px solid #e5e7eb; border-radius:10px; padding:7px 12px; font-size:13.5px; background:#fff; }
  .iv-q { flex:1; min-width:180px; }
  .iv-tabs { display:flex; gap:6px; flex-wrap:wrap; }
  .iv-tab { border:1px solid #e5e7eb; background:#fff; border-radius:999px; padding:5px 12px; font-size:13px; cursor:pointer; color:#374151; white-space:nowrap; }
  .iv-tab.on { background:#111827; border-color:#111827; color:#fff; }
  .iv-tab b { font-weight:600; margin-left:4px; opacity:.75; }
  .iv-tb { width:100%; font-size:13.5px; }
  .iv-tb th { font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:#6b7280; background:#f8fafc; padding:8px 10px; position:sticky; top:0; z-index:2; }
  .iv-tb td { padding:6px 10px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
  .iv-tb .r { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
  .iv-tb tr.cat td { background:#fbfbfd; font-size:12px; font-weight:600; color:#6b7280; text-transform:uppercase; letter-spacing:.03em; padding-top:12px; }
  .iv-tb input { width:90px; text-align:right; border:1px solid #e5e7eb; border-radius:8px; padding:5px 8px; font-size:14px; }
  .iv-tb input:focus { border-color:#2563eb; outline:none; box-shadow:0 0 0 3px rgba(37,99,235,.12); }
  .iv-tb tr.done td { background:#fcfffd; }
  .iv-neg { color:#dc2626; font-weight:600; }
  .iv-zero { color:#9ca3af; }
  .iv-d { font-weight:600; }
  .iv-d.p { color:#16a34a; } .iv-d.m { color:#dc2626; } .iv-d.z { color:#9ca3af; font-weight:400; }
  .iv-st { font-size:15px; }
  .iv-st.ok { color:#16a34a; } .iv-st.err { color:#dc2626; }
  .iv-tb input.saving { opacity:.6; }
  .iv-wrap { max-height:calc(100vh - 360px); overflow:auto; }
  .iv-bar { position:sticky; bottom:0; background:#fff; border-top:1px solid #e5e7eb; padding:10px 14px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; z-index:5; }
  .iv-bar .sum { margin-right:auto; font-size:13.5px; color:#374151; }
  .iv-bar .btn { border-radius:10px; }
  .iv-ok { background:#ecfdf5; border:1px solid #a7f3d0; color:#065f46; border-radius:12px; padding:10px 14px; margin-bottom:12px; font-size:13.5px; }
  @media (max-width:767px) {
    .iv-wrap { max-height:none; }
    .iv-tb .hide-sm { display:none; }
    .iv-tb td, .iv-tb th { padding:6px; }
    .iv-tb input { width:72px; font-size:16px; }
    .iv-bar .sum { flex:1 1 100%; }
  }
  @media print {
    .iv-info, .iv-top, .iv-bar, .breadcrumb, .separator-breadcrumb, .iv-ok { display:none !important; }
    .iv-wrap { max-height:none; overflow:visible; }
    .iv-tb input { border:0; border-bottom:1px solid #999; border-radius:0; }
    .iv-tb th { position:static; }
  }
.mx-dd:not(.open) > .mx-menu { display: none !important; }
/* liste déroulante avec recherche (client, magasin) */
.mx-combo { position: relative; }
.mx-combo-list { position: absolute; z-index: 1070; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 14px 36px -12px rgba(15,23,42,.35); }
.mx-combo-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.mx-combo-list li:hover, .mx-combo-list li.on { background: #eff6ff; color: #1d4ed8; }
.mx-combo-list li.none { color: #9ca3af; cursor: default; background: none; }
.mx-combo.off input { background: #f3f4f6; }
/* caisse (point de vente) */
.pos-body .pos-content .filter-box label { z-index: 3; }
.pos-body .pos-content .filter-box .mx-combo input { height: 54px; }
.pos-body .pos-content .product-card .title .badge { font-size: 10px; vertical-align: middle; }
.pos-body .pos-content .card-items:empty::after { content: "Panier vide"; display: block; color: #94a3b8; font-size: 13px; padding: 18px 4px 4px; }
/* acheter ce qui manque (depuis une vente) */
.af-bfs-st0 { background:#fee2e2; color:#b91c1c; border-radius:8px; padding:1px 8px; font-size:12px; font-weight:700; }
.af-bfs-low { background:#fee2e2 !important; color:#b91c1c !important; }
.af-bfs-btn { display:inline-block; background:#fff7ed; color:#c2410c !important; border:1px solid #fdba74; border-radius:8px; padding:2px 9px; font-size:12.5px; font-weight:700; cursor:pointer; white-space:nowrap; }
.af-bfs-all { background:#fff; color:#c2410c; border:1px solid #fdba74; font-weight:700; }
.af-bfs-item { margin-bottom:18px; }
.af-bfs-name { font-weight:700; font-size:15px; margin-bottom:6px; }
.af-bfs-name span { font-weight:400; color:#64748b; font-size:13px; }
.af-bfs-t { width:100%; border-collapse:collapse; font-size:14px; }
.af-bfs-t th { font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:#64748b; padding:6px 8px; background:#f8fafc; border-bottom:1px solid #e5e7eb; }
.af-bfs-t td { padding:6px 8px; border-bottom:1px solid #eef2f7; vertical-align:top; }
.af-bfs-t .r { text-align:right; }
.af-bfs-add { display:inline-block; margin-top:6px; color:#2563eb !important; font-weight:600; cursor:pointer; }
.af-bfs-note { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:10px 12px; font-size:13px; color:#475569; }
/* achats : cadeau du fournisseur, réception en plusieurs fois */
.af-gift { border:1px solid #bbf7d0; background:#f0fdf4; border-radius:12px; padding:12px 14px; }
.af-gift-ck { display:flex; gap:10px; align-items:center; font-weight:600; color:#14532d; margin:0; cursor:pointer; flex-wrap:wrap; }
.af-gift-ck input { width:18px; height:18px; }
.af-gift-ck span { font-weight:400; color:#64748b; font-size:13px; }
.af-gift-rw { display:flex; gap:12px; align-items:center; margin-top:10px; flex-wrap:wrap; }
.af-gift-in { position:relative; width:180px; }
.af-gift-in input { border-color:#86efac; padding-right:52px; }
.af-gift-in span { position:absolute; right:10px; top:50%; transform:translateY(-50%); font-size:12px; color:#64748b; }
.af-gift-h { font-size:12.5px; color:#475569; }
.af-rcv-t { width:100%; border-collapse:collapse; font-size:14px; }
.af-rcv-t th { font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:#64748b; padding:8px 10px; background:#f8fafc; border-bottom:1px solid #e5e7eb; }
.af-rcv-t td { padding:8px 10px; border-bottom:1px solid #eef2f7; vertical-align:middle; }
.af-rcv-t .r { text-align:right; }
.af-rcv-t tr.off td, .af-rcv-t tr.done td { color:#94a3b8; }
.af-rcv-t input[type=checkbox] { width:17px; height:17px; }
.af-rcv-in { width:110px; display:inline-block; text-align:right; }
.af-rcv-ok { background:#dcfce7; color:#15803d; border-radius:8px; padding:2px 9px; font-size:12px; font-weight:700; }
.af-rcv-note { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:10px 12px; font-size:13px; color:#475569; margin-top:12px; }
.af-rcv-lnk { color:#2563eb !important; font-weight:600; cursor:pointer; }
/* Dollars et devises */
.af-mp { border:1px solid #e5e7eb; border-radius:10px; overflow:hidden; }
.af-mp table { width:100%; border-collapse:collapse; font-size:14px; }
.af-mp th { font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:#64748b; font-weight:600; padding:8px 10px; background:#f8fafc; border-bottom:1px solid #e5e7eb; }
.af-mp td { padding:8px 10px; border-bottom:1px solid #eef2f7; cursor:pointer; }
.af-mp tr:last-child td { border-bottom:0; }
.af-mp .r { text-align:right; }
.af-mp tr.off td { color:#94a3b8; cursor:default; }
.af-mp input[type=checkbox] { width:17px; height:17px; vertical-align:middle; }
.af-paytabs { display:flex; gap:6px; background:#f1f5f9; padding:4px; border-radius:12px; width:max-content; }
.af-paytabs button { border:0; background:transparent; padding:8px 18px; border-radius:9px; font-weight:600; color:#475569; }
.af-paytabs button.on { background:#fff; color:#1d4ed8; box-shadow:0 1px 3px rgba(0,0,0,.12); }
.af-wal { padding:1rem; border-radius:.25rem; background:#eef2ff; }
.af-wal-b { font-size:24px; font-weight:700; color:#3730a3; }
/* Comparer les prix des fournisseurs */
.cp-info { background:#f0f6ff; border:1px solid #dbe8fd; border-radius:12px; padding:12px 16px; font-size:13px; color:#334155; margin-bottom:14px; line-height:1.55; }
.cp-top { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; margin-bottom:14px; }
.cp-top label { display:block; font-size:12px; color:#6b7280; margin-bottom:3px; }
.cp-top select, .cp-top input { border:1px solid #e5e7eb; border-radius:10px; padding:7px 10px; font-size:13.5px; background:#fff; }
.cp-wrap { overflow:auto; border:1px solid #eef0f3; border-radius:14px; }
.cp-tb { border-collapse:separate; border-spacing:0; width:100%; font-size:13.5px; }
.cp-tb th, .cp-tb td { padding:8px 10px; border-bottom:1px solid #f1f5f9; vertical-align:middle; background:#fff; }
.cp-tb thead th { background:#f8fafc; font-size:11.5px; color:#6b7280; text-transform:uppercase; letter-spacing:.03em; position:sticky; top:0; z-index:2; }
.cp-tb .art { position:sticky; left:0; z-index:1; min-width:220px; max-width:300px; }
.cp-tb thead .art { z-index:3; }
.cp-tb .q { text-align:center; white-space:nowrap; color:#374151; }
.cp-sup { min-width:136px; max-width:190px; text-align:center; }
.cp-sup select { width:100%; border:1px solid #e5e7eb; border-radius:8px; padding:5px 6px; font-size:12.5px; text-transform:none; letter-spacing:0; color:#111827; background:#fff; }
.cp-sup .x { font-size:11px; color:#9ca3af; cursor:pointer; margin-top:3px; display:inline-block; text-transform:none; letter-spacing:0; }
.cp-cell { text-align:center; cursor:pointer; }
.cp-cell input { width:100px; text-align:right; border:1px solid #e5e7eb; border-radius:8px; padding:5px 8px; font-size:13.5px; }
.cp-cell.best input { border-color:#86efac; background:#f0fdf4; }
.cp-cell.pick { box-shadow: inset 0 0 0 2px #2563eb; background:#eff6ff; }
.cp-cell.pick input { background:#fff; }
.cp-cell small { display:block; font-size:11px; color:#6b7280; margin-top:2px; min-height:14px; }
.cp-best { color:#16a34a; font-weight:600; }
.cp-add { min-width:90px; max-width:110px; text-align:center; }
.cp-add a { color:#2563eb !important; cursor:pointer; font-size:13px; text-transform:none; letter-spacing:0; white-space:normal; line-height:1.3; }
.cp-ch { font-size:12.5px; color:#374151; min-width:110px; max-width:170px; }
.cp-ch b { font-weight:600; }
.cp-ch .none { color:#b45309; }
.cp-tb tfoot td { background:#f8fafc; font-weight:600; border-bottom:0; }
.cp-sum { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.cp-card { flex:1 1 180px; border:1px solid #e5e7eb; border-radius:12px; padding:10px 14px; background:#fff; }
.cp-card .n { font-size:12px; color:#6b7280; }
.cp-card .v { font-size:17px; font-weight:700; color:#111827; }
.cp-card.tot { background:#111827; border-color:#111827; } .cp-card.tot .n { color:#cbd5e1; } .cp-card.tot .v { color:#fff; }
.cp-card.eco .v { color:#16a34a; }
.cp-bar { display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; margin-top:16px; }
.cp-bar .btn { border-radius:10px; }
.cp-done { padding:10px 4px; } .cp-done h4 { font-size:18px; font-weight:700; color:#065f46; } .cp-done ul { margin:10px 0 14px 18px; font-size:14px; line-height:1.8; } .cp-done .btn { border-radius:10px; }
.cp-lbl { width:100%; border:1px solid #e5e7eb; border-radius:8px; padding:5px 7px; font-size:13px; font-weight:600; color:#111827; text-transform:none; letter-spacing:0; margin-bottom:4px; }
.cp-sup select.cp-psel { color:#6b7280; font-size:12px; padding:3px 5px; }
.cp-sel2 { display:flex; gap:4px; } .cp-sel2 .cp-psel { flex:1 1 auto; min-width:0; } .cp-sup select.cp-csel { width:62px; flex:0 0 62px; font-size:12px; padding:3px 4px; }
.cp-cell small.conv { color:#2563eb; }
.cp-imp { display:block; margin:5px 0 0; border:1px dashed #93c5fd; background:#f8fbff; color:#2563eb; border-radius:8px; padding:4px 6px; font-size:12px; font-weight:600; cursor:pointer; text-transform:none; letter-spacing:0; white-space:nowrap; }
.cp-imp input { display:none; }
.cp-imp.busy { color:#6b7280; border-color:#d1d5db; cursor:wait; }
.cp-file { display:block; margin-top:4px; font-size:11px; color:#334155; background:#f1f5f9; border-radius:6px; padding:2px 6px; text-transform:none; letter-spacing:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:170px; margin-left:auto; margin-right:auto; }
.cp-cell small.src { font-size:10.5px; color:#16a34a; max-width:150px; margin:1px auto 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cp-cell small.src.chk { color:#b45309; }
.cp-wrong { display:block; font-size:10.5px; color:#9ca3af !important; cursor:pointer; margin-top:1px; }
.cp-wrong:hover { color:#dc2626 !important; }
.cp-un { border:1px solid #fde68a; background:#fffbeb; border-radius:12px; padding:10px 14px; margin-top:12px; font-size:13px; }
.cp-un h6 { font-size:13px; font-weight:700; color:#92400e; margin:0 0 4px; }
.cp-un .r { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; align-items:center; padding:6px 0; border-top:1px solid #fef3c7; }
.cp-un .r span { flex:1 1 220px; color:#374151; }
.cp-un select { border:1px solid #e5e7eb; border-radius:8px; padding:4px 6px; font-size:12.5px; max-width:260px; background:#fff; }
.cp-un a { color:#6b7280 !important; cursor:pointer; font-size:12.5px; }
.cp-multi { border:1px dashed #93c5fd; background:#f8fbff; color:#2563eb; border-radius:10px; padding:7px 12px; font-size:13px; font-weight:600; cursor:pointer; margin:0; }
.cp-multi input { display:none; }
.cp-legend { font-size:12px; color:#6b7280; margin-top:8px; }
.cp-legend span { display:inline-block; width:12px; height:12px; border-radius:3px; vertical-align:-2px; margin:0 4px 0 10px; }
@media (max-width:767px) {
  .cp-tb .art { min-width:150px; max-width:170px; }
  .cp-cell input { width:84px; font-size:16px; }
  .cp-sup { min-width:120px; }
}
/* Fiche client / fournisseur */
.pf-head { background:#fff; border-radius:16px; box-shadow:0 2px 12px rgba(15,23,42,.06); padding:18px 20px; display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between; margin-bottom:14px; }
.pf-id { display:flex; gap:14px; align-items:center; min-width:0; }
.pf-av { width:56px; height:56px; border-radius:16px; background:linear-gradient(135deg,#4f46e5,#0ea5e9); color:#fff; font-weight:800; font-size:24px; display:flex; align-items:center; justify-content:center; flex:none; }
.pf-av.sup { background:linear-gradient(135deg,#f59e0b,#ef4444); }
.pf-nm { font-size:20px; font-weight:800; color:#111827; line-height:1.2; }
.pf-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.pf-tags span { font-size:11.5px; padding:2px 9px; border-radius:999px; background:#f1f5f9; color:#475569; font-weight:600; }
.pf-tags .co { background:#eef2ff; color:#4338ca; }
.pf-tags .ok { background:#ecfdf5; color:#047857; }
.pf-tags .off { background:#fef2f2; color:#b91c1c; }
.pf-info { display:flex; flex-wrap:wrap; gap:4px 18px; font-size:13px; color:#374151; margin-top:6px; }
.pf-info b { color:#6b7280; font-weight:600; }
.pf-acts { display:flex; flex-wrap:wrap; gap:6px; }
.pf-acts .btn { border-radius:10px; font-size:13px; padding:.375rem .6rem; }
.pf-acts .pf-st { padding:.375rem .45rem; margin-left:-4px; }
.pf-docs { flex-basis:100%; display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; padding-top:10px; border-top:1px solid #f1f5f9; }
.pf-kpis { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.pf-k { background:#fff; border-radius:14px; box-shadow:0 2px 12px rgba(15,23,42,.06); padding:13px 15px; }
.pf-k .l { font-size:12px; color:#6b7280; }
.pf-k .v { font-size:19px; font-weight:800; color:#111827; font-variant-numeric:tabular-nums; word-break:break-word; }
.pf-k .s { font-size:11.5px; color:#9ca3af; }
.pf-k.due { background:linear-gradient(135deg,#fef2f2,#fff); border:1px solid #fecaca; }
.pf-k.due .v { color:#dc2626; }
.pf-k.ok .v { color:#059669; }
.pf-bar { height:6px; background:#f1f5f9; border-radius:3px; margin-top:6px; overflow:hidden; }
.pf-bar span { display:block; height:100%; background:#ef4444; }
.pf-grid { display:grid; grid-template-columns:2fr 1fr; gap:14px; margin-bottom:14px; }
.pf-box { background:#fff; border-radius:16px; box-shadow:0 2px 12px rgba(15,23,42,.06); padding:14px 16px; min-width:0; }
.pf-box h5 { font-size:15px; font-weight:700; margin:0 0 10px; display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.pf-tabs { display:flex; gap:6px; flex-wrap:wrap; }
.pf-tabs button { border:1px solid #e5e7eb; background:#fff; border-radius:999px; padding:5px 12px; font-size:12.5px; font-weight:600; color:#374151; }
.pf-tabs button.on { background:#111827; color:#fff; border-color:#111827; }
.pf-tools { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.pf-tools input, .pf-tools select { border:1px solid #e5e7eb; border-radius:10px; padding:5px 10px; font-size:13px; }
.pf-table { width:100%; font-size:13px; }
.pf-table th { font-size:11.5px; text-transform:uppercase; letter-spacing:.03em; color:#6b7280; background:#f8fafc; padding:7px 8px; text-align:left; }
.pf-table td { padding:8px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
.pf-table tr:hover td { background:#fafaff; }
.pf-table .r { text-align:right; font-variant-numeric:tabular-nums; }
.pf-table a.ref { font-weight:700; color:#4f46e5; }
.pf-table .st { font-size:11px; padding:2px 8px; border-radius:999px; font-weight:700; white-space:nowrap; }
.pf-table .st.paid { background:#ecfdf5; color:#047857; } .pf-table .st.partial { background:#fffbeb; color:#b45309; } .pf-table .st.unpaid { background:#fef2f2; color:#b91c1c; }
.pf-ic { display:inline-flex; gap:4px; }
.pf-cb { width:28px; padding-right:0 !important; }
.pf-cb input { width:16px; height:16px; accent-color:#2563eb; cursor:pointer; vertical-align:middle; }
.pf-table tr.pf-on td { background:#f5f9ff; }
.pf-selbar { display:flex; flex-wrap:wrap; align-items:center; gap:6px; background:#f8fafc; border:1px solid #e5e7eb; border-radius:12px; padding:8px 12px; margin:10px 0 4px; }
.pf-selbar .t { flex:1; min-width:180px; color:#64748b; font-size:14px; }
.pf-selbar .t b { color:#0f172a; }
.pf-selbar .af-da { background:#fff; }
.pf-selbar .pf-x { border:0; background:transparent !important; color:#64748b; }
.pf-ic a { display:inline-flex; align-items:center; justify-content:center; min-width:28px; height:26px; padding:0 6px; border-radius:7px; border:1px solid #e5e7eb; color:#374151; font-size:14px; }
.pf-ic a:hover { border-color:#6366f1; color:#4338ca; }
.pf-ic a.pf-sv { color:#2563eb; display:inline-flex; align-items:center; }
.pf-ic a.pf-sv svg, .btn.af-sv svg { width:15px; height:15px; }
.pf-avis { background:#ecfdf5; border:1px solid #a7f3d0; border-radius:14px; padding:10px 14px; margin-bottom:14px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between; font-size:13.5px; color:#065f46; }
.pf-avis-b { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.pf-avis-b .btn { border-radius:10px; }
.pf-grp { font-size:10.5px; padding:1px 7px; border-radius:999px; background:#f1f5f9; color:#475569; font-weight:600; margin-left:4px; white-space:nowrap; }
.gp-ov { position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:1060; display:flex; align-items:center; justify-content:center; padding:16px; }
.gp-box { background:#fff; border-radius:16px; width:100%; max-width:640px; max-height:calc(100vh - 32px); display:flex; flex-direction:column; box-shadow:0 20px 50px rgba(15,23,42,.25); }
.gp-hd { padding:16px 20px 10px; border-bottom:1px solid #f1f5f9; }
.gp-hd h4 { margin:0; font-size:17px; font-weight:700; color:#111827; }
.gp-hd p { margin:2px 0 0; font-size:12.5px; color:#6b7280; }
.gp-bd { padding:14px 20px; overflow:auto; }
.gp-ft { padding:12px 20px; border-top:1px solid #f1f5f9; display:flex; gap:8px; justify-content:flex-end; align-items:center; flex-wrap:wrap; }
.gp-ft .gp-sum { margin-right:auto; font-size:13px; color:#6b7280; }
.gp-ft .gp-sum b { color:#111827; font-size:15px; }
.gp-amt label, .gp-f label { font-size:12px; color:#6b7280; margin-bottom:3px; display:block; }
.gp-amt input { font-size:22px; font-weight:700; height:auto; padding:8px 12px; border-radius:10px; }
.gp-amt small { color:#9ca3af; font-size:12px; }
.gp-tb { width:100%; font-size:13px; margin:12px 0; }
.gp-tb th { font-size:11px; text-transform:uppercase; letter-spacing:.03em; color:#6b7280; background:#f8fafc; padding:6px 8px; text-align:left; }
.gp-tb td { padding:6px 8px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
.gp-tb .r { text-align:right; font-variant-numeric:tabular-nums; }
.gp-tb input[type=text] { width:120px; text-align:right; border:1px solid #e5e7eb; border-radius:8px; padding:4px 8px; font-size:13px; }
.gp-tb tr.off td { color:#9ca3af; }
.gp-f { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
.gp-f select, .gp-f input, .gp-note { border:1px solid #e5e7eb; border-radius:10px; padding:7px 10px; font-size:13px; width:100%; background:#fff; }
.gp-note { margin-top:10px; }
.gp-err { color:#dc2626; font-size:12.5px; margin-top:8px; }
.gp-done { text-align:center; padding:10px 0 4px; }
.gp-done .ic { width:54px; height:54px; border-radius:50%; background:#ecfdf5; color:#059669; font-size:28px; display:flex; align-items:center; justify-content:center; margin:0 auto 10px; }
.gp-done h4 { font-size:17px; font-weight:700; margin:0 0 4px; }
.gp-done p { color:#6b7280; font-size:13px; margin:0 0 14px; }
.gp-done .btn { margin:3px; border-radius:10px; }
@media (max-width:576px) { .gp-ov { align-items:flex-end; padding:0; } .gp-box { border-radius:16px 16px 0 0; max-height:92vh; } .gp-f { grid-template-columns:1fr; } .gp-tb .hide-sm { display:none; } .gp-tb input[type=text] { width:96px; font-size:16px; } .gp-amt input { font-size:20px; } }
.pf-empty { color:#9ca3af; text-align:center; padding:24px 0; font-size:13px; }
.pf-more { text-align:center; margin-top:8px; }
@media (max-width:991px) { .pf-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } .pf-grid { grid-template-columns:1fr; } }
@media (max-width:576px) { .pf-k .v { font-size:16px; } .pf-table .hide-sm { display:none; } }
/* Entreprises */
.co-k-wrap { margin-bottom:14px; }
.co-bar { display:flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--af-line,#e8edf3); border-radius:16px; padding:10px 14px; margin-bottom:14px; flex-wrap:wrap; }
.co-bar .af-tabs { margin:0; }
.co-bar .co-q { margin-left:auto; display:flex; align-items:center; gap:8px; border:1px solid var(--af-line,#e8edf3); border-radius:10px; padding:0 12px; height:38px; min-width:260px; color:#94a3b8; }
.co-bar .co-q input { border:0; outline:0; flex:1; font-size:13.5px; color:#0f172a; background:transparent; }
.co-bar .co-q svg { width:16px; height:16px; }
.co-mark { height:40px; border:1px solid var(--af-line,#e8edf3); border-radius:11px; padding:0 12px; font-weight:600; font-size:14px; color:#0f172a; background:#fff; max-width:280px; }
.co-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
@media (max-width: 1250px) { .co-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .co-grid { grid-template-columns:1fr; } .co-bar .co-q { min-width:0; width:100%; } }
.co-card { background:#fff; border:1px solid var(--af-line,#e8edf3); border-radius:16px; padding:16px 18px; display:flex; flex-direction:column; gap:10px; min-width:0; }
.co-card .top { display:flex; gap:12px; align-items:center; }
.co-card .av { width:42px; height:42px; border-radius:12px; font-weight:700; font-size:16px; display:flex; align-items:center; justify-content:center; flex:none; }
.co-card .who { flex:1; min-width:0; }
.co-card .nm { font-weight:600; font-size:14.5px; color:#0f172a; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.co-card .sec { font-size:12.5px; color:#64748b; }
.co-card .who .sec { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.co-card .pill { flex:none; display:inline-block; min-width:76px; text-align:center; padding:5px 10px; border-radius:20px; font-size:12px; font-weight:600; }
.co-card .pill.due { background:#fee2e2; color:#b91c1c; } .co-card .pill.ok { background:#dcfce7; color:#15803d; }
.co-card .ids { font-size:12px; color:#374151; display:flex; flex-wrap:wrap; gap:2px 12px; }
.co-card .ids span b { color:#64748b; font-weight:600; }
.co-card .stats { display:grid; grid-template-columns:1.25fr 1.1fr .7fr; gap:8px; background:#f7f9fc; border-radius:12px; padding:10px 12px; }
.co-card .stats div { font-size:11.5px; color:#64748b; min-width:0; }
.co-card .stats b { display:block; font-size:14px; font-weight:600; color:#0f172a; font-variant-numeric:tabular-nums; white-space:nowrap; }
.co-card .stats .due b { color:#dc2626; } .co-card .stats .zero b { color:#a0aab8; }
.co-card .acts { display:flex; gap:6px; align-items:center; margin-top:auto; }
.co-card .acts a.b { display:inline-flex; align-items:center; gap:4px; font-size:12.5px; font-weight:600; padding:6px 10px; border-radius:9px; border:1px solid var(--af-line,#e8edf3); color:#334155; white-space:nowrap; text-decoration:none; }
.co-card .acts a.b:hover { background:#f4f7fb; }
.co-card .acts a.b.p { background:#4E97FD; border-color:#4E97FD; color:#fff; }
.co-card .acts a.b svg { width:14px; height:14px; }
.co-more { margin-left:auto; position:relative; }
.co-more summary { list-style:none; width:32px; height:32px; border:1px solid var(--af-line,#e8edf3); border-radius:9px; display:flex; align-items:center; justify-content:center; color:#64748b; cursor:pointer; }
.co-more summary::-webkit-details-marker { display:none; }
.co-more summary svg { width:16px; height:16px; }
.co-more .m { position:absolute; right:0; bottom:calc(100% + 6px); z-index:20; background:#fff; border:1px solid #e8edf3; border-radius:12px; box-shadow:0 10px 30px rgba(15,23,42,.12); padding:6px; min-width:150px; }
.co-more .m a { display:block; padding:8px 12px; border-radius:8px; color:#334155; font-weight:600; font-size:13px; text-decoration:none; }
.co-more .m a:hover { background:#f4f7fb; }
.co-empty { background:#fff; border:1px solid var(--af-line,#e8edf3); border-radius:16px; padding:40px 20px; text-align:center; color:#64748b; }
.co-docs { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; padding-top:10px; border-top:1px solid #f1f5f9; }
</style>
@endsection

@php($co_unit = \App\utils\Afritech::currencyCode())
<div id="companies_app">

/* ---- dépenses (étape 6b) : styles de l'ancienne page, fenêtres « payé en devises » et « frais d'envoi » */
/* depenses par categorie : cartes */
  .exp-total { display:block; padding:16px 20px; border-radius:16px; background:#fff; color:#0f172a; cursor:pointer;
    border:1px solid #e8edf3; transition:box-shadow .15s; }
  .exp-total:hover { box-shadow:0 4px 14px rgba(15,23,42,.07); }
  .exp-total.active { border-color:#c7dcfb; }
  .exp-total .row1 { display:flex; align-items:center; gap:14px; }
  .exp-total .ic { width:44px; height:44px; border-radius:12px; background:#fff1f2; color:#e11d48; display:flex; align-items:center; justify-content:center; flex:none; }
  .exp-total .ic svg { width:20px; height:20px; }
  .exp-total .lbl { font-size:12px; color:#64748b; text-transform:uppercase; letter-spacing:.05em; }
  .exp-total .amt { font-size:22px; font-weight:600; line-height:1.25; font-variant-numeric:tabular-nums; }
  .exp-total .amt small { font-size:12px; color:#64748b; font-weight:600; }
  .exp-total .meta { margin-left:auto; font-size:13px; color:#64748b; text-align:right; }
  .exp-total .meta b { display:block; font-size:16px; color:#0f172a; font-weight:600; }
  .exp-total .stk { display:flex; height:8px; border-radius:6px; overflow:hidden; margin-top:14px; background:#eef2f6; }
  .exp-total .stk span { height:100%; }
  .exp-total .lgd { display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:9px; font-size:12px; color:#475569; }
  .exp-total .lgd i { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:5px; }
  .exp-total .lgd .more { color:#94a3b8; }
  .exp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px; margin-top:12px; }
  .exp-card { position:relative; background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:12px 14px 14px;
    cursor:pointer; transition:transform .12s, box-shadow .12s, border-color .12s; overflow:hidden; }
  .exp-card:hover { transform:translateY(-2px); box-shadow:0 6px 16px rgba(0,0,0,.08); }
  .exp-card.active { border-color:var(--c); box-shadow:0 0 0 2px var(--c) inset; background:#fafaff; }
  .exp-card .top { display:flex; align-items:center; gap:8px; }
  .exp-card .dot { width:10px; height:10px; border-radius:50%; background:var(--c); flex:none; }
  .exp-card .name { font-weight:600; color:#374151; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .exp-card .pct { margin-left:auto; font-size:12px; color:#6b7280; }
  .exp-card .amt { font-size:17px; font-weight:600; color:#111827; margin-top:6px; font-variant-numeric:tabular-nums; }
  .exp-card .cur { font-size:12px; font-weight:500; color:#6b7280; }
  .exp-card .nb { font-size:12px; color:#6b7280; }
  .exp-card .bar { height:5px; border-radius:3px; background:#f1f5f9; margin-top:8px; }
  .exp-card .bar span { display:block; height:100%; border-radius:3px; background:var(--c); }
  .exp-filter { display:flex; align-items:center; gap:10px; margin:14px 0 4px; font-size:14px; color:#374151; }
  .exp-filter .chip { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px;
    background:#eef2ff; color:#4338ca; font-weight:600; }
  .exp-filter .chip a { color:#4338ca; text-decoration:none; font-weight:700; }
  .exp-card .add { position:absolute; right:8px; bottom:12px; width:26px; height:26px; border-radius:50%; border:none;
    background:var(--c); color:#fff; font-size:18px; line-height:26px; text-align:center; padding:0; opacity:.9; }
  .exp-card .add:hover { opacity:1; transform:scale(1.08); }
  .exp-card .bar { margin-right:32px; }
  .exp-filter .btn-add { margin-left:auto; }
  .exp-people { margin-top:14px; border:1px solid #e5e7eb; border-radius:12px; background:#fff; overflow:hidden; }
  .exp-people .hd { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; padding:12px 16px; background:#f8fafc; border-bottom:1px solid #e5e7eb; }
  .exp-people .hd h5 { margin:0; font-weight:700; font-size:16px; }
  .exp-people .sums { display:flex; gap:16px; flex-wrap:wrap; font-size:13px; color:#374151; }
  .exp-people .sums b { font-size:15px; }
  .exp-people .srch { padding:10px 16px 0; }
  .exp-people .srch input { width:100%; max-width:320px; border:1px solid #e5e7eb; border-radius:8px; padding:6px 10px; }
  .exp-person { border-bottom:1px solid #f1f5f9; }
  .exp-person:last-child { border-bottom:none; }
  .exp-person .ln { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:10px 16px; cursor:pointer; }
  .exp-person .ln:hover { background:#fafaff; }
  .exp-person .nm { flex:1; min-width:150px; font-weight:600; color:#111827; }
  .exp-person .nm small { display:block; font-weight:400; color:#6b7280; font-size:12px; }
  .exp-person .num { min-width:120px; text-align:right; font-variant-numeric:tabular-nums; font-size:13px; }
  .exp-person .num small { display:block; color:#9ca3af; font-size:11px; }
  .exp-person .acts { display:flex; gap:6px; }
  .exp-person .acts .btn { padding:3px 10px; font-size:12px; border-radius:8px; }
  .exp-person .hist { padding:0 16px 12px 16px; }
  .inv-pick { position:relative; }
  .inv-res { position:absolute; z-index:20; left:0; right:0; top:100%; background:#fff; border:1px solid #e5e7eb; border-radius:10px; box-shadow:0 8px 24px rgba(15,23,42,.12); max-height:240px; overflow:auto; }
  .inv-res div { padding:7px 12px; cursor:pointer; font-size:13px; border-bottom:1px solid #f1f5f9; }
  .inv-res div:hover { background:#eff6ff; }
  .inv-res small { color:#6b7280; }
  .inv-chosen { display:flex; align-items:center; gap:8px; background:#eff6ff; border:1px solid #bfdbfe; border-radius:10px; padding:7px 12px; font-size:13px; }
  .inv-chip { display:inline-block; background:#eff6ff; color:#1d4ed8; border-radius:6px; padding:1px 7px; font-size:12px; margin-left:4px; }
  .grp-tg { display:inline-flex; gap:4px; margin-left:10px; }
  .grp-tg button { font-size:12px; padding:2px 10px; border-radius:20px; }
  .xd-inv { margin-top:12px; background:#eff6ff; border:1px solid #bfdbfe; border-radius:10px; padding:10px 12px; font-size:13px; }
  .exp-person .hist table { width:100%; font-size:13px; }
  .exp-person .hist td, .exp-person .hist th { padding:5px 8px; border-bottom:1px solid #f1f5f9; }
  #expense_table tbody tr { cursor:pointer; }
  #expense_table tbody tr:hover td { background:#f8faff; }
  .xd-row { display:flex; justify-content:space-between; gap:10px; padding:7px 0; border-bottom:1px solid #f1f5f9; font-size:14px; }
  .xd-row span:first-child { color:#6b7280; }
  .xd-amt { font-size:26px; font-weight:800; color:#111827; }
  .xd-sal { background:#f0fdf4; border:1px solid #bbf7d0; border-radius:12px; padding:12px 14px; margin-top:12px; }
  .rest-ok { color:#059669; font-weight:700; } .rest-due { color:#dc2626; font-weight:700; }
  @media (max-width:576px) { .exp-person .num { min-width:0; flex:1; text-align:left; } .exp-person .acts { width:100%; } }
  @media (max-width:576px) {
    .exp-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    .exp-card { padding:10px; }
    .exp-card .amt { font-size:15px; }
    .exp-total .amt { font-size:22px; }
    .exp-total .meta { text-align:left; }
  }
.inv-chosen .x { margin-left:auto; color:#dc2626; cursor:pointer; font-weight:700; font-size:18px; line-height:1; }
.af-exp-card { max-width:980px; background:#fff; border-radius:16px; box-shadow:0 1px 3px rgba(15,23,42,.08); padding:22px 22px 18px; }
.af-exp-card .form-group { margin-bottom:14px; }
.af-exp-card label { color:#334155; }
@media (max-width: 576px) { .af-exp-card { padding:14px 12px; border-radius:12px; } }
.af-cur-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}
.af-cur-tabs button{border:1px solid #d1d5db;background:#fff;border-radius:8px;padding:6px 12px;font-size:13px;color:#374151;cursor:pointer}
.af-cur-tabs button.on{background:#4f46e5;border-color:#4f46e5;color:#fff;font-weight:600}
.af-cur-box{background:#f5f7ff;border:1px solid #c7d2fe;border-radius:10px;padding:12px 12px 4px;margin:0 0 8px}
.af-cur-box label{font-size:12px;color:#4b5563}
.af-cur-ro{background:#fff;border:1px solid #e5e7eb;border-radius:6px;padding:7px 10px;font-weight:600}
.af-cur-gnf{font-size:18px;font-weight:800;color:#111827;padding-top:4px}
.af-cur-hint{font-size:12px;color:#6b7280;margin-top:3px}
.af-cur-bad{color:#b91c1c;font-weight:600}
.af-sf{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:12px 12px 6px}
.af-sf label{font-size:12px;color:#475569}
.af-sf-in{position:relative}
.af-sf-in input{padding-right:42px}
.af-sf-in span{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:12px;color:#64748b}
.af-sf-pct{border-color:#60a5fa!important}
.af-sf-res{font-size:14px;line-height:1.3;padding-top:2px;color:#0f172a}
.af-sf-res b{font-size:16px}
.af-sf-hint{font-size:12px;color:#64748b;margin:0 0 6px}
.exp-total .ic .af-ic { width:20px; height:20px; }
.ex-row { cursor:pointer; }

/* ---- point de caisse et clôture (étape 6c) */
.cash-table td, .cash-table th { vertical-align: middle; }
.cash-table .amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cash-table input { max-width: 170px; margin-left: auto; text-align: right; }
.cc-kpis { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:10px; margin-bottom:16px; }
.cc-k { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:12px 14px; }
.cc-k .l { font-size:12px; color:#6b7280; }
.cc-k .v { font-size:19px; font-weight:700; color:#111827; font-variant-numeric:tabular-nums; }
.cc-table td, .cc-table th { font-variant-numeric:tabular-nums; }
.cc-count { background:#f8fafc; border:1px solid #e5e7eb; border-radius:12px; padding:14px 16px; }
.cc-diff { font-size:20px; font-weight:800; }
.cc-ok { color:#047857; } .cc-bad { color:#b91c1c; }
@media print {
  .layout-sidebar, .layout-header, .no-print, .cc-count, .cc-hist-actions, .af-mobile-nav { display:none !important; }
  .layout-content, .main-content-wrap, .content-section { margin:0 !important; padding:0 !important; width:100% !important; }
  #section_cash_register .card, #section_cash_closing .card { box-shadow:none !important; border:0 !important; }
}

/* ---- salaires et espace salariés (étape 6d) */
.af-flip { transform: scaleX(-1); }
.st-head { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; margin-bottom:14px; }
  .st-sum { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:12px; margin-bottom:16px; }
  .st-sum > div { border-radius:14px; padding:14px 16px; color:#fff; box-shadow:0 4px 14px rgba(15,23,42,.10); }
  .st-sum > div span { font-size:12px; opacity:.9; }
  .st-sum > div b { display:block; font-size:20px; font-variant-numeric:tabular-nums; margin-top:2px; }
  .st-sum .c1 { background:linear-gradient(135deg,#4f46e5,#6366f1); }
  .st-sum .c2 { background:linear-gradient(135deg,#0284c7,#0ea5e9); }
  .st-sum .c3 { background:linear-gradient(135deg,#059669,#10b981); }
  .st-sum .c4 { background:linear-gradient(135deg,#d97706,#f59e0b); }
  @media (max-width: 768px) { .st-sum { grid-template-columns:repeat(2,1fr); } }
  .st-tools { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
  .st-tools input { border:1px solid #e5e7eb; border-radius:10px; padding:7px 12px; min-width:200px; }
  .st-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:14px; }
  .st-card { background:#fff; border-radius:14px; box-shadow:0 2px 12px rgba(15,23,42,.06); padding:16px 18px; display:flex; flex-direction:column; gap:10px; }
  .st-card.off { opacity:.6; }
  .st-card .top { display:flex; gap:12px; align-items:center; }
  .st-card .av { width:46px; height:46px; border-radius:50%; color:#fff; font-weight:800; font-size:18px; display:flex; align-items:center; justify-content:center; flex:none; }
  .st-card .nm { font-weight:700; font-size:15px; color:#111827; line-height:1.2; }
  .st-card .sec { font-size:12px; color:#6b7280; }
  .st-card .sal { display:flex; align-items:flex-end; justify-content:space-between; background:#f8fafc; border-radius:10px; padding:10px 12px; }
  .st-card .sal .l { font-size:11px; color:#6b7280; }
  .st-card .sal b { font-size:19px; color:#111827; font-variant-numeric:tabular-nums; }
  .st-card .up { font-size:12px; font-weight:700; color:#059669; }
  .st-card .down { font-size:12px; font-weight:700; color:#dc2626; }
  .st-card .row2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; font-size:12px; color:#6b7280; }
  .st-card .row2 b { display:block; color:#111827; font-size:13px; font-variant-numeric:tabular-nums; }
  .st-badge { font-size:11px; font-weight:700; padding:2px 8px; border-radius:20px; }
  .st-badge.paid { background:#dcfce7; color:#166534; }
  .st-badge.advance { background:#fef3c7; color:#92400e; }
  .st-badge.unpaid { background:#fee2e2; color:#991b1b; }
  .st-card .acts { display:flex; flex-wrap:wrap; gap:6px; }
  .st-card .acts a { font-size:12px; padding:4px 10px; border-radius:8px; }
  .st-empty { background:#fff; border-radius:14px; padding:40px 20px; text-align:center; color:#6b7280; }
  .st-tl { list-style:none; padding:0; margin:0; }
  .st-tl li { display:flex; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid #f1f5f9; font-size:13px; }
  .st-tl li:last-child { border-bottom:0; }
  .st-tl .muted { color:#6b7280; font-size:12px; }
  .st-calc { background:#f0fdf4; border-radius:10px; padding:10px 12px; font-size:14px; }

/* ---- rapports (étape 7a) : barre des rapports, haut commun, vue d'ensemble */
.afr-nav { display:flex; gap:2px; background:#fff; border:1px solid var(--af-line,#e8edf3); border-radius:14px; padding:5px; margin:0 0 14px; }
  .afr-nav > a, .afr-nav summary { flex:1 1 0; min-width:0; display:flex; align-items:center; justify-content:center; gap:7px; padding:8px 6px; border-radius:10px;
    font-weight:600; font-size:13px; color:#475569; white-space:nowrap; text-decoration:none; cursor:pointer; list-style:none; }
  .afr-nav summary::-webkit-details-marker { display:none; }
  .afr-nav svg { width:16px; height:16px; flex:none; opacity:.75; }
  .afr-nav > a:hover, .afr-nav summary:hover { background:#f4f7fb; color:#0f172a; }
  .afr-nav > a.on, .afr-nav details.on summary { background:#4E97FD; color:#fff; }
  .afr-nav > a.on svg, .afr-nav details.on summary svg { opacity:1; }
  .afr-nav details { flex:1 1 0; min-width:0; position:relative; display:flex; }
  .afr-nav details summary { width:100%; }
  .afr-nav .afr-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:1050; background:#fff; border:1px solid #e8edf3; border-radius:12px;
    box-shadow:0 10px 30px rgba(15,23,42,.12); padding:6px; min-width:240px; }
  .afr-nav .afr-menu a { display:block; padding:9px 12px; border-radius:8px; color:#334155; font-size:13px; font-weight:600; text-decoration:none; white-space:nowrap; }
  .afr-nav .afr-menu a:hover { background:#f4f7fb; }
  .afr-nav .afr-menu a.on { color:#2563eb; background:#eef4ff; }
  @media (max-width: 1100px) { .afr-nav { overflow-x:auto; } .afr-nav > a, .afr-nav details { flex:none; padding-left:12px; padding-right:12px; } .afr-nav details { padding:0; } }
.afr-hero .af-hero-head p { min-height: 20px; }
  .afr-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 16px; }
  .afr-per { display:inline-flex; flex-wrap:wrap; background:#fff; border:1px solid var(--af-line,#e8edf3); border-radius:11px; padding:4px; gap:2px; }
  .afr-per button { border:0; background:transparent; padding:6px 11px; border-radius:8px; font-size:13px; font-weight:600; color:#475569; white-space:nowrap; }
  .afr-per button:hover { background:#f4f7fb; }
  .afr-per button.on { background:#0f172a; color:#fff; }
  .afr-custom input, .afr-sel { border:1px solid var(--af-line,#e8edf3); border-radius:10px; padding:0 10px; height:38px; font-size:13px; background:#fff; color:#334155; font-weight:600; }
  .afr-exp { position:relative; }
  .afr-exp summary { list-style:none; cursor:pointer; }
  .afr-exp summary::-webkit-details-marker { display:none; }
  .afr-exp-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:1050; background:#fff; border:1px solid #e8edf3; border-radius:12px; box-shadow:0 10px 30px rgba(15,23,42,.12); padding:6px; min-width:140px; }
  .afr-exp-menu a { display:block; padding:8px 12px; border-radius:8px; color:#334155; font-weight:600; font-size:13px; cursor:pointer; }
  .afr-exp-menu a:hover { background:#f4f7fb; }
  .afr-card { background:#fff; border:1px solid var(--af-line,#e8edf3); border-radius:16px; padding:6px 16px 10px; }
  .afr-card .af-tabs { margin:8px 0 4px; }
  .afr-card .dt-buttons { display:none; }
  .afr-ok { color:#15803d; }
  .afr-q { display:inline-block; min-width:70px; text-align:center; padding:4px 10px; border-radius:8px; font-weight:700; font-size:12.5px; white-space:nowrap; }
  .afr-q-ok { background:#ecfdf3; color:#15803d; } .afr-q-low { background:#fff4e5; color:#c2410c; } .afr-q-out { background:#fee2e2; color:#b91c1c; }
  .afr-pimg { width:36px; height:36px; border-radius:9px; background:#f1f5f9; display:inline-flex; align-items:center; justify-content:center; color:#94a3b8; flex:none; }
  .afr-pimg svg { width:18px; height:18px; }
  .afr-prod { display:flex; align-items:center; gap:10px; justify-content:center; }
  .afr-prod > div { text-align:left; }
  /* produits / noms : alignes a gauche, sur une seule ligne */
  .content-section table.dataTable thead th.afr-l, .content-section table.dataTable tbody td.afr-l, .content-section table.dataTable tfoot th.afr-l { text-align:left !important; }
  .afr-pr { display:flex; align-items:center; gap:8px; min-width:0; }
  .afr-pr .afr-pimg { width:28px; height:28px; border-radius:8px; }
  .afr-pr .afr-pimg svg { width:14px; height:14px; }
  .afr-pr .af-ini { width:28px; height:28px; font-size:10.5px; }
  .afr-nm { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:300px; color:var(--af-ink,#0f172a); }
  .afr-cd { color:#64748b; font-size:12px; white-space:nowrap; }
  @media (max-width:1400px) { .afr-nm { max-width:220px; } }
  @media (max-width:1250px) { .afr-nm { max-width:170px; } }
  .afr-mode { display:inline-block; padding:3px 10px; border-radius:12px; font-size:12px; font-weight:600; white-space:nowrap; }
  .afr-m-cash { background:#dcfce7; color:#15803d; } .afr-m-om { background:#ffedd5; color:#c2410c; } .afr-m-chq { background:#e0edff; color:#1d5fd1; } .afr-m-vir { background:#f1ecfd; color:#6d28d9; } .afr-m-x { background:#f1f5f9; color:#475569; }
  .afr-card table.dataTable > tbody > tr > td { padding-top:6px; padding-bottom:6px; }
  @media print { .afr-bar, .afr-exp, #afr-print, #Show_Modal_Filter, .afr-nav { display:none !important; } }
.rp-head { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; margin-bottom:16px; }
  .rp-periods { display:flex; flex-wrap:wrap; gap:6px; }
  .rp-periods button { border:1px solid #e5e7eb; background:#fff; color:#374151; border-radius:10px; padding:7px 13px; font-size:13px; font-weight:600; }
  .rp-periods button.on { background:#111827; color:#fff; border-color:#111827; }
  .rp-custom { display:flex; gap:6px; align-items:center; }
  .rp-custom input, .rp-head select { border:1px solid #e5e7eb; border-radius:10px; padding:6px 10px; font-size:13px; background:#fff; height:36px; }
  .rp-range { color:#6b7280; font-size:13px; margin:-6px 0 14px; }
  .rp-hero { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
  .rp-kpi { position:relative; background:#fff; border-radius:16px; padding:16px 18px; box-shadow:0 2px 12px rgba(15,23,42,.06); overflow:hidden; }
  .rp-kpi .ic { width:38px; height:38px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:19px; color:#fff; margin-bottom:10px; }
  .rp-kpi .lb { font-size:12.5px; color:#6b7280; font-weight:500; }
  .rp-kpi .vl { font-size:21px; font-weight:600; color:#111827; line-height:1.25; font-variant-numeric:tabular-nums; word-break:break-word; }
  .rp-kpi .vl small { font-size:12px; font-weight:600; color:#9ca3af; }
  .rp-kpi .sb { font-size:12px; color:#6b7280; margin-top:4px; }
  .rp-kpi.big { background:linear-gradient(180deg,#f3fbf6,#fff); border:1px solid #bfe3cc; }
  
  .rp-kpi.big .vl { color:#15803d; }
  .rp-kpi.big .ic { background:#16a34a !important; }
  .neg { color:#dc2626 !important; }
  .rp-kpi.big .neg { color:#dc2626 !important; }
  .rp-mini { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
  .rp-mini .rp-kpi { padding:13px 16px; }
  .rp-mini .vl { font-size:18px; }
  .rp-grid2 { display:grid; grid-template-columns:2fr 1fr; gap:14px; margin-bottom:14px; }
  .rp-grid3 { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
  .rp-box { background:#fff; border-radius:16px; padding:16px 18px; box-shadow:0 2px 12px rgba(15,23,42,.06); min-width:0; }
  .rp-box h5 { font-size:15px; font-weight:700; color:#111827; margin:0 0 10px; display:flex; justify-content:space-between; align-items:center; }
  .rp-box h5 span { font-size:12px; color:#9ca3af; font-weight:500; }
  .rp-chart { height:300px; }
  .rp-list .row-i { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px dashed #eef0f3; }
  .rp-list .row-i:last-child { border-bottom:none; }
  .rp-list .rank { width:24px; height:24px; border-radius:7px; background:#eef2ff; color:#4f46e5; font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; flex:none; }
  .rp-list .nm { flex:1; min-width:0; }
  .rp-list .nm b { display:block; font-size:13px; color:#1f2937; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .rp-list .nm .bar { height:5px; background:#f1f5f9; border-radius:3px; margin-top:4px; }
  .rp-list .nm .bar span { display:block; height:100%; border-radius:3px; background:linear-gradient(90deg,#6366f1,#a855f7); }
  .rp-list .am { text-align:right; font-size:13px; font-weight:700; color:#111827; white-space:nowrap; }
  .rp-list .am small { display:block; font-weight:500; color:#9ca3af; font-size:11.5px; }
  .rp-flow { display:flex; flex-direction:column; gap:8px; }
  .rp-flow .ln { display:flex; justify-content:space-between; font-size:13.5px; padding:7px 0; border-bottom:1px solid #f1f5f9; }
  .rp-flow .ln.tot { border-bottom:none; border-top:2px solid #111827; font-weight:700; font-size:15px; padding-top:10px; }
  .rp-warn { background:#fffbeb; border:1px solid #fde68a; color:#92400e; border-radius:12px; padding:10px 14px; font-size:13px; margin-bottom:14px; }
  .rp-warn a { color:#b45309; font-weight:700; text-decoration:underline; cursor:pointer; }
  .rp-empty { color:#9ca3af; text-align:center; padding:30px 0; font-size:13px; }
  .rp-loading { opacity:.45; pointer-events:none; transition:opacity .2s; }
  @media (max-width:991px) { .rp-hero, .rp-mini { grid-template-columns:repeat(2,minmax(0,1fr)); } .rp-grid2, .rp-grid3 { grid-template-columns:1fr; } }
  @media (max-width:576px) { .rp-hero, .rp-mini { gap:8px; } .rp-kpi { padding:12px; } .rp-kpi .vl { font-size:17px; } .rp-mini .vl { font-size:15px; } .rp-chart { height:240px; } }

.afr-card table.dataTable thead th.afr-l, .afr-card table.dataTable tbody td.afr-l, .afr-card table.dataTable tfoot th.afr-l { text-align:left !important; }
.afr-hero .af-hero-head { flex-wrap: wrap; }
@media print { .layout-sidebar, .layout-header, .afr-nav, .afr-bar, .afr-exp, #afr-print, #afr-filter, .rp-head, .rp-noprint, .af-tabs, .dataTables_length, .dataTables_filter, .dataTables_paginate { display:none !important; }
  .rp-kpi, .rp-box { box-shadow:none !important; border:1px solid #cbd5e1; break-inside:avoid; } * { -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; } }
.afr-card.afr-card-x .dt-buttons { display:inline-flex; }

/* ---- boutiques (étape 8b) */
.sh-note { display:flex; gap:10px; background:#f0f6ff; border:1px solid #dbe8fd; border-radius:12px; padding:12px 15px; color:#334155; margin-bottom:14px; line-height:1.55; font-size:13.5px; }
  .sh-note svg { width:18px; height:18px; color:#4E97FD; flex:none; margin-top:2px; }
  .sh-card { background:#fff; border:1px solid var(--af-line,#e8edf3); border-radius:16px; overflow:hidden; }
  .sh-table { margin:0; }
  .sh-table th, .sh-table td { text-align:center !important; vertical-align:middle !important; padding:12px 9px !important; }
  .sh-table td.em { word-break:break-all; max-width:220px; }
  .sh-acts { display:inline-flex; gap:6px; }
  .sh-ic { width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; border:1px solid #e5e7eb; border-radius:9px; color:#2563eb !important; cursor:pointer; background:#fff; }
  .sh-ic svg { width:16px; height:16px; }
  .sh-ic.r { color:#dc2626 !important; } .sh-ic.g { color:#16a34a !important; }
  .sh-ic:hover { background:#f8fafc; }
  .sh-name { display:inline-flex; align-items:center; gap:8px; font-weight:600; }
  .sh-ini { width:30px; height:30px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:600; flex:none; }
  .sh-b { display:inline-flex; align-items:center; border:1px solid #c9dcfb; color:#2563eb !important; border-radius:8px; padding:5px 10px; font-size:12.5px; font-weight:600; cursor:pointer; margin:0 2px; white-space:nowrap; }
  .sh-b.r { border-color:#fecaca; color:#dc2626 !important; } .sh-b.g { border-color:#bbf7d0; color:#15803d !important; }
  .sh-b:hover { background:#f8fafc; }
  .sh-cp { border:1px solid #e2e8f0; background:#f8fafc; border-radius:12px; padding:12px 14px; }
  .sh-cp-t { font-weight:700; margin:0; cursor:pointer; display:flex; gap:8px; align-items:center; }
  .sh-cp-t span { font-weight:400; color:#64748b; font-size:13px; }
  .sh-cp input[type=checkbox], .sh-cp-o input { width:16px; height:16px; vertical-align:middle; }
  .sh-cp-o { display:flex; gap:18px; flex-wrap:wrap; margin:8px 0; }
  .sh-cp-o label { margin:0; cursor:pointer; }
  .sh-chip { display:inline-block; border:1px solid #cbd5e1; border-radius:999px; padding:4px 11px; font-size:13px; margin:0 6px 6px 0; cursor:pointer; background:#fff; user-select:none; }
  .sh-chip.on { background:#2563eb; color:#fff; border-color:#2563eb; }
  .sh-cp-note { background:#fff; border:1px solid #e2e8f0; border-radius:10px; padding:10px 12px; font-size:13px; color:#475569; margin-top:8px; }

/* éditeur des modèles d'e-mails (remplace Summernote) */
.mx-ed{border:1px solid #dee2e6;border-radius:8px;background:#fff;overflow:hidden}
.mx-ed-bar{display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:6px;background:#f8f9fa;border-bottom:1px solid #dee2e6}
.mx-ed-btn{min-width:32px;height:30px;padding:0 8px;border:1px solid #dee2e6;border-radius:6px;background:#fff;color:#333;font-size:13px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;position:relative;margin:0}
.mx-ed-btn:hover,.mx-ed-btn.on{background:#e9ecef}
.mx-ed-btn input[type=color]{position:absolute;inset:0;opacity:0;cursor:pointer}
.mx-ed-sel{height:30px;border:1px solid #dee2e6;border-radius:6px;background:#fff;font-size:13px;padding:0 6px}
.mx-ed-sep{width:1px;height:20px;background:#dee2e6;margin:0 2px}
.mx-ed-area{min-height:300px;padding:12px 14px;outline:none;overflow:auto}
.mx-ed-code{min-height:300px;border:0;border-radius:0;font-family:monospace;font-size:12.5px}
.tab-content>.tab-pane:not(.active){display:none}
