/* ==========================================================================
   ShipPulse Unified Enterprise Portal • Modern Design System
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Theme Tokens - Dark Mode Default */
  --bg-canvas: #090d16;
  --bg-sidebar: #0d121f;
  --bg-surface: #111827;
  --bg-card: #151f32;
  --bg-card-hover: #1c2942;
  --bg-input: #1a2438;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(59, 130, 246, 0.3);
  --border-focus: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;

  --blue: #3b82f6;
  --blue-hover: #2563eb;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #ef4444;
  --purple: #8b5cf6;

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.2);
}

/* Light Mode Overrides */
body.light-theme {
  --bg-canvas: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  
  --border-subtle: #e2e8f0;
  --border-glow: rgba(59, 130, 246, 0.2);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-sub: #64748b;

  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-canvas);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── App Layout Shell ──────────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar Navigation & Collapsible Behavior ────────────────────────────── */
.app-sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  flex-shrink: 0;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              min-width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease,
              border-color 0.2s ease;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 50;
}

.sidebar-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-sidebar-collapse {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-sidebar-collapse:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  color: var(--text-main);
  transform: translateX(-2px);
}

/* Collapsed Sidebar Rules */
.app-layout.sidebar-collapsed .app-sidebar {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  border-right: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.app-layout.sidebar-collapsed .content-stage {
  padding: 16px 20px;
}

/* Sidebar Toggle Button in Topbar */
.btn-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-sidebar-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-1px);
}

.btn-sidebar-toggle .sidebar-toggle-icon {
  font-size: 14px;
  line-height: 1;
}

.app-layout.sidebar-collapsed .btn-sidebar-toggle {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.25);
}

.btn-secondary#btnToggleTableWide.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  font-weight: 700;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box {
  font-size: 24px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid var(--border-glow);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.logo-text h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.logo-text small {
  font-size: 11px;
  color: var(--text-sub);
  display: block;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.profile-role {
  font-size: 11px;
  color: var(--blue);
  font-weight: 600;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.nav-item.active {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 7px;
  border-radius: 10px;
}

.nav-badge.alert {
  background: var(--rose);
  color: #ffffff;
}

.nav-pill-live {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 6px;
  border-radius: 8px;
}

.sidebar-footer {
  display: flex;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.btn-theme-toggle, .btn-logout {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-theme-toggle:hover, .btn-logout:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

/* ── Main Workspace ───────────────────────────────────────────────────────── */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-topbar {
  height: 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.workspace-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.server-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse-ring 1.8s infinite;
}

.topbar-search {
  position: relative;
  width: 320px;
}

.topbar-search input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 12px 8px 34px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}

.topbar-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--text-sub);
}

/* ── Content Stage ────────────────────────────────────────────────────────── */
.content-stage {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.view-panel {
  display: none;
  animation: fade-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-panel.active {
  display: block;
}

.page-title-wrap {
  margin-bottom: 20px;
}

.page-title-wrap h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.page-title-wrap p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

.title-with-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.action-btn-group {
  display: flex;
  gap: 10px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary, .btn-primary-action {
  background: linear-gradient(135deg, var(--blue), var(--blue-hover));
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover, .btn-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 10px;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}

.btn-small {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ── KPI Grid ─────────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
}

.kpi-card.blue::before { background: var(--blue); }
.kpi-card.amber::before { background: var(--amber); }
.kpi-card.green::before { background: var(--emerald); }
.kpi-card.red::before { background: var(--rose); }
.kpi-card.purple::before { background: var(--purple); }

.kpi-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.kpi-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  margin: 6px 0 4px 0;
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-sub);
}

.quick-action-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.btn-action-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: all 0.2s;
  color: var(--text-main);
}

.btn-action-tile:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.btn-action-tile .icon {
  font-size: 28px;
}

.btn-action-tile strong {
  display: block;
  font-size: 14px;
}

.btn-action-tile small {
  font-size: 12px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SUPER PARCEL MODERN ORDERS & LOGISTICS UI (High-Legibility Enterprise System)
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. Page Header */
.superparcel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 16px;
}

.superparcel-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-main);
  line-height: 1.2;
}

.superparcel-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.superparcel-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-superparcel-primary {
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
  transition: all 0.15s ease;
}

.btn-superparcel-primary:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-superparcel-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 9px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-superparcel-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--blue);
}

/* 2. Horizontal Status Tabs Bar (Super Parcel Underline Tab Style) */
.superparcel-tabs-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.superparcel-tabs-bar::-webkit-scrollbar {
  display: none;
}

