/* ===== CSS Variables ===== */
:root,
[data-theme="light"] {
  --bg-deep: #f8fafc;
  --bg-main: #ffffff;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --border-color: #e2e8f0;
  --border-color-dim: rgba(226, 232, 240, 0.7);
  --accent: #d72638;
  --accent-dim: rgba(215, 38, 56, 0.08);
  --accent-glow: rgba(215, 38, 56, 0.2);
  --gold: #d97706;
  --gold-dim: rgba(217, 119, 6, 0.1);
  --orange: #ea580c;
  --navy: #0b2545;
  --success: #10b981;
  --danger: #ef4444;
  --info: #0891b2;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-card:
    0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-hover:
    0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --font-heading: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;
}

[data-theme="dark"] {
  --bg-deep: #07182f;
  --bg-main: #0b2545;
  --bg-card: rgba(13, 34, 64, 0.85);
  --bg-card-solid: #0d2240;
  --border-color: rgba(29, 63, 120, 0.5);
  --border-color-dim: rgba(29, 63, 120, 0.3);
  --accent: #d72638;
  --accent-dim: rgba(215, 38, 56, 0.15);
  --accent-glow: rgba(215, 38, 56, 0.35);
  --gold: #e8b923;
  --gold-dim: rgba(232, 185, 35, 0.15);
  --orange: #ff6b35;
  --navy: #0b2545;
  --success: #10b981;
  --danger: #ef4444;
  --info: #06b6d4;
  --text-primary: #f8f9fa;
  --text-secondary: #9eb1c9;
  --text-muted: #627794;
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-hover: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

/* ===== Global Background ===== */
.page-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: brightness(0.12) saturate(0.4);
}

.page-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(
    135deg,
    rgba(7, 24, 47, 0.94) 0%,
    rgba(11, 37, 69, 0.9) 50%,
    rgba(7, 24, 47, 0.96) 100%
  );
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ===== Navbar ===== */
.navbar-custom {
  background: rgba(7, 24, 47, 0.92) !important;
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 0;
  transition: all 0.3s ease;
}

.navbar-custom .navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--accent) !important;
  letter-spacing: -0.5px;
}

.navbar-custom .navbar-brand i {
  margin-right: 6px;
}

.navbar-custom .nav-link {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.navbar-custom .nav-link:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.14) !important;
}

.navbar-custom .nav-link.active {
  color: #ffffff !important;
  background: var(--accent) !important;
}

.navbar-custom .dropdown-menu {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.navbar-custom .dropdown-item {
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  transition: all 0.2s;
}

.navbar-custom .dropdown-item:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ===== Notification Banner ===== */
.payment-banner {
  background: linear-gradient(
    90deg,
    rgba(215, 38, 56, 0.18),
    rgba(232, 185, 35, 0.1)
  ) !important;
  border: 1px solid rgba(215, 38, 56, 0.35) !important;
  border-radius: 0 !important;
  backdrop-filter: blur(10px);
  font-size: 0.9rem;
  padding: 0.65rem 1.2rem !important;
  color: #fff !important;
}

.payment-banner .alert-link {
  color: #fbbf24;
  font-weight: 600;
  text-decoration: underline;
}

.payment-banner .btn-close {
  filter: invert(1) brightness(0.7);
}

/* ===== Cards ===== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.35s ease;
  box-shadow: var(--shadow-card);
  color: var(--text-primary);
}

.glass-card:hover {
  border-color: rgba(215, 38, 56, 0.4);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.glass-card-flat {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  color: var(--text-primary);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease;
}

/* ===== Buttons ===== */
.btn-accent {
  background: linear-gradient(135deg, #d72638, #b81d2d);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.5rem;
  font-size: 0.92rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(215, 38, 56, 0.35);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #e63946, #d72638);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(215, 38, 56, 0.45);
}

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 0.55rem 1.4rem;
  font-size: 0.92rem;
  transition: all 0.3s ease;
}

.btn-outline-accent:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

.btn-ghost {
  background: var(--bg-deep);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.25s;
}

.btn-ghost:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Header Theme Toggle Button (Top Right) ===== */
.header-theme-btn {
  background: var(--bg-deep);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  height: 38px;
  padding: 0.25rem 0.65rem 0.25rem 0.35rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.header-theme-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.header-theme-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-theme-labels {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.header-theme-mode {
  color: var(--text-primary);
}

.header-theme-indicator {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

[data-theme="dark"] .header-theme-indicator {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.25);
}

/* ===== Form Controls ===== */
.form-control-dark,
.form-select-dark {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  transition: all 0.25s;
}

[data-theme="light"] .form-control-dark,
[data-theme="light"] .form-select-dark {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="dark"] .form-control-dark,
[data-theme="dark"] .form-select-dark {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f8f9fa;
}

.form-control-dark:focus,
.form-select-dark:focus {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  color: var(--text-primary);
}

.form-control-dark::placeholder {
  color: var(--text-muted);
}

.form-label-custom {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Hero Section ===== */
.hero-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(
      ellipse at 30% 20%,
      rgba(245, 158, 11, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 70% 80%,
      rgba(6, 182, 212, 0.05) 0%,
      transparent 50%
    );
  animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  100% {
    transform: translate(-5%, 3%) rotate(3deg);
  }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
}

.track-input-group {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.2rem;
  max-width: 560px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.track-input-group .form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  padding: 0.75rem 1rem;
}

.track-input-group .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ===== Stats Row ===== */
.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Feature Cards ===== */
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.feature-icon.amber {
  background: var(--accent-dim);
  color: var(--accent);
}

.feature-icon.cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--info);
}

.feature-icon.green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.feature-icon.red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

/* ===== Horizontal Timeline ===== */
.timeline-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: 2rem 0 1rem;
}

.timeline-h-line {
  position: absolute;
  top: 3.1rem;
  left: 40px;
  right: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  z-index: 0;
}

.timeline-h-progress {
  position: absolute;
  top: 3.1rem;
  left: 40px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #fbbf24);
  border-radius: 2px;
  z-index: 1;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-h-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  flex: 1;
  cursor: default;
}

.timeline-h-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  transition: all 0.5s ease;
  position: relative;
}

