/* ==========================================================================
   Flash Order Verification — Branch Tablet Kiosk Styles (RTL Arabic)
   Designed for Android Tablets (Landscape & Portrait) + High Readability
   ========================================================================== */

:root {
  --bg-app: #0f172a;
  --bg-surface: #1e293b;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-light: #e2e8f0;
  --border-dark: #334155;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-on-dark: #f8fafc;
  --text-muted-dark: #94a3b8;

  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --snooze: #7c3aed;
  --snooze-bg: #ede9fe;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-primary);
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Offline Red Banner (SOP Section 8.9)
   -------------------------------------------------------------------------- */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(90deg, #b91c1c, #dc2626, #b91c1c);
  color: #ffffff;
  padding: 14px 20px;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
  animation: pulseBanner 1.8s infinite;
}

@keyframes pulseBanner {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* --------------------------------------------------------------------------
   Overlays (Start Shift, Device Setup, Lightbox)
   -------------------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.start-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.brand-badge {
  background: #eff6ff;
  color: var(--brand);
  font-weight: 900;
  font-size: 1.1rem;
  padding: 8px 20px;
  border-radius: 999px;
}

.start-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
}

.start-subtitle {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.start-hint {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.setup-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  max-width: 580px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.setup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.setup-header h2 {
  font-size: 1.45rem;
  font-weight: 800;
}

.setup-note {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.5;
}

.setup-note code {
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.88rem;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: monospace;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--brand);
}

.form-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin-bottom: 12px;
}

.form-success {
  background: var(--success-bg);
  color: var(--success);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin-bottom: 12px;
}

.setup-actions {
  margin-top: 8px;
}

/* Lightbox */
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.lightbox-content img {
  max-width: 82vw;
  max-height: 75vh;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.lightbox-close {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s, background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
}

.btn-giant {
  width: 100%;
  padding: 22px 28px;
  font-size: 1.45rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.btn-large {
  width: 100%;
  padding: 15px 20px;
  font-size: 1.15rem;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 16px;
  font-size: 1rem;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.92rem;
}

.icon-btn {
  background: var(--bg-subtle);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   App Shell & Topbar
   -------------------------------------------------------------------------- */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--bg-surface);
  color: var(--text-on-dark);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-right,
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.logo-chip {
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.1rem;
  padding: 6px 14px;
  border-radius: 10px;
}

.branch-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.branch-name {
  font-size: 1.15rem;
  font-weight: 800;
}

.device-label {
  font-size: 0.85rem;
  color: var(--text-muted-dark);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
}

.status-pill .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.pill-online {
  background: rgba(22, 163, 74, 0.2);
  color: #86efac;
  border: 1px solid rgba(22, 163, 74, 0.45);
}
.pill-online .dot { background: #22c55e; }

.pill-connecting {
  background: rgba(217, 119, 6, 0.2);
  color: #fde68a;
  border: 1px solid rgba(217, 119, 6, 0.45);
}
.pill-connecting .dot { background: #f59e0b; }

.pill-offline {
  background: rgba(220, 38, 38, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.6);
}
.pill-offline .dot { background: #ef4444; }

.pill-neutral {
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

.pill-pending {
  background: #dbeafe;
  color: #1d4ed8;
}

.pill-snoozed {
  background: var(--snooze-bg);
  color: var(--snooze);
}

.meta-chip {
  font-size: 0.86rem;
  color: var(--text-muted-dark);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 10px;
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Workspace Two-Column Layout
   -------------------------------------------------------------------------- */
.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  padding: 18px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Order Stage (Active Order Card)
   -------------------------------------------------------------------------- */
.order-stage {
  display: flex;
  flex-direction: column;
}

.empty-state {
  flex: 1;
  background: var(--bg-surface);
  color: var(--text-on-dark);
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 12px;
}

.empty-icon {
  font-size: 4rem;
}

.empty-state h2 {
  font-size: 1.8rem;
  font-weight: 800;
}

.empty-state p {
  font-size: 1.1rem;
  color: var(--text-muted-dark);
  max-width: 460px;
}

.offhours-banner {
  margin-top: 12px;
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.order-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 3px solid transparent;
  transition: border-color 0.25s;
}

.order-card.alert-level-2 {
  border-color: var(--warning);
}

.order-card.alert-level-3 {
  border-color: var(--danger);
  animation: urgentBorder 1.4s infinite;
}

@keyframes urgentBorder {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}

.order-card-header {
  background: #f8fafc;
  padding: 20px 24px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.order-code-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.order-code-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.order-code {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.alert-badge {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 900;
}

.alert-badge.lvl-2 {
  background: var(--warning-bg);
  color: var(--warning);
}

.alert-badge.lvl-3 {
  background: var(--danger-bg);
  color: var(--danger);
}

.order-meta-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.district-pill {
  background: #0f172a;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 10px;
}

.elapsed-pill {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.98rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
}

.order-count-summary {
  background: #eff6ff;
  border: 2px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  text-align: center;
  min-width: 110px;
}

.summary-num {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--brand);
  line-height: 1.1;
}

.summary-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Items List */
.items-list {
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
}

.item-thumb {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: #e2e8f0;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
  cursor: zoom-in;
}

.item-details {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 6px;
}

.item-variant {
  display: inline-block;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 8px;
}

.item-qty-box {
  background: #0f172a;
  color: #ffffff;
  border-radius: 14px;
  padding: 10px 18px;
  text-align: center;
  min-width: 82px;
  flex-shrink: 0;
}

.item-qty-box.multi-qty {
  background: var(--warning);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}

.item-qty-num {
  display: block;
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1.1;
}

.item-qty-label {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.9;
}

/* Action Bar (Read-Only Preview in Phase 3) */
.order-actions-bar {
  padding: 16px 24px 22px;
  background: #f8fafc;
  border-top: 2px solid var(--border-light);
}

.phase3-readonly-banner {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.94rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.actions-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
}

.btn-action {
  padding: 18px 14px;
  font-size: 1.2rem;
  border-radius: var(--radius-md);
  color: #ffffff;
}

.btn-confirm { background: var(--success); }
.btn-confirm:hover:not(:disabled) { background: #15803d; }
.btn-unavailable { background: var(--danger); }
.btn-unavailable:hover:not(:disabled) { background: #b91c1c; }
.btn-snooze { background: var(--snooze); }
.btn-snooze:hover:not(:disabled) { background: #6d28d9; }

.btn-secondary {
  background: #e2e8f0;
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: #cbd5e1;
}

.btn-ghost-dark {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.lock-pill {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
}

.lock-release-row {
  margin-top: 10px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Phase 4 Modals (PIN Keypad, Confirm, Unavailable) & Toast Notifications
   -------------------------------------------------------------------------- */
.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  max-width: 460px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-card-wide {
  max-width: 600px;
}

.modal-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.pin-display {
  background: #f1f5f9;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 12px;
  color: var(--text-primary);
  margin-bottom: 14px;
  min-height: 70px;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.pin-key {
  font-family: inherit;
  font-size: 1.6rem;
  font-weight: 900;
  padding: 16px 0;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #f8fafc;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.12s, transform 0.08s;
}

.pin-key:active {
  background: #dbeafe;
  transform: scale(0.96);
}

.pin-key-clear,
.pin-key-back {
  font-size: 1.15rem;
  background: #f1f5f9;
  color: var(--text-secondary);
}

.modal-section {
  margin-bottom: 16px;
}

.modal-label {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.checklist-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
}

.check-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--danger);
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.reason-btn {
  font-family: inherit;
  padding: 14px 12px;
  font-size: 1rem;
  font-weight: 800;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: var(--text-primary);
  cursor: pointer;
}

.reason-btn.selected {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.text-input-ar {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  outline: none;
}

.text-input-ar:focus {
  border-color: var(--brand);
}

.modal-actions-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.toast-container {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(560px, 92vw);
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  border: 2px solid #334155;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 1.08rem;
  font-weight: 800;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.toast-success {
  background: #14532d;
  border-color: #22c55e;
}

.toast-error {
  background: #7f1d1d;
  border-color: #ef4444;
}

.toast-warning {
  background: #78350f;
  border-color: #f59e0b;
}

.batch-notice-banner {
  background: linear-gradient(90deg, #1e40af, #2563eb);
  color: #ffffff;
  padding: 12px 20px;
  font-size: 1.12rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-bottom: 2px solid #60a5fa;
}

.batch-notice-close {
  font-family: inherit;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  padding: 5px 14px;
  font-weight: 800;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Queue Sidebar
   -------------------------------------------------------------------------- */
.queue-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.queue-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-on-dark);
}

.queue-section-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
}

.count-badge {
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge-pending {
  background: var(--brand);
  color: #ffffff;
}

.badge-snoozed {
  background: var(--snooze);
  color: #ffffff;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 44vh;
  overflow-y: auto;
}

.queue-empty {
  color: var(--text-muted-dark);
  font-size: 0.95rem;
  text-align: center;
  padding: 14px 8px;
}

.queue-item {
  width: 100%;
  text-align: right;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-on-dark);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.queue-item:hover {
  background: rgba(255, 255, 255, 0.11);
}

.queue-item.active {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--brand);
}

.queue-item.urgent {
  border-color: var(--danger);
}

.queue-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.queue-item-code {
  font-size: 1.12rem;
  font-weight: 900;
}

.queue-item-time {
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.8;
}

.queue-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
  opacity: 0.88;
}

.offhours-footer {
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.95rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive (Portrait Tablet & Mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .queue-list {
    max-height: 260px;
  }

  .actions-grid {
    grid-template-columns: 1fr;
  }

  .order-code {
    font-size: 1.7rem;
  }

  .item-thumb {
    width: 78px;
    height: 78px;
  }
}

/* ============================================================================
   Phase 8: Smart Inter-Branch Transfer & Courier Handoff Styles
   ============================================================================ */
.btn-transfer {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: none;
}

.btn-transfer:hover:not(:disabled) {
  background: linear-gradient(135deg, #0369a1, #075985);
}

.transfer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.transfer-quote-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  font-size: 0.94rem;
  line-height: 1.65;
}

.transfer-quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.transfer-quote-col {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.transfer-quote-col.target-col {
  background: #f0f9ff;
  border-color: #7dd3fc;
}

.transfer-verdict {
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 0.92rem;
}

.transfer-verdict.ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.transfer-verdict.warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.courier-orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
}

.courier-order-row {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.courier-order-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.courier-veh-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.veh-btn {
  padding: 10px 8px;
  border-radius: 10px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  color: #0f172a;
  transition: all 0.15s ease;
}

.veh-btn:hover {
  border-color: #0284c7;
  background: #f0f9ff;
}

/* --------------------------------------------------------------------------
   Calm Ready-for-Courier Reminder Bar & Topbar Counter Badge
   -------------------------------------------------------------------------- */
.courier-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.courier-nav-btn.has-ready-orders {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
}

.courier-nav-btn.has-ready-orders:hover {
  background: rgba(16, 185, 129, 0.24);
}

.courier-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #10b981;
  color: #022c22;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.courier-reminder-banner {
  background: linear-gradient(90deg, #064e3b, #065f46);
  color: #ecfdf5;
  padding: 10px 20px;
  font-size: 0.96rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid rgba(52, 211, 153, 0.4);
}

.courier-reminder-body {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 240px;
}

.courier-reminder-icon {
  font-size: 1.15rem;
}

.courier-reminder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.courier-reminder-btn {
  font-family: inherit;
  background: #10b981;
  color: #022c22;
  border: none;
  border-radius: 8px;
  padding: 7px 15px;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.15s ease;
}

.courier-reminder-btn:hover {
  background: #34d399;
}

.courier-reminder-close {
  font-family: inherit;
  background: rgba(255, 255, 255, 0.12);
  color: #d1fae5;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.courier-reminder-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.courier-order-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.courier-wait-chip {
  font-size: 0.78rem;
  font-weight: 800;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  padding: 2px 8px;
  border-radius: 999px;
}
