/* =====================================================
   VIBE Carolina — Route / Fulfillment Dashboard Styles
   Mobile-first: drivers use this one-thumbed in a van.
   Builds on style.css tokens + packing.css components.
   ===================================================== */

.fl-body { padding-bottom: 90px; }

/* ── Offline banner ─────────────────────────────────── */
.fl-offline-banner {
  background: #fef3c7; color: #92400e;
  border-bottom: 1px solid #fde68a;
  padding: 9px 16px; font-size: .8rem; font-weight: 600;
}

/* ── Subheader: week nav + view toggle ──────────────── */
.fl-subheader {
  position: sticky; top: 56px; z-index: 40;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: #f0f2f5;
  border-bottom: 1px solid var(--color-border);
}
.fl-week-nav {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--color-border); background: #fff;
  font-size: 1.3rem; line-height: 1; color: var(--color-text);
  cursor: pointer; flex-shrink: 0;
}
.fl-week-nav:active { background: #e5e7eb; }
.fl-week-label {
  flex: 1; min-width: 0; height: 40px;
  border: 1px solid var(--color-border); border-radius: 10px;
  background: #fff; font-size: .88rem; font-weight: 700;
  color: var(--color-text); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 10px;
}
.fl-view-toggle {
  display: flex; border: 1px solid var(--color-border);
  border-radius: 10px; overflow: hidden; flex-shrink: 0; background: #fff;
}
.fl-view-btn {
  border: none; background: none; padding: 0 14px; height: 38px;
  font-size: .82rem; font-weight: 600; color: var(--color-muted); cursor: pointer;
}
.fl-view-btn.active { background: #1a1d2e; color: #fff; }

/* ── Driver chips ───────────────────────────────────── */
.fl-driver-chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 12px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fl-driver-chips::-webkit-scrollbar { display: none; }
.fl-chip {
  flex-shrink: 0;
  padding: 8px 14px; min-height: 38px;
  border-radius: 20px; border: 1.5px solid var(--color-border);
  background: #fff; color: var(--color-text);
  font-size: .82rem; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.fl-chip.active { background: #1a1d2e; border-color: #1a1d2e; color: #fff; }
.fl-chip:active { transform: scale(.97); }

/* ── Day strip ──────────────────────────────────────── */
.fl-day-strip {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 8px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fl-day-strip::-webkit-scrollbar { display: none; }
.fl-day-chip {
  flex: 1 0 auto; min-width: 68px; min-height: 54px;
  border-radius: 12px; border: 1.5px solid var(--color-border);
  background: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 6px 8px;
}
.fl-day-chip .fl-day-name { font-size: .72rem; font-weight: 700; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; }
.fl-day-chip .fl-day-date { font-size: .88rem; font-weight: 700; color: var(--color-text); }
.fl-day-chip .fl-day-count {
  font-size: .68rem; font-weight: 700; color: var(--color-muted);
  background: #f1f5f9; border-radius: 8px; padding: 0 7px; min-height: 15px;
}
.fl-day-chip.active { border-color: #1a1d2e; background: #1a1d2e; }
.fl-day-chip.active .fl-day-name,
.fl-day-chip.active .fl-day-date { color: #fff; }
.fl-day-chip.active .fl-day-count { background: rgba(255,255,255,.18); color: #fff; }
.fl-day-chip.fl-today { box-shadow: inset 0 0 0 2px #3b82f6; }
.fl-day-chip .fl-day-count:empty { display: none; }

/* ── Unassigned tray ────────────────────────────────── */
.fl-tray-wrap {
  margin: 8px 12px;
  background: #fff; border: 1.5px dashed #cbd5e1; border-radius: 14px;
  overflow: hidden;
}
.fl-tray-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: none; background: none;
  font-size: .88rem; font-weight: 700; color: var(--color-text); cursor: pointer;
}
.fl-tray-count {
  display: inline-block; margin-left: 6px;
  background: #fef3c7; color: #92400e;
  border-radius: 10px; padding: 1px 9px; font-size: .78rem;
}
.fl-tray-head svg { transition: transform .18s; color: var(--color-muted); }
.fl-tray-wrap.open .fl-tray-head svg { transform: rotate(180deg); }
.fl-tray-list { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.fl-tray-row {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc; border: 1px solid var(--color-border); border-radius: 11px;
  padding: 10px 12px;
}
.fl-tray-info { flex: 1; min-width: 0; }
.fl-tray-client { font-size: .88rem; font-weight: 700; color: var(--color-text); }
.fl-tray-meta   { font-size: .74rem; color: var(--color-muted); margin-top: 1px; }
.fl-tray-req    { font-size: .72rem; color: #1d4ed8; font-weight: 600; margin-top: 2px; }
.fl-assign-btn {
  flex-shrink: 0; min-height: 40px; padding: 0 14px;
  background: #1a1d2e; color: #fff; border: none; border-radius: 10px;
  font-size: .8rem; font-weight: 700; cursor: pointer;
}

/* ── Board / lanes ──────────────────────────────────── */
.fl-board { padding: 4px 12px 12px; }
.fl-day-section { margin-bottom: 14px; }
.fl-day-section-head {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 2px 6px; cursor: pointer;
}
.fl-day-section-head h2 { font-size: .95rem; font-weight: 800; color: var(--color-text); }
.fl-day-section-head .fl-day-sum { font-size: .74rem; color: var(--color-muted); }

.fl-lane {
  background: #fff; border: 1px solid var(--color-border); border-radius: 14px;
  margin-bottom: 10px; overflow: hidden;
}
.fl-lane-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
}
.fl-lane-name { font-size: .85rem; font-weight: 800; color: var(--color-text); }
.fl-lane-sum  { font-size: .72rem; color: var(--color-muted); }
.fl-lane-stops { padding: 8px; display: flex; flex-direction: column; gap: 7px; min-height: 20px; }
.fl-lane-empty { font-size: .78rem; color: var(--color-muted); padding: 6px 8px; }
.fl-lane-foot {
  display: flex; gap: 8px; padding: 8px; border-top: 1px dashed var(--color-border);
}
.fl-buildroute-btn {
  flex: 1; min-height: 42px;
  background: #eff6ff; color: #1d4ed8; border: 1.5px solid #bfdbfe;
  border-radius: 10px; font-size: .82rem; font-weight: 700; cursor: pointer;
}
.fl-buildroute-btn:active { background: #dbeafe; }

/* ── Stop blocks ────────────────────────────────────── */
.fl-stop {
  display: flex; align-items: stretch; gap: 8px;
  background: #fff; border: 1.5px solid var(--color-border); border-radius: 12px;
  padding: 9px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  touch-action: pan-y;                /* page scrolls; handle owns drags */
}
.fl-stop.fl-pickup { border-style: dashed; background: #fbfdff; }
.fl-stop.fl-service { background: #fefdf8; border-left: 3px solid #eab308; }
.fl-stop.fl-service .fl-stop-num { background: #a16207; }
.fl-stop.fl-done      { opacity: .58; }
.fl-stop.fl-cancelled { border-color: #fca5a5; background: #fef2f2; }
.fl-stop.fl-dragging  { opacity: .35; }

.fl-stop-handle {
  display: flex; align-items: center; justify-content: center;
  width: 30px; flex-shrink: 0; color: #cbd5e1;
  cursor: grab; touch-action: none;   /* pointer drag lives here only */
  font-size: 1.1rem; user-select: none; -webkit-user-select: none;
}
.fl-stop-num {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: #1a1d2e; color: #fff;
  font-size: .74rem; font-weight: 800; flex-shrink: 0; align-self: center;
}
.fl-stop.fl-pickup .fl-stop-num { background: #0e7490; }
.fl-stop-body { flex: 1; min-width: 0; cursor: pointer; align-self: center; }
.fl-stop-client { font-size: .88rem; font-weight: 700; color: var(--color-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-stop-sub { font-size: .74rem; color: var(--color-muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-stop-flags { display: flex; gap: 6px; margin-top: 3px; flex-wrap: wrap; align-items: center; }
.fl-flag { font-size: .68rem; color: var(--color-muted); }
.fl-flag-warn { color: #b45309; font-weight: 700; }

.fl-state-pill {
  font-size: .64rem; font-weight: 800; letter-spacing: .04em;
  border-radius: 8px; padding: 2px 8px; text-transform: uppercase;
}
.fl-pill-pending   { background: #fef9c3; color: #854d0e; }
.fl-pill-packed    { background: #dbeafe; color: #1e40af; }
.fl-pill-done      { background: #dcfce7; color: #166534; }
.fl-pill-cancelled { background: #fee2e2; color: #991b1b; }
.fl-pill-pickup    { background: #cffafe; color: #155e75; }
.fl-pill-service   { background: #fef9c3; color: #a16207; }

.fl-stop-arrows { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.fl-arrow-btn {
  width: 44px; height: 30px;
  border: 1px solid var(--color-border); border-radius: 8px;
  background: #f8fafc; color: var(--color-text);
  font-size: .95rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.fl-arrow-btn:disabled { opacity: .3; }
.fl-arrow-btn:active:not(:disabled) { background: #e2e8f0; }

.fl-pickup-check {
  width: 34px; height: 34px; align-self: center; flex-shrink: 0;
  border: 2px solid #cbd5e1; border-radius: 10px; background: #fff;
  color: transparent; font-size: 1rem; cursor: pointer;
}
.fl-pickup-check.done { background: #22c55e; border-color: #22c55e; color: #fff; }

/* Drag ghost + drop slot */
.fl-drag-ghost {
  position: fixed; z-index: 300; pointer-events: none;
  opacity: .92; box-shadow: 0 10px 28px rgba(0,0,0,.25);
  transform: rotate(1.5deg);
}
.fl-drop-slot {
  height: 4px; border-radius: 2px; background: #3b82f6;
  margin: 2px 6px;
}

/* ── Week view ──────────────────────────────────────── */
.fl-board.fl-week-view .fl-week-stop {
  display: flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--color-border); border-radius: 9px;
  padding: 6px 9px; margin-bottom: 5px; cursor: pointer;
}
.fl-week-stop .fl-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.fl-dot-pending   { background: #eab308; }
.fl-dot-packed    { background: #3b82f6; }
.fl-dot-done      { background: #22c55e; }
.fl-dot-cancelled { background: #ef4444; }
.fl-dot-pickup    { background: #06b6d4; }
.fl-dot-service   { background: #eab308; }
.fl-week-stop-name {
  flex: 1; min-width: 0; font-size: .76rem; font-weight: 600; color: var(--color-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fl-week-driver { font-size: .68rem; font-weight: 700; color: var(--color-muted); margin: 6px 0 3px; text-transform: uppercase; letter-spacing: .04em; }

@media (min-width: 900px) {
  .fl-board.fl-week-view { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: start; }
  .fl-board.fl-week-view .fl-day-section { margin-bottom: 0; }
}

/* ── Day actions bar ────────────────────────────────── */
.fl-day-actions {
  display: flex; gap: 8px; padding: 4px 12px 16px; flex-wrap: wrap;
}
.fl-action-btn {
  flex: 1 1 30%; min-height: 46px;
  background: #fff; border: 1.5px solid var(--color-border); border-radius: 12px;
  font-size: .82rem; font-weight: 700; color: var(--color-text); cursor: pointer;
}
.fl-action-btn:active { background: #f1f5f9; }

/* ── Sheets ─────────────────────────────────────────── */
.fl-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 18, 34, .45);
}
.fl-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 210;
  background: #fff; border-radius: 18px 18px 0 0;
  max-height: 88vh; overflow-y: auto;
  padding: 6px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,.22);
}
.fl-sheet-sm { max-height: 60vh; }
@media (min-width: 700px) {
  .fl-sheet {
    left: 50%; right: auto; bottom: auto; top: 7vh;
    transform: translateX(-50%);
    width: 560px; max-height: 84vh;
    border-radius: 18px;
  }
}
.fl-sheet-grab {
  width: 44px; height: 5px; border-radius: 3px;
  background: #d1d5db; margin: 8px auto 12px; cursor: pointer;
}
.fl-sheet-title { font-size: 1.02rem; font-weight: 800; color: var(--color-text); margin-bottom: 6px; }
.fl-sheet-hint  { font-size: .76rem; color: var(--color-muted); margin-bottom: 10px; }
.fl-sheet-label {
  font-size: .72rem; font-weight: 800; color: var(--color-muted);
  text-transform: uppercase; letter-spacing: .05em;
  margin: 14px 0 7px;
}

.fl-input, .fl-mini-form input, .fl-mini-form select, .fl-mini-form textarea {
  width: 100%; padding: 11px 12px;
  border: 1.5px solid var(--color-border); border-radius: 10px;
  font-size: .9rem; color: var(--color-text); background: #fff;
  font-family: inherit;
}
.fl-input:focus, .fl-mini-form input:focus, .fl-mini-form select:focus, .fl-mini-form textarea:focus {
  outline: none; border-color: var(--color-accent);
}
.fl-mini-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }

.fl-primary-btn {
  width: 100%; min-height: 48px; margin-top: 12px;
  background: #1a1d2e; color: #fff; border: none; border-radius: 12px;
  font-size: .92rem; font-weight: 800; cursor: pointer;
}
.fl-primary-btn:active { opacity: .85; }
.fl-primary-btn:disabled { opacity: .5; }
.fl-btn-alt { background: #374151; }
.fl-btn-sm { min-height: 42px; margin-top: 4px; font-size: .84rem; }
.fl-link-btn {
  background: none; border: none; color: var(--color-accent);
  font-size: .82rem; font-weight: 700; cursor: pointer; padding: 8px 0;
}
.fl-remember-label {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--color-text); margin-top: 12px;
}

/* Move sheet day / driver pickers */
.fl-move-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.fl-move-day {
  min-height: 52px; border: 1.5px solid var(--color-border); border-radius: 11px;
  background: #fff; cursor: pointer; text-align: center; padding: 5px 2px;
}
.fl-move-day .d1 { display: block; font-size: .68rem; font-weight: 700; color: var(--color-muted); text-transform: uppercase; }
.fl-move-day .d2 { display: block; font-size: .86rem; font-weight: 800; color: var(--color-text); }
.fl-move-day.selected { border-color: #1a1d2e; background: #1a1d2e; }
.fl-move-day.selected .d1, .fl-move-day.selected .d2 { color: #fff; }
.fl-move-day.suggested { box-shadow: inset 0 0 0 2px #3b82f6; }
.fl-move-drivers { display: flex; flex-wrap: wrap; gap: 7px; }
.fl-move-actions { margin-top: 4px; }

/* Cleaning nudge in the assign sheet — same yellow family as service stops */
.fl-svc-banner {
  margin-top: 12px; padding: 10px 12px;
  background: #fefdf8; border: 1.5px solid #eab308; border-radius: 11px;
  font-size: .84rem; color: var(--color-text);
}
.fl-svc-banner.fl-svc-overdue { background: #fff1f2; border-color: #f43f5e; }
.fl-svc-banner.fl-svc-booked  { border-style: dashed; color: var(--color-muted); }
.fl-svc-opt {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  font-weight: 700; cursor: pointer;
}
.fl-svc-opt input { width: 18px; height: 18px; accent-color: #a16207; flex: none; }

/* Pickup composer */
.fl-pickup-locations { display: flex; flex-direction: column; gap: 7px; }
.fl-loc-row {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--color-border); border-radius: 11px;
  background: #fff; padding: 10px 12px; cursor: pointer;
}
.fl-loc-row.selected { border-color: #1a1d2e; background: #f1f5f9; }
.fl-loc-kind { font-size: 1rem; flex-shrink: 0; }
.fl-loc-name { flex: 1; min-width: 0; font-size: .86rem; font-weight: 700; color: var(--color-text); }
.fl-loc-addr { font-size: .72rem; color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-loc-del { background: none; border: none; color: #cbd5e1; font-size: .95rem; cursor: pointer; padding: 4px; }

/* 📌 Internal note (staff-only heads-up — the driver must not miss it).
   Rose, not amber, so it can't blend into the delivery-instructions box. */
.fl-stop-internal { margin: 10px 0 0; }
.fl-internal-box {
  padding: 11px 12px;
  background: #fff1f2; border: 2px solid #fda4af; border-radius: 12px;
}
.fl-internal-head { font-size: .72rem; font-weight: 800; color: #be123c;
  text-transform: uppercase; letter-spacing: .04em; }
.fl-internal-src  { font-weight: 600; text-transform: none; letter-spacing: 0; color: #e11d48; opacity: .8; }
.fl-internal-text { font-size: .95rem; font-weight: 700; color: #1a1d2e; margin-top: 4px; white-space: pre-wrap; }
.fl-internal-edit { margin-top: 8px; min-height: 38px; }
.fl-internal-add {
  background: none; border: none; padding: 2px 0;
  font-size: .8rem; font-weight: 700; color: #9ca3af; cursor: pointer;
}
.fl-flag-internal { color: #be123c; font-weight: 800; }
.fl-run-tasknote  { color: #be123c; font-weight: 800; }
.fl-run-internal {
  background: #fff1f2; border: 2px solid #fda4af; color: #9f1239;
  border-radius: 10px; padding: 9px 12px; font-size: .86rem; font-weight: 700;
  white-space: pre-wrap;
}

/* Driver delivery instructions (prominent — read at the door) */
.fl-stop-delivery {
  margin: 10px 0 0; padding: 11px 12px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px;
}
.fl-delivery-head { font-size: .72rem; font-weight: 800; color: #92400e;
  text-transform: uppercase; letter-spacing: .04em; }
.fl-delivery-src  { font-weight: 600; text-transform: none; letter-spacing: 0; color: #b45309; opacity: .8; }
.fl-delivery-text { font-size: .92rem; font-weight: 600; color: #1a1d2e; margin-top: 4px; white-space: pre-wrap; }
.fl-delivery-empty { font-size: .82rem; color: #b45309; }
.fl-flag-note { color: #b45309; font-weight: 700; }

/* Stop sheet extras */
.fl-stop-address {
  margin: 10px 0; padding: 11px 12px;
  background: #f8fafc; border: 1px solid var(--color-border); border-radius: 12px;
}
.fl-addr-text { font-size: .85rem; color: var(--color-text); font-weight: 600; }
.fl-addr-missing { font-size: .82rem; color: #b45309; font-weight: 700; }
.fl-addr-btns { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.fl-nav-btn {
  flex: 1 1 40%; min-height: 46px;
  background: #1d4ed8; color: #fff; border: none; border-radius: 11px;
  font-size: .86rem; font-weight: 800; cursor: pointer;
}
.fl-call-btn {
  flex: 1 1 25%; min-height: 46px;
  background: #059669; color: #fff; border: none; border-radius: 11px;
  font-size: .86rem; font-weight: 800; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
}
.fl-addr-edit-btn {
  flex: 0 0 auto; min-height: 46px; padding: 0 13px;
  background: #fff; border: 1.5px solid var(--color-border); border-radius: 11px;
  font-size: .82rem; font-weight: 700; color: var(--color-text); cursor: pointer;
}
.fl-addr-form { display: flex; flex-direction: column; gap: 8px; margin-top: 9px; }
.fl-addr-form-btns { display: flex; gap: 8px; }
.fl-addr-form-btns button { flex: 1; }

.fl-stop-extras {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: 12px 0 90px;   /* leave room above the pinned fulfill bar */
}
.fl-extra-btn {
  min-height: 46px; padding: 8px 10px;
  background: #fff; border: 1.5px solid var(--color-border); border-radius: 11px;
  font-size: .8rem; font-weight: 700; color: var(--color-text); cursor: pointer;
}
.fl-extra-btn:active { background: #f1f5f9; }
.fl-extra-danger { color: #b91c1c; border-color: #fecaca; }

/* Inside the sheet, the packing fulfill bar sticks to the sheet, not the window */
.fl-sheet .pack-fulfill-wrap {
  position: sticky; bottom: -1px; left: auto; right: auto;
  margin: 0 -16px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, #ffffff 70%, rgba(255,255,255,0));
}
/* Photo card sits flush inside the sheet */
.fl-sheet .pack-photo-wrap { margin: 10px 0 0; }
.fl-sheet .pack-item-list  { margin: 10px 0 0; padding: 0; }
.fl-sheet .pack-notes-wrap { margin: 10px 0 0; }
.fl-sheet .pack-order-meta { padding: 4px 0 0; }
.fl-sheet .pack-progress-wrap { margin-top: 10px; }
.fl-sheet .pack-action-row { margin-top: 8px; }

/* Add item / service */
.fl-service-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.fl-additem-results { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.fl-additem-result {
  padding: 9px 11px; border: 1px solid var(--color-border); border-radius: 10px;
  background: #fff; cursor: pointer;
}
.fl-additem-result .n { font-size: .84rem; font-weight: 700; color: var(--color-text); }
.fl-additem-result .m { font-size: .72rem; color: var(--color-muted); }
.fl-free-row { display: grid; grid-template-columns: 1fr 64px 92px auto; gap: 6px; align-items: center; }
.fl-free-row input { padding: 10px 9px; }
.fl-free-row .fl-primary-btn { margin-top: 0; min-height: 42px; padding: 0 14px; width: auto; }
.fl-additem-pending { display: flex; flex-direction: column; gap: 6px; }
.fl-pending-row {
  display: flex; align-items: center; gap: 8px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
  padding: 8px 11px; font-size: .82rem; color: var(--color-text);
}
.fl-pending-row .x { margin-left: auto; background: none; border: none; color: #9ca3af; cursor: pointer; font-size: .9rem; }

/* Manual order item rows */
.fl-man-item-row { display: grid; grid-template-columns: 1fr 60px 84px 34px; gap: 6px; margin-bottom: 6px; }
.fl-man-item-row input { padding: 10px 9px; border: 1.5px solid var(--color-border); border-radius: 10px; font-size: .86rem; }
.fl-man-item-row .x { background: none; border: none; color: #9ca3af; font-size: 1rem; cursor: pointer; }

/* Pickup stop detail */
.fl-pickupstop-title { font-size: 1rem; font-weight: 800; color: var(--color-text); }
.fl-pickupstop-meta  { font-size: .8rem; color: var(--color-muted); margin: 3px 0 10px; }

/* ── Day Sheet (van pull list) ─────────────────────────── */
.ds-sub { font-size: .8rem; color: var(--color-muted); margin: 2px 0 12px; }
.ds-toggle { display: flex; gap: 6px; margin-bottom: 12px; }
.ds-progress { height: 6px; background: #eef0f4; border-radius: 4px; overflow: hidden; margin-bottom: 5px; }
.ds-progress-bar { height: 100%; background: #16a34a; border-radius: 4px; transition: width .2s ease; }
.ds-progress-label { font-size: .78rem; color: var(--color-muted); margin-bottom: 14px; }
.ds-section { margin-bottom: 18px; }
.ds-section-h { display: flex; align-items: center; justify-content: space-between; font-size: .95rem; font-weight: 800; color: var(--color-text); padding-bottom: 6px; border-bottom: 2px solid #eef0f4; margin-bottom: 8px; }
.ds-section-sum { font-size: .78rem; font-weight: 700; color: var(--color-muted); }
.ds-store { margin-bottom: 10px; }
.ds-store-h { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--color-muted); margin: 6px 0 4px; }
.ds-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.ds-row:active { background: #f6f7f9; }
.ds-row.ds-on { opacity: .5; }
.ds-row.ds-on .ds-name { text-decoration: line-through; }
.ds-row input { width: 20px; height: 20px; flex-shrink: 0; accent-color: #16a34a; }
.ds-qty { min-width: 30px; text-align: center; font-weight: 800; font-size: 1rem; color: var(--color-text); background: #eef2ff; border-radius: 6px; padding: 2px 6px; }
.ds-name { font-size: .9rem; color: var(--color-text); line-height: 1.3; }
.ds-clients { display: block; font-size: .72rem; color: var(--color-muted); margin-top: 1px; }
.ds-empty { text-align: center; color: var(--color-muted); font-size: .88rem; padding: 24px 0; }
.ds-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ds-actions .fl-action-btn { min-width: 84px; }
.ds-actions .fl-action-btn { flex: 1; }

/* Day Sheet — snacks prepacked per company */
.ds-co-hint { font-size: .72rem; color: var(--color-muted); margin: -2px 0 8px; }
.ds-co { display: block; border: 1px solid #eef0f4; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.ds-co:active { background: #f6f7f9; }
.ds-co.ds-on { opacity: .5; }
.ds-co.ds-on .ds-co-name { text-decoration: line-through; }
.ds-co-head { display: flex; align-items: center; gap: 10px; }
.ds-co-head input { width: 20px; height: 20px; flex-shrink: 0; accent-color: #16a34a; }
.ds-co-name { flex: 1; font-weight: 800; font-size: .95rem; color: var(--color-text); }
.ds-co-sum { font-size: .78rem; font-weight: 700; color: var(--color-muted); }
.ds-co-items { margin: 6px 0 0 30px; }
.ds-co-item { font-size: .82rem; color: var(--color-muted); padding: 2px 0; }
.ds-co-qty { display: inline-block; min-width: 22px; font-weight: 700; color: var(--color-text); }

/* Day Sheet — in-sheet driver picker */
.ds-drivers { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; margin-bottom: 10px; }
.ds-drivers::-webkit-scrollbar { display: none; }
.ds-drivers .fl-chip { white-space: nowrap; flex-shrink: 0; }

/* Day Sheet — summary stat chips */
.ds-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ds-stat { font-size: .78rem; font-weight: 700; color: var(--color-text); background: #eef2ff; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }

/* Day Sheet — live-sync status dot */
.ds-live { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 4px; vertical-align: middle; background: #9ca3af; }
.ds-live-live { background: #16a34a; }
.ds-live-connecting { background: #f59e0b; }
.ds-live-offline { background: #ef4444; }
.ds-live-local { background: #9ca3af; }

/* ── Run mode (driver day view) ─────────────────────── */
.fl-run-head {
  background: #1a1d2e; color: #fff;
  border-radius: 14px; padding: 14px 16px; margin: 2px 0 12px;
}
.fl-run-head-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.fl-run-driver { font-weight: 800; font-size: 1.05rem; }
.fl-run-date   { font-size: .8rem; color: #aeb3c2; }
.fl-run-head .fl-buildroute-btn {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; margin: 0; flex-shrink: 0;
}
.fl-run-progress-label {
  display: flex; justify-content: space-between;
  font-size: .78rem; font-weight: 700; color: #aeb3c2; margin-bottom: 5px;
}
.fl-run-bar  { height: 6px; background: rgba(255,255,255,.16); border-radius: 3px; overflow: hidden; }
.fl-run-fill { height: 100%; background: #4ade80; border-radius: 3px; transition: width .25s; }
.fl-run-fill.done { background: #22c55e; }

.fl-run-stop {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: 13px 14px; margin-bottom: 10px; cursor: pointer;
}
.fl-run-stop:active { background: #f9fafb; }
.fl-run-stop.fl-run-current { border: 2px solid #2f6fed; padding: 12px 13px; }
.fl-run-stop.fl-run-done { background: #f6fdf8; border-color: #d1ecd9; }
.fl-run-stop.fl-run-done .fl-run-name { color: #6b7280; }
.fl-run-stop.fl-run-cancelled { opacity: .55; }
.fl-run-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  background: #eef0f4; color: #374151; font-weight: 800; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.fl-run-current .fl-run-num { background: #2f6fed; color: #fff; }
.fl-run-num.done { background: #22c55e; color: #fff; }
.fl-run-body { flex: 1; min-width: 0; }
.fl-run-name { font-weight: 700; font-size: .98rem; }
.fl-run-co   { font-weight: 500; color: #6b7280; }
.fl-run-task { font-size: .8rem; color: #6b7280; margin-top: 3px; }
.fl-run-pill {
  display: inline-block; font-size: .7rem; font-weight: 800;
  border-radius: 999px; padding: 3px 9px; margin-top: 6px;
}
.fl-run-pill.ok     { background: #dbeafe; color: #1e40af; }
.fl-run-pill.warn   { background: #fef3c7; color: #92400e; }
.fl-run-pill.cancel { background: #fee2e2; color: #991b1b; }
.fl-run-doneline { font-size: .8rem; font-weight: 700; color: #15803d; margin-top: 6px; }
.fl-run-foot { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.fl-run-nav {
  text-align: left; background: #f3f6fd; border: 1px solid #dbe4f8; color: #1e40af;
  border-radius: 10px; padding: 10px 12px; font-size: .82rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fl-run-noaddr { font-size: .8rem; font-weight: 700; color: #b45309; }
.fl-run-notes {
  background: #fefce8; border: 1px solid #fde68a; color: #713f12;
  border-radius: 10px; padding: 9px 12px; font-size: .82rem;
}
.fl-run-open {
  background: #1a1d2e; color: #fff; border: none; border-radius: 12px;
  padding: 13px 14px; font-size: .92rem; font-weight: 800; cursor: pointer;
}
.fl-run-open:active { transform: scale(.99); }
.fl-run-view { max-width: 640px; margin: 0 auto; }

/* ── Run mode: van-load card + skip / issue ─────────── */
.fl-run-load { background: #f8f9fc; border-style: dashed; }
.fl-run-load.fl-run-done { border-style: solid; }
.fl-run-num.skip { background: #fef3c7; color: #92400e; }
.fl-run-stop.fl-run-skipped { background: #fffbeb; border-color: #fde68a; }
.fl-run-skipline { font-size: .8rem; font-weight: 700; color: #92400e; margin-top: 6px; cursor: pointer; }
.fl-run-skipbtn {
  background: #fff; border: 1.5px solid #ecd9bd; color: #b45309;
  border-radius: 10px; padding: 10px 12px; font-size: .82rem; font-weight: 700; cursor: pointer;
}
.fl-skip-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.fl-stop.fl-skipped { background: #fffbeb; }

/* ── Gas tank swap ──────────────────────────────────── */
.fl-run-gasbtn {
  background: #fff; border: 1.5px solid #bfdbfe; color: #1d4ed8;
  border-radius: 10px; padding: 10px 12px; font-size: .82rem; font-weight: 700; cursor: pointer;
}
.fl-run-gasline { font-size: .8rem; font-weight: 700; color: #1d4ed8; margin-top: 6px; }

/* ── Standalone gas swap (off-route) ────────────────── */
.fl-run-standalone {
  margin-top: 10px; width: 100%;
  background: rgba(255,255,255,.08); border: 1px dashed rgba(255,255,255,.25); color: #c7cbd8;
  border-radius: 10px; padding: 9px 10px; font-size: .78rem; font-weight: 600; cursor: pointer;
}
.fl-gas-results { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; }
.fl-gas-result {
  text-align: left; background: #f8fafc; border: 1px solid var(--color-border);
  border-radius: 10px; padding: 10px 12px; font-size: .85rem; color: var(--color-text); cursor: pointer;
}
.fl-gas-result strong { font-weight: 700; }
.fl-gas-freetext { border-style: dashed; color: #1d4ed8; background: #f3f6fd; }
.fl-gas-selected {
  display: block; width: 100%; text-align: left;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  border-radius: 10px; padding: 10px 12px; font-size: .85rem; font-weight: 700; cursor: pointer;
  margin: 0 0 10px;
}

/* ── ⭐ Top Tier visit checklists ─────────────────────── */
.fl-stop.fl-visit { background: #fbfaff; border-left: 3px solid #8b5cf6; }
.fl-stop.fl-visit .fl-stop-num { background: #6d28d9; }
.fl-pill-visit { background: #ede9fe; color: #6d28d9; }
.fl-care-chip { background: #ede9fe; color: #6d28d9; cursor: pointer; }
.fl-care-chip.done { background: #dcfce7; color: #15803d; }
.fl-care-tasksub { color: #6d28d9; font-weight: 700; }
.fl-care-tasksub-done { color: #15803d; font-weight: 700; }
.fl-care-openbtn { background: #f5f3ff; border: 1px solid #ddd6fe; color: #5b21b6; }
.fl-care-last { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.fl-care-lastbox { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  border-radius: 10px; padding: 8px 12px; font-size: .8rem; margin: 0 0 10px; }
.fl-care-list { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; }
.fl-care-item { display: flex; align-items: stretch; border-bottom: 1px solid #f3f4f6; }
.fl-care-item:last-child { border-bottom: none; }
.fl-care-tap { flex: 1; display: flex; gap: 10px; align-items: flex-start; text-align: left;
  background: none; border: none; padding: 11px 4px 11px 12px; cursor: pointer; min-width: 0; }
.fl-care-ico { font-size: 1.05rem; line-height: 1.2; flex-shrink: 0; }
.fl-care-txt { min-width: 0; }
.fl-care-label { display: block; font-size: .88rem; font-weight: 600; color: #111827; }
.fl-care-detail { display: block; font-size: .76rem; color: #6b7280; margin-top: 1px; }
.fl-care-note { display: block; font-size: .76rem; color: #b45309; font-weight: 600; margin-top: 2px; }
.fl-care-done .fl-care-label { text-decoration: line-through; color: #9ca3af; }
.fl-care-na .fl-care-label { color: #9ca3af; }
.fl-care-issue { background: #fffbeb; }
.fl-care-missed { background: #fef2f2; }
.fl-care-missed .fl-care-label { color: #991b1b; }
.fl-care-btns { display: flex; align-items: center; gap: 6px; padding: 0 10px; flex-shrink: 0; }
.fl-care-mini { border: 1px solid #e5e7eb; background: #fff; border-radius: 8px;
  font-size: .72rem; font-weight: 700; padding: 6px 8px; cursor: pointer; color: #6b7280; }
.fl-care-mini.active { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.fl-care-flagbox { padding: 10px 12px; background: #fffbeb; border-bottom: 1px solid #f3f4f6; }
.fl-care-flagrow { display: flex; gap: 8px; margin-top: 8px; }
.fl-care-orderbtn { display: block; width: calc(100% - 24px); margin: 0 12px 10px; text-align: center;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: 10px;
  padding: 9px 12px; font-size: .82rem; font-weight: 700; cursor: pointer; }
.fl-care-foot { margin-top: 12px; }
.fl-care-progress { font-size: .84rem; font-weight: 700; color: #374151; margin-bottom: 8px; }
.fl-care-hint { font-size: .76rem; color: #b45309; margin-bottom: 8px; }

/* ── 🍺 Keg Tracker run-mode sheet (2026-08-10) ─────────── */
.fl-run-kegbtn {
  grid-column: 1 / -1; padding: 11px 8px; border-radius: 10px;
  border: 1.5px solid #bfdbfe; background: #eff6ff; color: #1e40af;
  font-size: .85rem; font-weight: 700; cursor: pointer;
}
.fl-run-kegbtn:active { transform: scale(.97); }
.fl-keg-row { border: 1px solid #f1f5f9; background: #fafbfc; border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; }
.fl-keg-row-top { display: flex; align-items: baseline; gap: 8px; }
.fl-keg-beer { flex: 1; min-width: 0; font-weight: 700; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-keg-slot { font-size: .7rem; color: #9ca3af; font-weight: 500; }
.fl-keg-pct { font-size: .82rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fl-keg-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 7px; }
.fl-keg-chip {
  padding: 8px 2px; border: 1.5px solid #e5e7eb; border-radius: 9px; background: #fff;
  font-size: .76rem; font-weight: 700; color: #374151; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fl-keg-chip.sel { background: #1a1d2e; border-color: #1a1d2e; color: #fff; }
.fl-keg-chip:active { transform: scale(.95); }