.timeline-h-step.reached .timeline-h-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
}

.timeline-h-step.current .timeline-h-icon {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 0 10px transparent;
  }
}

.timeline-h-step.future .timeline-h-icon {
  filter: blur(3px);
  opacity: 0.4;
}

.timeline-h-step.future .timeline-h-label {
  filter: blur(3px);
  opacity: 0.35;
}

.timeline-h-label {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  max-width: 90px;
  transition: all 0.5s ease;
}

.timeline-h-step.reached .timeline-h-label {
  color: var(--accent);
}

.timeline-h-step.current .timeline-h-label {
  color: var(--text-primary);
}

/* ===== Vertical Stops ===== */
.stops-v {
  position: relative;
  padding-left: 2rem;
}

.stops-v-line {
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.stops-v-progress {
  position: absolute;
  left: 11px;
  top: 0;
  width: 2px;
  background: var(--accent);
  transition: height 0.6s ease;
  box-shadow: 0 0 8px var(--accent-glow);
}

.stop-v-item {
  position: relative;
  padding: 0.6rem 0 1.5rem 1.5rem;
  transition: all 0.4s ease;
}

.stop-v-dot {
  position: absolute;
  left: -2rem;
  top: 0.7rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-card-solid);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.stop-v-dot-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.4s ease;
}

.stop-v-item.passed .stop-v-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.stop-v-item.passed .stop-v-dot-inner {
  background: #000;
}

.stop-v-item.current .stop-v-dot {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulseDot 2s infinite;
}

.stop-v-item.current .stop-v-dot-inner {
  background: var(--accent);
}

