/* admin-shipping.css — the shipping screen's guided card-grid flow (owner request, 2026-10-22). Loaded after
   admin.css (shares its tokens: --pri/--mut/--line/--amber/--red/--green, .card/.btn/.tag). Owned by the
   shipping-screen agent only — do not add unrelated rules here, and do not touch admin.css's own pre-existing
   .ship-find/.ship-bar/.ship-ready/.ship-order/.sbn-* rules (order-detail "shipping instructions" banner +
   the shipment-entry panel wrapper — still used as-is by shipDraw/shipBanner/shipCard, unchanged by this round).

   Default screen = a grid of order cards (`.ship-ocard`), one per reservation currently allowed for shipping;
   clicking a card switches to the existing shipment-entry panel (`.ship-find` + `#shRes`, admin.css). */

/* ---------- toolbar: tabs + optional search + sort ---------- */
.ship-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:4px}
.ship-tabs{display:flex;gap:6px;flex-wrap:wrap}
.ship-sub{display:flex;gap:6px;flex-wrap:wrap;margin:-4px 0 12px;padding:8px 12px;background:#f8fafc;border:1px solid var(--line);border-radius:12px;align-items:center}
.ship-sub::before{content:"تصفية المشحونة:";font-size:12px;color:var(--mut);font-weight:600;margin-left:6px}
.ship-sub-chip{height:30px;padding:0 12px;border-radius:16px;border:1.5px solid var(--line);background:#fff;font-weight:600;font-size:12.5px;color:var(--mut);cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.ship-sub-chip b{background:#eef2f7;color:var(--ink);border-radius:9px;padding:0 6px;font-size:11.5px}
.ship-sub-chip.on{background:#0f172a;border-color:#0f172a;color:#fff}
.ship-sub-chip.on b{background:#334155;color:#fff}
.sc-shipped{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}
.ship-hist .ship-edit-btn{margin-top:6px}
.se-tbl td{vertical-align:middle}.se-tbl .se-q{width:96px}
.ship-tab{height:36px;padding:0 14px;border-radius:20px;border:1.5px solid var(--line);background:#fff;font-weight:600;font-size:13px;color:var(--mut);cursor:pointer;transition:.15s;display:inline-flex;align-items:center;gap:6px}
.ship-tab:hover{background:#f8fafc}
.ship-tab b{font-weight:700;background:#eef2f7;color:var(--ink);border-radius:10px;padding:1px 7px;font-size:12px}
.ship-tab.on{background:var(--pri);border-color:var(--pri);color:#fff}
.ship-tab.on b{background:rgba(255,255,255,.25);color:#fff}
.ship-tools{display:flex;gap:8px;align-items:center}
.ship-q{height:38px;border:1.5px solid var(--line);border-radius:10px;padding:0 14px;font-size:13px;min-width:260px;outline:none;background:#fcfdff}
.ship-q::placeholder{color:#94a3b8}
.ship-q:focus{border-color:var(--pri);box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.ship-tools select{height:38px;border:1.5px solid var(--line);border-radius:10px;padding:0 10px;font-size:13px;background:#fff}

/* ---------- "تم التحديث الآن" live indicator ---------- */
.ship-updated{min-height:18px;font-size:12px;color:var(--green);font-weight:600;margin:10px 2px 10px;opacity:0;transition:opacity .4s}
.ship-updated.flash{opacity:1;transition:opacity .15s}
.ship-updated.flash{animation:shFadeHold 2.6s ease forwards}
@keyframes shFadeHold{0%{opacity:1}70%{opacity:1}100%{opacity:.45}}

/* ---------- the card grid itself: full content width, 3-4/1366, 2/tablet, 1/~560 and under ---------- */
.ship-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;align-items:start}
@media (min-width:1500px){.ship-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}}
@media (max-width:900px){.ship-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){.ship-grid{grid-template-columns:1fr}}

.ship-ocard{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:0 1px 2px rgba(15,23,42,.04);cursor:pointer;transition:transform .12s,box-shadow .12s,border-color .12s;display:flex;flex-direction:column;gap:9px;min-width:0}
.ship-ocard:hover{transform:translateY(-2px);box-shadow:0 10px 24px -12px rgba(15,23,42,.18);border-color:#cbd5e1}
.ship-ocard .sc-top{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ship-ocard .sc-top b.mono{font-size:14px}
.ship-ocard .sc-cust{display:flex;justify-content:space-between;align-items:baseline;gap:8px;min-width:0}
.ship-ocard .sc-cust b{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ship-ocard .sc-cust span{font-size:12px;white-space:nowrap;flex:none}
.ship-ocard .sc-time{display:flex;justify-content:space-between;align-items:baseline;font-size:12px;color:var(--mut)}
.ship-ocard .sc-time span{font-weight:700;color:var(--ink)}
.ship-ocard .sc-prog{margin-top:2px}
.ship-ocard .sc-prog-lbl{font-size:12.5px;color:var(--mut);margin-bottom:5px}
.ship-ocard .sc-prog-lbl b{color:var(--ink)}
.ship-ocard .sc-bar{height:7px;border-radius:5px;background:#eef2f7;overflow:hidden}
.ship-ocard .sc-bar i{display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,var(--pri2),var(--pri));transition:width .4s}
.ship-ocard .sc-rest{margin-top:5px;font-size:12.5px;color:var(--mut)}
.ship-ocard .sc-rest b{font-size:14px;color:var(--ink)}
.ship-ocard .sc-warn{background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;font-size:12px;font-weight:600;border-radius:8px;padding:6px 10px}
.ship-ocard .sc-cta{margin-top:4px;width:100%;justify-content:center}
.ship-ocard .sc-view{margin-top:4px;align-self:flex-start}

/* newly-arrived card (real-time allow) */
.ship-ocard-new{animation:shCardIn .5s ease}
@keyframes shCardIn{0%{opacity:0;transform:translateY(-8px) scale(.98);box-shadow:0 0 0 3px rgba(37,99,235,.35)}100%{opacity:1;transform:none;box-shadow:0 1px 2px rgba(15,23,42,.04)}}

/* revoked card — brief "leaving" ghost before it's pruned from the grid */
.ship-ocard-leaving{cursor:default;opacity:.55;border-color:#fecaca;background:#fff7f7;animation:shCardOut 1.3s ease forwards}
.ship-ocard-leaving .sc-cta,.ship-ocard-leaving .sc-view{display:none}
.ship-ocard-leaving .sc-time span{color:var(--red)}
@keyframes shCardOut{0%{opacity:.85}70%{opacity:.55}100%{opacity:0;transform:scale(.97)}}

/* ---------- empty state ---------- */
.ship-empty{grid-column:1/-1;text-align:center;padding:60px 20px;color:var(--mut)}
.ship-empty .se-ic{font-size:40px;margin-bottom:10px}
.ship-empty b{display:block;font-size:16px;color:var(--ink);margin-bottom:6px}
.ship-empty p{font-size:13px;max-width:420px;margin:0 auto}

/* ---------- mobile: toolbar stacks, search/sort take the full row ---------- */
@media (max-width:760px){
  .ship-toolbar{flex-direction:column;align-items:stretch}
  .ship-tools{flex-direction:column;align-items:stretch}
  .ship-q{min-width:0;height:44px}
  .ship-tools select{height:44px}
  .ship-ocard{padding:14px}
}
.ship-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.ship-acts .btn.sm{height:30px;padding:0 10px;white-space:nowrap}
/* shipment waybill chip + button (owner decision 2026-10-25, migration 092) */
.ship-wbline{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}
.ship-wb{display:inline-flex;align-items:center;gap:6px;background:#eff6ff;border:1px solid #dbeafe;border-radius:20px;padding:3px 10px;font-size:12.5px}
.ship-wb .bs-wb-avatar{width:18px;height:18px;border-radius:50%;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}
.ship-wb-none{background:#f8fafc;border-color:var(--line)}
.ship-wb-btn{height:28px;padding:0 10px}
.se-wb{margin-top:14px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#f8fafc}
.se-wb h4{margin:0 0 8px;font-size:14px}
.bs-wb-legacy{margin:8px 0 0;font-size:12.5px}
