:root {
  --primary-color: #1e3a8a;
  --primary-hover: #1e40af;
  --secondary-color: #0ea5e9;
  --secondary-hover: #0284c7;
  --success-color: #10b981;
  --success-hover: #059669;
  --light-gray: #f8fafc;
  --border-color: #e2e8f0;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --glow-primary: rgba(30, 58, 138, 0.15);
  --glow-success: rgba(16, 185, 129, 0.2);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.10);
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--light-gray);
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-dark);
  margin-bottom: 80px;
}

html[dir="rtl"] body {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

/* Custom Premium Accent and Branding Styles */
.navbar-custom {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.35);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.navbar-custom .navbar-brand {
  position: relative;
  transition: opacity 0.2s ease;
}

.navbar-custom .navbar-brand:hover {
  opacity: 0.9;
}

.navbar-custom .navbar-brand img {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-custom .navbar-brand:hover img {
  transform: scale(1.08) rotate(-4deg);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.navbar-custom .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.navbar-custom .brand-text {
  font-size: 1.15rem;
  letter-spacing: 0.2px;
}

.card-premium {
  border: none;
  border-radius: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card-premium:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Smart Search Layout */
.search-card {
  border-top: 4px solid var(--secondary-color);
}

/* Verification Code Styling */
.verification-code-display {
  font-family: 'Courier New', Courier, monospace;
  font-size: 2.2rem;
  letter-spacing: 0.8rem;
  font-weight: 700;
  color: var(--primary-color);
  background: #eff6ff;
  border-radius: 12px;
  border: 2px dashed #bfdbfe;
  padding: 1rem 0;
  display: inline-block;
  width: 100%;
  text-align: center;
}

.spaced-code-input {
  font-family: 'Courier New', Courier, monospace;
  font-size: 2rem;
  letter-spacing: 0.8rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  max-width: 320px;
  margin: 0 auto;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem;
  color: var(--primary-color);
}

.spaced-code-input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px var(--glow-primary);
  outline: none;
}

/* Success Verify Circle Animation */
.checkmark-circle {
  width: 80px;
  height: 80px;
  background-color: var(--success-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px var(--glow-success);
  margin: 20px auto;
  animation: popCelebrate 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.checkmark-circle svg {
  width: 40px;
  height: 40px;
  stroke: white;
  stroke-width: 4px;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawCheck 0.4s ease-out 0.4s forwards;
}

@keyframes popCelebrate {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

/* Capacity Progress Design */
.capacity-progress {
  height: 10px;
  border-radius: 5px;
  background-color: var(--border-color);
  overflow: hidden;
}

.capacity-progress-bar {
  background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  border-radius: 5px;
}

html[dir="rtl"] .capacity-progress-bar {
  background: linear-gradient(270deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

/* Live stats */
.stat-box {
  padding: 1.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

/* Button & Form tweaks */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  border: none;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px var(--glow-primary);
}

.btn-primary-custom:hover {
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 6px 20px var(--glow-primary);
}

.btn-primary-custom:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px var(--glow-primary);
}

.btn-primary-custom::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 100%);
  pointer-events: none;
}

.btn-secondary-custom {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-hover) 100%);
  border: none;
  color: #fff;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

.btn-secondary-custom:hover {
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.25);
}

.btn-secondary-custom:active {
  transform: translateY(0);
}

/* ── Order Status Badges ── */
.badge-status-pending {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge-status-accepted {
  background-color: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}
.badge-status-paid {
  background-color: #ede9fe;
  color: #5b21b6;
  border: 1px solid #c4b5fd;
}
.badge-status-in-transit {
  background-color: #cffafe;
  color: #155e75;
  border: 1px solid #67e8f9;
}
.badge-status-delivered {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.badge-status-picked-up {
  background-color: #cffafe;
  color: #155e75;
  border: 1px solid #67e8f9;
}
.badge-status-completed {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.badge-status-cancelled {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
.badge-status-rejected {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* ── Order Status Timeline ── */
.order-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: 0;
  margin: 1.5rem 0;
}
.order-timeline::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: var(--border-color);
  z-index: 0;
}
.order-timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
}
.order-timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}
.order-timeline-step.active .order-timeline-dot {
  background: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color), 0 0 12px var(--glow-primary);
  color: #fff;
}
.order-timeline-step.completed .order-timeline-dot {
  background: var(--success-color);
  box-shadow: 0 0 0 2px var(--success-color);
  color: #fff;
}
.order-timeline-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 90px;
}
.order-timeline-step.active .order-timeline-label {
  color: var(--primary-color);
}
.order-timeline-step.completed .order-timeline-label {
  color: var(--success-color);
}

/* ── Payment Summary ── */
.payment-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  overflow: hidden;
}
.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}
.payment-row:last-child {
  border-bottom: none;
}
.payment-row.total {
  background: linear-gradient(135deg, var(--primary-color), #111827);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 1rem 1.25rem;
}
.payment-row .label {
  color: var(--text-muted);
  font-weight: 500;
}
.payment-row.total .label {
  color: rgba(255,255,255,0.8);
}

/* ── Receipt ── */
.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
}
.receipt-row:last-child {
  border-bottom: none;
}