@keyframes pulseDot {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.stop-v-item.future {
  filter: blur(2.5px);
  opacity: 0.35;
}

.stop-v-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.stop-v-type {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stop-v-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== Map Container ===== */
.map-container {
  width: 100%;
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.map-container iframe,
.map-container div {
  width: 100%;
  height: 100%;
}

/* ===== Status Badge & Type Badges ===== */
.badge-type-custom {
  background: var(--bg-deep);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  display: inline-block;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.badge-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-received,
.badge-pending {
  background: rgba(217, 119, 6, 0.15);
  color: #f59e0b;
}

.badge-prepared,
.badge-picked_up {
  background: rgba(8, 145, 178, 0.15);
  color: #06b6d4;
}

.badge-shipped,
.badge-in_transit {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.badge-out_for_delivery {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.badge-delivered {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-delayed,
.badge-notransit {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ===== Transit Warning ===== */
.transit-warning {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: all 0.25s;
}

.transit-warning:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.transit-warning i {
  color: var(--danger);
  font-size: 1.3rem;
}

/* ===== Chat FAB ===== */
.chat-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.35);
  cursor: pointer;
  z-index: 1050;
  transition: all 0.3s;
  border: none;
}

.chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.45);
}

/* ===== Tables ===== */
.table-dark-custom {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--border-color);
  font-size: 0.9rem;
}

.table-dark-custom thead th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 0.85rem;
}

.table-dark-custom td {
  padding: 0.55rem 0.85rem;
  vertical-align: middle;
  background: var(--bg-card);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.table-dark-custom tbody tr {
  transition: background 0.2s;
}

.table-dark-custom tbody tr:hover td {
  background: var(--bg-deep);
}

/* Compact Table (reduced row height for dense admin order management) */
.table-compact thead th {
  padding: 0.45rem 0.75rem !important;
  font-size: 0.74rem !important;
  letter-spacing: 0.4px !important;
}

.table-compact td {
  padding: 0.38rem 0.75rem !important;
  font-size: 0.83rem !important;
  line-height: 1.25 !important;
}

.table-compact .form-select-sm {
  padding-top: 0.18rem !important;
  padding-bottom: 0.18rem !important;
  font-size: 0.78rem !important;
  height: 28px !important;
}

.table-compact .form-check-input {
  width: 1.9rem !important;
  height: 1rem !important;
  margin-top: 0 !important;
}

.table-compact .btn-sm {
  padding: 0.15rem 0.4rem !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
}

.table-compact .badge-type-custom,
.table-compact .badge-status {
  padding: 0.2rem 0.45rem !important;
  font-size: 0.72rem !important;
}

/* ===== Crypto Card ===== */
.crypto-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 1.3rem;
  transition: all 0.3s;
}

.crypto-card:hover {
  border-color: var(--border-color);
  background: rgba(255, 255, 255, 0.05);
}

.crypto-card .wallet-addr {
  font-family: "Space Grotesk", monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  word-break: break-all;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  margin-top: 0.6rem;
  user-select: all;
}

.crypto-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-heading);
}

.crypto-icon.btc {
  background: rgba(247, 147, 26, 0.15);
  color: #f7931a;
}

.crypto-icon.eth {
  background: rgba(98, 126, 234, 0.15);
  color: #627eea;
}

.crypto-icon.usdt {
  background: rgba(38, 161, 123, 0.15);
  color: #26a17b;
}

/* ===== Toast Override ===== */
.toast-custom {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
}

/* ===== Page Header ===== */
.page-header {
  padding: 2rem 0 1.5rem;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== Offcanvas Custom ===== */
.offcanvas-dark {
  background: var(--bg-card-solid) !important;
  border-left: 1px solid var(--border-color) !important;
  color: var(--text-primary);
}

.offcanvas-dark .offcanvas-header {
  border-bottom: 1px solid var(--border-color);
}

.offcanvas-dark .btn-close {
  filter: invert(1) brightness(0.6);
}

.message-bubble {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 12px 12px 12px 2px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
}

.message-bubble .msg-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ===== Proof Image ===== */
.proof-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s;
}

.proof-thumb:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

/* ===== Section Divider ===== */
.section-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-color),
    transparent
  );
  margin: 2rem 0;
}

/* ===== Admin Sidebar Nav ===== */
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s;
  text-decoration: none;
}

