/* ==========================================================================
   TraceTrack - Enterprise Trace & Tracking SaaS Design System
   THEME: LIGHT GLASSMORPHISM (Tema Glassmorphism Ringan)
   Aesthetics: Frosted Glass Panels, Ambient Luminous Backdrop, Subtle Borders,
   Translucent Surfaces, Crisp Typography, and Refined Enterprise Blue Accents.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  /* Ambient Base Canvas */
  --canvas-bg: #edf2f7;
  --canvas-gradient: radial-gradient(1200px circle at 15% 10%, rgba(219, 234, 254, 0.8), transparent 45%),
                      radial-gradient(900px circle at 85% 15%, rgba(224, 231, 255, 0.7), transparent 40%),
                      radial-gradient(1000px circle at 70% 85%, rgba(254, 240, 138, 0.25), transparent 45%),
                      radial-gradient(900px circle at 20% 85%, rgba(243, 232, 255, 0.6), transparent 45%),
                      linear-gradient(135deg, #f0f4f9 0%, #eef2f8 50%, #f6f8fb 100%);

  /* Light Glassmorphism Tokens */
  --glass-surface: rgba(255, 255, 255, 0.72);
  --glass-surface-hover: rgba(255, 255, 255, 0.88);
  --glass-surface-active: rgba(255, 255, 255, 0.95);
  --glass-surface-subtle: rgba(255, 255, 255, 0.45);
  --glass-sidebar: rgba(255, 255, 255, 0.68);
  --glass-header: rgba(255, 255, 255, 0.75);

  --glass-border: 1px solid rgba(255, 255, 255, 0.82);
  --glass-border-subtle: 1px solid rgba(226, 232, 240, 0.65);
  --glass-border-dark: 1px solid rgba(148, 163, 184, 0.25);
  --glass-border-focus: 1px solid rgba(37, 99, 235, 0.45);

  --glass-blur: blur(20px) saturate(180%);
  --glass-blur-sm: blur(12px) saturate(160%);

  --glass-shadow: 0 8px 30px -4px rgba(31, 38, 135, 0.06), 0 2px 6px -1px rgba(31, 38, 135, 0.03), inset 0 1px 0 0 rgba(255, 255, 255, 0.95);
  --glass-shadow-hover: 0 14px 38px -4px rgba(31, 38, 135, 0.1), 0 4px 10px -2px rgba(31, 38, 135, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 1);
  --glass-shadow-sm: 0 4px 16px -2px rgba(31, 38, 135, 0.04), inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
  --glass-shadow-active: 0 0 0 3px rgba(37, 99, 235, 0.15), 0 8px 24px -2px rgba(37, 99, 235, 0.12);

  /* Primary Accent Colors */
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-500: #3b82f6;
  --primary-100: rgba(37, 99, 235, 0.1);
  --primary-50:  rgba(37, 99, 235, 0.05);

  /* Text & Neutral Hierarchy */
  --navy-950: #090d16;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --navy-600: #475569;
  --navy-500: #64748b;
  --navy-400: #94a3b8;
  --navy-300: #cbd5e1;
  --navy-200: #e2e8f0;
  --navy-100: #f1f5f9;
  --navy-50:  #f8fafc;
  --white:    #ffffff;

  /* Glassmorphic Semantic Badges */
  --status-created-bg: rgba(100, 116, 139, 0.1);
  --status-created-text: #475569;
  --status-created-border: rgba(100, 116, 139, 0.25);

  --status-processing-bg: rgba(37, 99, 235, 0.1);
  --status-processing-text: #1d4ed8;
  --status-processing-border: rgba(37, 99, 235, 0.28);

  --status-transit-bg: rgba(217, 119, 6, 0.12);
  --status-transit-text: #b45309;
  --status-transit-border: rgba(217, 119, 6, 0.3);

  --status-received-bg: rgba(109, 40, 217, 0.1);
  --status-received-text: #6d28d9;
  --status-received-border: rgba(109, 40, 217, 0.25);

  --status-completed-bg: rgba(16, 185, 129, 0.12);
  --status-completed-text: #047857;
  --status-completed-border: rgba(16, 185, 129, 0.3);

  --status-delayed-bg: rgba(239, 68, 68, 0.12);
  --status-delayed-text: #b91c1c;
  --status-delayed-border: rgba(239, 68, 68, 0.3);

  --status-return-bg: rgba(225, 29, 72, 0.12);
  --status-return-text: #be123c;
  --status-return-border: rgba(225, 29, 72, 0.3);

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Dimensions */
  --sidebar-width: 260px;
  --header-height: 68px;

  /* Transitions */
  --transition-fast: 160ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: var(--font-main);
  background-color: var(--canvas-bg);
  background-image: var(--canvas-gradient);
  background-attachment: fixed;
  color: var(--navy-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   Ambient Luminous Glow Mesh (Glass Backlight)
   ========================================================================== */
.ambient-mesh-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.65;
  animation: floatOrb 20s ease-in-out infinite alternate;
}

.orb-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
  top: -60px;
  left: 20%;
}