/* ── Bucket Card Actions ── */
.bucket-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.bucket-card-actions .btn {
  flex: 1;
  min-width: 0;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: rgba(248,250,252,0.6);
  border: 2px dashed var(--border-color);
  border-radius: 16px;
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}
.empty-state-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}
.empty-state-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Verification Panel (two-column) ── */
.verification-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 767.98px) {
  .verification-panel {
    grid-template-columns: 1fr;
  }
  .order-timeline {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .order-timeline::before {
    display: none;
  }
}

/* ── Form Section Title ── */
.form-section-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--secondary-color);
  display: inline-block;
}

/* ── Order Card Route ── */
.order-route {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  flex-wrap: wrap;
  direction: ltr;
}
.order-route .arrow {
  color: var(--secondary-color);
  font-size: 1.2rem;
}

/* ── Loading Overlay ── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-overlay.hidden {
  display: none;
}

/* ── Toast Notification ── */
.carryer-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  min-width: 300px;
  max-width: 420px;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  z-index: 10000;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.carryer-toast.show {
  transform: translateY(0);
  opacity: 1;
}
.carryer-toast.toast-success { background: var(--success-color); }
.carryer-toast.toast-error   { background: #dc2626; }
.carryer-toast.toast-info    { background: var(--primary-color); }

html[dir="rtl"] .carryer-toast {
  right: auto;
  left: 1.5rem;
}

/* ── Chat Security Banner ── */
.chat-security-banner {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.chat-security-banner strong {
  color: #92400e;
}

/* ── Real-time Order Chat ── */
.chat-conn-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  display: inline-block;
}

.chat-messages {
  background: #fafafb;
  border: 1px solid #f1f1f4;
  border-radius: 12px;
  padding: 1rem;
}

.chat-bubble {
  border-radius: 14px;
  padding: 0.5rem 0.85rem;
}
.chat-bubble-mine {
  background: var(--primary-color, #2563eb);
  color: #fff;
  border-bottom-right-radius: 4px;
}
html[dir="rtl"] .chat-bubble-mine {
  border-bottom-right-radius: 14px;
  border-bottom-left-radius: 4px;
}
.chat-bubble-theirs {
  background: #fff;
  color: #1f2937;
  border: 1px solid #eef0f3;
  border-bottom-left-radius: 4px;
}
html[dir="rtl"] .chat-bubble-theirs {
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 4px;
}
.chat-bubble-header {
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.7;
  margin-bottom: 0.15rem;
}
.chat-bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble-time {
  font-size: 0.65rem;
  opacity: 0.65;
  margin-top: 0.2rem;
  text-align: right;
}
html[dir="rtl"] .chat-bubble-time {
  text-align: left;
}

.chat-system-pill {
  background: #eef1f5;
  color: #6b7280;
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  text-align: center;
  max-width: 85%;
}

.chat-unread-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  border: 2px solid #fff;
}
html[dir="rtl"] .chat-unread-badge {
  right: auto;
  left: -0.35rem;
}


/* ── Review Stars ── */
.review-stars .star {
  cursor: pointer;
  font-size: 1.5rem;
  color: #d1d5db;
  transition: color 0.15s;
}
.review-stars .star.active,
.review-stars .star:hover {
  color: #f59e0b;
}

/* ── Confirm Dialog ── */
.confirm-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}
.confirm-dialog-overlay.hidden {
  display: none;
}
.confirm-dialog-box {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  text-align: center;
}
.confirm-dialog-box h5 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.confirm-dialog-box p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Onboarding Flow Styles */
.onboarding-role-card {
  border: 2px solid transparent;
  border-radius: 20px;
  background: #ffffff;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.onboarding-role-card:hover {
  transform: translateY(-8px);
  border-color: var(--secondary-color);
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.12);
}