.superparcel-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 2px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.superparcel-tab:hover {
  color: var(--text-main);
}

.superparcel-tab.active {
  color: #2563EB;
  font-weight: 700;
  border-bottom-color: #2563EB;
}

body.dark-theme .superparcel-tab.active {
  color: #60A5FA;
  border-bottom-color: #60A5FA;
}

.tab-badge-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  line-height: 1;
}

.tab-badge-count.red {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 3. Toolbar: Title, Search, Columns, Sync */
.superparcel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 14px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.superparcel-count-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
}

body.dark-theme .superparcel-count-badge {
  color: #34D399;
}

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

.superparcel-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-inside {
  position: absolute;
  left: 12px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0.6;
}

.superparcel-search-input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 14px 8px 34px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-main);
  width: 250px;
  outline: none;
  transition: all 0.15s ease;
}

.superparcel-search-input:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Columns Customizer Popover */
.columns-customizer-wrap {
  position: relative;
}

.btn-columns-toggle {
  padding: 8px 14px;
}

.columns-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  padding: 12px 14px;
  z-index: 100;
  width: 230px;
}

.columns-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.columns-popover-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.columns-popover-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 4px;
}

.columns-popover-list label:hover {
  background: var(--bg-card-hover);
}

.btn-superparcel-sync {
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-superparcel-sync:hover {
  background: #2563EB;
  color: #FFFFFF;
}

body.dark-theme .btn-superparcel-sync {
  color: #60A5FA;
  border-color: rgba(96, 165, 250, 0.3);
}

.btn-superparcel-bulk-sync {
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-superparcel-bulk-delete {
  background: #DC2626;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* 4. Super Parcel High-Legibility Table */
.superparcel-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.superparcel-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.superparcel-table thead {
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 10;
}

.superparcel-table th {
  padding: 13px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.superparcel-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
  font-size: 13.5px;
}

.superparcel-table tbody tr {
  transition: background 0.1s ease;
}

.superparcel-table tbody tr:hover {
  background: var(--bg-card-hover);
}

/* Column Hiding Utility Class */
.col-hidden {
  display: none !important;
}

/* Row-level typography */
.sp-order-code {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.sp-tracking-code {
  font-size: 13.5px;
  font-weight: 600;
  color: #2563EB;
  cursor: pointer;
}

body.dark-theme .sp-tracking-code {
  color: #60A5FA;
}

.sp-carrier-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.sp-carrier-badge.dpworld {
  background: rgba(249, 115, 22, 0.15);
  color: #EA580C;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.sp-carrier-badge.delhivery {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sp-carrier-badge.ekart {
  background: rgba(59, 130, 246, 0.15);
  color: #2563EB;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.sp-customer-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  display: block;
}

.sp-customer-phone {
  font-size: 12px;
  color: var(--text-sub);
  display: block;
  margin-top: 1px;
}

.sp-plain-date {
  font-size: 13.5px;
  color: var(--text-main);
  font-weight: 500;
  white-space: nowrap;
}

/* Clean Status Pills */
.sp-status-pill {
  display: inline-block;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.35;
  max-width: 100%;
}

.sp-status-pill.delivered {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.sp-status-pill.transit {
  background: #DBEAFE;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.sp-status-pill.late,
.sp-status-pill.stuck {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.sp-status-pill.due-today {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

body.dark-theme .sp-status-pill.delivered {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.35);
}

body.dark-theme .sp-status-pill.transit {
  background: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
  border-color: rgba(59, 130, 246, 0.35);
}

body.dark-theme .sp-status-pill.late,
body.dark-theme .sp-status-pill.stuck {
  background: rgba(239, 68, 68, 0.2);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.35);
}

body.dark-theme .sp-status-pill.due-today {
  background: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.35);
}

.sp-latest-summary {
  font-size: 12.5px;
  color: var(--text-main);
  line-height: 1.35;
  margin-top: 3px;
  max-width: 220px;
  word-break: break-word;
}

.sp-timestamp {
  font-size: 11px;
  color: var(--text-sub);
  display: block;
  margin-top: 2px;
}

.sp-prev-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.35;
  max-width: 200px;
  word-break: break-word;
}

/* Action Buttons (Super Parcel Clean Style) */
.sp-actions-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.btn-row-action {
  border-radius: 6px;
  padding: 5px 9px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-row-action.sync {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.btn-row-action.sync:hover {
  background: #DBEAFE;
}

.btn-row-action.edit {
  background: #F8FAFC;
  color: #334155;
  border: 1px solid #E2E8F0;
}

.btn-row-action.edit:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.btn-row-action.delete {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  font-weight: 700;
}

.btn-row-action.delete:hover {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
}

.btn-row-action.flag {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

body.dark-theme .btn-row-action.sync {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border-color: rgba(59, 130, 246, 0.35);
}

body.dark-theme .btn-row-action.edit {
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .btn-row-action.delete {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.35);
}

body.dark-theme .btn-row-action.delete:hover {
  background: #EF4444;
  color: #FFFFFF;
}

body.dark-theme .btn-row-action.flag {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.35);
}

.td-empty {
  text-align: center;
  padding: 40px !important;
  color: var(--text-sub);
  font-style: italic;
}

/* Status Badges */
.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.badge-status.delivered { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-status.transit { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-status.stuck { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-status.reconciled { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.badge-status.unreconciled { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* ── Barcode Dispatch Section ─────────────────────────────────────────────── */
.dispatch-mode-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: block;
}

.mode-card input {
  display: none;
}

.mode-card-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mode-icon {
  font-size: 24px;
}

.mode-card.active {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.barcode-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.input-glow-wrap {
  display: flex;
  gap: 12px;
}

.input-glow-wrap input {
  flex: 1;
  background: var(--bg-input);
  border: 2px solid var(--border-glow);
  border-radius: 12px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  outline: none;
  transition: all 0.2s;
}

.input-glow-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.btn-scan-submit {
  background: var(--blue);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.scan-feedback-banner {
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.scan-feedback-banner.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--emerald);
  color: #a7f3d0;
}

.scan-feedback-banner.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--rose);
  color: #fca5a5;
}

/* ── Biometric Attendance Kiosk ───────────────────────────────────────────── */
.att-tab-content {
  display: none;
}

.att-tab-content.active {
  display: block;
}

.punch-station-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.hw-status-container {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hw-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 14px;
  backdrop-filter: blur(10px);
  gap: 12px;
  flex-wrap: wrap;
}

.hw-badge-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.hw-badge-info.online {
  color: #34d399;
}

.hw-badge-info.offline {
  color: #f87171;
}

.hw-badge-info.probing {
  color: #fbbf24;
}

.hw-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-hw-check {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-hw-check:hover {
  background: rgba(59, 130, 246, 0.28);
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.btn-hw-flash {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-hw-flash:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #ef4444;
}

.hw-diag-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 12px;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.hw-diag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hw-diag-item:last-child {
  border-bottom: none;
}

.hw-status-card {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scanner-stage-wrap {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.scanner-pod {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px auto;
  border-radius: 50%;
  background: #0b1120;
  border: 2px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pod-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
}

.fingerprint-icon {
  color: var(--blue);
  z-index: 2;
}

.laser-beam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ef4444, #f87171, transparent);
  box-shadow: 0 0 10px #ef4444;
  opacity: 0;
}

.scanner-stage-wrap.scanning .laser-beam {
  opacity: 1;
  animation: laser-sweep 1.2s infinite alternate ease-in-out;
}

.sensor-instruction {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.sensor-sub-msg {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.btn-punch-scan-main {
  width: 100%;
  background: linear-gradient(135deg, var(--blue), var(--blue-hover));
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
  transition: all 0.2s;
}

.btn-punch-scan-main:hover {
  transform: translateY(-2px);
}

.btn-punch-scan-main.scanning {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  animation: pulse-ring 1s infinite;
}

.punch-result-card {
  margin-top: 20px;
  width: 100%;
  background: var(--bg-surface);
  border: 2px solid var(--emerald);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
}

.result-badge {
  display: inline-block;
  background: #065f46;
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.result-name {
  font-size: 20px;
  font-weight: 800;
}

.result-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--bg-canvas);
  padding: 12px;
  border-radius: 12px;
}

.r-cell .lbl {
  font-size: 10px;
  color: var(--text-sub);
  display: block;
}

.r-cell .val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.result-tamper-warning {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(239, 68, 68, 0.4); }
  50% { border-color: rgba(239, 68, 68, 0.9); }
}

/* Multi-Finger Grid */
.multi-finger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.finger-reg-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
}

.finger-reg-card.backup {
  border-style: dashed;
  border-color: rgba(147, 51, 234, 0.4);
}

.finger-title {
  font-size: 13px;
  font-weight: 700;
}

.finger-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  margin: 6px 0;
}

.finger-status.enrolled {
  color: var(--emerald);
}

.btn-scan-finger {
  background: var(--blue);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* Payroll summary banner */
.payroll-summary-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.payroll-summary-banner .lbl {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-sub);
  display: block;
}

.payroll-summary-banner .total-amount {
  font-size: 28px;
  font-weight: 800;
  color: #34d399;
}

.payroll-actions {
  display: flex;
  gap: 12px;
}

.payroll-actions input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-main);
}

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  width: 90%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: fade-up 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-window.wide {
  max-width: 760px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
}

.modal-header p {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

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

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-field input, .form-field select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.form-field input:focus, .form-field select:focus {
  border-color: var(--blue);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-feedback {
  margin-top: 14px;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.modal-feedback.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.modal-feedback.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* ── Login Overlay ────────────────────────────────────────────────────────── */
.login-wrapper {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #111a2e 0%, #080c14 100%);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: 24px;
  padding: 40px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.brand-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.login-brand h1 {
  font-size: 24px;
  font-weight: 800;
}

.login-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 24px 0;
}

.login-form {
  text-align: left;
}

.login-error-msg {
  margin-top: 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--rose);
  color: #fca5a5;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
}

.login-footer {
  margin-top: 24px;
  font-size: 11px;
  color: var(--text-sub);
}

.hidden {
  display: none !important;
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

@keyframes laser-sweep {
  0% { top: 0%; }
  100% { top: 96%; }
}

/* ── Installations View Styling ─────────────────────────────────────────── */
.custom-chk-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.custom-chk-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  cursor: pointer;
}

.chk-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pill-gray {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.pill-blue {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.pill-amber {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.pill-green {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.customer-tel-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  margin-right: 6px;
}
.customer-tel-link:hover {
  text-decoration: underline;
}

.customer-wa-btn {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}
.customer-wa-btn:hover {
  background: rgba(16, 185, 129, 0.25);
}

.install-date-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font-sans);
  outline: none;
}
.install-date-input:focus {
  border-color: var(--border-focus);
}

.install-remark-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-sans);
  outline: none;
  width: 100%;
}
.install-remark-input:focus {
  border-color: var(--border-focus);
}

/* ── Template Download Box (Bulk Import Modal) ───────────────────────────── */
.template-download-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px dashed rgba(59, 130, 246, 0.35);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.template-info strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 4px;
}
.template-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}
.template-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-template-dl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-template-dl.xlsx {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}
.btn-template-dl.xlsx:hover {
  background: rgba(16, 185, 129, 0.28);
  transform: translateY(-1px);
}
.btn-template-dl.csv {
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #60a5fa;
}
.btn-template-dl.csv:hover {
  background: rgba(59, 130, 246, 0.28);
  transform: translateY(-1px);
}

/* ── 2-Day Tracking Updates Cell & Highlights ────────────────────────────── */
.tracking-updates-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 200px;
  max-width: 280px;
}
.update-block-latest {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.update-block-prev {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: 6px;
  padding: 3px 6px;
}
.update-tag {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-sub);
}
.update-prev-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}
.update-timestamp {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 1px;
}

/* ── Stalled 2+ Days Highlighting ────────────────────────────────────────── */
.modern-table tbody tr.row-stalled {
  background: rgba(245, 158, 11, 0.08) !important;
  border-left: 4px solid #f59e0b !important;
}
body.light-theme .modern-table tbody tr.row-stalled {
  background: #fffbeb !important;
  border-left: 4px solid #d97706 !important;
}

.badge-stalled-glow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  animation: pulse-stalled-glow 2s infinite ease-in-out;
  margin-bottom: 4px;
}

@keyframes pulse-stalled-glow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(239, 68, 68, 0);
  }
  50% {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  }
}

.alert-pill {
  border-color: rgba(245, 158, 11, 0.4) !important;
  color: #fbbf24 !important;
}
.alert-pill:hover, .alert-pill.active {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: #f59e0b !important;
}

/* ── 2FA Bot & Abuse Prevention (The Secret Mask) ────────────────────────── */
.bot-verify-notice {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.verify-shield-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

.verify-shield-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 6px;
}

.bot-verify-notice p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.bot-verify-notice span {
  color: var(--text-main);
  font-weight: 700;
}

.otp-input-field {
  letter-spacing: 6px;
  font-weight: 800;
  font-size: 20px !important;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--blue) !important;
}

.login-2fa-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: underline;
  transition: opacity 0.2s;
}