.orb-2 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.28), transparent 70%);
  bottom: 5%;
  right: 15%;
  animation-duration: 25s;
  animation-delay: -5s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent 70%);
  top: 40%;
  right: 35%;
  animation-duration: 18s;
  animation-delay: -8s;
}

.orb-4 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 70%);
  bottom: -40px;
  left: 10%;
  animation-duration: 22s;
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.08) translateX(20px); }
  100% { transform: translateY(20px) scale(0.95) translateX(-25px); }
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ==========================================================================
   App Shell Layout
   ========================================================================== */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Sidebar Navigation (Light Frosted Glass)
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--glass-sidebar);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--navy-700);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 4px 0 24px 0 rgba(31, 38, 135, 0.04);
  z-index: 100;
  transition: transform var(--transition-base), width var(--transition-base);
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-600), #1d4ed8);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-600);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--navy-500);
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy-400);
  padding: 12px 12px 6px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--navy-600);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  user-select: none;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--navy-900);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(31, 38, 135, 0.04);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(59, 130, 246, 0.9));
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.28);
  border-color: rgba(255, 255, 255, 0.35);
}

.nav-item .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-item.active .icon {
  opacity: 1;
}

.nav-item .nav-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.07);
  color: var(--navy-700);
}

.nav-item.active .nav-count {
  background: rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.4);
}

.workspace-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  box-shadow: var(--glass-shadow-sm);
}

.workspace-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
}

.workspace-info {
  display: flex;
  flex-direction: column;
}

.workspace-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy-900);
}

.workspace-region {
  font-size: 0.68rem;
  color: var(--navy-500);
}
/* ==============================================================================
   Collapsed / Compact Mini-Sidebar System (Desktop & Tablet)
   ============================================================================== */
.sidebar.collapsed {
  width: 72px;
}
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-count,
.sidebar.collapsed .brand-badge,
.sidebar.collapsed .workspace-info,
.sidebar.collapsed .nav-item span {
  display: none !important;
}
.sidebar.collapsed .sidebar-header {
  padding: 0 10px;
  justify-content: center;
}
.sidebar.collapsed .brand {
  justify-content: center;
  gap: 0;
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px;
  position: relative;
}
.sidebar.collapsed .nav-item .icon {
  margin: 0;
  width: 22px;
  height: 22px;
}
.sidebar.collapsed .sidebar-footer {
  padding: 12px 6px;
  justify-content: center;
}
.sidebar.collapsed .workspace-badge {
  justify-content: center;
  padding: 8px;
}
.sidebar.collapsed .sidebar-close-btn {
  display: none;
}

/* Floating Glass Tooltip on Hover in Collapsed Mode */
.sidebar.collapsed .nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}
.sidebar.collapsed .nav-item:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(4px);
}

.sidebar-close-btn {
  display: none;
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: var(--radius-sm);
  padding: 6px;
  color: var(--navy-700);
  cursor: pointer;
  transition: all 0.2s ease;
}
.sidebar-close-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ==========================================================================
   Header / Top Navigation (Light Frosted Glass)
   ========================================================================== */
.top-header {
  width: 100%;
  box-sizing: border-box;
  height: var(--header-height);
  background: var(--glass-header);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 20px -2px rgba(31, 38, 135, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
  z-index: 50;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
}

.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.95);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--navy-700);
  cursor: pointer;
  box-shadow: var(--glass-shadow-sm);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
  background: #ffffff;
  color: var(--primary-600);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--navy-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb-root {
  font-weight: 700;
  color: #1e3a8a;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.breadcrumb-separator {
  color: var(--navy-300);
  user-select: none;
}

.breadcrumb-current {
  font-weight: 700;
  color: var(--navy-900);
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.header-action-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-700);
  cursor: pointer;
  position: relative;
  box-shadow: var(--glass-shadow-sm);
  backdrop-filter: blur(6px);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.header-action-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 38, 135, 0.08);
}

.badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background-color: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.header-divider {
  width: 1px;
  height: 24px;
  background: rgba(226, 232, 240, 0.8);
  flex-shrink: 0;
}

.btn-header-create {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--primary-600), #1d4ed8);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.btn-header-create:hover {
  background: linear-gradient(135deg, var(--primary-700), #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--glass-shadow-sm);
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.user-profile-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 38, 135, 0.08);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: var(--white);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.25;
  white-space: nowrap;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.2;
  white-space: nowrap;
}

.user-role {
  font-size: 0.68rem;
  color: var(--navy-500);
  font-weight: 500;
  white-space: nowrap;
}

/* ==========================================================================
   Main Content Views
   ========================================================================== */
.content-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  z-index: 2;
}

.view-section {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.view-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* View Header */
.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.view-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.view-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.view-subtitle {
  font-size: 0.88rem;
  color: var(--navy-600);
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Dashboard Overview Cards (Light Glassmorphic Stat Cards)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: var(--glass-shadow-hover);
  border-color: rgba(255, 255, 255, 1);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card.active-filter {
  border-color: var(--primary-500);
  box-shadow: var(--glass-shadow-active);
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy-500);
}

.stat-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
}