.onboarding-role-card.active {
  border-color: var(--primary-color);
  background: rgba(30, 58, 138, 0.02);
}

.onboarding-icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.onboarding-role-card:hover .onboarding-icon-wrapper {
  background: rgba(14, 165, 233, 0.1);
  transform: scale(1.1);
}

/* Stepper Component */
.onboarding-stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.onboarding-stepper::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 10%;
  right: 10%;
  height: 4px;
  background-color: var(--border-color);
  z-index: 0;
}

.onboarding-stepper-progress {
  position: absolute;
  top: 24px;
  left: 10%;
  height: 4px;
  background-color: var(--success-color);
  z-index: 0;
  transition: width 0.4s ease;
  width: 0%;
}

.onboarding-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  background: transparent;
  flex: 1;
}

.onboarding-step-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.onboarding-step-item.active .onboarding-step-circle {
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.2);
}

.onboarding-step-item.completed .onboarding-step-circle {
  border-color: var(--success-color);
  background-color: var(--success-color);
  color: #ffffff;
}

.onboarding-step-label {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.onboarding-step-item.active .onboarding-step-label {
  color: var(--primary-color);
}

.onboarding-step-item.completed .onboarding-step-label {
  color: var(--success-color);
}

/* Onboarding view transitions */
.onboarding-view {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.onboarding-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Stepper Layout */
@media (max-width: 767.98px) {
  .onboarding-stepper {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 2rem;
    gap: 1.5rem;
  }
  
  .onboarding-stepper::before {
    top: 0;
    bottom: 0;
    left: 44px;
    width: 4px;
    height: calc(100% - 50px);
  }
  
  .onboarding-stepper-progress {
    display: none;
  }
  
  .onboarding-step-item {
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 1rem;
    text-align: left;
  }
  
  .onboarding-step-label {
    margin-top: 0;
  }
}

/* ── Page Transition Fade-in ── */
main {
  animation: pageFadeIn 0.35s ease-out;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Focus & Selection ── */
::selection {
  background: rgba(30, 58, 138, 0.15);
  color: var(--text-dark);
}

:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px var(--glow-primary);
}

/* ── Form Controls Modern ── */
.form-control {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:hover:not(:focus):not(:disabled) {
  border-color: #cbd5e1;
}

/* ── Premium Link Styles ── */
a:not(.btn):not(.navbar-brand):not(.nav-link):not(.dropdown-item) {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:not(.btn):not(.navbar-brand):not(.nav-link):not(.dropdown-item):hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ═══════════════════════════════════════════
   PREMIUM DESIGN SYSTEM — Carryer Brand
   ═══════════════════════════════════════════ */

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--light-gray);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
@supports (scrollbar-color: #cbd5e1 var(--light-gray)) {
  * {
    scrollbar-color: #cbd5e1 var(--light-gray);
    scrollbar-width: thin;
  }
}

/* ── Typography Scale ── */
h1, .h1 { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-dark); }
h2, .h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text-dark); }
h3, .h3 { font-size: 1.4rem; font-weight: 700; color: var(--text-dark); }
h4, .h4 { font-size: 1.15rem; font-weight: 600; color: var(--text-dark); }
h5, .h5 { font-size: 1rem; font-weight: 600; color: var(--text-dark); }

.section-title {
  font-weight: 700;
  font-size: 1.3rem;
  padding-bottom: 0.6rem;
  margin-bottom: 1.2rem;
  border-bottom: 3px solid var(--secondary-color);
  display: inline-block;
  position: relative;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 40%;
  height: 3px;
  background: var(--primary-color);
}
html[dir="rtl"] .section-title::after {
  left: auto;
  right: 0;
}

/* ── Footer Premium ── */
.footer-premium {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0f172a 100%);
  border-top: 2px solid rgba(14, 165, 233, 0.15);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-premium a:hover {
  color: var(--secondary-color) !important;
  transition: color 0.2s ease;
}

/* ── Navbar Brand Hover ── */
.navbar-brand .brand-icon {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.navbar-brand:hover .brand-icon {
  transform: scale(1.1) rotate(-6deg);
}

/* ── Nav Link Animated Underline ── */
.navbar-custom .nav-link {
  position: relative;
  padding: 0.5rem 0.85rem !important;
  font-weight: 500;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.navbar-custom .nav-link::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.2s ease, width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar-custom .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
  opacity: 1;
  width: 28px;
}
.navbar-custom .nav-link.active {
  color: #fff;
  background: rgba(14, 165, 233, 0.16);
}

/* ── Navbar Icon Buttons (bell, etc.) ── */
.navbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50% !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}
.navbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}
.navbar-icon-btn::after {
  display: none !important;
}