.btn-text-link:hover {
  opacity: 0.8;
}

/* ── OTP Hint Badge & Quick Auto-Fill ───────────────────────────────────── */
.otp-hint-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  animation: fade-up 0.2s ease-out;
}

.otp-hint-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-main);
}

.otp-hint-text strong {
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 1.5px;
}

.btn-badge-action {
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-badge-action:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* ── Live Carrier Sync Banner & Controls ─────────────────────────────────── */
.sync-status-strip {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(16, 185, 129, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
  animation: fade-up 0.25s ease-out;
}

.sync-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sync-msg {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.bulk-sync-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sync-row {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sync-row:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Universal Modal System ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 13, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.hidden {
  display: none !important;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-feedback {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-feedback.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.modal-feedback.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* ── Modern High-Readability Data Table ────────────────────────────────────── */
.data-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.table-header-controls {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.records-counter {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.table-search-box input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  min-width: 240px;
  outline: none;
  transition: border-color 0.2s;
}

.table-search-box input:focus {
  border-color: var(--blue);
}

.table-scroll-wrap {
  overflow-x: auto;
  max-height: calc(100vh - 280px);
}

.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  text-align: left;
}

.modern-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-subtle);
  z-index: 10;
  white-space: nowrap;
}

.modern-table tbody tr {
  transition: background-color 0.15s ease;
  border-bottom: 1px solid var(--border-subtle);
}

.modern-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.modern-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.modern-table tbody tr.row-stalled {
  background: rgba(245, 158, 11, 0.04);
  border-left: 4px solid #f59e0b;
}

.modern-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--text-main);
}

.modern-table td code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 6px;
  border-radius: 4px;
  color: #60a5fa;
  font-weight: 600;
}

.modern-table .td-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Tracking Updates Rich Cell ────────────────────────────────────────────── */
.tracking-updates-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 210px;
  max-width: 320px;
}