.stat-icon-total     { background: rgba(100, 116, 139, 0.12); color: var(--navy-700); }
.stat-icon-progress  { background: rgba(37, 99, 235, 0.12); color: var(--primary-600); }
.stat-icon-transit   { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.stat-icon-completed { background: rgba(16, 185, 129, 0.14); color: #059669; }
.stat-icon-delayed   { background: rgba(239, 68, 68, 0.14); color: #dc2626; }
.stat-icon-return    { background: rgba(225, 29, 72, 0.14); color: #be123c; }

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.1;
  margin-bottom: 6px;
  font-feature-settings: "tnum";
}

.stat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--navy-500);
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  backdrop-filter: blur(4px);
}

.trend-up {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.trend-down {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.trend-neutral {
  background: rgba(100, 116, 139, 0.1);
  color: var(--navy-600);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

/* ==========================================================================
   Dashboard Two-Column Grid (Chart + Timeline)
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--glass-shadow-hover);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.35);
}

.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-action-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-600);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.card-action-link:hover {
  color: var(--primary-700);
  transform: translateX(2px);
}

.card-body {
  padding: 22px;
}

/* Tracking Status Breakdown Bar */
.chart-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.status-breakdown-bar {
  display: flex;
  height: 12px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  gap: 2px;
  padding: 2px;
}

.bar-segment {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}

.bar-completed  { background: linear-gradient(90deg, #10b981, #059669); box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.bar-transit    { background: linear-gradient(90deg, #f59e0b, #d97706); box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.bar-processing { background: linear-gradient(90deg, #3b82f6, #2563eb); box-shadow: 0 0 8px rgba(37, 99, 235, 0.4); }
.bar-delayed    { background: linear-gradient(90deg, #ef4444, #dc2626); box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.bar-return     { background: linear-gradient(90deg, #f43f5e, #be123c); box-shadow: 0 0 8px rgba(225, 29, 72, 0.4); }
.bar-created    { background: linear-gradient(90deg, #94a3b8, #64748b); }

.chart-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--navy-600);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.legend-count {
  font-weight: 700;
  color: var(--navy-900);
  margin-left: auto;
}

/* Weekly Throughput Visual */
.throughput-section {
  padding-top: 18px;
  border-top: 1px dashed rgba(226, 232, 240, 0.8);
}

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

.throughput-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy-700);
}

.weekly-bars-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 110px;
  padding: 10px 10px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.day-bar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
  width: 38px;
}

.day-bar-fill {
  width: 22px;
  background: rgba(203, 213, 225, 0.6);
  border-radius: 6px 6px 0 0;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.day-bar-fill:hover,
.day-bar-fill.active {
  background: linear-gradient(180deg, var(--primary-500), var(--primary-600));
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.35);
}

.day-bar-label {
  font-size: 0.72rem;
  color: var(--navy-500);
  font-weight: 700;
}

/* Timeline Components */
.timeline-list {
  display: flex;
  flex-direction: column;
  position: relative;
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 17px;
  width: 2px;
  background: rgba(203, 213, 225, 0.6);
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  position: relative;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(203, 213, 225, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
  color: var(--navy-600);
  font-size: 0.8rem;
  box-shadow: var(--glass-shadow-sm);
  transition: all var(--transition-fast);
}

.timeline-item.active .timeline-node {
  border-color: var(--primary-500);
  background: rgba(239, 246, 255, 0.95);
  color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.timeline-item.done .timeline-node {
  border-color: #10b981;
  background: rgba(236, 253, 245, 0.95);
  color: #059669;
}

.timeline-item.delayed .timeline-node {
  border-color: #ef4444;
  background: rgba(254, 242, 242, 0.95);
  color: #dc2626;
}

.timeline-content {
  flex: 1;
}

.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.timeline-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-900);
}

.timeline-time {
  font-size: 0.72rem;
  color: var(--navy-400);
  font-family: var(--font-mono);
}

.timeline-desc {
  font-size: 0.8rem;
  color: var(--navy-600);
  line-height: 1.4;
  margin-bottom: 6px;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--navy-500);
}

.timeline-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--navy-700);
}

/* ==========================================================================
   Monitoring Kiriman Aktif (Active Shipments Monitoring)
   ========================================================================== */
.monitoring-card {
  margin-bottom: 28px;
}

.monitoring-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.monitoring-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.btn-monitor-filter {
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--navy-600);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-monitor-filter:hover {
  color: var(--navy-900);
}

.btn-monitor-filter.active {
  background: var(--white);
  color: var(--primary-600);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.active-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.telemetry-item-card {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--glass-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.telemetry-item-card:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
}

.telemetry-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-600);
}

.telemetry-item-card.delayed-border::before {
  background: #dc2626;
}

.telemetry-item-card.processing-border::before {
  background: #3b82f6;
}

.telemetry-item-card.return-border::before {
  background: #be123c;
}

.telemetry-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.telemetry-cargo-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.3;
}

.telemetry-sub-info {
  font-size: 0.74rem;
  color: var(--navy-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.telemetry-sensor-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
}

.telemetry-sensor-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--navy-700);
}

.telemetry-route-tracker {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.telemetry-route-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--navy-600);
  font-weight: 600;
}