.admin-nav-link:hover,
.admin-nav-link.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.admin-nav-link i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-title {
    letter-spacing: -1px;
  }

  .timeline-h {
    gap: 0;
  }

  .timeline-h-label {
    font-size: 0.7rem;
    max-width: 65px;
  }

  .timeline-h-icon {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .map-container {
    height: 300px;
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

/* ===== Misc ===== */
.text-accent {
  color: var(--accent) !important;
}

.text-muted-custom {
  color: var(--text-muted) !important;
}

.bg-card-solid {
  background: var(--bg-card-solid);
}

.divider-v {
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  min-height: 30px;
}

.img-proof-modal {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Dashboard Layout ===== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--bg-card-solid);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 1rem 1rem;
  overflow-y: auto;
  z-index: 1050;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.sidebar-brand-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.sidebar-brand-text {
  transition:
    opacity 0.2s,
    max-width 0.3s;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-nav {
  flex: 1;
}

.sidebar-nav .sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 0.3rem;
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-nav .sidebar-link:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.sidebar-nav .sidebar-link.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.sidebar-nav .sidebar-link i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav .sidebar-link span {
  transition: opacity 0.2s;
}

/* Sidebar Footer Theme Toggle Card */
.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-theme-card {
  background: var(--bg-deep);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.sidebar-theme-card:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sidebar-theme-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sidebar-theme-text-wrap {
  min-width: 0;
  flex: 1;
}

.sidebar-theme-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-theme-status {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.2;
  margin-top: 2px;
  font-weight: 500;
}

.sidebar-theme-switch {
  width: 36px;
  height: 20px;
  border-radius: 9999px;
  background: #cbd5e1;
  position: relative;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.sidebar-theme-switch-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sidebar-theme-switch.active {
  background: #10b981;
}

.sidebar-theme-switch.active .sidebar-theme-switch-thumb {
  transform: translateX(16px);
}

[data-theme="dark"] .sidebar-theme-switch {
  background: #334155;
}

[data-theme="dark"] .sidebar-theme-switch.active {
  background: #10b981;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1040;
  transition: opacity 0.3s;
  opacity: 0;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Hamburger toggle button */
.sidebar-toggle {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--accent);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.main-area {
  flex: 1;
  margin-left: 260px;
  width: calc(100% - 260px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 999;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease;
}

[data-theme="dark"] .top-header {
  background: rgba(6, 10, 17, 0.85);
}

.top-header .logo {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent);
  font-size: 1.2rem;
  text-decoration: none;
}

.top-header .header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.top-header .user-greeting {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.top-header .user-greeting i {
  font-size: 1.4rem;
  color: var(--accent);
}

.content-area {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  min-width: 0;
}

/* Floating Action Button for Messages */
.msg-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.35);
  z-index: 1050;
  border: none;
}

.msg-fab:hover {
  transform: scale(1.1);
  color: #000;
}

/* ===== Mobile Responsive: Sidebar ===== */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    width: 72px;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    width: 260px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  }

  /* Icon-only state (sidebar hidden/collapsed) */
  .sidebar:not(.mobile-open) .sidebar-brand-text,
  .sidebar:not(.mobile-open) .sidebar-link span {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
  }

  /* When open show everything */
  .sidebar.mobile-open .sidebar-brand-text {
    opacity: 1;
    max-width: 200px;
  }

  .sidebar.mobile-open .sidebar-link span {
    opacity: 1;
  }

  .main-area {
    margin-left: 0;
  }

  .top-header {
    padding: 0 1.2rem;
  }

  .content-area {
    padding: 1.2rem;
  }
}

/* ===== Admin / Global Table Responsiveness ===== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  min-width: 0;
}

.table-dark-custom {
  min-width: 640px;
  /* Ensure tables scroll rather than crush */
  white-space: nowrap;
}

/* Specific columns that can wrap */
.table-dark-custom td .wallet-addr,
.table-dark-custom td div {
  white-space: normal;
}

/* Admin action buttons — make them wrap and shrink */
.table-dark-custom td .d-flex {
  flex-wrap: wrap;
  gap: 0.3rem;
}

/* ===== Admin pages — responsive card/section stacking ===== */
@media (max-width: 991.98px) {
  .glass-card-flat .row.g-4 > [class*="col-lg"] {
    width: 100%;
    flex: none;
  }

  /* Status select in tables — let it go full width on mobile */
  .form-select-dark.form-select-sm {
    width: 100% !important;
    min-width: 0;
  }

  /* Payment method columns in admin user profile */
  .glass-card.mb-4 .d-flex.flex-wrap {
    flex-direction: column;
  }

  /* Admin user profile header — stack vertically on mobile */
  .glass-card
    .d-flex.flex-wrap.gap-4.align-items-center.justify-content-between {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem !important;
  }

  /* Content area padding on small screens */
  .content-area {
    padding: 1rem 0.8rem;
  }

  /* Page header section padding */
  section.page-header .container {
    padding: 0 1rem;
  }

  /* Stat cards — 2-up on mobile */
  .row.g-3 .col-6.col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 575.98px) {
  /* Tables — even more scroll space on tiny screens */
  .table-dark-custom {
    min-width: 540px;
    font-size: 0.82rem;
  }

  .table-dark-custom th,
  .table-dark-custom td {
    padding: 0.55rem 0.5rem;
  }

  /* Admin action button groups */
  .btn-ghost.btn.btn-sm {
    padding: 0.3rem 0.5rem;
    font-size: 0.78rem;
  }

  /* Glass card flat padding */
  .glass-card-flat {
    padding: 1rem;
  }

  .glass-card {
    padding: 1rem;
  }

  /* User profile avatar size */
  .stat-number {
    font-size: 1.4rem;
  }

  /* Payments - selects full width */
  .glow-select {
    font-size: 0.88rem;
  }

  /* Impersonation banner text */
  [style*="admin_impersonating"] span {
    font-size: 0.82rem !important;
  }

  /* Modal — full width on mobile */
  .modal-lg {
    max-width: 98vw !important;
  }

  .modal-dialog {
    margin: 0.5rem auto;
  }

  /* Form controls */
  .form-control-dark,
  .form-select-dark {
    font-size: 0.88rem;
  }
}

/* ===== Form Select & Options Dark UI Styling ===== */
select,
.form-select,
.form-select-dark {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

select option,
.form-select option,
.form-select-dark option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  padding: 10px 14px;
}

select option:checked,
select option:hover,
.form-select option:checked,
.form-select-dark option:checked {
  background-color: #f59e0b !important;
  color: #000000 !important;
}

/* Animated Pulse Badge */
@keyframes pulseGlow {
  0% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }

  50% {
    transform: scale(1.08);
    opacity: 0.85;
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }

  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

.animate-pulse {
  animation: pulseGlow 1.5s infinite ease-in-out !important;
}

/* ============================================================
   ADVANCED REAL-TIME TRACKING STYLES (from tracking.html)
   ============================================================ */

/* Keyframe animations */
@keyframes mBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-5px) scale(1.05);
  }
}