.app-layout.sidebar-collapsed .tracking-updates-cell {
  min-width: 180px;
  max-width: 280px;
}

.update-block-latest {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.update-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-sub);
}

.badge-status {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.badge-status.delivered {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.badge-status.transit {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.badge-status.stuck {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.update-block-prev {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 4px 8px;
}

.update-prev-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.update-timestamp {
  font-size: 10px;
  color: var(--text-sub);
}

.badge-stalled-glow {
  display: inline-block;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
  animation: pulseAmber 2s infinite ease-in-out;
}

@keyframes pulseAmber {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── Filter Pills Bar ──────────────────────────────────────────────────────── */
.filter-pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
}

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.filter-pill.alert-pill.active {
  background: #d97706;
  border-color: #d97706;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ── SUPER PARCEL ULTRA-CLEAN DESIGN SYSTEM ────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Column visibility toggling */
.col-hidden {
  display: none !important;
}

/* Page Header */
.superparcel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.superparcel-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin: 0 0 4px 0;
}

.superparcel-subtitle {
  font-size: 13.5px;
  color: var(--text-sub);
  margin: 0;
  font-weight: 400;
}

.superparcel-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-superparcel-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  transition: all 0.15s ease;
}

.btn-superparcel-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-superparcel-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-superparcel-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  transform: translateY(-1px);
}

.btn-superparcel-secondary.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

/* Horizontal Underline Status Tabs */
.superparcel-tabs-bar {
  display: flex;
  gap: 24px;
  border-bottom: 1.5px solid var(--border-subtle);
  margin-bottom: 22px;
  overflow-x: auto;
  padding-bottom: 0;
  scrollbar-width: thin;
}

.superparcel-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 4px 12px 4px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.superparcel-tab:hover {
  color: var(--text-main);
}

.superparcel-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  font-weight: 700;
}

.superparcel-tab.alert-tab.active {
  color: #f59e0b;
  border-bottom-color: #f59e0b;
}

.tab-badge-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.tab-badge-count.red {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Toolbar (Left: Title + Count Badge | Right: Search + Columns + Sync) */
.superparcel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-section-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.3px;
}

.superparcel-count-badge {
  font-size: 13px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 10px;
  border-radius: 9999px;
}

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

.superparcel-search-wrap {
  position: relative;
}

.search-icon-inside {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 13px;
  opacity: 0.6;
}

.superparcel-search-input {
  padding: 8px 14px 8px 34px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 13.5px;
  width: 240px;
  transition: all 0.15s ease;
}

.superparcel-search-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Columns Customizer Dropdown Popover */
.columns-customizer-wrap {
  position: relative;
}

.btn-columns-toggle {
  font-size: 13px;
}

.columns-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 250px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  padding: 12px;
  z-index: 1000;
}