.telemetry-progress-line {
  height: 5px;
  border-radius: var(--radius-full);
  background: rgba(203, 213, 225, 0.5);
  overflow: hidden;
}

.telemetry-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #3b82f6, #10b981);
}

.telemetry-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  font-size: 0.74rem;
}

/* ==========================================================================
   Table & Filter Toolbar (Frosted Glass)
   ========================================================================== */
.table-filter-toolbar {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--glass-shadow-sm);
}

.filter-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}

.filter-search-box {
  position: relative;
  min-width: 240px;
  flex: 1;
}

.filter-search-input {
  width: 100%;
  height: 38px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  padding: 0 12px 0 34px;
  font-size: 0.82rem;
  color: var(--navy-800);
  backdrop-filter: blur(6px);
  transition: all var(--transition-fast);
}

.filter-search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--primary-600);
  box-shadow: var(--glass-shadow-active);
}

.filter-select {
  height: 38px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 0.82rem;
  color: var(--navy-800);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all var(--transition-fast);
}

.filter-select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--primary-600);
  box-shadow: var(--glass-shadow-active);
}

.filter-date-input {
  height: 38px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 0.82rem;
  color: var(--navy-800);
  backdrop-filter: blur(6px);
}

.btn-reset-filter {
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy-600);
  cursor: pointer;
  box-shadow: var(--glass-shadow-sm);
  backdrop-filter: blur(6px);
  transition: all var(--transition-fast);
}

.btn-reset-filter:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy-900);
  transform: translateY(-1px);
}

.filter-right-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Data Table Styling (Frosted Glass Table)
   ========================================================================== */
.table-responsive-container,
.table-responsive {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.table-responsive::-webkit-scrollbar,
.table-responsive-container::-webkit-scrollbar {
  height: 6px;
}
.table-responsive::-webkit-scrollbar-track,
.table-responsive-container::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.6);
}
.table-responsive::-webkit-scrollbar-thumb,
.table-responsive-container::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb:hover,
.table-responsive-container::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
}

.data-table th {
  background: rgba(248, 250, 252, 0.85);
  color: var(--navy-700);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-bottom: 1.5px solid rgba(226, 232, 240, 0.95);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.65);
  vertical-align: middle;
  color: var(--navy-800);
  font-size: 0.78rem;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.8);
}

.tracking-id-cell {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-600);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tracking-id-cell:hover {
  text-decoration: underline;
  color: var(--primary-700);
}

.item-cell {
  display: flex;
  flex-direction: column;
}

.item-name {
  font-weight: 700;
  color: var(--navy-900);
}

.item-code {
  font-size: 0.72rem;
  color: var(--navy-400);
  font-family: var(--font-mono);
}

/* Glassmorphic Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px currentColor;
}

.badge-created {
  background-color: var(--status-created-bg);
  color: var(--status-created-text);
  border: 1px solid var(--status-created-border);
}
.badge-created::before { background-color: var(--status-created-text); }

.badge-processing {
  background-color: var(--status-processing-bg);
  color: var(--status-processing-text);
  border: 1px solid var(--status-processing-border);
}
.badge-processing::before { background-color: var(--status-processing-text); }

.badge-in-transit {
  background-color: var(--status-transit-bg);
  color: var(--status-transit-text);
  border: 1px solid var(--status-transit-border);
}
.badge-in-transit::before { background-color: var(--status-transit-text); }

.badge-received {
  background-color: var(--status-received-bg);
  color: var(--status-received-text);
  border: 1px solid var(--status-received-border);
}
.badge-received::before { background-color: var(--status-received-text); }

.badge-completed {
  background-color: var(--status-completed-bg);
  color: var(--status-completed-text);
  border: 1px solid var(--status-completed-border);
}
.badge-completed::before { background-color: var(--status-completed-text); }

.badge-delayed {
  background-color: var(--status-delayed-bg);
  color: var(--status-delayed-text);
  border: 1px solid var(--status-delayed-border);
}
.badge-delayed::before { background-color: var(--status-delayed-text); }

.badge-return {
  background-color: var(--status-return-bg);
  color: var(--status-return-text);
  border: 1px solid var(--status-return-border);
}
.badge-return::before { background-color: var(--status-return-text); }

/* Assigned User Cell */
.user-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-cell-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.9), rgba(203, 213, 225, 0.8));
  color: var(--navy-800);
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--glass-shadow-sm);
}

/* Action Buttons */
.action-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon-action {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  color: var(--navy-600);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--glass-shadow-sm);
  transition: all var(--transition-fast);
}

.btn-icon-action:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-600);
  border-color: var(--primary-600);
  transform: translateY(-1px);
}

.btn-table-detail {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: var(--navy-800);
  cursor: pointer;
  box-shadow: var(--glass-shadow-sm);
  transition: all var(--transition-fast);
}

.btn-table-detail:hover {
  background: var(--primary-600);
  color: var(--white);
  border-color: var(--primary-600);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}

/* Table Footer / Pagination */
.table-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.45);
}

.table-summary-text {
  font-size: 0.78rem;
  color: var(--navy-500);
  font-weight: 600;
}