@keyframes mRingExpand {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes mPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.4;
  }

  50% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes mDelivered {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes dashFlow {
  to {
    stroke-dashoffset: -30;
  }
}

@keyframes fsMapIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes qrFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes blinkD {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.25;
    transform: scale(0.7);
  }
}

@keyframes trackErrIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tracking Header */
.trk-hdr {
  background: var(--bg-card);
  padding: 1.75rem 1.25rem 1.5rem;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

@media (min-width: 640px) {
  .trk-hdr {
    padding: 2.25rem 2rem 2rem;
  }
}

.trk-hdr::before {
  display: none;
}

[data-theme="dark"] .trk-hdr {
  background: linear-gradient(145deg, #07111e 0%, #0d1c38 50%, #0c2040 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .trk-hdr::before {
  display: block;
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.trk-hdr-inner {
  position: relative;
  z-index: 1;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  transition: all 0.2s;
  cursor: pointer;
  background: var(--bg-deep);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.875rem;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 600;
}

.back-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

[data-theme="dark"] .back-btn {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .back-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.trk-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  background: var(--bg-deep);
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.625rem;
  display: inline-block;
  border: 1px solid var(--border-color);
  letter-spacing: 0.05em;
  color: #0284c7;
  font-weight: 700;
}

[data-theme="dark"] .trk-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #67e8f9;
}

.trk-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.375rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
}

@media (min-width: 480px) {
  .trk-title {
    font-size: 1.75rem;
  }
}

.trk-sub {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
}

[data-theme="dark"] .trk-sub {
  color: rgba(255, 255, 255, 0.75);
}

/* PDF & Action Buttons */
.pdf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.trk-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(135deg, #1a56db, #0891b2);
  color: #fff;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.22s;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
}

.pdf-btn:hover {
  background: linear-gradient(135deg, #1342b5, #0e7490);
  transform: translateY(-1px);
  color: #fff;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card-solid);
  color: var(--text-primary);
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  font-family: inherit;
  transition: all 0.2s;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Delay & Halt Warning Banner */
.delay-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.125rem 1.35rem;
  background: rgba(220, 38, 38, 0.12);
  border: 1.5px solid rgba(220, 38, 38, 0.35);
  border-radius: 14px;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.15);
}

.delay-banner-ico {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  font-size: 1.2rem;
}

/* Status Card */
.status-card {
  background: var(--bg-card-solid);
  border-radius: 16px;
  padding: 1.35rem;
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

@media (min-width: 640px) {
  .status-card {
    padding: 1.75rem;
    gap: 1.5rem;
  }
}

.status-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex: 1;
  min-width: 0;
}

.status-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.35rem;
}

