:root {
  --bg: #f4f4f2; --card: #fff; --text: #141414; --muted: #6b6b6b; --line: #e2e2de;
  --accent: #06c167; --accent-text: #fff; --danger: #c62828; --warn-bg: #fff4d6;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; }
.top { background: #000; color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.top h1 { font-size: 20px; margin: 0; }
.badge { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: #333; }
.badge.demo, .badge.sandbox { background: #f5b301; color: #000; }
.badge.production { background: var(--accent); }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border-radius: 12px; padding: 16px; margin-bottom: 16px; border: 1px solid var(--line); }
h2 { font-size: 17px; margin: 4px 0 12px; }
h2:not(:first-child) { margin-top: 20px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
input, select { font: inherit; color: var(--text); padding: 11px 12px; border: 1px solid #cfcfca; border-radius: 8px; background: #fff; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--accent); border-color: transparent; }
input.invalid { border-color: var(--danger); }
button { font: inherit; border: 0; border-radius: 8px; padding: 11px 16px; cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
.primary { background: #000; color: #fff; font-weight: 600; }
.primary.big { background: var(--accent); color: var(--accent-text); padding: 14px 20px; font-size: 17px; }
.ghost { background: #ededea; color: var(--text); }
.danger { background: #fdecec; color: var(--danger); }
.small { font-size: 13px; padding: 7px 11px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.row { display: flex; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.error { background: #fdecec; color: var(--danger); padding: 10px 12px; border-radius: 8px; margin-top: 14px; }
.quote { margin-top: 16px; padding: 16px; background: #eefaf3; border-radius: 10px; border: 1px solid #bfe9d0; }
.quote-main { display: flex; gap: 32px; flex-wrap: wrap; }
.quote-main div { display: flex; flex-direction: column; }
.quote-main strong { font-size: 26px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { border-top: 1px solid var(--line); padding: 12px 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
.list .who { font-weight: 600; }
.list .meta { font-size: 13px; color: var(--muted); grid-column: 1; }
.list .btns { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.status { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: #ededea; white-space: nowrap; align-self: start; }
.status.pending { background: var(--warn-bg); }
.status.pickup, .status.pickup_complete, .status.dropoff { background: #e3f0ff; color: #0b4fa8; }
.status.delivered { background: #dff6e8; color: #0a7a3d; }
.status.canceled, .status.returned { background: #fdecec; color: var(--danger); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #000; color: #fff; padding: 12px 18px; border-radius: 10px; max-width: 90vw; }
.btnlink { display: inline-block; border-radius: 8px; text-decoration: none; color: var(--text); }
.seg { display: flex; gap: 8px; margin-bottom: 14px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; width: 0; }
.seg span { display: block; text-align: center; padding: 11px; border: 1px solid #cfcfca; border-radius: 8px; cursor: pointer; font-weight: 600; }
.seg input:checked + span { background: #000; color: #fff; border-color: #000; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.mt { margin-top: 12px; }
.incoming { border: 2px solid var(--accent); }
.pin { display: inline-flex; align-items: center; gap: 10px; background: #f0f0ec; border-radius: 8px; padding: 6px 12px; font-size: 13px; }
.pin strong { font-size: 22px; letter-spacing: 4px; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.warn { background: var(--warn-bg); color: #6b4a00; padding: 10px 12px; border-radius: 8px; margin-top: 10px; font-size: 14px; }
.prefixed { display: flex; align-items: stretch; }
.prefixed .prefix { display: flex; align-items: center; padding: 0 10px; background: #ededea; color: var(--text); border: 1px solid #cfcfca; border-right: 0; border-radius: 8px 0 0 8px; font-variant-numeric: tabular-nums; }
.prefixed input { border-radius: 0 8px 8px 0; min-width: 0; }

/* Autocomplétion d'adresse (Google Places) */
.ac { position: relative; }
.ac-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin: 4px 0 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid #cfcfca; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 280px; overflow-y: auto; }
.ac-list li { padding: 9px 12px; cursor: pointer; color: var(--text); font-size: 15px; line-height: 1.3; }
.ac-list li small { display: block; color: var(--muted); font-size: 13px; }
.ac-list li.active, .ac-list li:hover { background: #ededea; }
.ac-list li.ac-logo { cursor: default; text-align: right; font-size: 11px; color: var(--muted); padding: 4px 12px; }
.ac-list li.ac-logo:hover { background: none; }