.pagination-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-page {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy-700);
  cursor: pointer;
  box-shadow: var(--glass-shadow-sm);
}

.btn-page.active {
  background: var(--primary-600);
  color: var(--white);
  border-color: var(--primary-600);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   Tracking Detail View (Glassmorphic Deep Dive)
   ========================================================================== */
.detail-top-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--glass-shadow);
}

.detail-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.detail-id-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-id-badge {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-item-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-900);
}

.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-advance-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--primary-600), #1d4ed8);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  transition: all var(--transition-fast);
}

.btn-advance-status:hover {
  background: linear-gradient(135deg, var(--primary-700), #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

/* Progress Tracker / Stepper */
.progress-stepper-container {
  padding: 10px 0 16px;
}

.stepper-header {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy-500);
  margin-bottom: 20px;
}

.stepper-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 0 40px;
}

.stepper-track::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(203, 213, 225, 0.6);
  z-index: 1;
}

.stepper-progress-fill {
  position: absolute;
  top: 18px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
  z-index: 2;
  transition: width 0.4s ease;
}

.step-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 3;
  cursor: pointer;
}

.step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 3px solid rgba(203, 213, 225, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-600);
  box-shadow: var(--glass-shadow-sm);
  transition: all var(--transition-fast);
}

.step-point.active .step-circle {
  border-color: var(--primary-600);
  background: var(--primary-600);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22), 0 4px 12px rgba(37, 99, 235, 0.3);
}

.step-point.completed .step-circle {
  border-color: #10b981;
  background: #10b981;
  color: var(--white);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.step-label {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy-600);
  text-align: center;
  white-space: nowrap;
}

.step-point.active .step-label {
  color: var(--primary-600);
  font-weight: 700;
}

.step-point.completed .step-label {
  color: #047857;
  font-weight: 700;
}

/* Detail Split Grid */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.info-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
}

.info-item-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.info-item-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-900);
}

.info-item-full {
  grid-column: 1 / -1;
}

/* ==========================================================================
   Create Tracking Form (Glassmorphic Form Card)
   ========================================================================== */
.form-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--glass-shadow);
  max-width: 900px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-700);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-required {
  color: #ef4444;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  height: 40px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 0.85rem;
  color: var(--navy-900);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all var(--transition-fast);
}

.form-textarea {
  height: 90px;
  padding: 10px 14px;
  resize: vertical;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--primary-600);
  box-shadow: var(--glass-shadow-active);
}

.priority-selector {
  display: flex;
  gap: 8px;
}

.priority-option {
  flex: 1;
  text-align: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--glass-shadow-sm);
  transition: all var(--transition-fast);
  color: var(--navy-700);
}

.priority-option.selected {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.priority-option.selected.p-urgent {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.priority-option.selected.p-high {
  background: #ea580c;
  border-color: #ea580c;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.priority-option.selected.p-medium {
  background: #0284c7;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.priority-option.selected.p-low {
  background: #64748b;
  border-color: #64748b;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(226, 232, 240, 0.7);
}

.btn-secondary {
  height: 40px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-700);
  cursor: pointer;
  box-shadow: var(--glass-shadow-sm);
  backdrop-filter: blur(6px);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy-900);
  transform: translateY(-1px);
}

.btn-primary {
  height: 40px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--primary-600), #1d4ed8);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-700), #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

/* ==========================================================================
   Locations Hub & Users Grid (Glass Cards)
   ========================================================================== */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.location-hub-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.location-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-hover);
}

.hub-type-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-600);
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  display: inline-block;
  margin-bottom: 8px;
}

.hub-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 4px;
}

.hub-city {
  font-size: 0.78rem;
  color: var(--navy-500);
  margin-bottom: 14px;
}

.hub-metric-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  font-size: 0.78rem;
}

.hub-metric-label {
  color: var(--navy-500);
}

.hub-metric-val {
  font-weight: 700;
  color: var(--navy-900);
}

/* ==========================================================================
   Toast Notification System (Frosted Glass Dark Toast)
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.toast {
  min-width: 320px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--white);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--primary-600);
}

.toast.toast-success {
  border-left-color: #10b981;
}

.toast.toast-warning {
  border-left-color: #f59e0b;
}

.toast.toast-error {
  border-left-color: #ef4444;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}


/* ==============================================================================
   Shipment Management Modern Input Design System
   ============================================================================== */
.step-num-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

/* Unified Single Form System */
.unified-form-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  box-shadow: 0 4px 20px -2px rgba(31, 38, 135, 0.05);
}

.form-section-block {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.form-section-block:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.form-section-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.form-section-cat {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-600);
}

.form-section-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 2px 0 0 0;
}

.form-footer-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1.5px solid rgba(226, 232, 240, 0.95);
  flex-wrap: wrap;
  gap: 14px;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #334155;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label .required {
  color: #ef4444;
  margin-left: 3px;
  font-weight: 800;
}

.form-hint {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 6px;
  font-style: normal;
}