@media (min-width: 640px) {
  .status-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 1.5rem;
  }
}

.status-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.status-val {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

@media (min-width: 480px) {
  .status-val {
    font-size: 1.35rem;
  }
}

.status-loc {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.est-del {
  flex-shrink: 0;
  text-align: right;
  min-width: 0;
}

.el {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.ev {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

@media (min-width: 480px) {
  .ev {
    font-size: 1.1rem;
  }
}

.progress-bar-wrap {
  flex-basis: 100%;
  margin-top: 0.5rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.625rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1a56db, #0891b2, #10b981);
  border-radius: 9999px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  gap: 0.125rem;
}

.ps {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  flex: 1;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .ps {
    font-size: 0.72rem;
  }
}

.ps::before {
  content: "";
  position: absolute;
  top: -1.05rem;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  border: 2px solid var(--bg-card-solid);
}

.ps.done {
  color: #67e8f9;
  font-weight: 700;
}

.ps.done::before {
  background: #0891b2;
}

/* Info Grid */
.info-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 580px) {
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

.info-card {
  background: var(--bg-card-solid);
  border-radius: 14px;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.info-card h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.35rem 0;
  font-size: 0.83rem;
}

.info-key {
  color: var(--text-secondary);
  flex-shrink: 0;
  max-width: 42%;
}

.info-val {
  font-weight: 600;
  text-align: right;
  word-break: break-word;
  min-width: 0;
  color: var(--text-primary);
}

/* Map Card */
.map-card {
  background: var(--bg-card-solid);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

.map-chead {
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.625rem;
  background: rgba(139, 145, 155, 0.95);
}

.map-chead-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.map-chead-title {
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  color: var(--text-primary);
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  letter-spacing: 0.03em;
}

.stopped-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(217, 119, 6, 0.35);
  letter-spacing: 0.03em;
}

.delivered-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(13, 148, 136, 0.15);
  color: #2dd4bf;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(13, 148, 136, 0.35);
  letter-spacing: 0.03em;
}

.map-chead-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-tbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.75rem;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  transition: all 0.2s;
  font-family: inherit;
}

.map-tbtn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

#map {
  height: 380px;
  cursor: pointer;
  position: relative;
  background: #080e1a;
  z-index: 1;
}

@media (min-width: 768px) {
  #map {
    height: 440px;
  }
}

.map-coords-bar {
  padding: 0.6rem 1.125rem;
  background: rgba(148, 155, 165, 0.95);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.map-coord-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.map-coord-label {
  font-family: "Inter", sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-right: 0.15rem;
}

/* Fullscreen Map Modal */
.fsmap-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #060d1b;
  display: none;
  flex-direction: column;
}

.fsmap-overlay.open {
  display: flex;
  animation: fsMapIn 0.3s ease;
}

.fsmap-topbar {
  background: linear-gradient(to right, #0a1628, #0d1f3c);
  padding: 0 1.25rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  gap: 0.625rem;
}

.fsmap-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.fsmap-logo-t {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
}

.fsmap-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
}

.fsmap-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.fsmap-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.fsmap-close {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s;
}

.fsmap-close:hover {
  background: rgba(220, 38, 38, 0.4);
  color: #fff;
}

.fsmap-infobar {
  background: #0a1628;
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.65);
}

.fsmap-infobar strong {
  color: #fff;
}

.fsmap-legend-bar {
  background: #050d1a;
  padding: 0.45rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  flex-wrap: wrap;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.fsmap-leg-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.fsmap-leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.fsmap-leg-line {
  width: 16px;
  height: 3px;
  border-radius: 2px;
}

#fsmap {
  flex: 1;
  width: 100%;
  min-height: 0;
  background: #060d1b;
}

.fsmap-statusbar {
  background: #0a1628;
  padding: 0.45rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}

.fsmap-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: mPulse 1.5s infinite;
}

/* Timeline */
.timeline-card {
  background: var(--bg-card-solid);
  border-radius: 16px;
  padding: 1.35rem;
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

@media (min-width: 640px) {
  .timeline-card {
    padding: 1.75rem;
  }
}

.timeline-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.tl-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.5rem;
  position: relative;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 20px;
}