/* ── Navbar Avatar ── */
.navbar-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-hover) 100%);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
  text-transform: uppercase;
}
.navbar-username {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.navbar-custom .dropdown-toggle.user-toggle::after {
  display: none;
}

/* ── Language switch ── */
.navbar-lang {
  border-radius: 999px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85) !important;
}

/* ── Register CTA in navbar ── */
.navbar-custom .nav-register {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-hover) 100%);
  color: #fff;
  border-radius: 999px;
  padding: 0.5rem 1.1rem !important;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}
.navbar-custom .nav-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
  color: #fff;
}
.navbar-custom .nav-register::after {
  display: none !important;
}

/* ── Dropdown Branding ── */
.dropdown-menu {
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 14px;
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.18), 0 0 0 1px rgba(0,0,0,0.03);
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: dropdownPop 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes dropdownPop {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dropdown-item {
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  font-weight: 500;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.dropdown-item:hover {
  background: rgba(14, 165, 233, 0.07);
  transform: translateX(3px);
}
html[dir="rtl"] .dropdown-item:hover {
  transform: translateX(-3px);
}
.dropdown-item:active {
  background: rgba(14, 165, 233, 0.12);
}
.dropdown-divider {
  border-color: rgba(148, 163, 184, 0.2);
  margin: 0.4rem 0;
}

/* User menu in navbar */
.user-menu {
  min-width: 240px;
}
.user-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── Branded Loading Spinner ── */
.spinner-brand {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-right-color: var(--secondary-color);
  animation: spin 0.7s linear infinite;
}
.spinner-brand-sm { width: 1.25rem; height: 1.25rem; border-width: 2px; }
.spinner-brand-lg { width: 3rem; height: 3rem; border-width: 4px; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Skeleton Loading Placeholder ── */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}
.skeleton-text { height: 0.9rem; margin-bottom: 0.5rem; width: 80%; }
.skeleton-text-sm { height: 0.7rem; width: 50%; }
.skeleton-title { height: 1.3rem; margin-bottom: 0.75rem; width: 60%; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-card { height: 120px; border-radius: 16px; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Badge Refinements ── */
.badge {
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 0.35em 0.75em;
  border-radius: 6px;
}
.badge-status-pending,
.badge-status-accepted,
.badge-status-paid,
.badge-status-in-transit,
.badge-status-delivered,
.badge-status-picked-up,
.badge-status-completed,
.badge-status-cancelled,
.badge-status-rejected {
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ── Better Table Rows ── */
.table tbody tr {
  transition: background 0.15s ease;
}
.table tbody tr:hover {
  background: rgba(14, 165, 233, 0.03);
}

/* ── Premium Horizontal Rule ── */
hr.brand-hr {
  height: 2px;
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color), transparent);
  border: none;
  opacity: 0.3;
}
html[dir="rtl"] hr.brand-hr {
  background: linear-gradient(270deg, var(--secondary-color), var(--primary-color), transparent);
}

/* ── Mobile Nav Toggle Refinements ── */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.navbar-toggler:hover {
  opacity: 1;
  transform: scale(1.05);
}
.navbar-toggler:focus {
  box-shadow: none;
}

/* ── Toast Animation Enhancement ── */
.carryer-toast {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.carryer-toast.toast-success {
  background: rgba(16, 185, 129, 0.92);
}
.carryer-toast.toast-error {
  background: rgba(220, 38, 38, 0.92);
}
.carryer-toast.toast-info {
  background: rgba(30, 58, 138, 0.92);
}

/* ── Interactive Card Glow ── */
.card-premium.interactive-card {
  cursor: pointer;
}
.card-premium.interactive-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.08), 0 0 0 1px rgba(14, 165, 233, 0.15);
}

/* ── Responsive Refinements ── */
@media (max-width: 767.98px) {
  .footer-premium .row > div {
    text-align: center;
  }
  .footer-premium .d-flex {
    align-items: center !important;
  }
  .navbar-custom .nav-link::after {
    display: none;
  }
  .navbar-custom .nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
  }
  .navbar-custom .nav-link {
    border-radius: 14px;
    padding-top: 0.7rem !important;
    padding-bottom: 0.7rem !important;
  }
  .navbar-username {
    display: none;
  }
  .navbar-custom .navbar-collapse {
    background: rgba(15, 23, 42, 0.98);
    border-radius: 16px;
    margin-top: 0.6rem;
    padding: 0.75rem;
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
  }
  h1, .h1 { font-size: 1.7rem; }
  h2, .h2 { font-size: 1.4rem; }
}

/* ── Notification Dropdown ── */
.notification-dropdown {
  border: none;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  padding: 0;
}
.notification-dropdown .dropdown-item {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s ease;
  cursor: pointer;
}
.notification-dropdown .dropdown-item:last-child {
  border-bottom: none;
}
.notification-dropdown .dropdown-item:hover {
  background: rgba(14, 165, 233, 0.06);
}
.notification-dropdown .dropdown-item.unread {
  background: rgba(30, 58, 138, 0.03);
}
.notification-dropdown .dropdown-item .notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.notification-dropdown .dropdown-item .notif-icon.icon-order { background: #dbeafe; color: #1e40af; }
.notification-dropdown .dropdown-item .notif-icon.icon-payment { background: #d1fae5; color: #065f46; }
.notification-dropdown .dropdown-item .notif-icon.icon-trip { background: #ede9fe; color: #5b21b6; }
.notification-dropdown .dropdown-item .notif-icon.icon-chat { background: #e0f2fe; color: #075985; }
.notification-dropdown .dropdown-item .notif-icon.icon-info { background: #fef3c7; color: #92400e; }
.notification-dropdown .dropdown-item .notif-icon.icon-alert { background: #fee2e2; color: #991b1b; }
.notification-dropdown .notif-message {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-dark);
}
.notification-dropdown .notif-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.notification-dropdown .notif-action {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-top: 2px;
}
.notification-dropdown .unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary-color);
  flex-shrink: 0;
  margin-top: 6px;
}
.notif-badge-pulse {
  animation: notifPulse 2s ease-in-out infinite;
}
@keyframes notifPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}


/* ═══════════════════════════════════════════
   RESPONSIVE FIXES — Multi-platform
   ═══════════════════════════════════════════ */

/* ── Payment rows: prevent label/amount overflow on small screens ── */
.payment-row {
  flex-wrap: wrap;
  gap: 0.25rem;
}
.payment-row .label {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}
.payment-row > span:last-child {
  flex-shrink: 0;
  text-align: end;
}

/* ── Verification code: shrink letter-spacing on small screens ── */
@media (max-width: 575.98px) {
  .verification-code-display {
    font-size: 1.5rem;
    letter-spacing: 0.45rem;
    padding: 0.75rem 0.25rem;
  }

  .spaced-code-input {
    font-size: 1.4rem;
    letter-spacing: 0.45rem;
    max-width: 100%;
  }

  /* Payment page heading */
  h2, .h2 { font-size: 1.25rem; }

  /* Reduce card padding on very small screens */
  .card-premium.p-4 {
    padding: 1rem !important;
  }

  /* Pay button full width, readable font */
  #btnPayNow {
    font-size: 1rem !important;
    padding: 0.75rem !important;
  }
}

/* ── Tablet (768–991px): constrain payment page width ── */
@media (min-width: 768px) and (max-width: 991.98px) {
  .verification-code-display {
    font-size: 1.8rem;
    letter-spacing: 0.6rem;
  }
}

/* ── Disable card hover lift on touch devices (avoids sticky hover) ── */
@media (hover: none) {
  .card-premium:hover {
    transform: none;
    box-shadow: var(--shadow-md);
  }
  .btn-primary-custom:hover,
  .btn-secondary-custom:hover {
    transform: none;
  }
  .dropdown-item:hover {
    transform: none;
  }
}

/* ── Trips table: make it scrollable on mobile ── */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

/* ── Notification dropdown: full width on mobile ── */
@media (max-width: 575.98px) {
  .notification-dropdown {
    width: calc(100vw - 2rem) !important;
    max-width: 100%;
  }
}

/* ── Confirm dialog: full width on small screens ── */
@media (max-width: 575.98px) {
  .confirm-dialog-box {
    padding: 1.25rem;
    width: 95%;
  }
}

/* ── Toast: full width on mobile ── */
@media (max-width: 575.98px) {
  .carryer-toast {
    left: 1rem;
    right: 1rem;
    min-width: unset;
    max-width: unset;
    bottom: 1rem;
  }
  html[dir="rtl"] .carryer-toast {
    left: 1rem;
    right: 1rem;
  }
}

/* ── Stats row on home: stack at xs ── */
@media (max-width: 575.98px) {
  .stat-box {
    padding: 1rem;
  }
}

/* ── Onboarding role cards: full width on xs ── */
@media (max-width: 575.98px) {
  .onboarding-role-card {
    padding: 1.5rem 1rem;
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE HARDENING — mobiles / tablets / laptops
   ═══════════════════════════════════════════ */

/* Never let media blow a layout out */
img, video, iframe, svg {
  max-width: 100%;
  height: auto;
}

/* Kill accidental horizontal scroll while keeping sticky/fixed layout */
html, body {
  overflow-x: clip;
}

/* Missing utility classes used in views */
.max-width-320 { max-width: 320px !important; }
.max-width-420 { max-width: 420px !important; }

/* Long content must wrap, never force a scrollbar */
.notification-dropdown .notif-message,
.notification-dropdown .dropdown-item,
.chat-security-banner,
.alert {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Tables: tighter yet still scrollable on small screens */
@media (max-width: 767.98px) {
  .table { font-size: 0.85rem; }
  .table thead th { white-space: nowrap; }
  .table td, .table th { padding: 0.5rem 0.6rem; }
}

/* Card headers with title + badges: wrap instead of clipping */
.card-header.d-flex {
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Chat bubbles shouldn't span the whole width */
.chat-bubble {
  max-width: 85%;
}
@media (max-width: 575.98px) {
  .chat-bubble { max-width: 92%; }
}

/* Chat window height relative to viewport so the input stays visible */
@media (max-width: 575.98px) {
  #chatMessages { height: 50vh !important; }
  #chatInput { font-size: 1rem; }
}

/* Navbar: comfortable tap targets + keeping the brand readable */
@media (max-width: 767.98px) {
  .navbar-custom .navbar-brand { min-height: 44px; }
  .navbar-custom .nav-link {
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
  }
  .navbar-brand .brand-text { font-size: 1.05rem; }
}
@media (pointer: coarse) {
  .navbar-custom .nav-link,
  .dropdown-item,
  .btn-sm {
    min-height: 40px;
  }
  .dropdown-item {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }
}

/* Notification dropdown: keep items readable, never overflow (width override already lives above) */
.notification-dropdown .dropdown-item {
  white-space: normal;
}

/* Verification code: guarantee it fits the narrowest phones */
@media (max-width: 389.98px) {
  .verification-code-display {
    font-size: 1.3rem;
    letter-spacing: 0.3rem;
    padding: 0.6rem 0.15rem;
  }
}

/* Home hero + stat boxes: comfortable spacing on very small phones */
@media (max-width: 575.98px) {
  .stat-box { text-align: center; }
  .footer-premium .col-md-3 { text-align: center; }
}

/* Onboard stepper labels: wrap instead of clipping */
.onboarding-step-label {
  line-height: 1.35;
  padding: 0 0.25rem;
}

/* Chrome on small laptops (1024–1280): no layout tweaks needed, but smaller XL margins look better */
@media (min-width: 576px) and (max-width: 767.98px) {
  html { font-size: 15px; }
}

/* ═══════════════════════════════════════════
   MODAL CENTERING — every modal opens centered
   ═══════════════════════════════════════════ */
.modal.fade .modal-dialog {
  transition: transform 0.25s ease-out;
  transform: translateY(-18px) scale(0.98);
}
.modal.show .modal-dialog {
  transform: translateY(0) scale(1);
}

/* Center every modal dialog vertically + horizontally by default */
.modal .modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100% - var(--bs-modal-margin) * 2);
  margin-left: auto;
  margin-right: auto;
  max-width: var(--bs-modal-width, 500px);
}
.modal .modal-dialog.modal-sm { max-width: 300px; }
.modal .modal-dialog.modal-lg { max-width: 800px; }
.modal .modal-dialog.modal-xl { max-width: 1140px; }
.modal .modal-dialog.modal-fullscreen,
.modal .modal-dialog.modal-fullscreen-sm-down,
.modal .modal-dialog.modal-fullscreen-md-down,
.modal .modal-dialog.modal-fullscreen-lg-down,
.modal .modal-dialog.modal-fullscreen-xl-down,
.modal .modal-dialog.modal-fullscreen-xxl-down {
  display: block;
  min-height: 0;
  max-width: none;
}

/* Modern modal surface */
.modal-content {
  border: none;
  border-radius: 18px;
  box-shadow: 0 25px 70px rgba(2, 6, 23, 0.4);
  overflow: hidden;
}
.modal-backdrop.show {
  opacity: 0.55;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

@media (max-width: 575.98px) {
  .modal .modal-dialog {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }
}