/* Modern Input Group with Icon & Suffix */
.input-icon-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon-box .input-icon-left {
  position: absolute;
  left: 14px;
  color: #64748b;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.input-icon-box:focus-within .input-icon-left {
  color: #2563eb;
  transform: scale(1.1);
}

.input-suffix-badge {
  position: absolute;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 6px;
  padding: 3px 8px;
  pointer-events: none;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
  z-index: 2;
}

/* Modern Form Controls */
.form-control,
.form-select,
textarea.form-control {
  width: 100%;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(203, 213, 225, 0.85);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  color: #0f172a;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

/* Custom Styled Select with Modern SVG Chevron */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 15px 15px;
  padding-right: 38px !important;
  cursor: pointer;
}

.form-select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Modern Datetime-local Input */
input[type="datetime-local"].form-control {
  position: relative;
  cursor: pointer;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.55;
  margin-right: 46px;
  filter: invert(0.3) sepia(1) saturate(5) hue-rotate(190deg);
  transition: all 0.2s ease;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  transform: scale(1.12);
}

/* Remove default number spin buttons for clean sleek look */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Placeholder styling */
.form-control::placeholder,
textarea.form-control::placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 0.84rem;
}

textarea.form-control {
  height: auto;
  min-height: 80px;
  padding: 10px 14px;
  resize: vertical;
  line-height: 1.5;
}

.input-icon-box .form-control,
.input-icon-box .form-select {
  padding-left: 42px;
}

.input-icon-box.has-suffix .form-control {
  padding-right: 74px;
}

.form-control:hover,
.form-select:hover,
textarea.form-control:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.15), 0 4px 12px rgba(37, 99, 235, 0.08);
}

.form-control[readonly],
.form-control:disabled {
  background: rgba(241, 245, 249, 0.75);
  border-color: rgba(226, 232, 240, 0.9);
  color: #475569;
  cursor: not-allowed;
}

/* Modern Subcards (Pengirim / Penerima) */
.modern-subcard {
  background: rgba(255, 255, 255, 0.78);
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modern-subcard:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(203, 213, 225, 1);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.06);
}

.modern-subcard.sender-card {
  border-top: 3.5px solid #2563eb;
}

.modern-subcard.receiver-card {
  border-top: 3.5px solid #059669;
}

/* Option Pill Chips for Checkboxes */
.option-chips-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.7);
}

.option-pill-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.option-pill-chip:hover {
  background: #ffffff;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.option-pill-chip input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #2563eb;
  cursor: pointer;
  margin: 0;
}

.option-pill-chip.selected {
  background: rgba(239, 246, 255, 0.98);
  border-color: #2563eb;
  color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.12);
}

.option-pill-chip.selected svg {
  stroke: #2563eb;
}

/* Route Flow Graphic */
.route-flow-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.85) 0%, rgba(248, 250, 252, 0.75) 50%, rgba(236, 253, 245, 0.85) 100%);
  border: 1.5px solid rgba(219, 234, 254, 0.9);
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 0.8rem;
  backdrop-filter: blur(8px);
}

.route-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.route-dot.origin-dot {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.route-dot.dest-dot {
  background: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25);
}

/* ==============================================================================
   TraceTrack Responsive & Mobility System - Mobile Bottom Nav & Touch Ergonomics
   ============================================================================== */

/* Modern Frosted Glass Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  z-index: 1000;
  padding: 4px 6px max(4px, env(safe-area-inset-bottom, 0px)) 6px;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 5px 4px;
  border-radius: 10px;
  flex: 1;
  max-width: 72px;
  min-height: 48px;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-btn .icon {
  width: 20px;
  height: 20px;
  transition: transform 0.18s ease, color 0.18s ease;
}

.mobile-nav-btn:active {
  transform: scale(0.92);
}

.mobile-nav-btn.active {
  color: #2563eb;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.08);
}

.mobile-nav-btn.active .icon {
  transform: scale(1.12);
  color: #2563eb;
}

.mobile-nav-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.58rem;
  font-weight: 800;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  padding: 1px 5px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* Off-Canvas Mobile Drawer Backdrop Permanently Neutralized */
.drawer-backdrop,
.drawer-backdrop.active {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: transparent !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  z-index: -9999 !important;
}

body.drawer-locked {
  overflow: visible !important;
}

/* ==============================================================================
   RESPONSIVE BREAKPOINTS — TraceTrack Full Layout System
   Breakpoints:
     1280px  : Large Tablet / Small Laptop
     1024px  : iPad / Portrait Tablet
      860px  : Sidebar Collapses (Off-Canvas)
      768px  : Mobile Bottom Nav Appears
      640px  : Compact Mobile
      480px  : Small Phone
      360px  : Very Small / Legacy Phone
   ============================================================================== */

/* --- <= 1280px : Large Tablet / Small Laptop --- */
@media (max-width: 1280px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1.6fr 1fr;
  }
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .active-telemetry-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  .quick-search-input {
    width: 210px;
  }
}

