/* V404 — fenêtres (pop-up) : toutes les données bien visibles, style « fiche » aux couleurs du logo */
html body dialog[open]{border:0!important;border-radius:18px!important;box-shadow:0 18px 60px #10285b55!important}
html body dialog[open]:has(.dj-client-popup),html body dialog[open]:has(.dj-manif-table),html body dialog[open]:has(table){width:min(960px,calc(100vw - 28px))!important;max-width:960px!important}
html body dialog[open]>form>h3{background:linear-gradient(100deg,#10285b,#12519a)!important;color:#fff!important;border-bottom:3px solid #d7192d;font-weight:900}
html body .dj-client-details{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
html body .dj-client-field{background:#f4f8fe!important;border:1px solid #cfe0f5!important;border-left:5px solid #12519a!important;border-radius:12px!important;padding:10px 14px!important;gap:3px!important}
html body .dj-client-field:first-child{background:#e8f1fc!important;border-left-color:#d7192d!important}
html body .dj-client-label{font-size:11px!important;font-weight:900!important;text-transform:uppercase;letter-spacing:.5px;color:#12519a!important}
html body .dj-client-value{font-size:16px!important;font-weight:700!important;color:#10285b!important}
html body .dj-client-parcels h4{margin:6px 0 10px!important;padding:8px 12px;border-radius:10px;background:#10285b;color:#fff!important;font-size:15px!important;border-bottom:3px solid #d7192d}
html body .dj-client-table table{border-collapse:separate!important;border-spacing:0;border:1px solid #cfe0f5;border-radius:12px;overflow:hidden}
html body .dj-client-table th{background:linear-gradient(180deg,#12519a,#10285b)!important;color:#fff!important;font-size:12px;text-transform:uppercase;letter-spacing:.4px;border-bottom:3px solid #d7192d!important}
html body .dj-client-table td{font-size:14px;border-bottom:1px solid #e3ecf8}
html body .dj-client-table tr:nth-child(even) td{background:#f4f8fe}
html body .dj-client-table tr:last-child td{border-bottom:0}
/* anciennes lignes .rw (Expédition, Suivi, Compte…) -> champs en cartes */
html body dialog .sm,html body dialog form>.rw{display:block}
html body dialog .sm{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:6px 0 12px}
html body dialog .rw{display:flex;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;gap:3px!important;background:#f4f8fe;border:1px solid #cfe0f5;border-left:5px solid #12519a;border-radius:12px;padding:10px 14px!important;margin:8px 0!important}
html body dialog .rw>span{font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.5px;color:#12519a}
html body dialog .rw>b{font-size:16px;font-weight:700;color:#10285b;overflow-wrap:anywhere}
html body dialog table{width:100%;border-collapse:separate;border-spacing:0}
html body dialog table th{background:linear-gradient(180deg,#12519a,#10285b)!important;color:#fff!important;font-size:12px;text-transform:uppercase;border-bottom:3px solid #d7192d}
html body dialog table td{border-bottom:1px solid #e3ecf8;font-size:14px}
html body dialog table tr:nth-child(even) td{background:#f4f8fe}
@media(max-width:600px){html body .dj-client-details,html body dialog .sm{grid-template-columns:minmax(0,1fr)!important}}
html body dialog#dlg[open]:has(.dj-client-popup),html body dialog#dlg[open]:has(.dj-manif-table),html body dialog#dlg[open]:has(table){width:min(960px,calc(100vw - 28px))!important;max-width:960px!important}
html body .dj-client-field{display:flex!important;flex-direction:column!important;align-items:flex-start!important}
html body .dj-client-field>*{display:block!important;width:100%}
html body .dj-fiche-wrap{display:block!important;width:100%}
html body .dj-fiche-wrap>*{display:block;width:100%;box-sizing:border-box;margin-bottom:12px}
html body dialog#dlg[open]>form{width:100%!important;max-width:none!important;box-sizing:border-box}
html body dialog#dlg[open] .dj-client-popup,html body dialog#dlg[open] .dj-client-parcels,html body dialog#dlg[open] .dj-client-table{width:100%!important;max-width:100%!important}
html body .dj-client-table table{min-width:0!important}
/* Sénégal — Réception */
.dj-sn-head{display:grid;gap:12px;padding:12px}
.dj-sn-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.dj-sn-st{display:flex;flex-direction:column;gap:2px;background:#fff;border:1px solid #cfe0f5;border-left:6px solid var(--tone,#12519a);border-radius:14px;padding:12px 14px;box-shadow:0 3px 10px #10285b14}
.dj-sn-st span{font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.5px;color:#12519a}
.dj-sn-st b{font-size:30px;line-height:1.1;color:#10285b}
.dj-sn-st small{font-size:13px;color:#4a6a96;font-weight:600}
.dj-sn-scan{display:flex;flex-direction:column;gap:6px;padding:14px;border-radius:16px;background:linear-gradient(100deg,#10285b,#12519a);border-bottom:4px solid #d7192d}
.dj-sn-scan label{color:#fff;font-weight:900;font-size:16px}
.dj-sn-scan input{width:100%;box-sizing:border-box;min-height:52px;padding:0 14px;border:0;border-radius:12px;font:700 18px Roboto,sans-serif;color:#10285b}
.dj-sn-scan small{color:#cfe3fa;font-size:13px}
.dj-sn-empty{display:flex;flex-direction:column;gap:4px;align-items:center;text-align:center;margin:4px 12px 12px;padding:22px 14px;border:2px dashed #b9d4f2;border-radius:16px;background:#f4f8fe;color:#10285b}
.dj-sn-empty b{font-size:17px}.dj-sn-empty span{font-size:14px;color:#4a6a96}
@media(max-width:900px){.dj-sn-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
html body .dj-sn-scan small{color:#d7e9fc!important;font-weight:600}
@media(min-width:641px){
html body .dj-sn-tab td,html body .dj-sn-tab th{padding:8px 7px!important;font-size:12.5px!important;white-space:normal!important;overflow-wrap:anywhere}
html body .dj-sn-tab .sc{max-height:none!important;overflow-x:auto}
html body .dj-sn-tab td .btn.s{padding:6px 8px;font-size:12px}
html body .dj-sn-tab td:nth-child(4) .ph,html body .dj-sn-tab td:nth-child(4)>*{max-width:70px;font-size:11px}
}
html body main#main .dj-sn-head .dj-sn-scan small{color:#d7e9fc!important;opacity:1!important}
html body dialog form.djf-compact-grid>.dj-client-popup,html body dialog form.djf-compact-grid>.dj-fiche-wrap,html body dialog form.djf-compact-grid>h3,html body dialog form.djf-compact-grid>.row,html body dialog form.djf-compact-grid>.dj-manif-table{grid-column:1/-1!important}
html body dialog .dj-client-details{grid-template-columns:repeat(3,minmax(0,1fr))!important}
@media(max-width:900px){html body dialog .dj-client-details{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:600px){html body dialog .dj-client-details{grid-template-columns:minmax(0,1fr)!important}}
@media(max-width:640px){
html body dialog#dlg[open]:not(#x):not(#y){position:fixed!important;inset:0!important;left:0!important;top:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border-radius:0!important;display:flex!important;flex-direction:column;overflow:hidden!important}
html body dialog#dlg[open]>.djm-bar b{display:none}
html body dialog#dlg[open]>form{flex:1;min-height:0;overflow-y:auto!important;padding:10px!important;display:block!important}
html body dialog#dlg[open]>form>h3{margin:0 0 10px!important;border-radius:12px;padding:10px 12px;font-size:16px!important}
html body dialog#dlg[open] form>.row{position:sticky;bottom:0;display:grid!important;grid-template-columns:1fr 1fr;gap:8px;padding:10px 0 4px;background:#eef4fc}
html body dialog#dlg[open] form>.row .btn{width:100%;min-height:48px}
}
@media(max-width:640px){
html body dialog#dlg[open]:not(#x) form>.row{position:static!important;margin-top:12px}
html body dialog#dlg[open]:not(#x)>form.djf-compact-grid{display:block!important}
}
/* V407 — section QR Codes (Configuration) */
html body .djf-qr-section #djf-config-qr-panel{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin-top:12px}
html body .djf-qr-section #djf-config-qr-panel:not(:has(.djf-config-qr-card)){display:block!important}
html body .djf-qr-section .djf-config-qr-card{max-width:none!important;background:#fff;border:1px solid #cfe0f5!important;border-top:5px solid #12519a!important;border-radius:14px!important;padding:12px!important;box-shadow:0 3px 10px #10285b14;align-items:center}
html body .djf-qr-section .djf-config-qr-card:nth-child(even){border-top-color:#d7192d!important}
html body .djf-qr-section .djf-config-qr-card strong{color:#10285b;font-size:15px}
html body .djf-qr-section .djf-config-qr-card svg{width:100%;max-width:170px;height:auto}
html body .djf-qr-section .djf-config-qr-card small{font-size:11px;color:#4a6a96;text-align:center}
html body .djf-qr-section .djf-qr-acts{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin-top:4px}
html body .djf-qr-section .djf-qr-acts .btn{min-height:38px;padding:0 10px;font-size:13px}
html body .djf-qr-section #djf-config-qr-panel>.btn{grid-column:1/-1}
/* V409 — manifeste sans montant : tableau sans coupure */
html body dialog#dlg.dj-manif-modal[open]{width:min(1100px,96vw)!important;max-width:96vw!important}
html body .dj-manif-summary b{white-space:nowrap}
html body .dj-manif-table{overflow-x:auto}
html body .dj-manif-table th,html body .dj-manif-table td{padding:8px 7px!important}
html body .dj-manif-table .pill{white-space:nowrap}
/* V411 — tuiles de synthèse : toutes sur une seule ligne */
html body .dj-manif-summary{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px!important}
html body .dj-manif-summary>div{min-width:0!important;padding:8px 10px!important}
html body .dj-manif-summary span{font-size:11px!important;white-space:nowrap}
html body .dj-manif-summary b{font-size:14px!important;white-space:normal!important;overflow-wrap:anywhere;line-height:1.2}
html body .dj-sn-stats{display:grid!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important;gap:8px!important}
html body .dj-sn-stats>*{min-width:0!important}
@media (max-width:640px){
 html body .dj-manif-summary{gap:5px!important}
 html body .dj-manif-summary>div{padding:6px 5px!important}
 html body .dj-manif-summary span{font-size:9px!important}
 html body .dj-manif-summary b{font-size:11px!important}
 html body .dj-sn-stats>*{padding:8px 6px!important}
 html body .dj-sn-stats span{font-size:10px!important}
}
html body dialog#dlg .dj-manif-summary{width:100%!important;max-width:none!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-auto-flow:row!important;flex-wrap:nowrap!important}
html body dialog#dlg .dj-manif-summary>div{width:auto!important;flex:none!important;grid-column:auto!important}
html body dialog#dlg .dj-manif-summary b{word-break:normal!important;overflow-wrap:break-word!important;hyphens:auto}
@media (max-width:640px){html body dialog#dlg .dj-manif-summary span{font-size:8px!important;white-space:normal!important}html body dialog#dlg .dj-manif-summary b{font-size:10px!important}html body dialog#dlg .dj-manif-summary>div{padding:5px 4px!important}}
html body dialog#dlg .dj-manif-summary,html body dialog#dlg .dj-manif-table,html body dialog#dlg .dj-manif-actions{grid-column:1/-1!important}
/* V412 — ligne de boutons unique en bas des fenêtres */
html body dialog#dlg form>.row{display:flex!important;flex-wrap:nowrap!important;gap:8px!important;justify-content:flex-end!important;align-items:center!important;grid-column:1/-1!important}
html body dialog#dlg form>.row .btn{white-space:nowrap}
@media (max-width:640px){html body dialog#dlg form>.row{flex-wrap:wrap!important}html body dialog#dlg form>.row .btn{flex:1 1 auto}}
@media (max-width:640px){html body dialog#dlg[open]:not(#x) form>.row{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:6px!important}
html body dialog#dlg[open]:not(#x) form>.row .btn,html body dialog#dlg[open]:not(#x) form>.row button{flex:1 1 0!important;min-width:0!important;width:auto!important;padding:0 6px!important;font-size:12.5px!important;white-space:normal!important;line-height:1.15}}