.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid var(--border-color);
  background: var(--bg-card-solid);
  z-index: 1;
  flex-shrink: 0;
}

.tl-dot.passed,
.tl-dot.delivered {
  background: #0d9488;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.tl-dot.current,
.tl-dot.in_transit,
.tl-dot.shipped {
  background: #1a56db;
  border-color: #1a56db;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.2);
}

.tl-dot.pending,
.tl-dot.received {
  background: #d97706;
  border-color: #d97706;
}

.tl-dot.delayed {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.tl-line {
  width: 2px;
  flex: 1;
  background: var(--border-color);
  margin: 4px 0;
}

.tl-body {
  flex: 1;
  min-width: 0;
}

.tl-ttl {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}

.tl-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.tl-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  align-items: center;
}

/* QR Code Card */
.qr-card {
  background: var(--bg-card-solid);
  border-radius: 16px;
  padding: 1.35rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .qr-card {
    padding: 1.75rem;
  }
}

.qr-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 580px) {
  .qr-inner {
    flex-direction: row;
    align-items: flex-start;
  }
}

.qr-canvas-wrap {
  position: relative;
  flex-shrink: 0;
}

#qr-canvas {
  border-radius: 10px;
  display: block;
  max-width: 140px;
  max-height: 140px;
}

.qr-scan-label {
  position: absolute;
  bottom: -1.4rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.qr-info {
  flex: 1;
  width: 100%;
}

.qr-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.qr-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.875rem;
}

.qr-url {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  background: var(--bg-deep);
  padding: 0.65rem 0.9rem;
  border-radius: 9px;
  color: #0284c7;
  word-break: break-all;
  border: 1px solid var(--border-color);
  margin-bottom: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

[data-theme="dark"] .qr-url {
  background: rgba(10, 25, 47, 0.85);
  color: #67e8f9;
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.qr-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.qr-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: linear-gradient(135deg, #1a56db, #0891b2);
  color: #fff;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.qr-dl-btn:hover {
  opacity: 0.9;
}

.qr-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.qr-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Not found */
.not-found {
  text-align: center;
  padding: 4rem 1rem;
}

.not-found i {
  font-size: 3.5rem;
  color: var(--danger);
  margin-bottom: 1rem;
}

.not-found h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.not-found p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.btn-outline-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card-solid);
  transition: all 0.2s;
  text-decoration: none;
}

.btn-outline-custom:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Toast Notifications */
#toast-cnt {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
  width: calc(100% - 2rem);
  max-width: 360px;
}

.toast-msg {
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  width: 100%;
  justify-content: center;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-msg.toast-s {
  background: #0d9488;
  color: #fff;
}

.toast-msg.toast-e {
  background: #dc2626;
  color: #fff;
}

.toast-msg.toast-i {
  background: #1a56db;
  color: #fff;
}

/* Leaflet Popups */
.leaflet-container {
  font-family: "Inter", sans-serif !important;
}

.leaflet-popup-content-wrapper {
  background: #0f1c33 !important;
  color: #f8fafc !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  max-width: 240px;
}

.leaflet-popup-tip {
  background: #0f1c33 !important;
}

.popup-title {
  font-weight: 700;
  font-size: 0.86rem;
  margin-bottom: 4px;
  color: #fff;
}

.popup-detail {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 3px 0;
  word-break: break-word;
}

.popup-coords {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: #67e8f9;
  margin-top: 4px;
}

.popup-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 4px;
}

/* ===== Modals Theme Adaptation ===== */
[data-theme="light"] .modal-content {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .modal-header,
[data-theme="light"] .modal-footer {
  border-color: #e2e8f0;
}

[data-theme="dark"] .modal-content {
  background: #0d2240;
  color: #f8f9fa;
  border: 1px solid rgba(29, 63, 120, 0.5);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
  border-color: rgba(29, 63, 120, 0.5);
}

/* ==========================================================================
   MODERN SAAS DESIGN SYSTEM ENHANCEMENTS (Cards, Controls & Layouts)
   ========================================================================== */

/* Segmented View Switcher & Filter Chips */
.segmented-control {
  display: inline-flex;
  align-items: center;
  background: var(--bg-deep);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.segmented-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.segmented-btn:hover {
  color: var(--text-primary);
}

.segmented-btn.active {
  background: var(--bg-card-solid);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-color);
}

.filter-chips-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filter-chips-wrap::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip .chip-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
}