/* --- <= 1024px : Responsive Screen (Tablet & Mobile: Sidebar Dihilangkan, Navigasi Bottombar Eksklusif) --- */
@media (max-width: 1024px) {
  /* 1. Hilangkan Sidebar dan Drawer sepenuhnya pada semua layar responsif */
  .sidebar {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    transform: translateX(-100%) !important;
  }
  .sidebar-toggle-btn {
    display: none !important;
    visibility: hidden !important;
  }
  .drawer-backdrop {
    display: none !important;
  }
  .sidebar-close-btn {
    display: none !important;
  }

  /* 2. Container & Main Wrapper Full-Width */
  .app-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
  }
  .main-wrapper {
    width: 100% !important;
    max-width: 100vw !important;
    flex: 1 !important;
  }

  /* 3. Tampilkan Bottom Navigation Bar sebagai satu-satunya menu navigasi responsif */
  .mobile-bottom-nav {
    display: flex !important;
  }

  /* 4. Ruang padding bawah konten agar tidak tertutup bottom bar */
  .content-scrollable {
    padding: 14px 14px calc(84px + env(safe-area-inset-bottom, 0px)) 14px !important;
  }

  .top-header {
    padding: 0 16px;
    height: 58px;
  }

  .shipment-form-layout {
    grid-template-columns: 1fr !important;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .info-list-grid {
    grid-template-columns: 1fr;
  }
  .card-grid-3 {
    grid-template-columns: 1fr;
  }
  div[style*="grid-template-columns: 1fr 1.4fr"],
  div[style*="grid-template-columns:1fr 1.4fr"],
  div[style*="grid-template-columns: 340px 1fr"],
  div[style*="grid-template-columns:340px 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .stepper-track {
    margin: 0 10px;
  }
  .table-responsive-container {
    -webkit-overflow-scrolling: touch;
  }
  .quick-search-input {
    width: 190px;
  }
  .quick-search-input:focus {
    width: 230px;
  }
}

/* --- <= 768px : Mobile Bottom Nav, Compact Header, Single-Column --- */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }
  .content-scrollable {
    padding: 14px 14px 84px 14px !important;
  }
  .top-header {
    padding: 0 14px;
    height: 56px;
  }

  /* View header: stack title + action buttons */
  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }
  .view-title {
    font-size: 1.2rem;
  }
  .view-subtitle {
    font-size: 0.78rem;
  }
  .view-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .view-actions .btn-primary,
  .view-actions .btn-secondary {
    flex: 1;
    min-width: 130px;
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Detail header */
  .detail-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .detail-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .detail-header-actions .btn-advance-status,
  .detail-header-actions .btn-secondary,
  .detail-header-actions .btn-primary {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }

  /* Stepper: horizontally scrollable */
  .stepper-track {
    margin: 0 4px;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 10px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .stepper-track::before {
    display: none;
  }
  .stepper-progress-fill {
    display: none;
  }
  .step-label {
    white-space: normal;
    max-width: 64px;
    text-align: center;
    font-size: 0.72rem;
  }
  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  .step-point {
    min-width: 64px;
  }

  .info-list-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-row,
  .modern-subcard-grid,
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* GPS & Live Map side panels: stack */
  div[style*="grid-template-columns: 1fr 1.4fr"],
  div[style*="grid-template-columns:1fr 1.4fr"],
  div[style*="grid-template-columns: 340px 1fr"],
  div[style*="grid-template-columns:340px 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Filter toolbar */
  .table-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .filter-left-group {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-right-group {
    width: 100%;
    flex-wrap: wrap;
  }
  .filter-search-box {
    min-width: unset;
    width: 100%;
  }
  .filter-select,
  .filter-date-input {
    width: 100%;
  }

  /* Monitoring controls */
  .monitoring-header-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .monitoring-filter-group {
    width: 100%;
    flex-wrap: wrap;
  }

  .card-grid-3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .active-telemetry-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Modals: bottom sheet */
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
  }
  .modal-dialog,
  div[style*="max-width: 860px"],
  div[style*="max-width: 820px"],
  div[style*="max-width: 700px"],
  div[style*="max-width: 680px"],
  div[style*="max-width: 640px"] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 92dvh !important;
    overflow-y: auto !important;
  }

  /* Touch targets */
  .form-control,
  .form-select,
  textarea.form-control,
  .form-input,
  .btn-primary,
  .btn-secondary {
    min-height: 46px;
    font-size: 0.9rem;
  }
  .option-chips-container {
    flex-direction: column;
    align-items: stretch;
  }
  .option-pill-chip {
    width: 100%;
    justify-content: flex-start;
  }

  /* Header: hide non-essential */
  .quick-search-box {
    display: none;
  }
  .user-meta {
    display: none;
  }
  .live-indicator {
    display: none;
  }
  .btn-header-create span {
    display: none;
  }
  .btn-header-create {
    padding: 0 10px;
    width: 38px;
    height: 38px;
    justify-content: center;
  }
  .header-divider {
    display: none;
  }

  /* Toast: above bottom nav */
  .toast-container {
    bottom: 76px;
    right: 12px;
    left: 12px;
  }
  .toast {
    min-width: unset;
    width: 100%;
  }

  /* Map height */
  div[id="gpsMapCanvas"],
  div[id="liveMapCanvas"],
  div[style*="height: 480px"],
  div[style*="height:480px"],
  div[style*="height: 500px"],
  div[style*="height:500px"] {
    height: 300px !important;
    min-height: 260px !important;
  }
}

/* --- <= 640px : Compact Mobile --- */
@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-value {
    font-size: 1.55rem;
  }
  .stat-title {
    font-size: 0.72rem;
  }
  .content-scrollable {
    padding: 12px 12px 84px 12px !important;
  }
  .card-body {
    padding: 14px;
  }
  .card-header {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .card-title {
    font-size: 0.88rem;
  }
  .table-responsive-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table {
    min-width: 560px;
  }
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  .table-footer {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .pagination-group {
    width: 100%;
    flex-wrap: wrap;
  }
  .timeline-item {
    gap: 12px;
    padding-bottom: 16px;
  }
  .timeline-node {
    width: 30px;
    height: 30px;
  }
  .route-flow-bar {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.74rem;
  }
}

/* --- <= 480px : Small Phone --- */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .view-title {
    font-size: 1.1rem;
  }
  .monitoring-filter-group {
    width: 100%;
  }
  .monitoring-header-controls {
    width: 100%;
    justify-content: space-between;
  }
  .step-label {
    font-size: 0.65rem;
    max-width: 52px;
  }
  .mobile-nav-btn {
    min-width: 46px;
    font-size: 0.6rem;
    padding: 4px 6px;
  }
  .modal-dialog,
  div[style*="max-width: 860px"],
  div[style*="max-width: 820px"],
  div[style*="max-width: 700px"],
  div[style*="max-width: 680px"],
  div[style*="max-width: 640px"] {
    max-height: 96dvh !important;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions .btn-primary,
  .form-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .progress-stepper-container {
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .stepper-track {
    min-width: max-content;
  }
  .sidebar-footer {
    display: none;
  }
  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 0.76rem;
  }
  .stat-card {
    padding: 14px 12px;
  }
}

/* --- <= 360px : Very Small / Legacy Phone --- */
@media (max-width: 360px) {
  .content-scrollable {
    padding: 10px 10px 80px 10px !important;
  }
  .top-header {
    padding: 0 10px;
    height: 52px;
  }
  .mobile-nav-btn {
    min-width: 40px;
    font-size: 0;
    padding: 4px;
  }
  .mobile-nav-btn .icon {
    width: 22px;
    height: 22px;
  }
  .brand-text {
    display: none;
  }
  .header-right {
    gap: 6px;
  }
  .stat-value {
    font-size: 1.35rem;
  }
  .stat-card {
    padding: 12px 10px;
  }
  .toast {
    font-size: 0.78rem;
    padding: 10px 12px;
  }
}

/* ==============================================================================
   DESKTOP FLOATING SUMMARY CARD (Shipment Management)
   Compact 1-frame height, sticky floating with scroll
   ============================================================================== */
.shipment-form-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: stretch;
  position: relative;
}

.desktop-floating-summary {
  position: relative;
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  height: 100%;
}

.summary-sticky-card {
  position: -webkit-sticky;
  position: sticky;
  top: 16px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(203, 213, 225, 0.85);
  border-radius: 14px;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transition: top 0.15s ease, box-shadow 0.2s ease;
}

.summary-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #f1f5f9;
}

