/* ---------- Envíos y reparto (modules/shipping.js) ---------- */
.sh-tabs { margin-bottom: 16px; }
.sh-toolbar { gap: 12px; }
.sh-toolbar .count { margin: 0; text-align: left; }
.sh-toolbar-actions { margin-left: auto; display: flex; gap: 8px; }
.sh-check { width: 36px; }
.sh-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.sh-table td { vertical-align: middle; }
.sh-section { margin-bottom: 16px; }
.sh-card-h { padding: 16px 20px 12px; margin: 0; }
.sh-composer { margin: 0 16px 14px; }
.sh-composer .sh-wide { flex: 2 1 220px; }
.sh-composer .sh-cp { flex: 0 1 100px; }
.sh-days { display: flex; gap: 4px; height: 38px; align-items: center; }
.sh-days label { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border); font-size: 12.5px; cursor: pointer; position: relative; }
.sh-days input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.sh-days label:has(input:checked) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.sh-days label:has(input:focus-visible) { box-shadow: var(--ring); }
.sh-empty { padding: 18px 20px !important; }
.sh-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; }
.sh-banner > svg { width: 18px; height: 18px; color: var(--text2); }
.sh-banner > span { flex: 1; }

/* route detail */
.sh-route-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.sh-route-head h2 { margin: 6px 0 2px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sh-back svg { transform: rotate(180deg); }
.sh-route-actions { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.sh-driver { width: 180px; }
.sh-driver input { height: 32px; }
.sh-stops { list-style: none; margin: 0; padding: 0; }
.sh-stop { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--border); }
.sh-stop:first-child { border-top: 0; }
.sh-seq { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--text2); }
.sh-stop.is-delivered .sh-seq { background: var(--green-soft); color: var(--green); }
.sh-stop.is-failed .sh-seq { background: var(--red-soft); color: var(--red); }
.sh-kg { font-variant-numeric: tabular-nums; color: var(--text2); white-space: nowrap; }
.sh-stop .row-actions button[disabled] { opacity: .3; }
.sh-danger { display: flex; justify-content: flex-end; margin-top: 12px; }
.btn-link { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.btn-link:hover { background: var(--surface-2); color: var(--text); }
.btn-link svg { width: 13px; height: 13px; }

/* settings */
.sh-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.sh-h { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.sh-note { margin: 6px 0 0; color: var(--text3); font-size: 13px; max-width: 70ch; }
.sh-actions { display: flex; gap: 8px; }
.sh-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.sh-form .sh-span { grid-column: 1 / -1; }
.sh-sc { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.sh-sc-save { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.sh-hook { margin-top: 14px; }
.sh-hook code { word-break: break-all; }

/* sheet (dialog) */
.sh-sheet-wrap { position: fixed; inset: 0; z-index: 400; background: rgba(20, 17, 15, .32); display: grid; place-items: center; padding: 16px; animation: shFade .14s var(--ease); }
.sh-sheet { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); border-radius: var(--r-xl); border: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 22px; animation: shIn .18s var(--ease); }
.sh-sheet h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.sh-sheet .field { margin-top: 12px; display: flex; flex-direction: column; }
.sh-sheet-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.sh-choice { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.sh-option { border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.sh-option.is-off { background: var(--surface-2); }
.sh-option-h { display: flex; flex-direction: column; gap: 2px; }
.sh-option-h span { color: var(--text3); font-size: 13px; }
.sh-option-b { display: flex; gap: 8px; flex-wrap: wrap; }
.sh-option-b select { flex: 1 1 200px; height: 36px; }
@keyframes shFade { from { opacity: 0; } }
@keyframes shIn { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* driver view (phone first) */
.dr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.dr-head h2 { margin: 2px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.dr-bar { height: 4px; border-radius: 4px; background: var(--hover-strong); margin-bottom: 16px; overflow: hidden; }
.dr-bar i { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.dr-stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dr-stop { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; }
.dr-stop.is-next { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.dr-stop.is-delivered, .dr-stop.is-failed { opacity: .72; }
.dr-stop-top { display: flex; align-items: center; gap: 12px; }
.dr-seq { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; background: var(--surface-3); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.dr-stop.is-next .dr-seq { background: var(--signal); color: #0b0908; }
.dr-who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dr-who strong { font-size: 16px; font-weight: 600; }
.dr-who span { color: var(--text3); font-size: 13px; }
.dr-addr { margin: 10px 0 0 42px; font-size: 14.5px; line-height: 1.45; }
.dr-addr span { color: var(--text3); font-size: 13px; }
.dr-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0 42px; }
.dr-actions .btn-link, .dr-actions button { height: 44px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.dr-actions .primary { flex: 1 1 140px; }
.dr-sign { width: 100%; height: 160px; border: 1px dashed var(--border-strong); border-radius: var(--r-md); background: #fff; touch-action: none; margin: 4px 0 6px; }

@media (max-width: 720px) {
  .sh-stop { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .sh-stop .sh-kg { display: none; }
  .sh-stop .row-actions { grid-column: 2 / -1; }
  .sh-form, .sh-sc { grid-template-columns: 1fr; }
  .dr-addr, .dr-actions { margin-left: 0; }
  .sh-driver { width: 100%; }
}