/* Interactive Cards & Grid */
.card-interactive {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card-interactive:hover {
  transform: translateY(-3px);
  border-color: rgba(215, 38, 56, 0.4);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.25);
}

.card-interactive::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-interactive:hover::before {
  opacity: 1;
}

/* Route Flow Diagram Component */
.route-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color-dim);
  border-radius: 12px;
}

.route-flow-node {
  min-width: 0;
  flex: 1;
}

.route-flow-city {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-flow-country {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.route-flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
  padding: 0 4px;
}

.route-flow-line {
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--border-color), var(--accent));
  position: relative;
}

/* Status Pulse Indicators */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.pulse {
  animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-dot.green { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.8); }
.status-dot.blue  { background: #3b82f6; box-shadow: 0 0 8px rgba(59, 130, 246, 0.8); }
.status-dot.amber { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.8); }
.status-dot.red   { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.8); }

/* Quick Inspect Offcanvas Drawer */
.quick-drawer {
  position: fixed;
  top: 0;
  right: -460px;
  width: 460px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-card-solid);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
  z-index: 1060;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.quick-drawer.open {
  right: 0;
}

.quick-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quick-drawer-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.quick-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1055;
  transition: opacity 0.3s ease;
}

.quick-drawer-overlay.active {
  display: block;
}

/* Settings Tabs Navigation */
.settings-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.settings-tabs-nav::-webkit-scrollbar {
  display: none;
}

.settings-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.settings-tab-btn:hover {
  color: var(--text-primary);
  border-bottom-color: var(--border-color);
}

.settings-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Modern Card Grid Layout */
.cards-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 575.98px) {
  .cards-grid-auto {
    grid-template-columns: 1fr;
  }
}

/* ===================================================
   Ultra-Compact Data Tables System (Admin & User)
   =================================================== */
.table-dark-custom {
  --bs-table-bg: transparent;
  color: var(--text-primary);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table-dark-custom thead th {
  background: var(--bg-card-header, rgba(255, 255, 255, 0.03));
  color: var(--text-secondary, #94a3b8);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08)) !important;
  white-space: nowrap;
}

.table-dark-custom tbody td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.05));
  color: var(--text-primary);
  vertical-align: middle;
}

.table-dark-custom tbody tr:hover td {
  background: var(--bg-hover, rgba(255, 255, 255, 0.03)) !important;
}

/* Dense / Compact modifier */
.table-compact th {
  padding: 0.38rem 0.65rem !important;
  font-size: 0.72rem !important;
  line-height: 1.2;
}

.table-compact td {
  padding: 0.28rem 0.65rem !important;
  font-size: 0.81rem !important;
  line-height: 1.25;
}

/* Compact controls inside tables */
.table-compact .form-select,
.table-compact .form-select-sm {
  padding: 0.15rem 1.6rem 0.15rem 0.5rem !important;
  font-size: 0.76rem !important;
  height: 26px !important;
  min-height: 26px !important;
  line-height: 1.2 !important;
  border-radius: 6px !important;
  border-color: var(--border-color, rgba(255, 255, 255, 0.15));
}

.table-compact .form-check-input {
  width: 1.9rem !important;
  height: 0.95rem !important;
  margin-top: 0 !important;
  vertical-align: middle;
}

.table-compact .btn-sm,
.table-compact .btn-ghost {
  padding: 0.15rem 0.4rem !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  border-radius: 5px;
}

.table-compact .badge {
  padding: 0.18rem 0.45rem !important;
  font-size: 0.7rem !important;
  line-height: 1.15;
}

.table-compact .badge-status {
  padding: 0.16rem 0.48rem !important;
  font-size: 0.7rem !important;
}

.table-compact .badge-type-custom {
  padding: 0.14rem 0.45rem !important;
  font-size: 0.7rem !important;
}

/* Specific density reduction for Admin Order Management */
#ordersDesktopTable tr.order-row td {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
  height: 36px;
}

#ordersDesktopTable .order-customer-name {
  font-size: 0.81rem;
  font-weight: 600;
  line-height: 1.15;
}

#ordersDesktopTable .order-customer-email {
  font-size: 0.71rem;
  line-height: 1.1;
  color: var(--text-secondary, #94a3b8);
}


