/* Maxime Book Order Flow 0.5.0 - manager and tracking */
html body .mg-manager,
html body .mg-detail-page,
html body .mg-track {
  --mg-black: #111;
  --mg-orange: #ef6a22;
  --mg-blue: #3446df;
  --mg-green: #16813a;
  --mg-red: #b42318;
  --mg-soft: #f5f6f7;
  --mg-border: #e1e4e8;
  --mg-muted: #687078;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--mg-black);
}

html body .mg-manager *,
html body .mg-detail-page *,
html body .mg-track * {
  box-sizing: border-box;
}

html body .mg-manager {
  max-width: 1480px !important;
  margin: 18px auto 68px !important;
  padding: 0 clamp(12px, 2.4vw, 28px) !important;
}

html body .mg-manager-top {
  align-items: flex-start !important;
  margin-bottom: 16px !important;
}

html body .mg-manager-top h1 {
  margin-top: 5px !important;
  font-size: clamp(34px, 4vw, 54px) !important;
  line-height: 1.02 !important;
}

html body .mg-welcome {
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr) !important;
  gap: 14px !important;
  margin-bottom: 16px !important;
}

html body .mg-welcome-main,
html body .mg-help {
  padding: 18px !important;
  border-radius: 18px !important;
}

html body .mg-manager-kpis {
  gap: 12px !important;
}

html body .mg-kpi {
  padding: 17px !important;
  border-radius: 17px !important;
}

html body .mg-kpi strong {
  margin: 6px 0 3px !important;
  font-size: 31px !important;
}

html body .mg-manager-filters {
  padding: 11px !important;
  border-radius: 17px !important;
}

html body .mg-filter-main input,
html body .mg-filter-advanced select {
  min-width: 0 !important;
  min-height: 48px !important;
  font-size: 16px !important;
}

html body .mg-order {
  padding: 18px !important;
  border-radius: 20px !important;
}

html body .mg-order-head h3 {
  font-size: 21px !important;
}

html body .mg-next {
  padding: 16px !important;
  border-radius: 16px !important;
}

html body .mg-next h4 {
  font-size: 20px !important;
}

html body .mg-manager-btn,
html body .mg-link-btn,
html body .mg-contact-picker summary {
  min-height: 46px !important;
  padding: 10px 13px !important;
  border-radius: 11px !important;
  font-size: 14px !important;
}

html body .mg-order.is-complete {
  padding: 15px !important;
  box-shadow: none !important;
  background: #fbfcfb !important;
}

html body .mg-order.is-complete .mg-progress,
html body .mg-order.is-complete .mg-next {
  display: none !important;
}

html body .mg-order.is-complete .mg-quick-info {
  margin-top: 12px !important;
}

html body .mg-communication {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dfe3e8;
  border-radius: 15px;
  background: #fff;
}

html body .mg-communication > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
}

html body .mg-communication > summary::-webkit-details-marker {
  display: none;
}

html body .mg-communication > summary::after {
  content: "+";
  font-size: 22px;
}

html body .mg-communication[open] > summary::after {
  content: "-";
}

html body .mg-communication-body {
  padding-top: 13px;
}

html body .mg-message-template {
  padding: 13px;
  border: 1px solid #e3e6ea;
  border-radius: 13px;
  background: #f8f9fa;
}

html body .mg-message-template + .mg-message-template {
  margin-top: 10px;
}

html body .mg-message-template h5 {
  margin: 0 0 6px;
  font-size: 16px;
}

html body .mg-message-template p {
  margin: 0;
  color: #5f666d;
  line-height: 1.48;
}

html body .mg-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

html body .mg-message-actions form {
  margin: 0;
}

html body .mg-message-actions .mg-manager-btn,
html body .mg-message-actions .mg-link-btn {
  width: auto !important;
}

html body .mg-message-preview {
  margin-top: 10px;
  padding: 12px;
  border-left: 3px solid var(--mg-blue);
  border-radius: 8px;
  background: #fff;
  color: #454b51;
  white-space: pre-line;
  line-height: 1.55;
}

html body .mg-comm-history {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

html body .mg-comm-history-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f6f8;
  font-size: 13px;
  line-height: 1.45;
}

html body .mg-comm-history-item time {
  display: block;
  margin-top: 3px;
  color: #737b83;
}

html body .mg-preflight {
  display: grid;
  gap: 8px;
  margin: 11px 0;
}

html body .mg-preflight-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7e8;
  color: #704900;
  font-size: 13px;
  line-height: 1.42;
}

html body .mg-preflight-item.error {
  background: #fff0f0;
  color: #8b1f1f;
}

html body .mg-preflight-item.ok {
  background: #eaf8ef;
  color: #176b34;
}

html body .mg-track {
  width: 100%;
  max-width: 920px;
  margin: 28px auto 72px;
  padding: 0 16px;
}

html body .mg-track-card {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--mg-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .06);
}

html body .mg-track-kicker {
  color: var(--mg-orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

html body .mg-track h1 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
}

html body .mg-track-lead {
  margin: 0;
  color: var(--mg-muted);
  font-size: 17px;
  line-height: 1.55;
}

html body .mg-track-progress {
  display: grid;
  grid-template-columns: repeat(var(--mg-track-count), minmax(0, 1fr));
  gap: 0;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

html body .mg-track-progress li {
  position: relative;
  text-align: center;
  color: #9aa0a6;
  font-size: 12px;
  font-weight: 800;
}

html body .mg-track-progress li::before {
  content: "";
  position: absolute;
  top: 17px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: #e5e8eb;
}

html body .mg-track-progress li:first-child::before {
  display: none;
}

html body .mg-track-progress li.done::before,
html body .mg-track-progress li.current::before {
  background: #bfe8cb;
}

html body .mg-track-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border: 2px solid #d8dce0;
  border-radius: 50%;
  background: #eef0f2;
}

html body .mg-track-progress li.done .mg-track-dot {
  border-color: var(--mg-green);
  background: var(--mg-green);
  color: #fff;
}

html body .mg-track-progress li.current .mg-track-dot {
  border-color: #111;
  background: #fff;
  color: #111;
  box-shadow: 0 0 0 4px #f0f1f2;
}

html body .mg-track-label {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
}

html body .mg-track-progress li.done,
html body .mg-track-progress li.current {
  color: #111;
}

html body .mg-track-next {
  padding: 18px;
  border: 1px solid #dce8df;
  border-radius: 16px;
  background: #f0faf3;
}

html body .mg-track-next h2 {
  margin: 0 0 7px;
  font-size: 24px;
}

html body .mg-track-next p {
  margin: 0;
  color: #5d6660;
  line-height: 1.5;
}

html body .mg-track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

html body .mg-track-info {
  padding: 16px;
  border: 1px solid var(--mg-border);
  border-radius: 15px;
  background: #fff;
}

html body .mg-track-info small {
  display: block;
  margin-bottom: 4px;
  color: #727980;
}

html body .mg-track-info strong,
html body .mg-track-info a {
  overflow-wrap: anywhere;
}

html body .mg-track-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  padding: 13px 18px;
  border-radius: 13px;
  background: #111;
  color: #fff !important;
  font-weight: 900;
  text-decoration: none !important;
}

html body .mg-track-faq {
  margin-top: 18px;
  border-top: 1px solid var(--mg-border);
}

html body .mg-track-faq details {
  border-bottom: 1px solid var(--mg-border);
}

html body .mg-track-faq summary {
  padding: 15px 0;
  cursor: pointer;
  font-weight: 800;
}