.summary-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-badge-live {
  font-size: 0.62rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.summary-content-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.summary-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5px 0;
  border-bottom: 1px dashed #f1f5f9;
  font-size: 0.76rem;
  gap: 8px;
}

.summary-item-row:last-child {
  border-bottom: none;
}

.summary-label {
  color: #64748b;
  font-weight: 500;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.summary-value {
  color: #0f172a;
  font-weight: 700;
  text-align: right;
  font-size: 0.76rem;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-value.awb-badge {
  font-family: var(--font-mono);
  color: #2563eb;
  background: #eff6ff;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}

.summary-dual-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 3px 0;
  background: #f8fafc;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.summary-dual-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.summary-dual-item:nth-child(2) {
  border-left: 1px solid #e2e8f0;
  padding-left: 8px;
}

.summary-dual-label {
  font-size: 0.62rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.summary-dual-val {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-value.eta-badge {
  font-family: var(--font-mono);
  color: #059669;
  background: #ecfdf5;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #a7f3d0;
  font-size: 0.72rem;
}

.summary-btn-submit {
  width: 100%;
  margin-top: 10px;
  height: 38px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
}

.summary-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

@media (max-width: 1024px) {
  .shipment-form-layout {
    grid-template-columns: 1fr !important;
  }
  .desktop-floating-summary {
    position: static;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto;
  }
  .summary-sticky-card {
    position: static;
    width: 100%;
    margin-top: 16px;
  }
}

/* ==========================================================================
   Universal Table Pagination Component (10 rows/page)
   ========================================================================== */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-radius: 0 0 12px 12px;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  box-sizing: border-box;
}

.pagination-info {
  color: #475569;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-info strong {
  color: #0f172a;
  font-weight: 700;
}

.pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  user-select: none;
  font-family: inherit;
  line-height: 1;
}

.pagination-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1d4ed8;
}

.pagination-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

