/* Order Rescue — NABD-style shipping-exception workspace. No overlay drawer. */
.gm-rescue-workspace {
  overflow-x: hidden;
}
.gm-rescue-split {
  align-items: stretch;
}
.gm-rescue-list,
.gm-rescue-case {
  min-width: 0;
  min-height: 28rem;
}
.gm-rescue-hero h1 {
  font-size: 1.15rem;
}
.gm-rescue-kpis {
  font-size: 12px;
}

.gm-rescue-statusbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
}
.gm-rescue-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.gm-rescue-status:hover {
  background: hsl(var(--background) / 0.7);
  color: hsl(var(--foreground));
}
.gm-rescue-status.is-on {
  background: #2563eb;
  border: 0;
  box-shadow: none;
  color: #fff;
}
.dark .gm-rescue-status.is-on {
  background: #fff;
  color: #1d4ed8;
}
.gm-rescue-status:disabled {
  opacity: 0.65;
  cursor: default;
}
.gm-rescue-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.gm-rescue-status.gm-rescue-sheets,
.gm-rescue-status.gm-rescue-review {
  font-weight: 800;
}
.gm-rescue-count {
  display: inline-flex;
  min-width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 6px;
  background: hsl(var(--background) / 0.8);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.gm-rescue-status.is-on .gm-rescue-count {
  background: #fff;
  color: #2563eb;
}
.dark .gm-rescue-status.is-on .gm-rescue-count {
  background: #2563eb;
  color: #fff;
}

.gm-rescue-lanes {
  display: flex;
  gap: 0;
  border-bottom: 1px solid hsl(var(--border));
}
@media (max-width: 420px) {
  .gm-rescue-lane {
    font-size: 12px;
    padding: 10px 4px;
  }
}
.gm-rescue-lane {
  flex: 1;
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.gm-rescue-lane.is-on {
  color: hsl(var(--primary));
  box-shadow: inset 0 -2px 0 hsl(var(--primary));
}

.gm-rescue-card {
  width: 100%;
  text-align: start;
  padding: 12px 14px;
  cursor: pointer;
  background: transparent;
}
.gm-rescue-card:hover {
  background: hsl(var(--muted) / 0.45);
}
.gm-rescue-card.is-active {
  background: hsl(var(--primary) / 0.1);
  box-shadow: inset 3px 0 0 hsl(var(--primary));
}
[dir="rtl"] .gm-rescue-card.is-active {
  box-shadow: inset -3px 0 0 hsl(var(--primary));
}
.gm-rescue-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.gm-rescue-oid {
  color: #2563eb;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.01em;
}
.dark .gm-rescue-oid {
  color: #60a5fa;
}
.gm-rescue-cname {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.gm-rescue-reason {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gm-rescue-src {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #0b2559;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  white-space: nowrap;
}
.gm-rescue-bosta-msg {
  margin: 0;
  padding: 8px 16px 0;
  font-size: 12px;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
}
.gm-rescue-bosta-msg.is-err {
  color: #b91c1c;
}
.gm-rescue-age {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: #f59e0b;
  color: #111827;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  white-space: nowrap;
}
.gm-rescue-card-actions {
  margin-top: 10px;
}
.gm-rescue-assign {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  cursor: pointer;
}
.gm-rescue-assign:disabled {
  opacity: 0.65;
  cursor: default;
}

.gm-rescue-head-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.gm-rescue-carrier,
.gm-rescue-ship {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
}
.gm-rescue-ship {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}
.dark .gm-rescue-ship {
  background: rgb(37 99 235 / 0.2);
  color: #93c5fd;
}

.gm-rescue-case-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 4px;
}
.gm-rescue-case-tabs button {
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 800;
  padding: 8px 4px;
  cursor: pointer;
}
.gm-rescue-case-tabs button.is-on {
  color: hsl(var(--primary));
  box-shadow: inset 0 -2px 0 hsl(var(--primary));
}

.gm-rescue-alert {
  width: 100%;
  text-align: start;
  border-radius: 14px;
  border: 1px solid #f59e0b;
  background: rgb(245 158 11 / 0.12);
  padding: 12px 14px;
  cursor: pointer;
}
.gm-rescue-alert.is-refused {
  border-color: #ef4444;
  background: rgb(239 68 68 / 0.12);
}
.gm-rescue-alert-title {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  color: #b45309;
}
.gm-rescue-alert.is-refused .gm-rescue-alert-title {
  color: #b91c1c;
}
.dark .gm-rescue-alert-title {
  color: #fbbf24;
}
.dark .gm-rescue-alert.is-refused .gm-rescue-alert-title {
  color: #fca5a5;
}
.gm-rescue-alert-meta {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.gm-rescue-chip {
  border-radius: 999px !important;
  font-weight: 700 !important;
}
.gm-rescue-chip.is-on {
  color: #fff !important;
  border-color: transparent !important;
}
.gm-rescue-chip.answered { background: #dcfce7; color: #166534; border-color: #86efac; }
.gm-rescue-chip.answered.is-on { background: #16a34a; }
.gm-rescue-chip.no_answer { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.gm-rescue-chip.no_answer.is-on { background: #ea580c; }
.gm-rescue-chip.busy_closed { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }
.gm-rescue-chip.busy_closed.is-on { background: #4f46e5; }
.gm-rescue-chip.promise_to_receive { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.gm-rescue-chip.promise_to_receive.is-on { background: #2563eb; }
.gm-rescue-chip.refused_receipt,
.gm-rescue-chip.wrong_number { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.gm-rescue-chip.refused_receipt.is-on,
.gm-rescue-chip.wrong_number.is-on { background: #dc2626; }

.gm-rescue-wa {
  background: #16a34a !important;
  color: #fff !important;
  border-color: #16a34a !important;
}
.gm-rescue-wa:hover { background: #15803d !important; color: #fff !important; }
.gm-rescue-refuse {
  background: #dc2626 !important;
  color: #fff !important;
  border-color: #dc2626 !important;
}
.gm-rescue-refuse:hover { background: #b91c1c !important; color: #fff !important; }
.gm-rescue-follow {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #2563eb !important;
}
.gm-rescue-follow:hover { background: #1d4ed8 !important; color: #fff !important; }

.gm-rescue-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 10px;
  background: linear-gradient(to top, hsl(var(--card)) 80%, transparent);
}

.gm-rescue-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 14, 28, 0.55);
}
.gm-rescue-modal-card {
  width: min(560px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  border-radius: 16px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  padding: 20px;
}
.gm-rescue-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-inline-start: 2px solid hsl(var(--border));
  padding-inline-start: 14px;
}
.gm-rescue-tl-item {
  position: relative;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.35);
  padding: 10px 12px;
}
.gm-rescue-tl-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -19px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
}
.gm-rescue-tl-item b {
  display: block;
  font-size: 13px;
}
.gm-rescue-tl-item p,
.gm-rescue-tl-item small {
  display: block;
  margin-top: 4px;
  color: hsl(var(--muted-foreground));
  font-size: 11px;
}

.gm-rescue-live {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  padding: 12px;
  background: hsl(var(--muted) / 0.25);
}
.gm-rescue-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gm-rescue-live-head b {
  font-size: 13px;
}
.gm-rescue-courier {
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  padding: 10px 12px;
}
.gm-rescue-courier b {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}
.gm-rescue-courier-body p {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 767.98px) {
  .gm-rescue-workspace { overflow-x: hidden; }
  .gm-rescue-list,
  .gm-rescue-case { min-height: 0; }
}
