:root {
  --bg: #f4f6f8;
  --card: #fff;
  --text: #1a1a1a;
  --muted: #667085;
  --primary: #0b6e4f;
  --primary-press: #085540;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --ok-bg: #ecfdf3;
  --border: #e4e7ec;
  --radius: 12px;
  --touch: 48px;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
html, body {
  margin: 0; padding: 0;
  font-family: "Noto Sans SC", "Noto Sans", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 16px; line-height: 1.45;
}
a { color: var(--primary); text-decoration: none; }
.topbar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  justify-content: space-between;
  padding: 6px 10px; background: #0b3d2e; color: #fff;
  /* document flow — do not cover scrolled content */
  position: static;
}
.topbar a { color: #fff; }
.brand { font-weight: 700; font-size: 0.95rem; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.82rem; }
.nav-toggle { display: none; }
.phone-entry { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.phone-entry input { flex: 1; min-width: 0; margin-top: 0 !important; }
.phone-prefix { padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; }
.nav .lang a.active { font-weight: 700; text-decoration: underline; }
.userpill { opacity: 0.85; font-size: 0.85rem; }
.container { max-width: 960px; width: 100%; margin: 0 auto; padding: 14px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.login-card { max-width: 420px; margin: 40px auto; }
h1 { font-size: 1.35rem; margin: 0 0 12px; }
.form label, .filters label {
  display: block; margin-bottom: 12px; font-weight: 600; font-size: 0.92rem;
}
.form input, .form select, .form textarea,
.filters input, .filters select {
  display: block; width: 100%; margin-top: 6px;
  min-height: var(--touch); padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 1rem; background: #fff;
}
.form textarea { min-height: 72px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--touch); padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-weight: 600; cursor: pointer;
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:active { background: var(--primary-press); }
/* §10 #20: filter submit buttons use primary green */
.filters .btn {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.filters .btn:active { background: var(--primary-press); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:active { filter: brightness(0.92); }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.sticky-actions { position: sticky; top: 0; background: var(--card); padding: 8px 0; z-index: 10; }
.alert {
  padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid transparent;
}
.alert-error { background: var(--danger-bg); border-color: #fecdca; color: var(--danger); }
.alert-warning { background: #fffaeb; border-color: #fedf89; color: #93370d; }
.alert-warning { background: #fffaeb; border-color: #fedf89; color: #93370d; }
.alert-error strong { font-size: 1.05rem; }

.alert-danger {
  background: var(--danger-bg, #fef3f2);
  border: 1px solid #fecdca;
  color: var(--danger, #b42318);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
  list-style: disc inside;
}
.alert-danger li { margin: 2px 0; color: var(--danger, #b42318); font-weight: 600; }
.alert-ok { background: var(--ok-bg); border-color: #abefc6; color: #067647; }
.fee-box {
  background: #f8fafc; border: 1px dashed var(--border);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px;
}
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.footer { text-align: center; padding: 20px 12px 40px; }
.filters {
  display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px;
}
@media (min-width: 640px) {
  .filters { grid-template-columns: repeat(4, 1fr); align-items: end; }
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td {
  border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: left; vertical-align: top;
}
.table th { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }
.amount-emph { font-size: 1.4rem; font-weight: 700; }
#daily-page-mobile .amount-emph { font-size: 1.4rem; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #f2f4f7; font-size: 0.75rem; font-weight: 700;
}
.tag.paye { background: #000; color: #fff; }
.tag.remise { background: #000; color: #fff; }
.radio, .check { font-weight: 500; display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.radio input, .check input { width: auto; min-height: auto; }
fieldset { border: 1px solid var(--border); border-radius: 10px; margin: 0 0 12px; padding: 8px 12px; }
.actions-cell a { display: inline-block; margin-right: 8px; }

[hidden], .is-hidden { display: none !important; }


/* Responsive: cards on mobile, table on desktop */
.mobile-only { display: block; }
.desktop-only { display: none; }
@media (min-width: 768px) {
  .mobile-only { display: none !important; }
  .desktop-only { display: block !important; }
}
.order-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.order-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  background: #fff;
}
.order-card .card-check { font-weight: 700; display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.order-card .card-row { display: flex; justify-content: space-between; gap: 8px; margin: 6px 0; font-size: 0.92rem; }
.order-card .card-row .k { color: var(--muted); flex-shrink: 0; }
.order-card .card-actions { display: flex; gap: 8px; margin-top: 10px; }
.order-card .card-actions .btn { flex: 1; min-height: 40px; font-size: 0.9rem; }

/* Outbound / rider */
.scan-feedback { padding: 12px 14px; border-radius: 10px; margin: 10px 0; font-weight: 700; }
.scan-ok { background: var(--ok-bg); color: #067647; border: 1px solid #abefc6; }
.scan-err { background: var(--danger-bg); color: var(--danger); border: 2px solid #f04438; }
.scan-input { font-size: 1.2rem !important; letter-spacing: 0.02em; }
.rider-sheet-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.rider-sheet-table th, .rider-sheet-table td { border: 1px solid #ccc; padding: 6px 8px; text-align: left; }
.rider-sheet-table .tot { font-weight: 800; background: #f8fafc; }
.rider-sheet-table { table-layout: auto; }
.rider-sheet-table th:nth-child(1),
.rider-sheet-table td:nth-child(1),
.rider-sheet-table th:nth-child(3),
.rider-sheet-table td:nth-child(3) { white-space: nowrap; }
.rider-sheet-table td:nth-child(1),
.rider-sheet-table td:nth-child(3) { overflow: visible; text-overflow: clip; }
.rider-sheet-table th:nth-child(5),
.rider-sheet-table td:nth-child(5),
.rider-sheet-table th:nth-child(6),
.rider-sheet-table td:nth-child(6),
.rider-sheet-table th:nth-child(7),
.rider-sheet-table td:nth-child(7) { white-space: nowrap; overflow: visible; }
.rider-sheet-table th:nth-child(1) { width: 14%; }
.rider-sheet-table th:nth-child(2) { width: 14%; }
.rider-sheet-table th:nth-child(3) { width: 15%; }
.rider-sheet-table th:nth-child(4) { width: 20%; }
.rider-sheet-table th:nth-child(5),
.rider-sheet-table th:nth-child(6) { width: 12%; }
.rider-sheet-table th:nth-child(7) { width: 13%; }
.rider-sheet-table td:nth-child(2),
.rider-sheet-table td:nth-child(4) { overflow-wrap: anywhere; word-break: break-word; }
.rider-sheet-table .tot-grand { white-space: nowrap; font-weight: 800; }
.rider-sheet-card a[href^="tel:"] { white-space: nowrap; }
.paye-inline { background:#000; color:#fff; padding:1px 6px; border-radius:4px; font-size:0.75rem; }

/* Rider sheet summaries + mobile cards (no horizontal scroll) */
.sheet-summary {
  margin: 10px 0;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sheet-summary .sheet-total-encaisser {
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 800;
}
.rider-sheet-cards { margin-top: 8px; }
.rider-sheet-card .card-row-addr {
  flex-direction: column;
  align-items: flex-start;
}
.rider-sheet-card .card-row-addr .addr {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.rider-sheet-card .card-row {
  flex-wrap: wrap;
}
@media (min-width: 768px) {
  .desktop-only.table-wrap { display: block !important; }
}

/* Returns overdue */
.order-card.overdue { border-color: #f04438; background: #fef3f2; }
.overdue-text { color: var(--danger); font-weight: 800; }

.radio.is-disabled, .radio:has(input:disabled) {
  opacity: 0.45;
  pointer-events: none;
}
.radio input:disabled { cursor: not-allowed; }


.change-log-card .card-row-change {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.change-log-card .change-values {
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.4;
}

#change-log { scroll-margin-top: 8px; }
.btn.is-disabled, button:disabled { opacity: 0.55; pointer-events: none; }

.file-native { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; z-index: -1; }
.file-photo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.file-photo .k { width: 100%; color: var(--muted); font-size: 0.9rem; }

/* À traiter table: full columns + sticky action */
.traiter-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.table-compact th, .table-compact td { padding: 8px 10px; font-size: 0.92rem; }
.table-compact .col-notes { max-width: 140px; }
.table-compact .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-compact .nowrap { white-space: nowrap; }
.table-compact .col-action { position: sticky; right: 0; background: #fff; box-shadow: -4px 0 8px rgba(0,0,0,.06); white-space: nowrap; }
.btn-sm { padding: 6px 12px; font-size: 0.88rem; }
.pill-ok { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #e8f8ef; color: #067647; font-size: 0.85rem; }
/* Roles matrix */
.roles-matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.roles-matrix { border-collapse: collapse; min-width: 720px; width: 100%; font-size: 0.88rem; }
.roles-matrix th, .roles-matrix td { border: 1px solid #e5e7eb; padding: 6px 8px; text-align: center; vertical-align: middle; }
.roles-matrix th.perm-name, .roles-matrix td.perm-name { text-align: left; min-width: 200px; position: sticky; left: 0; background: #fff; z-index: 1; }
.roles-matrix tr.group-row th { background: #f3f4f6; text-align: left; font-weight: 700; }
.roles-matrix thead th { background: #f9fafb; position: sticky; top: 0; z-index: 2; }
.roles-matrix thead th.perm-name { z-index: 3; }
.roles-matrix input[type=checkbox]:disabled { opacity: 0.7; }
.changelog-line { font-size: 0.9rem; padding: 6px 0; border-bottom: 1px solid #eee; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.changelog-line .when { font-family: ui-monospace, monospace; color: #667; }
.changelog-line .who { font-weight: 600; }
.changelog-line .action { flex: 1 1 200px; }
@media (max-width: 767px) {
  .topbar { align-items: center; }
  .nav-toggle { display: inline-flex; min-height: 40px; padding: 4px 12px; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; background: transparent; color: #fff; font-size: 1.2rem; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .nav.nav-open { display: flex; }
  .container { width: 100%; max-width: 100%; }
  .table-wrap, .roles-matrix-wrap { max-width: 100%; overflow-x: auto; }
  .order-cards, .order-card, .card { max-width: 100%; min-width: 0; }
}

/* Outbound: sticky current rider */
.outbound-rider-sticky {
  position: sticky; top: 0; z-index: 20;
  margin: 10px 0 14px; padding: 12px 16px;
  background: #0f766e; color: #fff;
  border-radius: 10px; box-shadow: 0 4px 14px rgba(15,118,110,.35);
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline;
}
.outbound-rider-label { font-size: 0.85rem; opacity: .9; text-transform: uppercase; letter-spacing: .04em; }
.outbound-rider-name { font-size: 1.35rem; font-weight: 800; }
.outbound-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.outbound-pending-card { max-width: 100%; min-width: 0; overflow: hidden; }
/* p26 N9: very long customer names (no spaces) wrap inside the card instead of running past its edge */
.outbound-pending-card { overflow-wrap: anywhere; word-break: break-word; }
.outbound-pending-addr {
  display: inline-block;
  max-width: min(40ch, 55vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  color: var(--muted);
}

.outbound-today-table th:nth-child(5),
.outbound-today-table td:nth-child(5) { overflow-wrap: anywhere; }
.outbound-today-table th:nth-child(1),
.outbound-today-table td:nth-child(1),
.outbound-today-table th:nth-child(3),
.outbound-today-table td:nth-child(3),
.outbound-today-table th:nth-child(6),
.outbound-today-table td:nth-child(6) { white-space: nowrap; }

.order-card .mono, .rider-sheet-card .mono { white-space: nowrap; }


/* Radio/check: control inline with label, large tap target */
.form label.radio,
.form label.check,
label.radio,
label.check {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: var(--touch);
  padding: 8px 4px;
  margin: 4px 0;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
.form label.radio input,
.form label.check input,
label.radio input,
label.check input {
  display: inline-block !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px;
  min-height: 22px !important;
  margin: 0 !important;
  flex-shrink: 0;
  accent-color: var(--brand, #0f5c4c);
}
.form fieldset { border: none; padding: 0; margin: 0 0 8px; }
.form fieldset legend { font-weight: 700; margin-bottom: 4px; }

/* Outbound today: full order no, compact tot row */
.outbound-today-table { table-layout: auto; font-size: 0.82rem; }
.outbound-today-table th:nth-child(1),
.outbound-today-table td:nth-child(1) {
  white-space: nowrap;
  font-size: 0.78rem;
  width: auto;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}
.outbound-today-table td.mono { white-space: nowrap; }
.rider-sheet-table tr.tot td,
.outbound-today-table tr.tot td {
  padding: 6px 8px;
  line-height: 1.25;
  vertical-align: middle;
  height: auto;
}
.order-card .mono { white-space: nowrap; }

/* === FORCE inline radio/check (beats .form input {display:block;width:100%}) === */
.form input[type="radio"],
.form input[type="checkbox"],
input[type="radio"],
input[type="checkbox"] {
  display: inline-block !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-width: 1.25rem !important;
  min-height: 1.25rem !important;
  margin: 0 0.5rem 0 0 !important;
  vertical-align: middle !important;
  float: none !important;
}
.form label.radio,
.form label.check,
fieldset label.radio,
fieldset label.check {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.65rem !important;
  min-height: 44px !important;
  padding: 6px 8px !important;
  margin: 2px 0 !important;
  width: auto !important;
  max-width: 100%;
  box-sizing: border-box;
}

label.choice-row {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 44px !important;
  padding: 8px 10px !important;
  margin: 4px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
label.choice-row > input[type="radio"],
label.choice-row > input[type="checkbox"] {
  display: inline-block !important;
  flex: 0 0 22px !important;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
}
label.choice-row > span { flex: 1 1 auto; line-height: 1.3; cursor: pointer; pointer-events: auto; }
label.choice-row, label.radio, label.check { cursor: pointer; pointer-events: auto; }
label.choice-row > input[type="radio"],
label.choice-row > input[type="checkbox"],
label.radio > input[type="radio"],
label.check > input[type="checkbox"] { pointer-events: auto; }

.scan-result-card { margin-top: 12px; border: 1px solid #cbd5e1; }
.scan-result-card .card-row { flex-wrap: wrap; }
.scan-result-card .card-row .k { min-width: 7rem; }
.scan-result-card .card-row > span:not(.k) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* p26 N5: return inspection rows (goods total / notes / rider) - label and value apart */
#inspect-items .card-row { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 6px 0; font-size: 0.92rem; }
#inspect-items .card-row .k { color: var(--muted); min-width: 7rem; flex-shrink: 0; }
#inspect-items .card-row > span:not(.k) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* amount + "AR" stay on one line (fr "Total marchandise (après réduction)") */
#inspect-items .card-row > span.mono { white-space: nowrap; overflow-wrap: normal; word-break: normal; }


/* Scan online/offline + full-page error banner */
.scan-net {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 8px;
}
.scan-net-on { background: #dcfce7; color: #166534; }
.scan-net-off { background: #fee2e2; color: #991b1b; }
.scan-net::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
}
.scan-input-offline,
input.scan-input.scan-input-offline {
  background: #fef9c3 !important;
  border-color: #ca8a04 !important;
}
.scan-offline-hint {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 6px 0 10px;
  font-weight: 600;
}
.scan-feedback.scan-banner-full {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  font-size: 1.05rem;
  font-weight: 700;
  background: #fee2e2;
  color: #991b1b;
  border: 2px solid #ef4444;
  border-radius: 8px;
}
.scan-result-card.scan-card-ok {
  border: 2px solid #22c55e;
  background: #f0fdf4;
}

.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
.select-scope-actions { flex-wrap: wrap; align-items: center; gap: 8px; }

/* Staff profile incomplete badge */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-warn { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }

/* rider phone inside the green "Livreur actuel" banner must stay readable */
.outbound-rider-sticky a,
.outbound-rider-sticky a:visited { color: #fff; text-decoration: underline; font-weight: 700; white-space: nowrap; }

/* Inline field validation (order form phone, etc.) */
.rider-sheet-table td.sheet-no, .rider-sheet-card .mono { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.field-error {
  display: block;
  color: #b91c1c;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}
.field-error[hidden] { display: none !important; }
/* §10 #9: empty required fields must NOT show red on first paint.
   Prefer :user-invalid (after user interaction / failed submit).
   Keep .is-invalid for JS-marked errors (phone etc.). */
input.is-invalid,
input:user-invalid,
textarea.is-invalid,
textarea:user-invalid,
select.is-invalid,
select:user-invalid {
  border-color: #b91c1c;
}

/* L2: remittance daily — keep trailing columns readable at 1280px via horizontal scroll */
.remittance-daily-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.remittance-daily-table { min-width: 1100px; width: 100%; border-collapse: collapse; }
.remittance-daily-table th, .remittance-daily-table td { white-space: nowrap; padding: 6px 8px; }

/* New-order agent controls: compact adjacent controls, including narrow screens. */
.order-revendeur-controls{display:flex;align-items:center;gap:.5rem;width:100%;max-width:34rem;min-width:0}
.order-revendeur-controls #revendeur_id{flex:1 1 0;width:0;min-width:0;margin:0}
.order-revendeur-controls #create-order-revendeur{flex:0 0 auto;margin:0;white-space:nowrap}
/* Only the draft remittance cash field keeps native number validation without steppers. */
#remit-actual-cash{display:block;width:100%;max-width:16rem;box-sizing:border-box;appearance:textfield;-moz-appearance:textfield}
#remit-actual-cash::-webkit-inner-spin-button,
#remit-actual-cash::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* Follow-up desktop table: allow French headings to wrap at 1280px. */
#traiter-table { width:100%; table-layout:fixed; }
#traiter-table th { white-space:normal; overflow-wrap:anywhere; }
#traiter-table td { overflow-wrap:anywhere; }
#traiter-table .col-notes { width:10%; max-width:none; }
#traiter-table .col-action { position:static; width:10%; box-shadow:none; white-space:normal; }
#traiter-table th:nth-child(7), #traiter-table th:nth-child(8) { width:9%; }
#traiter-table th:nth-child(9) { width:3%; }
#traiter-table td:nth-child(8) .pill-ok { white-space:normal; }
#traiter-table .nowrap { white-space:normal; }
#traiter-table th, #traiter-table td { padding:6px; }
#traiter-table .btn-sm { max-width:100%; padding:6px; white-space:normal; }

/* p25 ui8: collapsible list cards (products / users / revendeurs) */
details.collapse-card > summary.collapse-summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; list-style: none; }
details.collapse-card > summary.collapse-summary::-webkit-details-marker { display: none; }
details.collapse-card > summary.collapse-summary::before { content: "▸"; color: var(--muted); }
details.collapse-card[open] > summary.collapse-summary::before { content: "▾"; }
details.collapse-card > summary .collapse-title { font-size: 1.05rem; }
details.collapse-card > .collapse-body { margin-top: 10px; }
.badge-on { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.badge-off { background: #f3f4f6; color: #4b5563; border: 1px solid #d1d5db; }
/* p28: 全系统数字框去掉上下箭头（键盘照旧，滚轮拦截见 p26） */
input[type=number]{appearance:textfield;-moz-appearance:textfield}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