.light-theme .columns-popover {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.columns-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.columns-popover-header strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.btn-text-link {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

.btn-text-link:hover {
  text-decoration: underline;
}

.columns-popover-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 280px;
  overflow-y: auto;
}

.columns-popover-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-main);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  user-select: none;
  transition: background 0.1s ease;
}

.columns-popover-list label:hover {
  background: var(--bg-card-hover);
}

.columns-popover-list input[type="checkbox"] {
  accent-color: #2563eb;
  cursor: pointer;
}

/* Primary Live Sync Button */
.btn-superparcel-sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-superparcel-sync:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  transform: translateY(-1px);
}

/* Bulk Selection Actions Strip */
.bulk-sync-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-superparcel-bulk-sync {
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-superparcel-bulk-sync:hover {
  background: #059669;
}

.btn-superparcel-bulk-delete {
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.btn-superparcel-bulk-delete:hover {
  background: #b91c1c;
}

/* ── SUPER PARCEL TABLE CARD & TABLE CELL STYLES ────────────────────────── */
.superparcel-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.superparcel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.superparcel-table thead th {
  padding: 14px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  white-space: nowrap;
}

.superparcel-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.12s ease;
}

.superparcel-table tbody tr:last-child {
  border-bottom: none;
}

.superparcel-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.superparcel-table tbody tr.row-stalled {
  background: rgba(245, 158, 11, 0.05);
  border-left: 4px solid #f59e0b;
}

.superparcel-table tbody td {
  padding: 13px 16px;
  vertical-align: middle;
  color: var(--text-main);
  font-size: 13.5px;
  line-height: 1.4;
}

/* Clean Typography within cells */
.sp-order-code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.sp-tracking-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: #3b82f6;
  text-decoration: none;
}