html body .mg-track-faq p {
  margin: 0 0 15px;
  color: var(--mg-muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  html body .mg-welcome {
    grid-template-columns: 1fr !important;
  }

  html body .mg-manager-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  html body .mg-manager {
    margin-top: 12px !important;
    padding: 0 12px !important;
  }

  html body .mg-manager-top {
    display: block !important;
  }

  html body .mg-manager-top h1 {
    font-size: 36px !important;
  }

  html body .mg-manager-user {
    margin-top: 10px !important;
    padding-top: 0 !important;
    white-space: normal !important;
  }

  html body .mg-welcome-main,
  html body .mg-help {
    padding: 16px !important;
  }

  html body .mg-welcome-main h2 {
    font-size: 22px !important;
  }

  html body .mg-filter-main {
    grid-template-columns: 1fr !important;
  }

  html body .mg-filter-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  html body .mg-filter-actions button,
  html body .mg-manager-refresh {
    width: 100% !important;
  }

  html body .mg-filter-advanced-grid {
    grid-template-columns: 1fr !important;
  }

  html body .mg-orders {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  html body .mg-order {
    padding: 16px !important;
  }

  html body .mg-order-head {
    display: block !important;
  }

  html body .mg-badges {
    justify-content: flex-start !important;
    margin-top: 10px !important;
  }

  html body .mg-progress {
    margin: 16px 0 14px !important;
  }

  html body .mg-progress-label {
    font-size: 10px !important;
  }

  html body .mg-quick-info,
  html body .mg-order-grid {
    grid-template-columns: 1fr !important;
  }

  html body .mg-contact-buttons,
  html body .mg-message-actions {
    grid-template-columns: 1fr !important;
  }

  html body .mg-message-actions {
    display: grid !important;
  }

  html body .mg-message-actions .mg-manager-btn,
  html body .mg-message-actions .mg-link-btn,
  html body .mg-message-actions form {
    width: 100% !important;
  }

  html body .mg-secondary-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  html body .mg-secondary-actions > * {
    width: 100% !important;
  }

  html body .mg-detail-page {
    padding: 0 12px !important;
  }

  html body .mg-track {
    margin-top: 16px;
    padding: 0 12px;
  }

  html body .mg-track-card {
    padding: 19px;
    border-radius: 18px;
  }

  html body .mg-track-progress {
    overflow-x: auto;
    padding-bottom: 5px;
  }

  html body .mg-track-progress li {
    min-width: 92px;
  }

  html body .mg-track-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  html body .mg-manager-top h1 {
    font-size: 32px !important;
  }

  html body .mg-manager-kpis {
    gap: 10px !important;
  }

  html body .mg-kpi {
    padding: 14px !important;
  }

  html body .mg-kpi span {
    font-size: 13px !important;
  }

  html body .mg-kpi strong {
    font-size: 28px !important;
  }

  html body .mg-order-head h3 {
    font-size: 20px !important;
  }

  html body .mg-next h4 {
    font-size: 19px !important;
  }
}

/* Manager finishing: no floating control may cover an action */
body.mg-book-manager-page .back-to-top,
body.mg-book-manager-page .scroll-to-top,
body.mg-book-manager-page [class*="scroll-top"],
body.mg-book-manager-page [class*="back-to-top"],
body.mg-book-tracking-page .back-to-top,
body.mg-book-tracking-page .scroll-to-top,
body.mg-book-tracking-page [class*="scroll-top"],
body.mg-book-tracking-page [class*="back-to-top"] {
  display: none !important;
}

html body .mg-meeting-form {
  display: grid;
  gap: 10px;
  margin: 0;
}

html body .mg-meeting-form label {
  display: grid;
  gap: 6px;
  color: #34383d;
  font-size: 13px;
  font-weight: 800;
}

html body .mg-meeting-form input,
html body .mg-meeting-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #d6d9dd;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 16px;
}

html body .mg-meeting-form textarea {
  min-height: 76px;
  resize: vertical;
}

html body .mg-meeting-form .mg-manager-btn {
  width: 100%;
  justify-content: center;
}

@media (min-width: 760px) {
  html body .mg-meeting-form {
    grid-template-columns: 1fr 1fr;
  }

  html body .mg-meeting-form label:nth-of-type(3),
  html body .mg-meeting-form .mg-manager-btn {
    grid-column: 1 / -1;
  }
}


/* v0.6.0 Premium: official tracking and communication studio */
html body .mg-relay-tracking{margin:16px 0;padding:18px;border:1px solid #c7ecea;border-radius:17px;background:linear-gradient(145deg,#f2fbfb,#fff);box-shadow:0 8px 24px rgba(8,127,122,.06)}
html body .mg-relay-tracking-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
html body .mg-relay-tracking-kicker{display:block;color:#087f7a;font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;margin-bottom:5px}
html body .mg-relay-tracking h4{margin:0!important;font-size:20px!important;line-height:1.2}
html body .mg-relay-tracking p{margin:9px 0 13px;color:#536069;line-height:1.55}
html body .mg-relay-number{padding:7px 10px;border-radius:999px;background:#fff;border:1px solid #bfe2df;font-size:12px;font-weight:900;white-space:nowrap}
html body .mg-relay-point{display:grid;gap:3px;padding:11px 13px;border-radius:12px;background:#fff;border:1px solid #dcebea;margin-bottom:12px}
html body .mg-relay-point strong{font-size:12px;color:#087f7a;text-transform:uppercase;letter-spacing:.05em}
html body .mg-relay-point span{font-size:14px;line-height:1.45;overflow-wrap:anywhere}
html body .mg-relay-actions{display:flex;flex-wrap:wrap;gap:9px;align-items:center}
html body .mg-relay-primary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:11px 15px;border-radius:11px;background:#087f7a;color:#fff!important;text-decoration:none!important;font-weight:900}
html body .mg-relay-note{display:block;margin-top:12px;color:#687078;line-height:1.45}
html body .mg-track .mg-relay-tracking{margin-top:18px;text-align:left}
html body .mg-track .mg-relay-actions{justify-content:flex-start}
html body .mg-relay-detail-list{margin-top:16px}
html body .mg-message-template-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
html body .mg-message-template-head span{display:block;color:#3446df;font-size:10px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;margin-bottom:4px}
html body .mg-message-template-head small{max-width:42%;color:#727980;text-align:right;line-height:1.4}
html body .mg-message-template.is-featured{border-color:#bfc5ff;background:linear-gradient(145deg,#f7f8ff,#fff)}
html body .mg-email-preview{margin:12px 0;border:1px solid #e1e3e6;border-radius:12px;background:#fff;overflow:hidden}
html body .mg-email-preview summary{padding:11px 13px;cursor:pointer;font-weight:900;background:#f7f8f9}
html body .mg-email-preview iframe{display:block;width:100%;height:620px;border:0;background:#f3f4f5}
html body .mg-all-templates{margin-top:14px;border-top:1px solid #e2e4e7;padding-top:14px}
html body .mg-all-templates>summary{cursor:pointer;font-weight:900;font-size:16px}
html body .mg-all-templates-grid{display:grid;gap:14px;margin-top:14px}
html body .mg-custom-message label{display:grid;gap:6px;margin-top:11px;font-weight:900}
html body .mg-custom-message input,html body .mg-custom-message textarea{width:100%;min-height:46px;padding:11px 12px;border:1px solid #d6d9dd;border-radius:10px;background:#fff;color:#111;font:inherit;font-size:16px}
html body .mg-custom-message textarea{min-height:135px;resize:vertical}
html body .mg-custom-help{padding:10px 12px;border-radius:10px;background:#f5f6f7;color:#5e666d!important;font-size:13px!important}
html body .mg-comm-history-item{display:flex!important;justify-content:space-between;gap:12px;align-items:flex-start}
html body .mg-comm-history-item.status-failed{border-left:4px solid #b42318;padding-left:10px}
html body .mg-comm-history-item.status-accepted{border-left:4px solid #16813a;padding-left:10px}
html body .mg-comm-history-item.status-queued{border-left:4px solid #d69b00;padding-left:10px}
@media(max-width:760px){html body .mg-relay-tracking-head,html body .mg-message-template-head{display:block}html body .mg-relay-number{display:inline-flex;margin-top:10px}html body .mg-relay-actions{display:grid;grid-template-columns:1fr}html body .mg-relay-actions>*{width:100%!important}html body .mg-message-template-head small{display:block;max-width:none;text-align:left;margin-top:6px}html body .mg-email-preview iframe{height:540px}}


/* v0.6.1: envoi manuel sans double confirmation */
html body .mg-manager-btn:disabled,
html body .mg-manager-btn[aria-disabled="true"] {
  cursor: wait !important;
  opacity: .72 !important;
  filter: saturate(.75);
}

html body .mg-communication-form[aria-busy="true"] {
  position: relative;
}

html body .mg-send-progress {
  margin-top: 9px;
  padding: 10px 12px;
  border: 1px solid #c9d0ff;
  border-radius: 10px;
  background: #f3f5ff;
  color: #2533a8;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

html body .mg-comm-history-item.status-submitted {
  border-left: 4px solid #16813a;
  padding-left: 10px;
}

html body .mg-comm-history-item.status-blocked {
  border-left: 4px solid #3446df;
  padding-left: 10px;
}


.mg-cancelled-communication-warning{display:flex;flex-direction:column;gap:5px;margin:0 0 14px;padding:14px 16px;border:1px solid #f0b8b8;border-radius:14px;background:#fff5f5;color:#7d1717}
.mg-cancelled-communication-warning strong{font-size:15px;font-weight:900}
.mg-cancelled-communication-warning span{font-size:13px;line-height:1.55}


/* v0.6.3: états annulés, paiement cohérent et archives transporteur */
html body .mg-detail-subvalue{display:inline-block;margin-top:3px;color:#6b737b;font-size:12px;font-weight:700}
html body .mg-order.is-cancelled{border-color:#efc2c2;background:linear-gradient(180deg,#fff,#fffafa)}
html body .mg-order.is-cancelled .mg-badge.status{background:#fff0f0;color:#9d2525}
html body .mg-next.cancelled{background:#fff4f4;border-color:#efc2c2}
html body .mg-next.cancelled .mg-next-eyebrow{color:#b42318}
html body .mg-order.is-cancelled .mg-progress li.current:before{background:#efc2c2}
html body .mg-order.is-cancelled .mg-progress li.current .mg-progress-dot{border-color:#b42318;background:#fff;color:#b42318;box-shadow:0 0 0 4px #fff0f0}
html body .mg-order.is-cancelled .mg-progress li.current{color:#8f1e1e}
html body .mg-relay-tracking.tone-cancelled{border-color:#e2d7d7;background:linear-gradient(145deg,#fafafa,#fff);box-shadow:none}
html body .mg-relay-tracking.tone-cancelled .mg-relay-tracking-kicker{color:#8f1e1e}
html body .mg-relay-tracking.tone-cancelled .mg-relay-number{border-color:#ded6d6;background:#fff}
html body .mg-relay-tracking.tone-cancelled .mg-relay-point{border-color:#e5dddd;background:#fff}
html body .mg-relay-tracking.tone-cancelled .mg-relay-point strong{color:#8f1e1e}
html body .mg-track.is-cancelled .mg-track-card{border-color:#efc2c2;background:linear-gradient(180deg,#fff,#fffafa)}
html body .mg-track.is-cancelled .mg-track-kicker{color:#b42318}
html body .mg-track.is-cancelled .mg-track-progress li.current::before{background:#efc2c2}
html body .mg-track.is-cancelled .mg-track-progress li.current .mg-track-dot{border-color:#b42318;background:#fff;color:#b42318;box-shadow:0 0 0 4px #fff0f0}
html body .mg-track.is-cancelled .mg-track-progress li.current{color:#8f1e1e}
html body .mg-track.is-cancelled .mg-track-next{border-color:#efc2c2;background:#fff4f4}
html body .mg-track.is-cancelled .mg-track-next h2{color:#8f1e1e}


/* v0.6.4 Navigation Premium */
html body .mg-order-compact {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  gap: 15px;
}

html body .mg-order-compact .mg-order-task {
  padding: 14px 15px;
  border: 1px solid #e2e5e8;
  border-radius: 14px;
  background: #f8f9fa;
}

html body .mg-order-compact .mg-order-task > span {
  display: block;
  margin-bottom: 5px;
  color: #ef5b20;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

html body .mg-order-compact .mg-order-task strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

html body .mg-order-compact .mg-order-task p {
  margin: 6px 0 0;
  color: #626970;
  line-height: 1.45;
}

html body .mg-order-compact .mg-order-task.tone-success {
  border-color: #ccebd5;
  background: #effaf2;
}

html body .mg-order-compact .mg-order-task.tone-success > span {
  color: #16813a;
}

html body .mg-order-compact .mg-order-task.tone-cancelled {
  border-color: #efcaca;
  background: #fff5f5;
}

html body .mg-order-compact .mg-order-task.tone-cancelled > span {
  color: #b42318;
}

html body .mg-order-compact .mg-quick-info-compact {
  margin-top: auto;
}

html body .mg-order-footer {
  padding-top: 13px;
  border-top: 1px solid #eceeef;
}

html body .mg-order-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #111;
  color: #fff !important;
  font-weight: 900;
  text-decoration: none !important;
}

html body .mg-order-open:hover {
  transform: translateY(-1px);
  background: #252525;
}

html body .mg-communication-standalone {
  margin-top: 0;
  padding: clamp(16px, 3vw, 24px);
  border-radius: 20px;
}

html body .mg-communication-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7ea;
}

html body .mg-communication-title span {
  display: block;
  color: #3446df;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

html body .mg-communication-title h2 {
  margin: 5px 0 0;
  font-size: clamp(24px, 3vw, 34px);
}

html body .mg-communication-title a {
  color: #111 !important;
  font-weight: 900;
}

html body .mg-communication-standalone .mg-communication-body {
  padding-top: 18px;
}

html body .mg-communication-standalone .mg-message-template {
  padding: clamp(15px, 2.5vw, 22px);
  border-radius: 16px;
}

html body .mg-communication-standalone .mg-message-template.is-featured {
  border-color: #bfc6ff;
  background: #f8f8ff;
}

@media (max-width: 760px) {
  html body .mg-order-compact {
    min-height: 0;
  }

  html body .mg-order-compact .mg-order-head {
    flex-direction: row !important;
  }

  html body .mg-order-compact .mg-badges {
    justify-content: flex-end !important;
  }

  html body .mg-order-compact .mg-quick-info-compact {
    grid-template-columns: 1fr 1fr !important;
  }

  html body .mg-communication-title {
    flex-direction: column;
  }

  html body .mg-communication-standalone .mg-message-actions,
  html body .mg-communication-standalone .mg-message-actions form,
  html body .mg-communication-standalone .mg-message-actions .mg-manager-btn,
  html body .mg-communication-standalone .mg-message-actions .mg-link-btn {
    width: 100% !important;
  }
}

@media (max-width: 520px) {
  html body .mg-order-compact .mg-order-head {
    flex-direction: column !important;
  }

  html body .mg-order-compact .mg-badges {
    justify-content: flex-start !important;
  }

  html body .mg-order-compact .mg-quick-info-compact {
    grid-template-columns: 1fr !important;
  }
}

/* Maxime Gautier Commandes v0.7.0 Premium */
:root {
  --mg-ink: #111318;
  --mg-muted: #626a76;
  --mg-line: #e5e8ed;
  --mg-soft: #f6f7f9;
  --mg-blue: #3446df;
  --mg-blue-soft: #eef0ff;
  --mg-green: #147a54;
  --mg-green-soft: #eaf8f1;
  --mg-orange: #b96408;
  --mg-orange-soft: #fff4e5;
  --mg-red: #b42318;
  --mg-red-soft: #fff0ee;
  --mg-turquoise: #087b85;
  --mg-turquoise-soft: #e7f8f8;
  --mg-purple: #6d39b4;
  --mg-purple-soft: #f5efff;
  --mg-shadow: 0 18px 55px rgba(17, 19, 24, .08);
  --mg-radius: 22px;
}

html body .mg-manager-v070,
html body .mg-detail-v070,
html body .mg-track-v070 {
  color: var(--mg-ink);
  font-family: inherit;
}

html body .mg-manager-v070,
html body .mg-detail-v070 {
  width: min(1180px, calc(100% - 28px));
  margin: 32px auto 64px;
}

html body .mg-manager-v070 *,
html body .mg-detail-v070 *,
html body .mg-track-v070 * {
  box-sizing: border-box;
}

html body .mg-manager-top {
  align-items: flex-start;
  background: linear-gradient(135deg, #111318 0%, #252936 100%);
  border: 0;
  border-radius: 28px;
  box-shadow: var(--mg-shadow);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  position: relative;
}

html body .mg-manager-top::after {
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 68%);
  content: "";
  height: 260px;
  pointer-events: none;
  position: absolute;
  right: -90px;
  top: -130px;
  width: 260px;
}

html body .mg-manager-kicker,
html body .mg-detail-title > span,
html body .mg-section-heading > div > span,
html body .mg-operation-page > .mg-section-heading span,
html body .mg-shipping-assistant .mg-assistant-summary span,
html body .mg-track-header > span {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

html body .mg-manager-top h1,
html body .mg-detail-title h1,
html body .mg-track-header h1 {
  color: inherit;
  font-size: clamp(30px, 4.6vw, 50px);
  letter-spacing: -.045em;
  line-height: 1.02;
  margin: 7px 0 10px;
}

html body .mg-manager-top p,
html body .mg-detail-title p,
html body .mg-track-header p {
  color: inherit;
  margin: 0;
  opacity: .82;
}

html body .mg-manager-user {
  align-items: flex-end;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

html body .mg-manager-user span { font-weight: 850; }
html body .mg-manager-user a {
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
  text-decoration: none;
}

html body .mg-command-center {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 14px;
}

html body .mg-command-tile {
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: 20px;
  color: var(--mg-ink) !important;
  display: grid;
  min-height: 154px;
  padding: 18px;
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

html body .mg-command-tile:hover,
html body .mg-command-tile:focus-visible {
  border-color: #c8cdd6;
  box-shadow: 0 12px 30px rgba(17,19,24,.08);
  outline: none;
  transform: translateY(-2px);
}

html body .mg-command-tile span { font-size: 13px; font-weight: 850; }
html body .mg-command-tile strong {
  align-self: center;
  font-size: 40px;
  letter-spacing: -.05em;
  line-height: 1;
}
html body .mg-command-tile small { align-self: end; color: var(--mg-muted); line-height: 1.35; }
html body .mg-command-tile.action { background: var(--mg-orange-soft); border-color: #f3d5af; }
html body .mg-command-tile.waiting { background: var(--mg-blue-soft); border-color: #d8dcff; }
html body .mg-command-tile.incident { background: var(--mg-red-soft); border-color: #f3c7c2; }
html body .mg-command-tile.done { background: var(--mg-green-soft); border-color: #c5ead8; }

html body .mg-micro-kpis {
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
}

html body .mg-micro-kpis > div {
  border-right: 1px solid var(--mg-line);
  display: grid;
  gap: 5px;
  padding: 15px 18px;
}
html body .mg-micro-kpis > div:last-child { border-right: 0; }
html body .mg-micro-kpis small { color: var(--mg-muted); font-weight: 750; }
html body .mg-micro-kpis strong { font-size: 21px; letter-spacing: -.025em; }

html body .mg-all-good,
html body .mg-premium-ok {
  align-items: center;
  background: var(--mg-green-soft);
  border: 1px solid #c5ead8;
  border-radius: 18px;
  color: #0b6141;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 16px 0;
  padding: 15px 18px;
}
html body .mg-all-good span,
html body .mg-premium-ok span { color: #326c57; }

html body .mg-priority-preview,
html body .mg-orders-section,
html body .mg-recent-events,
html body .mg-operation-page,
html body .mg-communication-standalone {
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: var(--mg-radius);
  box-shadow: 0 8px 26px rgba(17,19,24,.035);
  margin: 18px 0;
  padding: clamp(18px, 3vw, 28px);
}

html body .mg-section-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}
html body .mg-section-heading h2 {
  font-size: clamp(22px, 3vw, 31px);
  letter-spacing: -.035em;
  line-height: 1.05;
  margin: 5px 0 0;
}
html body .mg-section-heading > span,
html body .mg-section-heading > strong,
html body .mg-section-heading > a {
  color: var(--mg-muted);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

html body .mg-priority-list,
html body .mg-orders-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html body .mg-order-premium {
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(17,19,24,.035);
  color: var(--mg-ink);
  display: flex;
  flex-direction: column;
  min-height: 245px;
  overflow: hidden;
  padding: 20px;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
html body .mg-order-premium:hover {
  border-color: #cdd1da;
  box-shadow: 0 15px 36px rgba(17,19,24,.075);
  transform: translateY(-2px);
}
html body .mg-order-accent {
  background: var(--mg-blue);
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}
html body .mg-order-premium.channel-guadeloupe .mg-order-accent { background: var(--mg-orange); }
html body .mg-order-premium.channel-france .mg-order-accent { background: var(--mg-turquoise); }
html body .mg-order-premium.channel-other .mg-order-accent { background: var(--mg-purple); }
html body .mg-order-premium.is-cancelled .mg-order-accent { background: var(--mg-red); }

html body .mg-order-premium .mg-order-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
html body .mg-order-number { color: var(--mg-muted); display: block; font-size: 12px; font-weight: 850; }
html body .mg-order-premium h3 { font-size: 20px; letter-spacing: -.025em; margin: 4px 0 0; }
html body .mg-order-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  max-width: 52%;
  padding: 8px 10px;
  text-align: center;
}
html body .mg-order-status.urgency-critical { background: var(--mg-red-soft); color: var(--mg-red); }
html body .mg-order-status.urgency-attention { background: var(--mg-orange-soft); color: var(--mg-orange); }
html body .mg-order-status.urgency-waiting { background: var(--mg-blue-soft); color: var(--mg-blue); }
html body .mg-order-status.urgency-complete { background: var(--mg-green-soft); color: var(--mg-green); }

html body .mg-order-facts {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}
html body .mg-order-facts > div {
  background: var(--mg-soft);
  border-radius: 12px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 11px;
}
html body .mg-order-facts small { color: var(--mg-muted); font-size: 11px; font-weight: 750; }
html body .mg-order-facts strong { font-size: 13px; overflow-wrap: anywhere; }
html body .mg-card-alert {
  background: var(--mg-red-soft);
  border-radius: 12px;
  color: var(--mg-red);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
  padding: 9px 11px;
}
html body .mg-order-premium .mg-order-footer {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: auto;
}
html body .mg-order-date { color: var(--mg-muted); font-size: 11px; }
html body .mg-order-open {
  background: var(--mg-ink);
  border-radius: 12px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 850;
  padding: 10px 14px;
  text-decoration: none !important;
}

html body .mg-manager-filters {
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: 20px;
  margin: 18px 0;
  padding: 16px;
}
html body .mg-filter-main { align-items: end; display: flex; gap: 12px; justify-content: space-between; }
html body .mg-search-field { display: grid; flex: 1; gap: 6px; }
html body .mg-search-field span { font-size: 12px; font-weight: 850; }
html body .mg-search-field input,
html body .mg-filter-advanced select,
html body .mg-premium-form input,
html body .mg-premium-form textarea,
html body .mg-premium-form select,
html body .mg-communication-form input,
html body .mg-communication-form textarea {
  background: #fff;
  border: 1px solid #cfd4dc;
  border-radius: 12px;
  color: var(--mg-ink);
  font: inherit;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}
html body .mg-premium-form textarea,
html body .mg-communication-form textarea { min-height: 105px; resize: vertical; }
html body .mg-search-field input:focus,
html body .mg-filter-advanced select:focus,
html body .mg-premium-form input:focus,
html body .mg-premium-form textarea:focus,
html body .mg-premium-form select:focus,
html body .mg-communication-form input:focus,
html body .mg-communication-form textarea:focus {
  border-color: var(--mg-blue);
  box-shadow: 0 0 0 3px rgba(52,70,223,.12);
  outline: none;
}
html body .mg-filter-actions { display: flex; gap: 8px; }
html body .mg-filter-actions button,
html body .mg-manager-refresh {
  align-items: center;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  text-decoration: none !important;
}
html body .mg-filter-actions button { background: var(--mg-ink); color: #fff; }
html body .mg-manager-refresh { background: var(--mg-soft); color: var(--mg-ink) !important; }
html body .mg-filter-advanced { border-top: 1px solid var(--mg-line); margin-top: 14px; padding-top: 12px; }
html body .mg-filter-advanced summary { cursor: pointer; font-size: 13px; font-weight: 850; }
html body .mg-filter-advanced-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; }

html body .mg-manager-flash {
  border: 1px solid;
  border-radius: 16px;
  font-weight: 800;
  margin: 14px 0;
  padding: 14px 16px;
}
html body .mg-manager-flash.success { background: var(--mg-green-soft); border-color: #bce1ce; color: var(--mg-green); }
html body .mg-manager-flash.info { background: var(--mg-blue-soft); border-color: #ccd2ff; color: var(--mg-blue); }
html body .mg-manager-flash.warning,
html body .mg-manager-flash.error { background: var(--mg-red-soft); border-color: #efc1bc; color: var(--mg-red); }

html body .mg-detail-back {
  color: var(--mg-muted) !important;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  margin-bottom: 12px;
  text-decoration: none !important;
}
html body .mg-detail-back::before { content: "‹"; font-size: 20px; line-height: .7; margin-right: 6px; }
html body .mg-detail-hero {
  background: linear-gradient(135deg, #12141a, #282c39);
  border-radius: 28px;
  box-shadow: var(--mg-shadow);
  color: #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 14px;
  padding: clamp(22px, 4vw, 38px);
}
html body .mg-detail-badges { align-content: start; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
html body .mg-detail-badge {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  padding: 8px 10px;
}
html body .mg-detail-badge.route-guadeloupe { background: rgba(185,100,8,.35); }
html body .mg-detail-badge.route-france { background: rgba(8,123,133,.38); }
html body .mg-detail-badge.route-other { background: rgba(109,57,180,.42); }
html body .mg-detail-badge.status-cancelled,
html body .mg-detail-badge.status-refunded { background: rgba(180,35,24,.5); }
html body .mg-detail-meta {
  border-top: 1px solid rgba(255,255,255,.17);
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 16px;
}
html body .mg-detail-meta > div { display: grid; gap: 3px; }
html body .mg-detail-meta small { opacity: .68; }
html body .mg-detail-meta strong { font-size: 15px; }

html body .mg-detail-tabs-wrap {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--mg-line);
  border-radius: 16px;
  position: sticky;
  top: 10px;
  z-index: 40;
}
html body .mg-detail-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 5px;
  scrollbar-width: none;
}
html body .mg-detail-tabs::-webkit-scrollbar { display: none; }
html body .mg-detail-tabs a {
  border-radius: 11px;
  color: var(--mg-muted) !important;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 850;
  padding: 11px 14px;
  text-decoration: none !important;
}
html body .mg-detail-tabs a.is-active { background: var(--mg-ink); color: #fff !important; }
html body .mg-detail-view { margin-top: 16px; }

html body .mg-pilot-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .75fr);
}
html body .mg-pilot-main,
html body .mg-next-panel {
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: var(--mg-radius);
  padding: clamp(20px, 3vw, 30px);
}
html body .mg-pilot-main.tone-cancelled { background: var(--mg-red-soft); border-color: #efc1bc; }
html body .mg-pilot-main.tone-success { background: var(--mg-green-soft); border-color: #c5ead8; }
html body .mg-pilot-main.tone-waiting { background: var(--mg-blue-soft); border-color: #d4d8ff; }
html body .mg-pilot-description { color: var(--mg-muted); font-size: 15px; line-height: 1.6; }
html body .mg-now-badge {
  background: var(--mg-soft);
  border-radius: 999px;
  color: var(--mg-ink);
  font-size: 11px;
  font-weight: 900;
  padding: 8px 10px;
  white-space: nowrap;
}
html body .mg-next-panel { align-content: start; display: grid; gap: 9px; }
html body .mg-next-panel > span { color: var(--mg-blue); font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
html body .mg-next-panel > strong { font-size: 22px; letter-spacing: -.025em; }
html body .mg-next-panel p { color: var(--mg-muted); line-height: 1.5; margin: 0; }
html body .mg-next-panel a { background: var(--mg-ink); border-radius: 12px; color: #fff !important; font-weight: 850; margin-top: 6px; padding: 11px 14px; text-align: center; text-decoration: none !important; }

html body .mg-progress {
  align-items: flex-start;
  counter-reset: step;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(var(--mg-step-count, 5), minmax(0, 1fr));
  list-style: none;
  margin: 24px 0;
  overflow: visible;
  padding: 0;
}
html body .mg-progress > li {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  position: relative;
  text-align: center;
}
html body .mg-progress > li::before {
  background: #dfe2e8;
  content: "";
  height: 3px;
  left: calc(-50% + 18px);
  position: absolute;
  top: 16px;
  width: calc(100% - 36px);
}
html body .mg-progress > li:first-child::before { display: none; }
html body .mg-progress > li.done::before,
html body .mg-progress > li.current::before { background: var(--mg-green); }
html body .mg-progress-dot {
  align-items: center;
  background: #edf0f3;
  border: 2px solid #dce0e5;
  border-radius: 50%;
  color: #6d7480;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  position: relative;
  width: 34px;
  z-index: 2;
}
html body .mg-progress > li.done .mg-progress-dot { background: var(--mg-green); border-color: var(--mg-green); color: #fff; }
html body .mg-progress > li.current .mg-progress-dot { background: var(--mg-blue); border-color: var(--mg-blue); box-shadow: 0 0 0 5px rgba(52,70,223,.13); color: #fff; }
html body .channel-guadeloupe .mg-progress > li.current .mg-progress-dot { background: var(--mg-orange); border-color: var(--mg-orange); box-shadow: 0 0 0 5px rgba(185,100,8,.13); }
html body .channel-france .mg-progress > li.current .mg-progress-dot { background: var(--mg-turquoise); border-color: var(--mg-turquoise); box-shadow: 0 0 0 5px rgba(8,123,133,.13); }
html body .channel-other .mg-progress > li.current .mg-progress-dot { background: var(--mg-purple); border-color: var(--mg-purple); box-shadow: 0 0 0 5px rgba(109,57,180,.13); }
html body .mg-progress-label { color: var(--mg-muted); font-size: 11px; font-weight: 750; line-height: 1.25; }
html body .mg-progress > li.done .mg-progress-label,
html body .mg-progress > li.current .mg-progress-label { color: var(--mg-ink); font-weight: 900; }

html body .mg-pilot-action,
html body .mg-operation-action { margin-top: 20px; }
html body .mg-action-choice,
html body .mg-contact-buttons,
html body .mg-assistant-links,
html body .mg-relay-actions,
html body .mg-payment-share {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
html body .mg-manager-btn,
html body .mg-link-btn,
html body .mg-relay-primary {
  align-items: center;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  justify-content: center;
  line-height: 1.2;
  min-height: 44px;
  padding: 10px 14px;
  text-decoration: none !important;
}
html body .mg-manager-btn.primary,
html body .mg-link-btn.blue,
html body .mg-relay-primary { background: var(--mg-blue); color: #fff !important; }
html body .mg-manager-btn.success { background: var(--mg-green); color: #fff; }
html body .mg-manager-btn.orange { background: var(--mg-orange); color: #fff; }
html body .mg-manager-btn.blue { background: var(--mg-blue); color: #fff; }
html body .mg-manager-btn.small { min-height: 36px; padding: 8px 11px; }
html body .mg-link-btn { background: var(--mg-soft); color: var(--mg-ink) !important; }
html body .mg-link-btn.whatsapp { background: #e8f8ed; color: #126b38 !important; }
html body .mg-manager-btn[disabled],
html body .mg-link-btn[aria-disabled="true"] { cursor: not-allowed; opacity: .5; }

html body .mg-summary-grid,
html body .mg-detail-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}
html body .mg-summary-grid > article,
html body .mg-detail-card {
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: 18px;
  min-width: 0;
  padding: 18px;
}
html body .mg-summary-grid > article { display: grid; gap: 5px; }
html body .mg-summary-grid small,
html body .mg-detail-list small { color: var(--mg-muted); font-size: 11px; font-weight: 800; }
html body .mg-summary-grid strong { font-size: 16px; overflow-wrap: anywhere; }
html body .mg-summary-grid span { color: var(--mg-muted); font-size: 13px; }
html body .mg-detail-card.full { grid-column: 1 / -1; }
html body .mg-detail-card h2 { font-size: 21px; letter-spacing: -.025em; margin: 0 0 15px; }
html body .mg-detail-list { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0,1fr)); }
html body .mg-detail-list > div { background: var(--mg-soft); border-radius: 12px; display: grid; gap: 4px; min-width: 0; padding: 11px; }
html body .mg-detail-list a,
html body .mg-detail-list strong { color: var(--mg-ink); overflow-wrap: anywhere; }
html body .mg-detail-address { border-top: 1px solid var(--mg-line); color: var(--mg-muted); margin-top: 14px; padding-top: 14px; }
html body .mg-responsive-table { overflow-x: auto; }
html body .mg-detail-table { border-collapse: collapse; min-width: 520px; width: 100%; }
html body .mg-detail-table th,
html body .mg-detail-table td { border-bottom: 1px solid var(--mg-line); padding: 11px; text-align: left; }
html body .mg-detail-table th { color: var(--mg-muted); font-size: 11px; text-transform: uppercase; }

html body .mg-incident-stack { margin: 18px 0; }
html body .mg-incident {
  align-items: center;
  background: var(--mg-orange-soft);
  border: 1px solid #f1d0a8;
  border-radius: 16px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 9px;
  padding: 14px 16px;
}
html body .mg-incident.severity-error,
html body .mg-incident.severity-critical { background: var(--mg-red-soft); border-color: #efc1bc; }
html body .mg-incident.severity-info { background: var(--mg-blue-soft); border-color: #d3d7ff; }
html body .mg-incident p { color: var(--mg-muted); margin: 4px 0 0; }

html body .mg-mini-history { display: grid; gap: 8px; }
html body .mg-mini-history > div {
  align-items: center;
  background: var(--mg-soft);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 13px;
}
html body .mg-mini-history strong { font-size: 13px; font-weight: 750; }
html body .mg-mini-history time { color: var(--mg-muted); flex: 0 0 auto; font-size: 11px; }

html body .mg-operation-page > p { color: var(--mg-muted); line-height: 1.6; }
html body .mg-premium-form {
  background: var(--mg-soft);
  border: 1px solid var(--mg-line);
  border-radius: 18px;
  margin-top: 14px;
  padding: 16px;
}
html body .mg-form-grid { display: grid; gap: 13px; grid-template-columns: repeat(2, minmax(0,1fr)); margin-bottom: 15px; }
html body .mg-form-grid > label,
html body .mg-communication-form label { display: grid; font-size: 12px; font-weight: 850; gap: 7px; }
html body .mg-form-grid > label.full { grid-column: 1 / -1; }
html body .mg-check { align-items: flex-start; display: flex !important; flex-direction: row !important; gap: 9px !important; }
html body .mg-check input { flex: 0 0 auto; height: 18px; min-height: 18px; margin: 1px 0 0; width: 18px; }
html body .mg-check span { color: var(--mg-muted); font-weight: 700; }
html body .mg-money-input { align-items: center; display: flex; position: relative; }
html body .mg-money-input input { padding-right: 36px; }
html body .mg-money-input > span { color: var(--mg-muted); font-weight: 850; position: absolute; right: 13px; }

html body .mg-shipping-assistant,
html body .mg-shipment-record,
html body .mg-relay-premium,
html body .mg-relay-admin-notice {
  background: var(--mg-purple-soft);
  border: 1px solid #dfd0f5;
  border-radius: 18px;
  margin: 14px 0;
  padding: 16px;
}
html body .mg-relay-premium,
html body .mg-relay-admin-notice { background: var(--mg-turquoise-soft); border-color: #bfe3e5; }
html body .mg-assistant-summary { align-items: flex-start; display: flex; gap: 12px; justify-content: space-between; }
html body .mg-assistant-summary h3 { margin: 4px 0 0; }
html body .mg-shipping-assistant pre {
  background: #fff;
  border: 1px solid #e0d7ec;
  border-radius: 13px;
  font-family: inherit;
  line-height: 1.55;
  margin: 14px 0;
  overflow-x: auto;
  padding: 14px;
  white-space: pre-wrap;
}
html body .mg-shipment-record { display: grid; gap: 8px; }
html body .mg-shipment-record strong { font-size: 17px; }

html body .mg-relay-tracking {
  background: var(--mg-turquoise-soft);
  border: 1px solid #bde3e5;
  border-radius: 18px;
  margin: 16px 0;
  padding: 16px;
}
html body .mg-relay-tracking.tone-cancelled { background: var(--mg-red-soft); border-color: #efc1bc; }
html body .mg-relay-tracking-head { align-items: start; display: flex; gap: 12px; justify-content: space-between; }
html body .mg-relay-tracking-kicker { color: var(--mg-turquoise); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
html body .mg-relay-tracking h4 { font-size: 20px; margin: 4px 0 0; }
html body .mg-relay-number { background: #fff; border-radius: 999px; font-size: 12px; font-weight: 850; padding: 7px 9px; }
html body .mg-relay-point { background: rgba(255,255,255,.65); border-radius: 12px; display: grid; gap: 4px; margin: 10px 0; padding: 11px; }
html body .mg-relay-note { color: var(--mg-muted); display: block; margin-top: 10px; }

html body .mg-history-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
html body .mg-history-filters a { background: var(--mg-soft); border-radius: 999px; color: var(--mg-muted) !important; font-size: 12px; font-weight: 800; padding: 8px 11px; text-decoration: none !important; }
html body .mg-history-filters a.is-active { background: var(--mg-ink); color: #fff !important; }
html body .mg-history { display: grid; gap: 9px; }
html body .mg-history-row {
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: 15px;
  padding: 13px 15px;
}
html body .mg-history-row summary { cursor: pointer; font-size: 13px; font-weight: 800; }
html body .mg-history-row-body { color: var(--mg-muted); font-size: 12px; margin-top: 8px; overflow-wrap: anywhere; }
html body .mg-history-empty,
html body .mg-empty { background: var(--mg-soft); border-radius: 14px; color: var(--mg-muted); padding: 20px; text-align: center; }
html body .mg-empty.compact { padding: 14px; }

html body .mg-communication-standalone .mg-communication-body { display: grid; gap: 18px; }
html body .mg-all-templates,
html body .mg-custom-message { margin-top: 0 !important; }
html body .mg-all-templates > summary,
html body .mg-custom-message > summary { cursor: pointer; font-weight: 850; padding: 12px 0; }
html body .mg-all-templates-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0,1fr)); padding-top: 12px; }
html body .mg-custom-message { border-top: 1px solid var(--mg-line); padding-top: 12px; }
html body .mg-recipient-strip { background: var(--mg-soft); border-radius: 12px; color: var(--mg-muted); display: flex; gap: 8px; justify-content: space-between; padding: 10px 12px; }
html body .mg-message-template { border: 1px solid var(--mg-line); }
html body .mg-cancelled-communication-warning { background: var(--mg-red-soft); border: 1px solid #efc1bc; border-radius: 14px; color: var(--mg-red); display: grid; gap: 4px; padding: 13px 15px; }
html body .mg-comm-history { border-top: 1px solid var(--mg-line); display: grid; gap: 7px; padding-top: 15px; }
html body .mg-comm-history-item { align-items: center; background: var(--mg-soft); border-radius: 11px; display: flex; gap: 12px; justify-content: space-between; padding: 9px 11px; }
html body .mg-comm-history-item time { color: var(--mg-muted); font-size: 11px; }
html body .mg-send-progress { background: var(--mg-blue-soft); border-radius: 10px; color: var(--mg-blue); font-size: 12px; font-weight: 800; margin-top: 10px; padding: 9px 11px; }

html body .mg-track-v070 {
  background: #f5f6f8;
  border-radius: 28px;
  margin: 24px auto 60px;
  max-width: 920px;
  overflow: hidden;
  width: min(920px, calc(100% - 24px));
}
html body .mg-track-v070 .mg-track-header {
  background: linear-gradient(135deg, #111318, #292d39);
  color: #fff;
  padding: clamp(24px, 6vw, 48px);
}
html body .mg-track-v070 > section,
html body .mg-track-v070 > .mg-track-help,
html body .mg-track-v070 > .mg-track-contact {
  margin: 16px;
}
html body .mg-track-v070 .mg-progress { background: #fff; border-radius: 18px; margin: 16px; padding: 20px 14px; }
html body .mg-track-v070 .mg-track-stage,
html body .mg-track-v070 .mg-track-summary,
html body .mg-track-v070 .mg-track-help,
html body .mg-track-v070 .mg-track-contact {
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: 18px;
  padding: 18px;
}
html body .mg-track-v070 .mg-track-stage h2 { font-size: 24px; letter-spacing: -.03em; margin: 0 0 8px; }
html body .mg-track-v070 .mg-track-stage p { color: var(--mg-muted); line-height: 1.55; margin: 0; }
html body .mg-track-v070 .mg-track-summary { display: grid; gap: 9px; grid-template-columns: repeat(2, minmax(0,1fr)); }
html body .mg-track-v070 .mg-track-summary > div { background: var(--mg-soft); border-radius: 12px; display: grid; gap: 4px; padding: 11px; }
html body .mg-track-v070 .mg-track-summary small { color: var(--mg-muted); }
html body .mg-track-help-head { align-items: start; display: flex; gap: 12px; justify-content: space-between; }
html body .mg-track-help-head h2 { font-size: 22px; margin: 0; }
html body .mg-track-help details { border-top: 1px solid var(--mg-line); padding: 12px 0; }
html body .mg-track-help details:first-of-type { margin-top: 10px; }
html body .mg-track-help summary { cursor: pointer; font-weight: 850; }
html body .mg-track-help details p { color: var(--mg-muted); line-height: 1.55; }
html body .mg-track-contact { align-items: center; display: flex; gap: 14px; justify-content: space-between; }
html body .mg-track-contact-note { color: var(--mg-muted); margin: 3px 0 0; }
html body .mg-track-contact a { background: var(--mg-ink); border-radius: 12px; color: #fff !important; flex: 0 0 auto; font-weight: 850; padding: 11px 14px; text-decoration: none !important; }

html body .mg-settings-v070 .form-table { background: #fff; border: 1px solid #dcdcde; border-radius: 8px; display: block; max-width: 1050px; padding: 0 18px; }
html body .mg-settings-v070 .form-table tbody { display: table; width: 100%; }

html body .mg-network-banner {
  align-items: center;
  background: #fff4e5;
  border: 1px solid #f2d0a5;
  border-radius: 12px;
  color: #8b4b05;
  display: none;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  margin: 10px 0;
  padding: 10px 12px;
}
html body .mg-network-banner.is-visible { display: flex; }

@media (max-width: 960px) {
  html body .mg-command-center { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body .mg-micro-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  html body .mg-micro-kpis > div:nth-child(2) { border-right: 0; }
  html body .mg-micro-kpis > div:nth-child(-n+2) { border-bottom: 1px solid var(--mg-line); }
  html body .mg-pilot-grid { grid-template-columns: 1fr; }
  html body .mg-next-panel { display: none; }
  html body .mg-filter-advanced-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  html body .mg-manager-v070,
  html body .mg-detail-v070 { margin-top: 14px; width: min(100% - 18px, 1180px); }
  html body .mg-manager-top { border-radius: 22px; flex-direction: column; padding: 24px 20px; }
  html body .mg-manager-user { align-items: flex-start; }
  html body .mg-command-center { gap: 9px; }
  html body .mg-command-tile { min-height: 132px; padding: 14px; }
  html body .mg-command-tile strong { font-size: 34px; }
  html body .mg-priority-list,
  html body .mg-orders-grid,
  html body .mg-all-templates-grid { grid-template-columns: 1fr; }
  html body .mg-detail-hero { border-radius: 22px; grid-template-columns: 1fr; padding: 22px 18px; }
  html body .mg-detail-badges { justify-content: flex-start; }
  html body .mg-detail-tabs-wrap { border-radius: 13px; top: 4px; }
  html body .mg-detail-tabs a { padding: 10px 12px; }
  html body .mg-summary-grid,
  html body .mg-detail-grid { grid-template-columns: 1fr; }
  html body .mg-detail-card.full { grid-column: auto; }
  html body .mg-pilot-main,
  html body .mg-operation-page,
  html body .mg-communication-standalone,
  html body .mg-recent-events { border-radius: 18px; padding: 18px; }
  html body .mg-progress { overflow-x: auto; padding-bottom: 4px; }
  html body .mg-progress > li { min-width: 86px; }
  html body .mg-form-grid { grid-template-columns: 1fr; }
  html body .mg-form-grid > label.full { grid-column: auto; }
  html body .mg-operation-action .mg-manager-btn.primary,
  html body .mg-premium-form > .mg-manager-btn.primary { width: 100%; }
  html body .mg-mini-history > div { align-items: flex-start; flex-direction: column; gap: 5px; }
  html body .mg-filter-main { align-items: stretch; flex-direction: column; }
  html body .mg-filter-actions > * { flex: 1; }
  html body .mg-incident { align-items: flex-start; flex-direction: column; }
  html body .mg-track-v070 { border-radius: 0; margin: 0 auto 40px; width: 100%; }
  html body .mg-track-v070 .mg-progress { margin: 10px; }
  html body .mg-track-v070 > section,
  html body .mg-track-v070 > .mg-track-help,
  html body .mg-track-v070 > .mg-track-contact { margin: 10px; }
  html body .mg-track-contact { align-items: stretch !important; flex-direction: column; }
  html body .mg-track-contact a { text-align: center; }
}

@media (max-width: 520px) {
  html body .mg-command-center { grid-template-columns: 1fr 1fr; }
  html body .mg-command-tile { min-height: 118px; }
  html body .mg-command-tile small { display: none; }
  html body .mg-micro-kpis { grid-template-columns: 1fr 1fr; }
  html body .mg-micro-kpis > div { padding: 12px; }
  html body .mg-micro-kpis small { font-size: 10px; }
  html body .mg-order-facts { grid-template-columns: 1fr 1fr; }
  html body .mg-order-premium .mg-order-head { flex-direction: column; }
  html body .mg-order-status { max-width: 100%; }
  html body .mg-detail-meta { grid-template-columns: 1fr 1fr; }
  html body .mg-detail-meta > div:last-child { grid-column: 1 / -1; }
  html body .mg-detail-list { grid-template-columns: 1fr; }
  html body .mg-filter-advanced-grid { grid-template-columns: 1fr; }
  html body .mg-assistant-summary,
  html body .mg-relay-tracking-head,
  html body .mg-track-help-head { flex-direction: column; }
  html body .mg-action-choice,
  html body .mg-contact-buttons,
  html body .mg-assistant-links,
  html body .mg-payment-share { align-items: stretch; flex-direction: column; }
  html body .mg-action-choice > *,
  html body .mg-contact-buttons > *,
  html body .mg-assistant-links > *,
  html body .mg-payment-share > * { width: 100%; }
  html body .mg-track-v070 .mg-track-summary { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html body .mg-command-tile,
  html body .mg-order-premium,
  html body .mg-manager-btn,
  html body .mg-link-btn { scroll-behavior: auto !important; transition: none !important; }
}

html body .mg-laposte-panel {
  background: #fff8e8;
  border: 1px solid #f0d8a6;
  border-radius: 18px;
  margin: 14px 0;
  padding: 16px;
}
html body .mg-laposte-panel p { color: var(--mg-muted); line-height: 1.55; }
html body .mg-shipment-record dl { display: grid; gap: 8px; margin: 4px 0 0; }
html body .mg-shipment-record dl > div { background: rgba(255,255,255,.7); border-radius: 11px; display: grid; gap: 3px; padding: 10px 11px; }
html body .mg-shipment-record dt { color: var(--mg-muted); font-size: 11px; font-weight: 800; }
html body .mg-shipment-record dd { margin: 0; overflow-wrap: anywhere; }

html body .mg-incident-add {
  background: #fff;
  border: 1px dashed #cbd1da;
  border-radius: 15px;
  margin-top: 12px;
  padding: 0 14px;
}
html body .mg-incident-add > summary { cursor: pointer; font-size: 13px; font-weight: 850; padding: 13px 0; }
html body .mg-incident-add .mg-premium-form { margin: 0 0 14px; }
html body .mg-print-orders { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 18px; }
html body .mg-print-orders > article {
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: 18px;
  break-inside: avoid;
  padding: 18px;
}
html body .mg-print-orders h2 { font-size: 20px; margin: 4px 0; }
html body .mg-print-orders p { color: var(--mg-muted); margin: 0; }
html body .mg-print-orders dl { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin: 15px 0; }
html body .mg-print-orders dl > div { background: var(--mg-soft); border-radius: 10px; padding: 9px; }
html body .mg-print-orders dt { color: var(--mg-muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
html body .mg-print-orders dd { font-size: 12px; font-weight: 800; margin: 3px 0 0; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  html body .mg-print-orders { grid-template-columns: 1fr; }
}

@media print {
  html body .mg-print-sheet { margin: 0; width: 100%; }
  html body .mg-print-sheet .mg-manager-top { background: #fff !important; box-shadow: none; color: #111 !important; padding: 0 0 14px; }
  html body .mg-print-sheet .mg-manager-user,
  html body .mg-print-sheet .mg-assistant-links { display: none !important; }
  html body .mg-print-orders { grid-template-columns: 1fr 1fr; }
  html body .mg-print-orders > article { box-shadow: none; }
}

/* Card status block correction for the premium dashboard */
html body .mg-order-premium .mg-order-status {
  align-items: start;
  background: var(--mg-soft);
  border: 1px solid var(--mg-border);
  border-radius: 14px;
  color: var(--mg-text);
  display: grid;
  gap: 3px;
  line-height: 1.35;
  margin-top: 15px;
  max-width: none;
  padding: 11px 12px;
  text-align: left;
  width: 100%;
}
html body .mg-order-premium .mg-order-status small {
  color: var(--mg-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
html body .mg-order-premium .mg-order-status strong { font-size: 14px; }
html body .mg-order-premium .mg-order-status span { color: var(--mg-muted); font-size: 12px; font-weight: 700; }
html body .mg-order-premium.urgency-critical .mg-order-status { background: var(--mg-red-soft); border-color: rgba(185,28,28,.16); }
html body .mg-order-premium.urgency-attention .mg-order-status { background: var(--mg-orange-soft); border-color: rgba(180,83,9,.16); }
html body .mg-order-premium.urgency-waiting .mg-order-status { background: var(--mg-blue-soft); border-color: rgba(29,78,216,.14); }
html body .mg-order-premium.urgency-complete .mg-order-status { background: var(--mg-green-soft); border-color: rgba(21,128,61,.14); }

html body .mg-secondary-action {
  background: #fff;
  border: 1px solid var(--mg-border);
  border-radius: 14px;
  margin-top: 14px;
  padding: 0 14px;
}
html body .mg-secondary-action > summary { cursor: pointer; font-weight: 850; padding: 14px 0; }
html body .mg-secondary-action[open] > summary { border-bottom: 1px solid var(--mg-border); }
html body .mg-secondary-action .mg-premium-form { margin-top: 14px; }
html body .mg-track-help .mg-track-contact {
  align-items: stretch;
  background: var(--mg-soft);
  border: 1px solid var(--mg-line);
  border-radius: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0,1fr) auto;
  margin-top: 18px;
  padding: 15px;
}
html body .mg-track-help .mg-track-contact strong { display: block; font-size: 16px; }
html body .mg-track-problem { min-width: 190px; position: relative; }
html body .mg-track-problem > summary {
  background: var(--mg-ink);
  border: 0 !important;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  font-weight: 850;
  list-style: none;
  padding: 11px 14px !important;
  text-align: center;
}
html body .mg-track-problem > summary::-webkit-details-marker { display: none; }
html body .mg-track-problem-links { display: grid; gap: 7px; padding-top: 9px; }
html body .mg-track-help .mg-track-problem-links a {
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: 10px;
  color: var(--mg-ink) !important;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 10px;
  text-align: left;
  text-decoration: none !important;
}
@media (max-width: 680px) {
  html body .mg-track-help .mg-track-contact { grid-template-columns: 1fr; }
  html body .mg-track-problem { min-width: 0; }
}

html body .mg-admin-reopen {
  border: 1px solid var(--mg-line);
  border-radius: 16px;
  margin-top: 18px;
  padding: 12px 14px;
}
html body .mg-admin-reopen summary {
  cursor: pointer;
  font-weight: 850;
}
html body .mg-admin-reopen form {
  margin-top: 14px;
}

/* Maxime Gautier Commandes v0.7.1 Final UX
   Simplicité v0.6.4, protections et workflows v0.7.x. */
html body .mg-manager-v071,
html body .mg-detail-v071,
html body .mg-track-v071 {
  --mg-route-gp: #e96522;
  --mg-route-gp-soft: #fff4ec;
  --mg-route-fr: #087d87;
  --mg-route-fr-soft: #eaf8f8;
  --mg-route-other: #7140b9;
  --mg-route-other-soft: #f5efff;
  --mg-success: #16864a;
  --mg-success-soft: #edf9f2;
  --mg-warning: #a25d00;
  --mg-warning-soft: #fff7e8;
  --mg-danger: #b42318;
  --mg-danger-soft: #fff2f0;
  --mg-ink-final: #16191f;
  --mg-muted-final: #68717d;
  --mg-line-final: #e2e6eb;
  --mg-surface-final: #ffffff;
  --mg-soft-final: #f6f7f9;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

/* Remove theme floating buttons that cover actions on the private app pages. */
body.mg-book-manager-page .scroll-to-top,
body.mg-book-manager-page .back-to-top,
body.mg-book-manager-page #scrollUp,
body.mg-book-manager-page [class*="scroll-to-top"],
body.mg-book-tracking-page .scroll-to-top,
body.mg-book-tracking-page .back-to-top,
body.mg-book-tracking-page #scrollUp,
body.mg-book-tracking-page [class*="scroll-to-top"] {
  display: none !important;
}

html body .mg-manager-v071,
html body .mg-detail-v071 {
  width: min(1120px, calc(100% - 28px)) !important;
  margin: 22px auto 64px !important;
}

/* Light, compact app header. */
html body .mg-manager-v071 .mg-manager-top,
html body .mg-detail-v071 .mg-detail-hero,
html body .mg-track-v071 .mg-track-header {
  background: linear-gradient(135deg, #ffffff 0%, #fffaf6 100%) !important;
  border: 1px solid var(--mg-line-final) !important;
  box-shadow: 0 12px 34px rgba(29, 34, 42, .06) !important;
  color: var(--mg-ink-final) !important;
}

html body .mg-manager-v071 .mg-manager-top {
  border-left: 5px solid var(--mg-route-gp) !important;
  border-radius: 22px !important;
  min-height: 0 !important;
  padding: 25px 28px !important;
}

html body .mg-manager-v071 .mg-manager-top::after,
html body .mg-detail-v071 .mg-detail-hero::after {
  display: none !important;
}

html body .mg-manager-v071 .mg-manager-kicker,
html body .mg-detail-v071 .mg-detail-title > span,
html body .mg-track-v071 .mg-track-kicker {
  color: var(--mg-route-gp) !important;
}

html body .mg-manager-v071 .mg-manager-top h1 {
  font-size: clamp(31px, 4vw, 45px) !important;
  letter-spacing: -.04em !important;
  margin: 5px 0 8px !important;
}

html body .mg-manager-v071 .mg-manager-top p {
  color: var(--mg-muted-final) !important;
  max-width: 700px;
  opacity: 1 !important;
}

html body .mg-manager-v071 .mg-manager-user {
  align-items: flex-end !important;
}

html body .mg-manager-v071 .mg-manager-user span {
  color: var(--mg-ink-final) !important;
}

html body .mg-manager-v071 .mg-manager-user a {
  background: #fff !important;
  border: 1px solid #d9dde3 !important;
  color: var(--mg-ink-final) !important;
  min-height: 38px;
  padding: 8px 12px !important;
}

html body .mg-manager-v071 .mg-manager-user a:first-of-type {
  background: var(--mg-route-fr-soft) !important;
  border-color: #bde0e3 !important;
  color: #096c74 !important;
}

/* Daily indicators: useful, not oversized. */
html body .mg-manager-v071 .mg-command-center {
  gap: 11px !important;
  margin: 14px 0 11px !important;
}

html body .mg-manager-v071 .mg-command-tile {
  border-radius: 17px !important;
  box-shadow: none !important;
  min-height: 118px !important;
  padding: 15px 16px !important;
}

html body .mg-manager-v071 .mg-command-tile strong {
  font-size: 34px !important;
}

html body .mg-manager-v071 .mg-command-tile small {
  font-size: 12px;
}

html body .mg-manager-v071 .mg-micro-kpis {
  border-radius: 15px !important;
  margin-bottom: 11px !important;
}

html body .mg-manager-v071 .mg-micro-kpis > div {
  padding: 12px 15px !important;
}

html body .mg-manager-v071 .mg-micro-kpis strong {
  font-size: 19px !important;
}

/* Obvious route categories. */
html body .mg-route-shortcuts {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 16px;
}

html body .mg-route-shortcuts a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--mg-line-final);
  border-radius: 14px;
  color: var(--mg-ink-final) !important;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 52px;
  padding: 11px 14px;
  text-decoration: none !important;
}

html body .mg-route-shortcuts a span {
  font-size: 13px;
  font-weight: 850;
}

html body .mg-route-shortcuts a strong {
  align-items: center;
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0 8px;
}

html body .mg-route-shortcuts .route-guadeloupe {
  background: var(--mg-route-gp-soft);
  border-color: #f2cfba;
}
html body .mg-route-shortcuts .route-france {
  background: var(--mg-route-fr-soft);
  border-color: #bce1e3;
}
html body .mg-route-shortcuts .route-other {
  background: var(--mg-route-other-soft);
  border-color: #dccdf1;
}
html body .mg-route-shortcuts a.is-active {
  box-shadow: inset 0 0 0 2px currentColor;
}
html body .mg-route-shortcuts .route-guadeloupe.is-active { color: #a84914 !important; }
html body .mg-route-shortcuts .route-france.is-active { color: #07666e !important; }
html body .mg-route-shortcuts .route-other.is-active { color: #60349f !important; }

/* Sections breathe without wasting space. */
html body .mg-manager-v071 .mg-priority-preview,
html body .mg-manager-v071 .mg-orders-section,
html body .mg-detail-v071 .mg-operation-page,
html body .mg-detail-v071 .mg-communication-standalone {
  border-radius: 18px !important;
  box-shadow: 0 7px 22px rgba(17,19,24,.035) !important;
  margin: 14px 0 !important;
  padding: clamp(16px, 2.5vw, 23px) !important;
}

html body .mg-manager-v071 .mg-section-heading {
  margin-bottom: 14px !important;
}

html body .mg-manager-v071 .mg-section-heading h2,
html body .mg-detail-v071 .mg-section-heading h2 {
  font-size: clamp(22px, 2.8vw, 29px) !important;
}

/* Order cards: one clear action, four facts only. */
html body .mg-manager-v071 .mg-priority-list,
html body .mg-manager-v071 .mg-orders-grid {
  gap: 13px !important;
}

html body .mg-manager-v071 .mg-order-premium {
  border-radius: 17px !important;
  box-shadow: 0 7px 24px rgba(17,19,24,.04) !important;
  min-height: 0 !important;
  padding: 17px !important;
}

html body .mg-manager-v071 .mg-order-head {
  align-items: flex-start !important;
}

html body .mg-manager-v071 .mg-badges {
  align-items: center;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 7px !important;
  justify-content: flex-end;
}

html body .mg-manager-v071 .mg-badge {
  border-radius: 999px !important;
  display: inline-flex !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  padding: 7px 9px !important;
  white-space: nowrap !important;
}

html body .mg-manager-v071 .mg-badge.route-guadeloupe { background: var(--mg-route-gp-soft) !important; color: #a74a17 !important; }
html body .mg-manager-v071 .mg-badge.route-france { background: var(--mg-route-fr-soft) !important; color: #076b73 !important; }
html body .mg-manager-v071 .mg-badge.route-other { background: var(--mg-route-other-soft) !important; color: #60379a !important; }
html body .mg-manager-v071 .mg-badge.urgency { background: #f2f4f6 !important; color: #606975 !important; }
html body .mg-manager-v071 .mg-badge.urgency-critical { background: var(--mg-danger-soft) !important; color: var(--mg-danger) !important; }
html body .mg-manager-v071 .mg-badge.urgency-warning { background: var(--mg-warning-soft) !important; color: var(--mg-warning) !important; }

html body .mg-manager-v071 .mg-order-status {
  background: var(--mg-soft-final) !important;
  border: 0 !important;
  border-radius: 13px !important;
  display: grid !important;
  gap: 3px !important;
  margin: 14px 0 12px !important;
  max-width: none !important;
  padding: 12px 13px !important;
  text-align: left !important;
}

html body .mg-manager-v071 .mg-order-status small {
  color: var(--mg-muted-final) !important;
  font-size: 10px !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}

html body .mg-manager-v071 .mg-order-status strong {
  font-size: 16px !important;
  line-height: 1.3 !important;
}

html body .mg-manager-v071 .mg-order-status span {
  color: var(--mg-muted-final) !important;
  font-size: 12px !important;
}

html body .mg-manager-v071 .mg-order-facts {
  display: grid !important;
  gap: 8px !important;
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  margin: 0 !important;
}

html body .mg-manager-v071 .mg-order-facts > div {
  background: #f8f9fa !important;
  border-radius: 11px !important;
  min-width: 0;
  padding: 10px 11px !important;
}

html body .mg-manager-v071 .mg-order-facts small {
  font-size: 10px !important;
}

html body .mg-manager-v071 .mg-order-facts strong {
  font-size: 13px !important;
  line-height: 1.35 !important;
  overflow-wrap: anywhere;
}

html body .mg-manager-v071 .mg-order-open {
  border-radius: 12px !important;
  margin-top: 12px !important;
  min-height: 46px !important;
}

/* Light detail header, route accent, no intimidating black block. */
html body .mg-detail-v071 .mg-detail-hero {
  border-left: 5px solid var(--mg-route-gp) !important;
  border-radius: 20px !important;
  color: var(--mg-ink-final) !important;
  gap: 17px !important;
  padding: 22px 25px !important;
}
html body .mg-detail-v071.channel-france .mg-detail-hero { border-left-color: var(--mg-route-fr) !important; }
html body .mg-detail-v071.channel-other .mg-detail-hero { border-left-color: var(--mg-route-other) !important; }
html body .mg-detail-v071.is-cancelled .mg-detail-hero { border-left-color: var(--mg-danger) !important; }

html body .mg-detail-v071 .mg-detail-title h1 {
  font-size: clamp(30px, 4vw, 43px) !important;
  margin: 4px 0 7px !important;
}

html body .mg-detail-v071 .mg-detail-title p {
  color: var(--mg-muted-final) !important;
  opacity: 1 !important;
}

html body .mg-detail-v071 .mg-detail-badges {
  align-content: flex-start;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 7px !important;
  justify-content: flex-end;
}

html body .mg-detail-v071 .mg-detail-badge {
  background: #f3f4f6 !important;
  border: 1px solid #dfe3e8 !important;
  color: #505965 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}
html body .mg-detail-v071 .mg-detail-badge.route-guadeloupe { background: var(--mg-route-gp-soft) !important; border-color: #f0c9b1 !important; color: #a44916 !important; }
html body .mg-detail-v071 .mg-detail-badge.route-france { background: var(--mg-route-fr-soft) !important; border-color: #bde0e2 !important; color: #076b73 !important; }
html body .mg-detail-v071 .mg-detail-badge.route-other { background: var(--mg-route-other-soft) !important; border-color: #d9c9f0 !important; color: #60349e !important; }

html body .mg-detail-v071 .mg-detail-meta {
  border-top: 1px solid var(--mg-line-final) !important;
  gap: 10px !important;
  grid-column: 1 / -1 !important;
  padding-top: 14px !important;
}
html body .mg-detail-v071 .mg-detail-meta small { color: var(--mg-muted-final) !important; }
html body .mg-detail-v071 .mg-detail-meta strong { color: var(--mg-ink-final) !important; }

html body .mg-detail-v071 .mg-detail-tabs-wrap {
  background: rgba(255,255,255,.97) !important;
  border-radius: 14px !important;
  margin: 12px 0 !important;
  overflow: hidden !important;
}

html body .mg-detail-v071 .mg-detail-tabs {
  display: flex !important;
  gap: 5px !important;
  overflow-x: auto !important;
  padding: 5px !important;
  scrollbar-width: none;
}
html body .mg-detail-v071 .mg-detail-tabs::-webkit-scrollbar { display: none; }
html body .mg-detail-v071 .mg-detail-tabs a {
  border-radius: 10px !important;
  flex: 0 0 auto !important;
  min-height: 42px !important;
  padding: 10px 13px !important;
  white-space: nowrap !important;
}
html body .mg-detail-v071 .mg-detail-tabs a.is-active {
  background: var(--mg-ink-final) !important;
  color: #fff !important;
}

/* Pilotage: one action, no duplicate right panel. */
html body .mg-detail-v071 .mg-pilot-simple {
  background: #fff;
  border: 1px solid var(--mg-line-final);
  border-radius: 18px;
  box-shadow: 0 7px 23px rgba(17,19,24,.035);
  display: grid;
  gap: 18px;
  margin: 13px 0;
  padding: clamp(18px, 3vw, 26px);
  position: relative;
}

html body .mg-detail-v071 .mg-pilot-simple::before {
  background: var(--mg-route-gp);
  border-radius: 18px 18px 0 0;
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}
html body .mg-detail-v071.channel-france .mg-pilot-simple::before { background: var(--mg-route-fr); }
html body .mg-detail-v071.channel-other .mg-pilot-simple::before { background: var(--mg-route-other); }
html body .mg-detail-v071.is-cancelled .mg-pilot-simple::before { background: var(--mg-danger); }

html body .mg-detail-v071 .mg-pilot-copy {
  max-width: 760px;
  padding-right: 190px;
}
html body .mg-detail-v071 .mg-pilot-eyebrow {
  color: var(--mg-muted-final);
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
html body .mg-detail-v071 .mg-pilot-copy h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  letter-spacing: -.04em;
  line-height: 1.08;
  margin: 6px 0 9px;
}
html body .mg-detail-v071 .mg-pilot-copy p {
  color: var(--mg-muted-final);
  line-height: 1.55;
  margin: 0;
}
html body .mg-detail-v071 .mg-pilot-simple > .mg-now-badge {
  position: absolute;
  right: 22px;
  top: 23px;
}

html body .mg-detail-v071 .mg-pilot-primary {
  display: flex;
  justify-content: flex-start;
}
html body .mg-detail-v071 .mg-pilot-primary .mg-manager-btn {
  min-width: 230px;
}
html body .mg-detail-v071 .mg-manager-btn.route-guadeloupe { background: var(--mg-route-gp) !important; }
html body .mg-detail-v071 .mg-manager-btn.route-france { background: var(--mg-route-fr) !important; }
html body .mg-detail-v071 .mg-manager-btn.route-other { background: var(--mg-route-other) !important; }

html body .mg-detail-v071 .mg-closed-note {
  background: var(--mg-success-soft);
  border: 1px solid #c8e9d6;
  border-radius: 13px;
  display: grid;
  gap: 3px;
  padding: 12px 14px;
}
html body .mg-detail-v071 .mg-closed-note span { color: #4f695a; }

/* Timelines stay readable without overflowing the page. */
html body .mg-detail-v071 .mg-progress,
html body .mg-track-v071 .mg-track-progress {
  margin: 4px 0 !important;
  min-width: 0;
  overflow-x: auto;
  padding: 4px 0 6px !important;
  scrollbar-width: thin;
}
html body .mg-detail-v071 .mg-progress li,
html body .mg-track-v071 .mg-track-progress li {
  min-width: 82px;
}
html body .mg-detail-v071 .mg-progress-label,
html body .mg-track-v071 .mg-track-label {
  font-size: 11px !important;
  line-height: 1.25 !important;
}

/* Alerts become a compact status line when there is nothing to fix. */
html body .mg-detail-v071 .mg-incidents {
  margin: 13px 0;
}
html body .mg-detail-v071 .mg-incidents.is-clear .mg-section-heading {
  display: none !important;
}
html body .mg-detail-v071 .mg-all-good.compact {
  border-radius: 13px !important;
  margin: 0 !important;
  min-height: 0 !important;
  padding: 11px 13px !important;
}
html body .mg-detail-v071 .mg-all-good.compact strong::before {
  content: "✓ ";
}
html body .mg-detail-v071 .mg-incident-add {
  border: 1px dashed #d8dde4;
  border-radius: 12px;
  margin-top: 10px;
  padding: 0 12px;
}
html body .mg-detail-v071 .mg-incident-add > summary {
  cursor: pointer;
  font-weight: 800;
  padding: 12px 0;
}

/* Essential information is available, but collapsed by default. */
html body .mg-detail-v071 .mg-summary-compact {
  background: #fff;
  border: 1px solid var(--mg-line-final);
  border-radius: 14px;
  margin: 13px 0;
  padding: 0 14px;
}
html body .mg-detail-v071 .mg-summary-compact > summary {
  cursor: pointer;
  font-weight: 850;
  padding: 14px 0;
}
html body .mg-detail-v071 .mg-summary-compact .mg-summary-grid {
  margin: 0 0 14px !important;
}

html body .mg-detail-v071 .mg-recent-events-compact {
  background: #fff;
  border: 1px solid var(--mg-line-final);
  border-radius: 14px;
  box-shadow: none !important;
  margin: 13px 0 !important;
  padding: 0 14px !important;
}
html body .mg-detail-v071 .mg-recent-events-compact > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 0;
}
html body .mg-detail-v071 .mg-recent-events-compact > summary span {
  color: var(--mg-muted-final);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
html body .mg-detail-v071 .mg-recent-events-compact > summary strong {
  font-size: 13px;
  max-width: 70%;
  text-align: right;
}
html body .mg-detail-v071 .mg-recent-events-compact .mg-mini-history {
  padding-bottom: 14px;
}

/* Forms are shown only in their operation tab and remain easy to scan. */
html body .mg-detail-v071 .mg-operation-page > p {
  color: var(--mg-muted-final);
  max-width: 760px;
}
html body .mg-detail-v071 .mg-premium-form {
  background: #f8f9fa !important;
  border: 1px solid #e2e6eb !important;
  border-radius: 15px !important;
  padding: 15px !important;
}
html body .mg-detail-v071 .mg-form-grid {
  gap: 12px !important;
}
html body .mg-detail-v071 input,
html body .mg-detail-v071 select,
html body .mg-detail-v071 textarea {
  font-size: 16px !important;
}

html body .mg-detail-v071 .mg-shipping-assistant {
  border-radius: 15px !important;
  padding: 14px !important;
}
html body .mg-detail-v071 .mg-shipping-assistant pre {
  max-height: 220px;
}

/* History separates content and date, technical identifiers hidden in standard copy. */
html body .mg-detail-v071 .mg-history-row summary {
  align-items: flex-start;
  display: grid;
  gap: 9px;
  grid-template-columns: minmax(0,1fr) auto;
}
html body .mg-detail-v071 .mg-history-row summary span {
  overflow-wrap: anywhere;
}
html body .mg-detail-v071 .mg-history-row summary time {
  color: var(--mg-muted-final);
  font-size: 11px;
  white-space: nowrap;
}

/* Client tracking: clear, warm and route-aware. */
html body .mg-track-v071 {
  background: transparent !important;
  border-radius: 0 !important;
  margin: 22px auto 60px !important;
  max-width: 900px !important;
  overflow: visible !important;
  width: min(900px, calc(100% - 22px)) !important;
}
html body .mg-track-v071 .mg-track-card {
  background: #fff !important;
  border: 1px solid var(--mg-line-final) !important;
  border-radius: 22px !important;
  box-shadow: 0 14px 42px rgba(20,25,33,.06) !important;
  padding: clamp(17px, 3.5vw, 28px) !important;
}
html body .mg-track-v071 .mg-track-header {
  border-left: 5px solid var(--mg-route-gp) !important;
  border-radius: 17px !important;
  padding: clamp(20px, 4vw, 30px) !important;
}
html body .mg-track-v071.channel-france .mg-track-header { border-left-color: var(--mg-route-fr) !important; background: linear-gradient(135deg,#fff,#f3fbfb) !important; }
html body .mg-track-v071.channel-other .mg-track-header { border-left-color: var(--mg-route-other) !important; background: linear-gradient(135deg,#fff,#faf7ff) !important; }
html body .mg-track-v071 .mg-track-header h1 {
  color: var(--mg-ink-final) !important;
  font-size: clamp(30px, 5vw, 44px) !important;
  margin: 5px 0 8px !important;
}
html body .mg-track-v071 .mg-track-header p,
html body .mg-track-v071 .mg-track-header span {
  color: var(--mg-muted-final) !important;
  opacity: 1 !important;
}
html body .mg-track-v071.channel-france .mg-track-kicker { color: var(--mg-route-fr) !important; }
html body .mg-track-v071.channel-other .mg-track-kicker { color: var(--mg-route-other) !important; }

html body .mg-track-v071 .mg-track-progress,
html body .mg-track-v071 .mg-track-next,
html body .mg-track-v071 .mg-track-grid,
html body .mg-track-v071 .mg-track-help,
html body .mg-track-v071 .mg-relay-tracking {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
html body .mg-track-v071 .mg-track-next {
  background: var(--mg-success-soft) !important;
  border: 1px solid #cce8d8 !important;
  border-radius: 15px !important;
  padding: 16px !important;
}
html body .mg-track-v071 .mg-track-next h2 {
  font-size: clamp(23px, 4vw, 29px) !important;
}
html body .mg-track-v071 .mg-track-grid {
  gap: 10px !important;
}
html body .mg-track-v071 .mg-track-info {
  border-radius: 13px !important;
  padding: 13px !important;
}
html body .mg-track-v071 .mg-track-help {
  border-radius: 15px !important;
  padding: 15px !important;
}
html body .mg-track-v071 .mg-track-help-head h2 {
  font-size: 21px !important;
}
html body .mg-track-v071 .mg-track-contact {
  background: #f7f8fa;
  border: 0 !important;
  border-radius: 13px !important;
  margin-top: 12px;
  padding: 13px !important;
}

/* Error and success feedback stays inside the interface. */
html body .mg-manager-flash.error {
  background: var(--mg-danger-soft) !important;
  border: 1px solid #efc5c0 !important;
  color: var(--mg-danger) !important;
}

/* Mobile: compact cards, touchable tabs and no page overflow. */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  html body .mg-manager-v071,
  html body .mg-detail-v071 {
    margin-top: 10px !important;
    width: calc(100% - 14px) !important;
  }
  html body .mg-manager-v071 .mg-manager-top {
    border-radius: 18px !important;
    gap: 16px !important;
    padding: 20px 17px !important;
  }
  html body .mg-manager-v071 .mg-manager-top h1 {
    font-size: 32px !important;
  }
  html body .mg-manager-v071 .mg-manager-top p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  html body .mg-manager-v071 .mg-manager-user {
    align-items: flex-start !important;
    width: 100%;
  }
  html body .mg-manager-v071 .mg-manager-user a {
    justify-content: center;
    text-align: center;
    width: 100%;
  }
  html body .mg-manager-v071 .mg-command-center {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
  html body .mg-manager-v071 .mg-command-tile {
    min-height: 106px !important;
    padding: 13px !important;
  }
  html body .mg-manager-v071 .mg-command-tile span {
    font-size: 12px !important;
    line-height: 1.25;
  }
  html body .mg-manager-v071 .mg-command-tile strong {
    font-size: 30px !important;
  }
  html body .mg-manager-v071 .mg-command-tile small {
    display: none;
  }
  html body .mg-manager-v071 .mg-micro-kpis > div {
    min-width: 0;
    padding: 11px 12px !important;
  }
  html body .mg-manager-v071 .mg-micro-kpis small {
    font-size: 11px;
  }
  html body .mg-manager-v071 .mg-micro-kpis strong {
    font-size: 18px !important;
    overflow-wrap: anywhere;
  }
  html body .mg-route-shortcuts {
    grid-template-columns: 1fr !important;
  }
  html body .mg-route-shortcuts a {
    min-height: 46px;
  }
  html body .mg-manager-v071 .mg-priority-preview,
  html body .mg-manager-v071 .mg-orders-section {
    padding: 15px 11px !important;
  }
  html body .mg-manager-v071 .mg-section-heading {
    align-items: flex-start !important;
    gap: 8px !important;
  }
  html body .mg-manager-v071 .mg-section-heading h2 {
    font-size: 25px !important;
  }
  html body .mg-manager-v071 .mg-order-premium {
    padding: 15px !important;
  }
  html body .mg-manager-v071 .mg-order-head {
    flex-direction: column !important;
    gap: 10px !important;
  }
  html body .mg-manager-v071 .mg-badges {
    justify-content: flex-start !important;
    width: 100%;
  }
  html body .mg-manager-v071 .mg-order-facts {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
  html body .mg-manager-v071 .mg-order-facts > div {
    min-height: 70px;
  }
  html body .mg-manager-v071 .mg-order-open {
    width: 100%;
  }

  html body .mg-detail-v071 .mg-detail-hero {
    border-radius: 17px !important;
    gap: 14px !important;
    padding: 18px 16px !important;
  }
  html body .mg-detail-v071 .mg-detail-title h1 {
    font-size: 34px !important;
  }
  html body .mg-detail-v071 .mg-detail-badges {
    justify-content: flex-start !important;
  }
  html body .mg-detail-v071 .mg-detail-meta {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
  html body .mg-detail-v071 .mg-detail-meta > div:last-child {
    grid-column: 1 / -1;
  }
  html body .mg-detail-v071 .mg-detail-tabs-wrap {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
  }
  html body .mg-detail-v071 .mg-pilot-simple {
    gap: 15px;
    padding: 19px 15px !important;
  }
  html body .mg-detail-v071 .mg-pilot-copy {
    padding-right: 0 !important;
  }
  html body .mg-detail-v071 .mg-pilot-copy h2 {
    font-size: 29px;
  }
  html body .mg-detail-v071 .mg-pilot-simple > .mg-now-badge {
    justify-self: flex-start;
    position: static !important;
  }
  html body .mg-detail-v071 .mg-pilot-primary,
  html body .mg-detail-v071 .mg-pilot-primary .mg-manager-btn {
    width: 100% !important;
  }
  html body .mg-detail-v071 .mg-progress {
    margin-left: -4px !important;
    margin-right: -4px !important;
  }
  html body .mg-detail-v071 .mg-progress li {
    min-width: 78px !important;
  }
  html body .mg-detail-v071 .mg-all-good.compact {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 2px !important;
  }
  html body .mg-detail-v071 .mg-recent-events-compact > summary {
    align-items: flex-start;
    flex-direction: column;
  }
  html body .mg-detail-v071 .mg-recent-events-compact > summary strong {
    max-width: 100%;
    text-align: left;
  }
  html body .mg-detail-v071 .mg-summary-grid {
    grid-template-columns: 1fr !important;
  }
  html body .mg-detail-v071 .mg-history-row summary {
    grid-template-columns: 1fr !important;
  }
  html body .mg-detail-v071 .mg-history-row summary time {
    white-space: normal;
  }
  html body .mg-detail-v071 .mg-form-grid {
    grid-template-columns: 1fr !important;
  }
  html body .mg-detail-v071 .mg-form-grid .full {
    grid-column: auto !important;
  }

  html body .mg-track-v071 {
    margin-top: 10px !important;
    width: calc(100% - 12px) !important;
  }
  html body .mg-track-v071 .mg-track-card {
    border-radius: 18px !important;
    padding: 11px !important;
  }
  html body .mg-track-v071 .mg-track-header {
    border-radius: 14px !important;
    padding: 18px 15px !important;
  }
  html body .mg-track-v071 .mg-track-header h1 {
    font-size: 32px !important;
  }
  html body .mg-track-v071 .mg-track-progress {
    margin: 13px 0 !important;
  }
  html body .mg-track-v071 .mg-track-progress li {
    min-width: 75px !important;
  }
  html body .mg-track-v071 .mg-track-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  html body .mg-track-v071 .mg-track-info {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  html body .mg-track-v071 .mg-track-contact {
    align-items: stretch !important;
    flex-direction: column !important;
  }
  html body .mg-track-v071 .mg-track-problem,
  html body .mg-track-v071 .mg-track-problem > summary {
    width: 100% !important;
  }
}

@media (max-width: 390px) {
  html body .mg-manager-v071 .mg-command-center,
  html body .mg-manager-v071 .mg-micro-kpis,
  html body .mg-track-v071 .mg-track-grid {
    grid-template-columns: 1fr !important;
  }
  html body .mg-manager-v071 .mg-micro-kpis > div {
    border-bottom: 1px solid var(--mg-line-final) !important;
    border-right: 0 !important;
  }
  html body .mg-manager-v071 .mg-order-facts {
    grid-template-columns: 1fr !important;
  }
}

/* v0.7.1 final interaction polish */
html body .mg-detail-v071 .mg-field-error {
  color: var(--mg-danger);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 6px;
}
html body .mg-detail-v071 [aria-invalid="true"] {
  border-color: var(--mg-danger) !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .11) !important;
}

@media (max-width: 760px) {
  html body .mg-detail-v071 .mg-progress {
    grid-template-columns: repeat(var(--mg-step-count, 5), 92px) !important;
    min-width: 100% !important;
    width: max-content !important;
  }
  html body .mg-detail-v071 .mg-progress > li {
    min-width: 92px !important;
  }
  html body .mg-track-v071 .mg-track-progress {
    min-width: 100% !important;
    width: max-content !important;
  }
  html body .mg-track-v071 .mg-track-progress > li {
    min-width: 88px !important;
  }
}


/* v0.7.4 Mobile Final Polish: compact, readable and overflow-safe */
html body .mg-manager-v071,
html body .mg-detail-v071,
html body .mg-track-v071,
html body .mg-manager-v071 *,
html body .mg-detail-v071 *,
html body .mg-track-v071 * {
  box-sizing: border-box;
}

html body .mg-manager-v071 .scroll-to-top,
html body .mg-detail-v071 .scroll-to-top,
html body .mg-track-v071 .scroll-to-top,
html body .mg-manager-v071 .back-to-top,
html body .mg-detail-v071 .back-to-top,
html body .mg-track-v071 .back-to-top,
html body .mg-manager-v071 #scrollUp,
html body .mg-detail-v071 #scrollUp,
html body .mg-track-v071 #scrollUp,
body:has(.mg-manager-v071) [class*="scroll-top"],
body:has(.mg-detail-v071) [class*="scroll-top"],
body:has(.mg-track-v071) [class*="scroll-top"],
body:has(.mg-manager-v071) [class*="back-to-top"],
body:has(.mg-detail-v071) [class*="back-to-top"],
body:has(.mg-track-v071) [class*="back-to-top"] {
  display: none !important;
}

@media (max-width: 760px) {
  html body .mg-manager-v071,
  html body .mg-detail-v071,
  html body .mg-track-v071 {
    max-width: 100% !important;
    overflow-x: clip !important;
  }

  html body .mg-detail-v071 .mg-detail-tabs-wrap {
    overflow: hidden !important;
  }
  html body .mg-detail-v071 .mg-detail-tabs {
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    padding: 7px !important;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  html body .mg-detail-v071 .mg-detail-tabs a {
    flex: 0 0 auto !important;
    min-height: 44px !important;
    padding: 11px 15px !important;
    scroll-snap-align: start;
    white-space: nowrap !important;
  }

  html body .mg-detail-v071 .mg-operation-page {
    overflow: hidden !important;
    padding: 18px 15px !important;
  }
  html body .mg-detail-v071 .mg-section-heading {
    align-items: flex-start !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  html body .mg-detail-v071 .mg-section-heading > div,
  html body .mg-detail-v071 .mg-section-heading > span,
  html body .mg-detail-v071 .mg-section-heading > strong,
  html body .mg-detail-v071 .mg-section-heading > a {
    max-width: 100% !important;
    min-width: 0 !important;
  }
  html body .mg-detail-v071 .mg-section-heading h2 {
    font-size: clamp(28px, 9vw, 36px) !important;
    line-height: 1.08 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
  html body .mg-detail-v071 .mg-section-heading .mg-now-badge,
  html body .mg-detail-v071 .mg-now-badge {
    align-self: flex-start !important;
    font-size: 11px !important;
    max-width: 100% !important;
    position: static !important;
    white-space: normal !important;
  }
  html body .mg-detail-v071 .mg-operation-page > p {
    font-size: 16px !important;
    line-height: 1.55 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  html body .mg-detail-v071 .mg-progress {
    display: grid !important;
    grid-template-columns: repeat(var(--mg-step-count, 5), 82px) !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    padding: 7px 2px 10px !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch;
  }
  html body .mg-detail-v071 .mg-progress > li {
    min-width: 82px !important;
  }
  html body .mg-detail-v071 .mg-progress-label {
    font-size: 10px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }

  html body .mg-detail-v071 .mg-operation-action,
  html body .mg-detail-v071 .mg-operation-action > *,
  html body .mg-detail-v071 .mg-relay-tracking,
  html body .mg-detail-v071 .mg-relay-tracking *,
  html body .mg-detail-v071 .mg-relay-admin-notice,
  html body .mg-detail-v071 .mg-manager-btn,
  html body .mg-detail-v071 button,
  html body .mg-detail-v071 input,
  html body .mg-detail-v071 select,
  html body .mg-detail-v071 textarea {
    max-width: 100% !important;
    min-width: 0 !important;
  }
  html body .mg-detail-v071 .mg-manager-btn,
  html body .mg-detail-v071 .mg-relay-actions > *,
  html body .mg-detail-v071 .mg-operation-action > a,
  html body .mg-detail-v071 .mg-operation-action > button {
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
    width: 100% !important;
  }

  html body .mg-detail-v071 .mg-relay-tracking,
  html body .mg-detail-v071 .mg-relay-admin-notice {
    padding: 15px !important;
  }
  html body .mg-detail-v071 .mg-relay-tracking-head {
    display: flex !important;
    flex-direction: column !important;
  }
  html body .mg-detail-v071 .mg-relay-number {
    align-self: flex-start !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  html body .mg-detail-v071 .mg-relay-point span,
  html body .mg-detail-v071 .mg-recent-events-compact > summary strong,
  html body .mg-detail-v071 .mg-mini-history strong {
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  html body .mg-detail-v071 .mg-recent-events-compact > summary strong,
  html body .mg-detail-v071 .mg-mini-history strong {
    font-size: 13px !important;
  }
}

@media (max-width: 390px) {
  html body .mg-detail-v071 .mg-section-heading h2 {
    font-size: 28px !important;
  }
  html body .mg-detail-v071 .mg-progress {
    grid-template-columns: repeat(var(--mg-step-count, 5), 76px) !important;
  }
  html body .mg-detail-v071 .mg-progress > li {
    min-width: 76px !important;
  }
}

/* v0.7.5 Final Mobile Clean: remove document overflow and simplify touch UI */
html:has(.mg-manager-v071),
html:has(.mg-detail-v071),
html:has(.mg-track-v071),
body:has(.mg-manager-v071),
body:has(.mg-detail-v071),
body:has(.mg-track-v071) {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body:has(.mg-manager-v071) > *,
body:has(.mg-detail-v071) > *,
body:has(.mg-track-v071) > * {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Catch the common theme back-to-top controls, including direct fixed links. */
body:has(.mg-manager-v071) :is(#topcontrol,#back-to-top,#backtotop,#scroll-top,#scrollToTop,.go-top,.gotop,.to-top,.totop,.scrollup,.scroll-up,.scrollTop,.backtotop,.back-to-top,.ct-back-to-top,.ast-scroll-top-icon,.generate-back-to-top),
body:has(.mg-detail-v071) :is(#topcontrol,#back-to-top,#backtotop,#scroll-top,#scrollToTop,.go-top,.gotop,.to-top,.totop,.scrollup,.scroll-up,.scrollTop,.backtotop,.back-to-top,.ct-back-to-top,.ast-scroll-top-icon,.generate-back-to-top),
body:has(.mg-track-v071) :is(#topcontrol,#back-to-top,#backtotop,#scroll-top,#scrollToTop,.go-top,.gotop,.to-top,.totop,.scrollup,.scroll-up,.scrollTop,.backtotop,.back-to-top,.ct-back-to-top,.ast-scroll-top-icon,.generate-back-to-top),
body:has(.mg-manager-v071) a[href="#top"],
body:has(.mg-detail-v071) a[href="#top"],
body:has(.mg-track-v071) a[href="#top"],
body:has(.mg-manager-v071) [aria-label*="haut" i],
body:has(.mg-detail-v071) [aria-label*="haut" i],
body:has(.mg-track-v071) [aria-label*="haut" i],
body:has(.mg-manager-v071) [title*="haut" i],
body:has(.mg-detail-v071) [title*="haut" i],
body:has(.mg-track-v071) [title*="haut" i] {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

@media (max-width: 760px) {
  html body .mg-manager-v071,
  html body .mg-detail-v071,
  html body .mg-track-v071,
  html body .mg-manager-v071 > *,
  html body .mg-detail-v071 > *,
  html body .mg-track-v071 > *,
  html body .mg-detail-v071 :is(.mg-detail-shell,.mg-detail-main,.mg-detail-content,.mg-operation-page,.mg-operation-card,.mg-operation-action,.mg-relay-tracking,.mg-relay-admin-notice,.mg-info-card,.mg-details-grid),
  html body .mg-manager-v071 :is(.mg-dashboard-shell,.mg-dashboard-section,.mg-order-card),
  html body .mg-track-v071 :is(.mg-track-shell,.mg-track-card) {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  /* Only the tab rail and timelines may scroll horizontally, never the page. */
  html body .mg-detail-v071 .mg-detail-tabs-wrap,
  html body .mg-detail-v071 .mg-progress,
  html body .mg-track-v071 .mg-track-progress {
    contain: inline-size !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  html body .mg-detail-v071 .mg-detail-tabs-wrap {
    position: relative;
  }
  html body .mg-detail-v071 .mg-detail-tabs-wrap::after {
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.96));
    content: "";
    height: calc(100% - 14px);
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 7px;
    width: 28px;
    z-index: 2;
  }
  html body .mg-detail-v071 .mg-detail-tabs {
    scrollbar-width: none;
  }
  html body .mg-detail-v071 .mg-detail-tabs::-webkit-scrollbar {
    display: none;
  }
  html body .mg-detail-v071 .mg-detail-tabs a {
    font-size: 14px !important;
    padding-inline: 13px !important;
  }

  html body .mg-detail-v071 .mg-section-heading h2 {
    font-size: clamp(27px, 8.2vw, 35px) !important;
  }
  html body .mg-detail-v071 .mg-operation-page > p {
    font-size: 15px !important;
    line-height: 1.48 !important;
  }

  html body .mg-detail-v071 .mg-relay-tracking p,
  html body .mg-detail-v071 .mg-relay-point span,
  html body .mg-detail-v071 .mg-info-value,
  html body .mg-detail-v071 .mg-details-grid a,
  html body .mg-detail-v071 .mg-details-grid span,
  html body .mg-detail-v071 .mg-mini-history strong {
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  html body .mg-detail-v071 .mg-relay-actions {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: 1fr !important;
  }
  html body .mg-detail-v071 .mg-relay-actions > * {
    margin: 0 !important;
    width: 100% !important;
  }

  html body .mg-detail-v071 .mg-preflight {
    display: grid !important;
    gap: 9px !important;
  }
  html body .mg-detail-v071 .mg-preflight > * {
    margin: 0 !important;
    max-width: 100% !important;
  }
}

/* v0.7.6 Final UX touch: compact relay step and eliminate theme floaters. */
body:has(.mg-manager-v071),
body:has(.mg-detail-v071),
body:has(.mg-track-v071) {
  overflow-x: clip !important;
}

body:has(.mg-manager-v071) [style*="position: fixed"],
body:has(.mg-detail-v071) [style*="position: fixed"],
body:has(.mg-track-v071) [style*="position: fixed"] {
  max-width: 100vw;
}

@media (max-width: 760px) {
  html body .mg-detail-v071 .mg-section-heading h2 {
    font-size: clamp(26px, 7.7vw, 32px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em !important;
  }

  html body .mg-detail-v071 .mg-operation-page > p {
    margin-bottom: 18px !important;
    max-width: 34ch !important;
  }

  html body .mg-detail-v071 .mg-preflight-item {
    padding: 14px 16px !important;
    line-height: 1.42 !important;
  }

  html body .mg-detail-v071 .mg-action-choice .mg-manager-btn,
  html body .mg-detail-v071 .mg-action-choice form,
  html body .mg-detail-v071 .mg-action-choice form .mg-manager-btn {
    width: 100% !important;
  }
}


/* v0.7.7 Final iOS viewport polish. */
html.mg-plugin-screen,
body.mg-plugin-screen {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  width: 100% !important;
}

@media (max-width: 760px) {
  html.mg-plugin-screen body,
  body.mg-plugin-screen main,
  body.mg-plugin-screen #page,
  body.mg-plugin-screen .site,
  body.mg-plugin-screen .site-content,
  body.mg-plugin-screen .content-area,
  body.mg-plugin-screen .entry-content {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    width: 100% !important;
  }

  html body .mg-detail-v071 .mg-detail-tabs-wrap,
  html body .mg-detail-v071 .mg-progress,
  html body .mg-track-v071 .mg-track-progress {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  html body .mg-detail-v071 .mg-detail-tabs,
  html body .mg-detail-v071 .mg-progress,
  html body .mg-track-v071 .mg-track-progress {
    overscroll-behavior-inline: contain !important;
  }

  html body .mg-detail-v071 .mg-pilot-simple,
  html body .mg-detail-v071 .mg-operation-page,
  html body .mg-detail-v071 .mg-details-grid,
  html body .mg-detail-v071 .mg-info-card,
  html body .mg-detail-v071 .mg-relay-tracking {
    overflow-x: hidden !important;
  }
}


/* v0.7.8 Final iPhone hardening. */
@media (max-width: 980px) {
  html.mg-plugin-screen,
  html.mg-plugin-screen body {
    overflow-x: clip !important;
    max-width: 100dvw !important;
  }

  body:has(.mg-manager-v071) > :is(a,button,div,span)[style*="position: fixed"],
  body:has(.mg-detail-v071) > :is(a,button,div,span)[style*="position: fixed"],
  body:has(.mg-track-v071) > :is(a,button,div,span)[style*="position: fixed"] {
    max-width: 100dvw;
  }

  html body .mg-manager-v071,
  html body .mg-detail-v071,
  html body .mg-track-v071,
  html body .mg-manager-v071 *,
  html body .mg-detail-v071 *,
  html body .mg-track-v071 * {
    box-sizing: border-box !important;
  }

  html body .mg-manager-v071 :where(img,svg,video,canvas,iframe,table),
  html body .mg-detail-v071 :where(img,svg,video,canvas,iframe,table),
  html body .mg-track-v071 :where(img,svg,video,canvas,iframe,table) {
    max-width: 100% !important;
  }

  html body .mg-detail-v071 :where(.mg-pilot-simple,.mg-operation-page,.mg-details-grid,.mg-info-card,.mg-relay-tracking,.mg-manager-card,.mg-action-card),
  html body .mg-manager-v071 :where(.mg-manager-card,.mg-stats,.mg-priority-section),
  html body .mg-track-v071 :where(.mg-track-card,.mg-track-shell) {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: clip !important;
  }
}

/* v0.9.14 — zone de suppression sûre, limitée au centre de pilotage. */
.mg-danger-zone {
  margin-top: 30px;
  border: 1px solid #fecaca;
  border-radius: 18px;
  background: #fffafa;
  overflow: hidden;
}
.mg-danger-zone > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 850;
  color: #991b1b;
  background: #fff1f2;
}
.mg-danger-zone > summary::-webkit-details-marker { display: none; }
.mg-danger-zone > summary::after {
  content: '＋';
  float: right;
  font-weight: 900;
}
.mg-danger-zone[open] > summary::after { content: '−'; }
.mg-danger-zone-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .78fr);
  gap: 18px;
  padding: 18px;
  align-items: start;
}
.mg-danger-zone-body p {
  margin: 7px 0 0;
  color: #6b7280;
  line-height: 1.5;
}
.mg-delete-order-form {
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff;
}
.mg-delete-confirm {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin: 0 0 12px !important;
  font-weight: 700 !important;
  color: #4b5563 !important;
}
.mg-delete-confirm input {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px;
  margin-top: 2px !important;
}
.mg-manager-btn.danger {
  background: #b91c1c !important;
  color: #fff !important;
  border-color: #b91c1c !important;
  width: 100%;
}
.mg-manager-btn.danger:hover { background: #991b1b !important; }
@media (max-width: 760px) {
  .mg-danger-zone-body { grid-template-columns: 1fr; padding: 14px; }
  .mg-danger-zone > summary { padding: 15px 16px; }
}