.sp-tracking-code:hover {
  text-decoration: underline;
}

.sp-carrier-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  margin-bottom: 3px;
}

.sp-platform-text {
  font-size: 11.5px;
  color: var(--text-sub);
  display: block;
}

.sp-customer-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-main);
  display: block;
}

.sp-customer-phone {
  font-size: 12px;
  color: var(--text-sub);
  font-family: var(--font-mono);
  display: block;
  margin-top: 2px;
}

/* Plain, Clean Dates - NO dark highlight boxes! */
.sp-plain-date {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
  white-space: nowrap;
}

.sp-plain-date.muted {
  color: var(--text-sub);
}

/* Clean Status Pills (Super Parcel style) */
.sp-status-pill {
  display: inline-block;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.35;
  max-width: 100%;
  box-sizing: border-box;
}

.sp-status-pill.delivered {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sp-status-pill.transit {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.sp-status-pill.stuck {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.sp-status-pill.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.sp-days-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.sp-days-badge.late {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.sp-days-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Explicit column width bounds to prevent table cell overflow */
th.col-idx-9, td.col-idx-9 {
  width: 250px;
  min-width: 220px;
  max-width: 280px;
  vertical-align: top;
  box-sizing: border-box;
  padding: 8px 10px;
}

th.col-idx-10, td.col-idx-10 {
  width: 250px;
  min-width: 220px;
  max-width: 280px;
  vertical-align: top;
  box-sizing: border-box;
  padding: 8px 10px;
}

/* Latest & Previous Day Update cell */
.sp-update-cell {
  width: 100%;
  max-width: 250px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-main);
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sp-prev-update-box {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.38;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

body.light-theme .sp-prev-update-box {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.sp-update-timestamp {
  font-size: 11px;
  color: var(--text-sub);
  display: block;
  margin-top: 3px;
}

/* Action Buttons within Rows */
.sp-actions-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  white-space: nowrap;
}

.btn-row-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-row-action.sync {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.25);
}

.btn-row-action.sync:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #60a5fa;
}

.btn-row-action.edit {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.25);
}

.btn-row-action.edit:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: #a78bfa;
}

.btn-row-action.delete {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.btn-row-action.delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #f87171;
  color: #ffffff;
}

.btn-row-action.flag {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.25);
}

.btn-row-action.flag:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
}

/* WhatsApp Action Button & Sent Badges */
.btn-row-action.wa {
  background: rgba(37, 211, 102, 0.12);
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.3);
}

.btn-row-action.wa:hover {
  background: rgba(37, 211, 102, 0.25);
  border-color: #25d366;
  color: #ffffff;
}

.btn-row-action.wa.sent {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-row-action.wa.sent:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #34d399;
}

.badge-wa-sent {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 3px;
  white-space: nowrap;
}



