/* ==========================================================================
   Me2Plus Courier Price Comparison System - Ultra-Modern VIP Theme
   Designed for Flash Express Direct VIP Integration (CBG8194)
   ========================================================================== */

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

:root {
  /* ==========================================================================
     IZIN EXPRESS Official Brand Palette (Sampled Directly from Brand Logo)
     Primary: Deep Royal Navy Blue (#01266c / #001238 / #08348c)
     Accent: Speed Gold / Electric Yellow (#ffc931 / #f59e0b)
     Background: Pure White & Subtle Ice Blue tint (#ffffff / #f0f5fc)
     ========================================================================== */
  --brand-navy-950: #001032;
  --brand-navy-900: #00153d;
  --brand-navy-800: #01266c;
  --brand-navy-700: #08348c;
  --brand-navy-600: #0d47a1;
  --brand-navy-500: #1976d2;
  --brand-navy-100: #e2ecf8;
  --brand-navy-50:  #f0f5fc;

  --brand-gold: #ffc931;
  --brand-gold-hover: #f5b716;
  --brand-gold-dark: #d97706;
  --brand-gold-light: #fffbeb;
  --brand-gold-border: rgba(255, 201, 49, 0.45);
  --brand-gold-glow: 0 0 25px -2px rgba(255, 201, 49, 0.5);

  --brand-gold-gradient: linear-gradient(135deg, #ffc931 0%, #f59e0b 100%);
  --brand-navy-gradient: linear-gradient(135deg, #001238 0%, #01266c 50%, #08348c 100%);
  --brand-header-gradient: linear-gradient(135deg, #001032 0%, #001849 35%, #01266c 70%, #08348c 100%);

  /* Brand Signature & Flash Aliases */
  --flash-yellow: #ffc931;
  --flash-yellow-hover: #f5b716;
  --flash-amber: #f59e0b;
  --flash-gold-gradient: linear-gradient(135deg, #ffc931 0%, #f59e0b 100%);
  --flash-gold-glow: 0 0 25px -2px rgba(255, 201, 49, 0.45);

  /* Primary Accent (Royal Navy / VIP Active) */
  --primary: #01266c;
  --primary-hover: #08348c;
  --primary-light: #f0f5fc;
  --primary-dark: #00153d;
  --primary-glow: 0 0 20px -2px rgba(1, 38, 108, 0.4);

  /* Secondary Accents */
  --indigo: #0d47a1;
  --indigo-light: #e8f0fe;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  
  /* Obsidian Dark Palette (For Navigation & Modals) */
  --obsidian-950: #001032;
  --obsidian-900: #00153d;
  --obsidian-850: #01266c;
  --obsidian-800: #08348c;
  --obsidian-700: #1e3a8a;

  /* Modern Slate Neutrals */
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(1, 38, 108, 0.08), 0 2px 6px -2px rgba(1, 38, 108, 0.04);
  --shadow-lg: 0 12px 36px -4px rgba(1, 38, 108, 0.14), 0 4px 12px -2px rgba(1, 38, 108, 0.06);
  --shadow-card-hover: 0 16px 40px -6px rgba(1, 38, 108, 0.18);

  /* Border Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-pill: 9999px;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-thai: 'Prompt', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(1, 38, 108, 0.08) 0px, transparent 45%),
    radial-gradient(at 100% 0%, rgba(255, 201, 49, 0.09) 0px, transparent 40%),
    radial-gradient(at 50% 100%, rgba(13, 71, 161, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Sleek Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(1, 38, 108, 0.25);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(1, 38, 108, 0.45);
}

/* ==========================================================================
   Header & Top Command Bar (Luxury Royal Navy Glass)
   ========================================================================== */

.top-nav {
  background: linear-gradient(135deg, #001032 0%, #001849 35%, #01266c 70%, #08348c 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2.5px solid var(--brand-gold);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 25px rgba(0, 16, 50, 0.4), 0 0 15px rgba(255, 201, 49, 0.15);
  color: var(--white);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--brand-gold);
  box-shadow: 0 0 16px rgba(255, 201, 49, 0.45), 0 2px 8px rgba(0, 0, 0, 0.4);
  background: var(--brand-navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  cursor: pointer;
}

.brand-logo-wrap:hover {
  transform: scale(1.06);
  box-shadow: 0 0 24px rgba(255, 201, 49, 0.65);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.vip-direct-pill {
  background: rgba(255, 201, 49, 0.15);
  color: var(--brand-gold);
  border: 1px solid rgba(255, 201, 49, 0.45);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.74rem;
  color: #cbd5e1;
}

.brand-subtitle strong {
  color: #f8fafc;
}

.brand-subtitle strong {
  color: #f1f5f9;
}

/* User & VIP Status Bar */
.user-status-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Verified Status Pill with Animated Radar Pulse */
.badge-verify {
  position: relative;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px 5px 24px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-verify .pulse-ring {
  position: absolute;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: radarPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.badge-verify .pulse-dot {
  position: absolute;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

@keyframes radarPulse {
  0% { transform: scale(1); opacity: 1; }
  70% { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

.user-balance-box {
  display: flex;
  flex-direction: column;
  text-align: right;
  font-size: 0.75rem;
  line-height: 1.35;
}

.balance-credit {
  color: #cbd5e1;
  font-weight: 500;
}

.balance-credit strong {
  color: #ffd200;
  font-weight: 700;
}

.balance-points {
  color: #64748b;
  font-size: 0.72rem;
}

.balance-points strong {
  color: #94a3b8;
}

/* Top History Action Button */
.btn-top-history {
  background: linear-gradient(135deg, rgba(255, 210, 0, 0.15), rgba(255, 210, 0, 0.05));
  color: var(--flash-yellow);
  border: 1px solid rgba(255, 210, 0, 0.4);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-family: var(--font-thai);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-top-history:hover {
  background: var(--flash-yellow);
  color: var(--obsidian-950);
  border-color: var(--flash-yellow);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 210, 0, 0.45);
}

.btn-top-history .history-btn-icon {
  font-size: 0.95rem;
}

.history-count-badge {
  background: var(--flash-yellow);
  color: var(--obsidian-950);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  line-height: 1.3;
}

.btn-top-history:hover .history-count-badge {
  background: var(--obsidian-950);
  color: var(--flash-yellow);
}

/* User Profile Badge */
.user-avatar-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 201, 49, 0.35);
  padding: 4px 14px 4px 4px;
  border-radius: var(--radius-pill);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-avatar-badge:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--brand-gold);
  box-shadow: 0 0 14px rgba(255, 201, 49, 0.35);
}

.user-avatar-logo-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--brand-gold);
  background: var(--brand-navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(255, 201, 49, 0.4);
}

.user-avatar-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-avatar-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.user-role {
  font-size: 0.68rem;
  color: var(--brand-gold);
  font-weight: 600;
}

/* ==========================================================================
   Security & VIP Banner (Royal Navy Ribbon with Gold Accent)
   ========================================================================== */

.security-alert-bar {
  background: linear-gradient(90deg, #001032 0%, #01266c 50%, #001032 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid rgba(255, 201, 49, 0.4);
  color: #e2ecf8;
  font-size: 0.82rem;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 -1px 3px rgba(0, 0, 0, 0.2);
}

.security-alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1680px;
  width: 100%;
}

.security-alert-bar .icon-info {
  font-size: 1.05rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255, 201, 49, 0.6));
}

.security-alert-bar strong {
  color: var(--brand-gold);
}

/* ==========================================================================
   Main Application Grid Layout
   ========================================================================== */

.app-container {
  display: grid;
  grid-template-columns: 365px 1fr;
  min-height: calc(100vh - 100px);
  gap: 20px;
  padding: 20px 24px;
  max-width: 1720px;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .app-container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Left Panel - Sidebar / Parcel Cart
   ========================================================================== */

.sidebar-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 130px);
  position: sticky;
  top: 90px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.sidebar-panel:hover {
  box-shadow: var(--shadow-lg);
}

.sidebar-header {
  padding: 12px 14px;
  background: linear-gradient(180deg, #ffffff 0%, rgba(248, 250, 252, 0.8) 100%);
  border-bottom: 1px solid var(--slate-100);
}

.bill-selector-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.bill-select {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  font-family: var(--font-thai);
  font-size: 0.82rem;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  background: #ffffff;
  border-radius: var(--radius-md);
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bill-select:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.bill-select optgroup {
  font-weight: 800;
  color: #475569;
  background: #f1f5f9;
}

.bill-select option {
  font-weight: 600;
  color: #0f172a;
  padding: 6px;
  background: #ffffff;
}

.btn-new-bill {
  flex-shrink: 0;
  background: var(--primary);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: bold;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-new-bill:hover {
  background: var(--primary-hover);
  transform: scale(1.06);
  box-shadow: var(--primary-glow);
}

.sidebar-title {
  padding: 12px 18px 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-700);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-sidebar-history-link {
  background: none;
  border: none;
  color: var(--indigo);
  font-size: 0.78rem;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.btn-sidebar-history-link:hover {
  color: #4338ca;
  text-decoration: underline;
}

.parcel-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--slate-400);
  padding: 30px 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--slate-500);
  line-height: 1.5;
}

/* Modern Parcel Ticket Item */
.parcel-card-item {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-left: 4px solid var(--flash-yellow);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.parcel-card-item:hover {
  border-color: #cbd5e1;
  border-left-color: var(--flash-amber);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.parcel-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-right: 20px;
}

.parcel-logo-mini {
  height: 22px;
  object-fit: contain;
}

.parcel-track-no {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-900);
  background: var(--slate-100);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.parcel-receiver-name {
  font-size: 0.84rem;
  color: var(--slate-800);
  margin-bottom: 3px;
  font-weight: 700;
}

.parcel-item-pricing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  border-top: 1px dashed var(--slate-200);
  padding-top: 8px;
  margin-top: 8px;
}

.parcel-cost {
  color: var(--slate-500);
  font-weight: 500;
}

.parcel-storefront {
  font-weight: 800;
  color: var(--primary-dark);
}

.btn-remove-item {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.15s;
}

.btn-remove-item:hover {
  color: var(--danger);
  background: var(--danger-light);
}

/* Sidebar Footer & Totals */
.sidebar-footer {
  padding: 14px 18px;
  background: #ffffff;
  border-top: 1px solid var(--slate-100);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.total-summary-card {
  background: linear-gradient(180deg, var(--slate-50) 0%, #ffffff 100%);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 5px;
  color: var(--slate-600);
}

.summary-row strong {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--slate-800);
}

.summary-row.total-row {
  border-top: 1px dashed var(--slate-200);
  padding-top: 8px;
  margin-top: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--slate-900);
}

.summary-row .profit-badge {
  color: var(--primary-dark);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15);
}

.sidebar-actions {
  display: flex;
  gap: 10px;
}

.btn-action-primary {
  flex: 1;
  background: var(--flash-gold-gradient);
  color: var(--obsidian-950);
  border: none;
  font-family: var(--font-thai);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
  filter: brightness(1.03);
}

.btn-action-secondary {
  background: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  font-family: var(--font-thai);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-action-secondary:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

/* ==========================================================================
   Right Column: Work Area & Form Cards
   ========================================================================== */

.main-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cards-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 900px) {
  .cards-grid-row {
    grid-template-columns: 1fr;
  }
}

.form-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(203, 213, 225, 0.9);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: 10px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}

.header-action-btns {
  display: flex;
  gap: 6px;
}

/* Micro Tool Action Pills */
.btn-sm-tool {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  font-family: var(--font-thai);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-sm-tool:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-light);
  transform: translateY(-1px);
}

.btn-sm-tool.highlight {
  border-color: #ffd200;
  color: #000;
  background: #fef9c3;
  font-weight: 700;
}

.btn-sm-tool.highlight:hover {
  background: #fef08a;
  border-color: #f59e0b;
}

/* Inputs & Form Fields */
.input-row {
  margin-bottom: 14px;
  position: relative;
}

.input-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 14px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  color: var(--slate-800);
  background: #ffffff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--flash-yellow);
  box-shadow: 0 0 0 4px rgba(255, 210, 0, 0.22);
  background: #ffffff;
}

.form-input.danger-border {
  border-color: #fca5a5;
  background: #fffdfd;
}

.form-input.danger-border:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.input-note {
  font-size: 0.72rem;
  color: var(--primary-dark);
  margin-top: 4px;
  font-weight: 500;
}

.remote-alert-pill {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa;
  color: #c2410c;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

/* ==========================================================================
   Parcel Specs & Box Presets Card
   ========================================================================== */

.parcel-specs-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.preset-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.preset-chip {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  font-family: var(--font-thai);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.preset-chip:hover {
  background: var(--slate-200);
  transform: translateY(-1px);
}

.preset-chip.active {
  background: var(--flash-yellow);
  color: var(--obsidian-950);
  border-color: var(--flash-yellow);
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(255, 210, 0, 0.35);
  transform: translateY(-2px);
}

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

.addon-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--slate-200);
}

.custom-checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
  accent-color: #f59e0b;
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.cod-input-wrap {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-left: 26px;
}

.cod-input-wrap.show {
  display: flex;
}

/* Calculate Hero Button */
.calculate-btn-row {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.btn-calculate {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: white;
  border: none;
  font-family: var(--font-thai);
  font-size: 1.02rem;
  font-weight: 800;
  padding: 13px 36px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-calculate:hover {
  background: linear-gradient(135deg, #059669 0%, #065f46 100%);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
  transform: translateY(-2px);
}

.btn-calculate:active {
  transform: translateY(0);
}

/* ==========================================================================
   Courier Comparison Results Cards (The Core Highlight)
   ========================================================================== */

.comparison-section {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: none;
}

.comparison-section.show {
  display: block;
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.comparison-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comparison-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.3px;
}

.comparison-badge {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.store-margin-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-700);
}

.margin-input {
  width: 76px;
  padding: 6px 10px;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
  outline: none;
}

.margin-input:focus {
  border-color: var(--flash-yellow);
  box-shadow: 0 0 0 3px rgba(255, 210, 0, 0.2);
}

/* Courier Grid */
.courier-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

/* Courier Card Base */
.courier-card {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.courier-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Ranked #1 Cheapest VIP Card */
.courier-card.is-cheapest {
  border: 2px solid var(--flash-yellow);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 50%);
  box-shadow: 0 8px 30px -4px rgba(255, 210, 0, 0.3);
}

.courier-card.is-cheapest:hover {
  box-shadow: 0 12px 36px -4px rgba(255, 210, 0, 0.45);
  transform: translateY(-3px);
}

.cheapest-banner {
  background: var(--flash-gold-gradient);
  color: var(--obsidian-950);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  top: -12px;
  left: 20px;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4);
  letter-spacing: 0.3px;
}

.courier-top-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.courier-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid var(--slate-200);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.courier-meta {
  flex: 1;
}

.courier-name {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 2px;
}

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

.courier-tag {
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
}

/* Pricing Section */
.courier-pricing-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  background: var(--slate-50);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  border: 1px solid var(--slate-100);
}

.cost-group {
  display: flex;
  flex-direction: column;
}

.cost-label {
  font-size: 0.72rem;
  color: var(--slate-500);
  font-weight: 600;
}

.cost-val {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: #047857;
  line-height: 1.1;
}

.cost-val .currency {
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 2px;
}

.store-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.store-label-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.store-label {
  font-size: 0.72rem;
  color: var(--slate-500);
  font-weight: 600;
}

.price-edit-tag {
  font-size: 0.65rem;
  color: #0284c7;
  background: #e0f2fe;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 600;
}

.store-price-input-wrap {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.store-price-input-wrap:focus-within {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.store-price-input {
  width: 72px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-900);
  border: none;
  background: transparent;
  text-align: right;
  padding: 0;
  outline: none;
}

.currency-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-500);
  margin-left: 3px;
}

.store-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--slate-800);
}

.profit-val {
  font-size: 0.75rem;
  color: #047857;
  font-weight: 700;
  margin-top: 2px;
}

.cart-store-edit-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
}

.cart-store-price-input {
  width: 58px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-900);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 4px;
  text-align: right;
}

.cart-store-price-input:focus {
  border-color: #f59e0b;
  outline: none;
}

.cart-profit-tag {
  font-weight: 700;
  color: #047857;
}

.breakdown-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.72rem;
}

.breakdown-pill {
  background: var(--slate-100);
  color: var(--slate-700);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.breakdown-pill.warning-pill {
  background: #fef3c7;
  color: #b45309;
}

/* Action Button */
.btn-select-courier {
  width: 100%;
  background: var(--flash-gold-gradient);
  color: var(--obsidian-950);
  border: none;
  font-family: var(--font-thai);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 11px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-select-courier:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
  filter: brightness(1.04);
}

.price-diff-badge {
  font-size: 0.75rem;
  color: var(--danger);
  font-weight: 700;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open,
.modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  max-width: 580px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--slate-900);
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  font-size: 1.4rem;
  color: var(--slate-400);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 22px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Modal Variations */
.modal-card-wide {
  max-width: 1040px;
  width: 95vw;
  max-height: 90vh;
}

.modal-header-dark {
  background: linear-gradient(135deg, var(--brand-navy-950) 0%, var(--brand-navy-900) 40%, var(--brand-navy-800) 100%);
  color: #ffffff;
  border-bottom: 2.5px solid var(--brand-gold);
  box-shadow: 0 4px 18px rgba(0, 16, 50, 0.35);
}

.modal-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-vip-tag {
  background: var(--flash-gold-gradient);
  color: var(--obsidian-950);
  font-weight: 900;
  font-size: 0.82rem;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(255, 210, 0, 0.3);
  letter-spacing: 0.4px;
}

.modal-title-light {
  color: #ffffff !important;
  font-size: 1.15rem;
  margin: 0;
}

.modal-subtitle-light {
  font-size: 0.74rem;
  color: #94a3b8;
  margin: 0;
}

.modal-close-btn-light {
  color: #94a3b8;
}

.modal-close-btn-light:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Flash Order History Modal & Components (Enhanced High-Contrast & Color Separation)
   ========================================================================== */

/* Modal Body Background */
.history-body {
  background: #f1f5f9;
  border-top: 1px solid var(--slate-200);
}

/* History Stats Bar (Top KPI Cards) */
.history-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--slate-200);
}

@media (max-width: 680px) {
  .history-stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px 16px;
  }
}

.h-stat-card {
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.h-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.h-stat-card.stat-total {
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
  border: 1.5px solid #c7d2fe;
}
.h-stat-card.stat-total .h-stat-label { color: #4338ca; }
.h-stat-card.stat-total .h-stat-value { color: #312e81; }

.h-stat-card.stat-freight {
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
  border: 1.5px solid #a7f3d0;
}
.h-stat-card.stat-freight .h-stat-label { color: #065f46; }
.h-stat-card.stat-freight .h-stat-value { color: #047857; }

.h-stat-card.stat-printed {
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
  border: 1.5px solid #bae6fd;
}
.h-stat-card.stat-printed .h-stat-label { color: #0369a1; }
.h-stat-card.stat-printed .h-stat-value { color: #0284c7; }

.h-stat-card.stat-unprinted {
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
  border: 1.5px solid #fde68a;
}
.h-stat-card.stat-unprinted .h-stat-label { color: #92400e; }
.h-stat-card.stat-unprinted .h-stat-value { color: #d97706; }

.h-stat-label {
  font-size: 0.76rem;
  font-weight: 700;
}

.h-stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 900;
}

/* History Filter Toolbar */
.history-toolbar {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border-bottom: 1px solid var(--slate-200);
  flex-wrap: wrap;
}

.history-search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.history-search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.88rem;
  color: var(--slate-400);
}

.history-search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-pill);
  font-family: var(--font-thai);
  font-size: 0.85rem;
  outline: none;
  background: #f8fafc;
  transition: all 0.15s;
}

.history-search-input:focus {
  background: #ffffff;
  border-color: #ffd200;
  box-shadow: 0 0 0 3px rgba(255, 210, 0, 0.25);
}

.history-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.h-pill {
  background: #f1f5f9;
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
  font-family: var(--font-thai);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s;
}

.h-pill:hover {
  background: var(--slate-200);
  color: var(--obsidian-950);
}

.h-pill.active {
  background: #0f172a;
  color: #ffd200;
  border-color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.h-pill[data-status="printed"].active {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.h-pill[data-status="unprinted"].active {
  background: #d97706;
  color: #ffffff;
  border-color: #d97706;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.h-pill[data-status="cod"].active {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.btn-sync-history {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #047857;
  border: 1.5px solid #6ee7b7;
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-family: var(--font-thai);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 4px rgba(4, 120, 87, 0.15);
  transition: all 0.2s;
}

.btn-sync-history:hover {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(4, 120, 87, 0.25);
}

.btn-sync-history.loading span#syncIcon {
  display: inline-block;
  animation: spin 1s linear infinite;
}

/* ==========================================================================
   History Order Cards - High Contrast, Colored & Partitioned
   ========================================================================== */

.history-item-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 3px 10px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  border: 1.5px solid #cbd5e1;
  position: relative;
}

.history-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -3px rgba(15, 23, 42, 0.12), 0 3px 6px -2px rgba(15, 23, 42, 0.06);
}

/* Card Status Differentiation: Left Accent Bar & Top Glow */
.history-item-card.is-unprinted {
  border-left: 6px solid #f59e0b;
  border-top-color: #fde68a;
  border-right-color: #e2e8f0;
  border-bottom-color: #e2e8f0;
  background: linear-gradient(180deg, #fffdf7 0%, #ffffff 65px);
}

.history-item-card.is-printed {
  border-left: 6px solid #10b981;
  border-top-color: #a7f3d0;
  border-right-color: #e2e8f0;
  border-bottom-color: #e2e8f0;
  background: linear-gradient(180deg, #f8fdfa 0%, #ffffff 65px);
}

/* Header Row */
.h-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.h-tracking-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.h-flash-brand-badge {
  background: linear-gradient(135deg, #ffd200, #f59e0b);
  color: #000000;
  font-weight: 900;
  font-size: 0.76rem;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  letter-spacing: 0.3px;
}

.h-pno-tag {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffd200;
  background: #0f172a;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.8px;
}

.btn-copy-pno {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

.btn-copy-pno:hover {
  color: #047857;
  background: #e2e8f0;
  border-color: #94a3b8;
}

.h-date-text {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.h-status-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.h-status-badge.printed {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #065f46;
  border: 1.5px solid #6ee7b7;
}

.h-status-badge.unprinted {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #92400e;
  border: 1.5px solid #fcd34d;
}

.h-price-tag {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.15rem;
  color: #34d399;
  background: #0f172a;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Card Body - Dual Contrasting Panels */
.h-card-body {
  display: grid;
  grid-template-columns: 1.6fr 1.4fr;
  gap: 12px;
  background: transparent;
  padding: 0;
  border: none;
}

@media (max-width: 720px) {
  .h-card-body {
    grid-template-columns: 1fr;
  }
}

/* Panel 1: Dest / Receiver Info (Sky Blue Theme) */
.h-dest-info {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.05);
}

.h-dest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.h-dest-name {
  font-weight: 800;
  font-size: 0.96rem;
  color: #0c4a6e;
}

.h-receiver-phone-badge {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 2px 9px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
  font-family: var(--font-mono);
}

.h-dest-address {
  font-size: 0.83rem;
  color: #334155;
  line-height: 1.45;
}

.h-sender-mini-tag {
  font-size: 0.72rem;
  color: #64748b;
  background: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  display: inline-block;
  align-self: flex-start;
  margin-top: 2px;
}

/* Panel 2: Parcel Specs (Warm Amber / Gold Theme) */
.h-parcel-specs {
  background: #fefce8;
  border: 1.5px solid #fef08a;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  box-shadow: 0 1px 3px rgba(234, 179, 8, 0.05);
}

.h-spec-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.h-spec-label {
  color: #854d0e;
  font-weight: 700;
}

.h-spec-val {
  color: #713f12;
}

.h-spec-dim {
  color: #a16207;
  font-size: 0.74rem;
}

.h-cat-chip {
  background: #fef08a;
  color: #713f12;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.76rem;
  border: 1px solid #fde047;
}

.h-pay-chip {
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.74rem;
}

.h-cod-chip {
  background: #dc2626;
  color: #ffffff;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.76rem;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.3);
}

/* Card Footer & Sorting Badge */
.h-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

.h-sorting-pill {
  font-size: 0.8rem;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.h-sort-code-tag {
  background: #0f172a;
  color: #ffd200;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 0.88rem;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.h-sort-dc strong { color: #0284c7; }
.h-sort-line strong { color: #d97706; }
.h-sort-divider { color: #cbd5e1; }

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

.btn-h-print {
  background: linear-gradient(135deg, #ffd200 0%, #f59e0b 100%);
  color: #0f172a;
  font-weight: 800;
  font-size: 0.82rem;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  transition: all 0.15s;
}

.btn-h-print:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
}

.btn-h-receipt {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.82rem;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  transition: all 0.15s;
}

.btn-h-receipt:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-h-track {
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  font-size: 0.82rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-h-track:hover {
  background: #f8fafc;
  color: #0284c7;
  border-color: #94a3b8;
  transform: translateY(-1px);
}


/* ==========================================================================
   Thermal Label Modal & Print Media
   ========================================================================== */

.label-100x150-container {
  display: flex;
  justify-content: center;
  padding: 10px 0;
  background: #f1f5f9;
  border-radius: var(--radius-md);
}

.flash-thermal-label {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid #cbd5e1;
}

/* ==========================================================================
   IZIN EXPRESS CUSTOMER RECEIPT & SLIP STYLES
   ========================================================================== */
.izin-receipt-box {
  width: 80mm;
  max-width: 100%;
  height: auto;
  min-height: auto;
  background: #ffffff !important;
  color: #0f172a;
  padding: 20px 14px 24px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Sarabun", sans-serif;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  box-sizing: border-box;
  margin: 0 auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.izin-receipt-box.format-a4 {
  width: 100%;
  max-width: 520px;
  border: 1px solid #cbd5e1;
  padding: 26px 28px;
  border-radius: 12px;
}

.izin-receipt-header {
  text-align: center;
  border-bottom: 2px dashed #0f172a;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.izin-receipt-brand {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.izin-receipt-brand span.bolt {
  color: #eab308;
}

.izin-receipt-subbrand {
  font-size: 0.72rem;
  color: #475569;
  font-weight: 700;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.izin-receipt-meta {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 6px;
  line-height: 1.45;
}

.izin-receipt-section {
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.izin-receipt-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #1e293b;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.izin-receipt-sender-box {
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.4;
  border: 1px solid #f1f5f9;
}

.izin-receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin: 6px 0;
}

.izin-receipt-table th {
  border-bottom: 1px solid #0f172a;
  padding: 4px 2px;
  font-weight: 800;
  text-align: left;
  font-size: 0.7rem;
  color: #334155;
}

.izin-receipt-table td {
  padding: 6px 2px;
  vertical-align: top;
  border-bottom: 1px dashed #f1f5f9;
}

.izin-receipt-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 0.76rem;
}

.izin-receipt-total-row.grand-total {
  border-top: 2px dashed #0f172a;
  border-bottom: 2px dashed #0f172a;
  padding: 8px 0;
  margin: 6px 0;
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
}

.izin-receipt-qr-wrap {
  text-align: center;
  margin: 12px 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.izin-receipt-footer {
  text-align: center;
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 8px;
  line-height: 1.4;
}

.receipt-tab-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.receipt-tab-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.btn-action-receipt {
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

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

.btn-receipt-sm {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s;
}

.btn-receipt-sm:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

@media print {
  body * {
    visibility: hidden;
  }
  
  /* Print Label Mode */
  body.printing-label .shipping-label-printable,
  body.printing-label .shipping-label-printable * {
    visibility: visible;
  }
  body.printing-label .shipping-label-printable {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    box-shadow: none;
    border: none;
  }

  /* Print Receipt Mode (IZIN EXPRESS) */
  body.printing-receipt .izin-receipt-box,
  body.printing-receipt .izin-receipt-box *,
  body.printing-shift-slip .izin-receipt-box,
  body.printing-shift-slip .izin-receipt-box * {
    visibility: visible;
  }
  body.printing-receipt .izin-receipt-box,
  body.printing-shift-slip .izin-receipt-box {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    box-shadow: none;
    border: none;
  }

  @page {
    margin: 0;
    size: auto;
  }
}

/* ==========================================================================
   Main App Navigation Bar & Views
   ========================================================================== */
.main-nav-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--slate-200);
  padding: 0 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-tabs-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.nav-tab-item:hover {
  color: var(--brand-navy-900);
  background: var(--brand-navy-50);
}

.nav-tab-item.active {
  color: var(--brand-navy-950);
  border-bottom-color: var(--brand-gold);
  border-bottom-width: 3.5px;
  background: linear-gradient(to top, rgba(255, 201, 49, 0.12), transparent);
}

.nav-pulse-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.08); }
}

.btn-nav-quick {
  background: var(--slate-100);
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-nav-quick:hover {
  background: var(--slate-200);
  color: var(--obsidian-950);
}

/* ==========================================================================
   IZIN EXPRESS SMART DASHBOARD & ANALYTICS
   ========================================================================== */
.app-dashboard-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dash-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.dash-badge-flash {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brand-navy-950);
  color: var(--brand-gold);
  border: 1px solid var(--brand-gold-border);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
  box-shadow: 0 0 8px rgba(255, 201, 49, 0.2);
}

.dash-heading {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--brand-navy-950);
  margin: 0;
  letter-spacing: -0.3px;
}

.dash-subheading {
  font-size: 0.82rem;
  color: var(--slate-500);
  margin: 3px 0 0;
}

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

.dash-filter-pill-group {
  display: flex;
  background: var(--slate-100);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
}

.dash-filter-pill {
  border: none;
  background: transparent;
  color: var(--slate-600);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.dash-filter-pill.active {
  background: #ffffff;
  color: var(--brand-navy-950);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-dash-action {
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-dash-sync {
  background: var(--slate-100);
  color: var(--slate-800);
  border: 1px solid var(--slate-300);
}
.btn-dash-sync:hover {
  background: var(--slate-200);
  transform: translateY(-1px);
}
.btn-dash-sync.loading .sync-icon {
  animation: spin 0.8s linear infinite;
}

.btn-dash-closing {
  background: linear-gradient(135deg, var(--brand-navy-950), var(--brand-navy-800));
  color: var(--brand-gold);
  border: 1.5px solid var(--brand-gold-border);
  box-shadow: 0 2px 8px rgba(0, 16, 50, 0.25);
}
.btn-dash-closing:hover {
  background: linear-gradient(135deg, var(--brand-navy-900), var(--brand-navy-700));
  border-color: var(--brand-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 16, 50, 0.4), 0 0 12px rgba(255, 201, 49, 0.3);
}

.btn-dash-line {
  background: #06c755;
  color: #ffffff;
}
.btn-dash-line:hover {
  background: #05b04a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

/* Dashboard KPI Cards Grid */
.dash-kpis-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .dash-kpis-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .dash-kpis-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .dash-kpis-grid { grid-template-columns: 1fr; }
}

.kpi-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.kpi-card.kpi-profit {
  background: linear-gradient(145deg, #ffffff, #f0fdf4);
  border-color: #86efac;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.08);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-title {
  font-size: 0.8rem;
  color: var(--slate-500);
  font-weight: 700;
}

.kpi-icon-badge {
  font-size: 1.25rem;
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--obsidian-950);
  letter-spacing: -0.5px;
}

.kpi-value.profit-accent {
  color: #059669;
}

.kpi-unit {
  font-size: 0.85rem;
  color: var(--slate-500);
  font-weight: 600;
}

.kpi-subtext {
  font-size: 0.72rem;
  color: var(--slate-500);
  margin-top: 4px;
}

.kpi-footer-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  align-self: flex-start;
}

.kpi-footer-tag.success { background: #dcfce7; color: #166534; }
.kpi-footer-tag.info { background: #e0f2fe; color: #0369a1; }
.kpi-footer-tag.warning { background: #fef3c7; color: #92400e; }
.kpi-footer-tag.profit { background: #059669; color: #ffffff; }
.kpi-footer-tag.neutral { background: #f1f5f9; color: #475569; }

/* Status Pipeline */
.dash-pipeline-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

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

.pipeline-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.pipeline-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--obsidian-950);
  margin: 0;
}

.pipeline-tip {
  font-size: 0.75rem;
  color: var(--slate-400);
}

.pipeline-steps-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pipeline-step-item {
  flex: 1;
  min-width: 140px;
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pipeline-step-item:hover {
  background: #ffffff;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.pipeline-step-item.active {
  background: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.pipeline-step-item.exception.active {
  border-color: #ef4444;
  background: #fef2f2;
}

.step-icon-circle {
  font-size: 1.15rem;
}

.step-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.step-count {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--obsidian-950);
}

.step-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-700);
}

.step-sub {
  font-size: 0.68rem;
  color: var(--slate-400);
}

.pipeline-arrow {
  color: var(--slate-300);
  font-size: 1rem;
  font-weight: 900;
}

.pipeline-divider {
  width: 1px;
  height: 40px;
  background: var(--slate-200);
  margin: 0 4px;
}

/* Charts Grid */
.dash-charts-grid,
.dash-insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 960px) {
  .dash-charts-grid,
  .dash-insights-grid { grid-template-columns: 1fr; }
}

.dash-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.dash-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--obsidian-950);
  margin: 0;
}

.dash-card-sub {
  font-size: 0.74rem;
  color: var(--slate-500);
  margin: 2px 0 0;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-600);
}

.legend-color {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.legend-color.bar { background: #0284c7; }
.legend-color.profit { background: #10b981; }

.leaderboard-badge {
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.dash-badge-sm {
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

/* 7 Days Bar Chart Container */
.dash-chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  height: 180px;
  padding: 10px 0 0;
  border-bottom: 2px solid var(--slate-200);
}

.chart-day-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 6px;
  position: relative;
}

.chart-bars-wrap {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  width: 100%;
  justify-content: center;
}

.chart-bar-single {
  width: 16px;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
}

.chart-bar-single.volume {
  background: linear-gradient(to top, #0284c7, #38bdf8);
}
.chart-bar-single.profit {
  background: linear-gradient(to top, #059669, #34d399);
}

.chart-bar-single:hover {
  filter: brightness(1.15);
  transform: scaleY(1.05);
}

.chart-day-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-600);
}

/* Leaderboard List */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-md);
  transition: all 0.15s;
}

.leaderboard-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

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

.leaderboard-rank {
  font-size: 1.1rem;
  width: 26px;
  text-align: center;
  font-weight: 900;
}

.leaderboard-name {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--obsidian-950);
}

.leaderboard-meta {
  font-size: 0.72rem;
  color: var(--slate-500);
}

.leaderboard-right {
  text-align: right;
}

.leaderboard-revenue {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  color: #047857;
}

.leaderboard-profit {
  font-size: 0.72rem;
  color: #059669;
  font-weight: 700;
}

/* Destination Provinces */
.provinces-bars-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.province-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.province-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-700);
}

.province-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--slate-100);
  border-radius: 9999px;
  overflow: hidden;
}

.province-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #ffd200, #f59e0b);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* Peak Hours Grid */
.peak-hours-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 520px) {
  .peak-hours-grid { grid-template-columns: repeat(2, 1fr); }
}

.peak-card {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
}

.peak-card-time {
  font-size: 0.7rem;
  color: var(--slate-500);
  font-weight: 700;
}

.peak-card-count {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--obsidian-950);
  margin: 4px 0 2px;
}

.peak-card-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0284c7;
}

/* Real-time Table */
.dash-table-card {
  padding: 20px 22px;
}

.dash-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-search-box {
  position: relative;
  min-width: 260px;
}

.dash-search-box .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--slate-400);
}

.dash-search-box input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  outline: none;
}

.dash-search-box input:focus {
  border-color: #0f172a;
}

.dash-select {
  padding: 7px 12px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  background: #ffffff;
  color: var(--slate-700);
  outline: none;
}

.dash-table-container {
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  margin-top: 6px;
}

.dash-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.dash-data-table th {
  background: #f8fafc;
  border-bottom: 2px solid var(--slate-200);
  padding: 10px 12px;
  font-weight: 800;
  color: var(--slate-700);
  text-align: left;
  white-space: nowrap;
}

.dash-data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--slate-100);
  vertical-align: middle;
}

.dash-data-table tr:hover td {
  background: #f8fafc;
}

.dash-row-pno {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #0f172a;
  text-decoration: none;
}
.dash-row-pno:hover {
  text-decoration: underline;
  color: #0284c7;
}

.dash-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.dash-badge-status.ready { background: #fef3c7; color: #92400e; }
.dash-badge-status.pickup { background: #e0f2fe; color: #0369a1; }
.dash-badge-status.transit { background: #ede9fe; color: #6d28d9; }
.dash-badge-status.delivered { background: #dcfce7; color: #166534; }
.dash-badge-status.exception { background: #fee2e2; color: #b91c1c; }

.dash-actions-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-table-action {
  border: none;
  background: var(--slate-100);
  color: var(--slate-700);
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-table-action:hover {
  background: #0f172a;
  color: #ffffff;
}

.btn-table-action.receipt:hover {
  background: #0284c7;
  color: #ffffff;
}

/* ==========================================================================
   IZIN VIP Customer & Locked Pricing System Styles
   ========================================================================== */

/* Top Nav VIP Button */
.btn-nav-vip {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  transition: all 0.2s ease;
}

.btn-nav-vip:hover {
  background: #fde68a !important;
  transform: translateY(-1px);
}

.vip-count-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 4px;
}

/* Sender Card VIP Banner */
.sender-vip-banner {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px solid #f59e0b;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: vipBannerSlideDown 0.25s ease-out;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

@keyframes vipBannerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vip-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vip-crown-icon {
  font-size: 1.4rem;
  line-height: 1;
  background: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.2);
}

.vip-banner-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vip-banner-title-row strong {
  font-size: 0.88rem;
  color: #78350f;
}

.vip-tag-badge {
  background: #d97706;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vip-lock-badge {
  background: #b45309;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.vip-banner-sub {
  font-size: 0.74rem;
  color: #92400e;
  margin-top: 2px;
}

.vip-banner-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-vip-banner-action {
  background: #ffffff;
  border: 1px solid #fde68a;
  color: #b45309;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-vip-banner-action:hover {
  background: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
}

/* VIP Courier Card Highlights */
.courier-card.is-vip-locked {
  border: 2px solid #f59e0b !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.18) !important;
}

.vip-courier-banner {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.store-price-input.is-vip-locked {
  background: #fffbeb !important;
  border-color: #f59e0b !important;
  color: #b45309 !important;
  font-weight: 800 !important;
}

/* VIP Customers Grid & Cards in Modal 7 */
.vip-customers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

.vip-customer-card {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  padding: 16px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.vip-customer-card:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.12);
}

.vip-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.vip-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vip-card-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.vip-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-800);
  margin: 0;
}

.vip-card-shop {
  font-size: 0.76rem;
  color: var(--slate-500);
}

.vip-card-phone {
  background: #f1f5f9;
  color: var(--slate-700);
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.vip-card-pricing-row {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vip-pricing-label {
  font-size: 0.75rem;
  color: #92400e;
  font-weight: 600;
}

.vip-pricing-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #b45309;
}

.vip-card-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--slate-600);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--slate-100);
  margin-bottom: 12px;
}

.vip-card-stats strong {
  color: var(--slate-800);
}

.vip-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.btn-vip-use {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-vip-use:hover {
  background: #f59e0b;
  color: #ffffff;
}

.btn-vip-edit-sm, .btn-vip-delete-sm {
  border: 1px solid var(--slate-200);
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-vip-edit-sm:hover {
  background: #f1f5f9;
  color: var(--slate-900);
}

.btn-vip-delete-sm:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Cart Item VIP Badge */
.cart-item-vip-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
}

/* ==========================================================================
   Photo Proof & Anti-Theft Modal Styles
   ========================================================================== */
.btn-nav-photo {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3) !important;
}

.btn-nav-photo:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  transform: translateY(-1px);
}

.btn-nav-track {
  background: linear-gradient(135deg, #ffd200 0%, #f59e0b 100%) !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

.btn-nav-track:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  transform: translateY(-1px);
}

.modal-card-photo-proof,
.modal-card-tracking {
  max-width: 820px;
  width: 95%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.photo-order-selector-card {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.photo-capture-viewport {
  background: #0f172a;
  border: 2px dashed #334155;
  border-radius: 12px;
  padding: 12px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.photo-preview-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-photo-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.empty-photo-placeholder p {
  color: #cbd5e1;
}

.photo-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn-tool-camera {
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-tool-camera:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.photo-watermark-indicator {
  background: rgba(15, 23, 42, 0.92);
  color: #38bdf8;
  border: 1px solid #0284c7;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  margin-top: 10px;
  text-align: center;
}

/* ==========================================================================
   Live Tracking & Timeline Styles
   ========================================================================== */
.tracking-search-bar {
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.tracking-recent-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.tracking-recent-chip:hover {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #7dd3fc;
}

.tracking-info-card {
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.t-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #cbd5e1;
}

.t-pno-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.t-carrier-pill {
  background: #ffd200;
  color: #0f172a;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.t-pno-display {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.15rem;
  color: #0f172a;
  letter-spacing: 0.5px;
}

.t-status-badge {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  font-weight: 800;
  font-size: 0.84rem;
  padding: 5px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.t-parties-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}

@media (max-width: 640px) {
  .t-parties-grid {
    grid-template-columns: 1fr;
  }
}

.t-party-box {
  padding: 10px 12px;
  border-radius: 8px;
}

.t-sender-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.t-receiver-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

.t-party-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 2px;
}

.t-party-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.t-party-sub {
  font-size: 0.78rem;
  color: #475569;
  margin-top: 3px;
  line-height: 1.4;
}

.t-specs-bar {
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #713f12;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Photo Proof in Tracking */
.tracking-photo-proof-card {
  background: white;
  border: 2px solid #86efac;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.t-proof-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.t-photo-body {
  text-align: center;
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
}

.t-photo-img-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.t-photo-img {
  max-width: 100%;
  max-height: 360px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: block;
}

.t-photo-verified-stamp {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(16, 185, 129, 0.92);
  color: white;
  font-weight: 800;
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
}

.t-photo-details {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #334155;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
}

/* Timeline */
.tracking-timeline-card {
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.tracking-timeline {
  position: relative;
  padding-left: 30px;
  margin-top: 12px;
}

.tracking-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: #cbd5e1;
}

.t-step-item {
  position: relative;
  padding-bottom: 20px;
}

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

.t-step-dot {
  position: absolute;
  left: -30px;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.t-step-item.completed .t-step-dot {
  background: #10b981;
  color: white;
}

.t-step-item.current .t-step-dot {
  background: #0284c7;
  color: white;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.25);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(2, 132, 199, 0); }
  100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

.t-step-content {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}

.t-step-item.current .t-step-content {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.t-step-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.t-step-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: #0f172a;
}

.t-step-time {
  font-size: 0.75rem;
  color: #64748b;
  font-family: var(--font-mono);
}

.t-step-desc {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.4;
}

.t-step-evidence-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Toast Prompt for Taking Photo after printing */
.photo-prompt-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: white;
  border: 2px solid #38bdf8;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  animation: slideUpToast 0.3s ease-out;
}

@keyframes slideUpToast {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.btn-toast-photo {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  font-weight: 800;
  font-size: 0.82rem;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
}

/* Multi-match Parcel Search Results (เมื่อค้นหาจากเบอร์ผู้ส่ง/เบอร์ผู้รับ) */
.tracking-multi-results {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
  margin-bottom: 14px;
}

.tm-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 10px;
}

.tm-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.tracking-match-card {
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.tracking-match-card:hover {
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.tracking-match-card.active {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 2px #bae6fd;
}

.tm-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tm-card-pno {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 0.88rem;
  color: #0f172a;
}

.tm-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.tm-badge-photo {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.tm-badge-no-photo {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.tm-card-route {
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.4;
  margin-bottom: 8px;
}

.tm-card-route strong {
  color: #0f172a;
}

.tm-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #64748b;
  border-top: 1px dashed #e2e8f0;
  padding-top: 6px;
}

/* ==========================================================================
   SERVICE RATES & VIP LOYALTY TIERS STYLES
   ========================================================================== */

.btn-nav-rates {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
  transition: all 0.2s ease;
}

.btn-nav-rates:hover {
  background: #d1fae5 !important;
  transform: translateY(-1px);
}

.rates-tabs-header {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
  background: #f0fdf4;
  border-bottom: 2px solid #bbf7d0;
}

.rates-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px 6px 0 0;
}

.rates-tab-btn:hover {
  color: #065f46;
  background: rgba(16, 185, 129, 0.08);
}

.rates-tab-btn.active {
  color: #047857;
  border-bottom-color: #059669;
  background: white;
  font-weight: 800;
}

/* Tier Ladder Grid */
.tier-control-panel {
  background: white;
  border: 1.5px solid #d1fae5;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.05);
}

.tier-ladder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.tier-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.tier-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.tier-card.tier-standard { border-color: #cbd5e1; }
.tier-card.tier-silver { border-color: #38bdf8; background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 40%); }
.tier-card.tier-gold { border-color: #f59e0b; background: linear-gradient(180deg, #fffbeb 0%, #ffffff 40%); }
.tier-card.tier-diamond { border-color: #a855f7; background: linear-gradient(180deg, #faf5ff 0%, #ffffff 40%); }

.tier-badge-pill {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.tier-card.tier-standard .tier-badge-pill { background: #f1f5f9; color: #475569; }
.tier-card.tier-silver .tier-badge-pill { background: #e0f2fe; color: #0369a1; }
.tier-card.tier-gold .tier-badge-pill { background: #fef3c7; color: #92400e; }
.tier-card.tier-diamond .tier-badge-pill { background: #f3e8ff; color: #6b21a8; }

.tier-target-boxes {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
}

.tier-price-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.tier-price-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.tier-price-unit {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

.tier-profit-sub {
  font-size: 0.74rem;
  color: #166534;
  font-weight: 700;
  margin-top: 4px;
}

.tier-input-group {
  margin-top: 8px;
  text-align: left;
}

.tier-input-group label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  display: block;
  margin-bottom: 2px;
}

.tier-input-group input {
  width: 100%;
  padding: 4px 8px;
  font-size: 0.82rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
}

/* Weight Rates Table */
.rates-table-wrap {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.rates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.rates-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  padding: 12px 14px;
  text-align: center;
  border-bottom: 2px solid #e2e8f0;
}

.rates-table td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.rates-table tr:hover td {
  background: #f8fafc;
}

/* Printable Poster Card */
.poster-preview-card {
  background: white;
  border: 2px dashed #10b981;
  border-radius: 14px;
  padding: 24px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.poster-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #10b981;
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.poster-brand-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: #064e3b;
  margin: 0;
}

.poster-tier-banner {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

@media print {
  body.printing-poster * {
    visibility: hidden;
  }
  body.printing-poster #printablePosterArea, 
  body.printing-poster #printablePosterArea * {
    visibility: visible;
  }
  body.printing-poster #printablePosterArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
  }

  body.printing-manifest * {
    visibility: hidden;
  }
  body.printing-manifest #printableManifestArea,
  body.printing-manifest #printableManifestArea * {
    visibility: visible;
  }
  body.printing-manifest #printableManifestArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
  }
}

/* ==========================================================================
   MERCHANT VIP PORTAL & DROPOFF SYSTEM
   ========================================================================== */
.btn-top-merchant-portal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-gold-gradient);
  color: var(--brand-navy-950);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 12px rgba(255, 201, 49, 0.35);
}

.btn-top-merchant-portal:hover {
  background: linear-gradient(135deg, #ffe066 0%, #f5b716 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(255, 201, 49, 0.55);
}

.merchant-status-badge {
  background: var(--brand-navy-950);
  color: var(--brand-gold);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.3px;
}

.btn-nav-dropoff {
  background: linear-gradient(135deg, var(--brand-navy-950), var(--brand-navy-800)) !important;
  color: var(--brand-gold) !important;
  border: 1.5px solid var(--brand-gold-border) !important;
  box-shadow: 0 2px 8px rgba(0, 16, 50, 0.25) !important;
}

.btn-nav-dropoff:hover {
  background: var(--brand-gold) !important;
  color: var(--brand-navy-950) !important;
  border-color: var(--brand-gold) !important;
  box-shadow: 0 4px 16px rgba(255, 201, 49, 0.45) !important;
}

.merchant-portal-view {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.merchant-hero-card {
  background: linear-gradient(135deg, #001032 0%, #001849 35%, #01266c 70%, #08348c 100%);
  border: 1.5px solid rgba(255, 201, 49, 0.45);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  box-shadow: 0 12px 35px rgba(0, 16, 50, 0.45), 0 0 25px rgba(255, 201, 49, 0.15);
  position: relative;
  overflow: hidden;
}

.merchant-hero-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 201, 49, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.merchant-hero-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 280px;
}

.merchant-avatar-wrap {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--brand-navy-900);
  border: 2px solid var(--brand-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(255, 201, 49, 0.45), 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.merchant-avatar-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.merchant-avatar-crown {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 1.15rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  animation: floatCrown 3s ease-in-out infinite;
}

@keyframes floatCrown {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(6deg); }
}

.merchant-info-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.merchant-shop-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.merchant-tier-pill {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 201, 49, 0.18);
  color: var(--brand-gold);
  border: 1.5px solid rgba(255, 201, 49, 0.5);
  box-shadow: 0 0 10px rgba(255, 201, 49, 0.25);
}

.merchant-subinfo {
  font-size: 0.82rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.merchant-price-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.82rem;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.merchant-hero-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 320px;
  max-width: 480px;
  flex: 1;
}

.loyalty-progress-container {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 201, 49, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loyalty-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.loyalty-label {
  font-weight: 700;
  color: #cbd5e1;
}

.loyalty-count-highlight {
  font-weight: 800;
  color: var(--brand-gold);
  font-size: 0.92rem;
  text-shadow: 0 0 10px rgba(255, 201, 49, 0.4);
}

.loyalty-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.loyalty-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffc931, #f59e0b, #10b981);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(255, 201, 49, 0.6);
}

.loyalty-subtext {
  font-size: 0.74rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}

.merchant-hero-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-hero-action {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-hero-action:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.merchant-portal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--slate-200);
  padding-bottom: 2px;
  overflow-x: auto;
}

.merchant-tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-500);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border-radius: 6px 6px 0 0;
  white-space: nowrap;
}

.merchant-tab-btn:hover {
  color: var(--brand-navy-900);
  background: var(--brand-navy-50);
}

.merchant-tab-btn.active {
  color: var(--brand-navy-950);
  border-bottom-color: var(--brand-gold);
  border-bottom-width: 3.5px;
  background: linear-gradient(to top, rgba(255, 201, 49, 0.12), transparent);
}

.modal-auth-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--brand-gold);
  background: var(--brand-navy-900);
  box-shadow: 0 0 12px rgba(255, 201, 49, 0.4);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-auth-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.merchant-tab-badge {
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 800;
}

.merchant-subview {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.merchant-create-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

@media (max-width: 992px) {
  .merchant-create-grid {
    grid-template-columns: 1fr;
  }
}

.merchant-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.merchant-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--obsidian-950);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: 12px;
}

.smart-paste-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.smart-paste-textarea {
  width: 100%;
  min-height: 95px;
  padding: 12px 14px;
  border: 2px dashed var(--brand-navy-500);
  border-radius: var(--radius-md);
  background: var(--brand-navy-50);
  font-size: 0.88rem;
  line-height: 1.5;
  font-family: inherit;
  resize: vertical;
  color: var(--brand-navy-950);
  box-sizing: border-box;
}

.smart-paste-textarea:focus {
  outline: none;
  border-color: var(--brand-navy-700);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(1, 38, 108, 0.15);
}

.smart-paste-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.btn-smart-parse {
  background: linear-gradient(135deg, var(--brand-navy-950) 0%, var(--brand-navy-800) 100%);
  color: var(--brand-gold);
  border: 1.5px solid var(--brand-gold-border);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 16, 50, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-smart-parse:hover {
  background: linear-gradient(135deg, var(--brand-navy-900) 0%, var(--brand-navy-700) 100%);
  border-color: var(--brand-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 16, 50, 0.4), 0 0 10px rgba(255, 201, 49, 0.25);
}

.box-size-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.box-size-pill {
  padding: 10px 8px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: #ffffff;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.box-size-pill:hover {
  border-color: var(--brand-navy-500);
  background: var(--brand-navy-50);
}

.box-size-pill.active {
  border-color: var(--brand-navy-700);
  background: var(--brand-navy-50);
  box-shadow: 0 0 0 2px rgba(1, 38, 108, 0.2);
}

.box-size-name {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--brand-navy-950);
}

.box-size-dim {
  font-size: 0.72rem;
  color: var(--slate-500);
}

.merchant-pricing-summary {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.merchant-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--slate-600);
}

.merchant-price-row.highlight {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--brand-navy-950);
  border-top: 1px dashed var(--slate-300);
  padding-top: 10px;
  margin-top: 4px;
}

.merchant-price-row.saving {
  color: #15803d;
  font-weight: 700;
  font-size: 0.82rem;
}

.btn-merchant-print {
  background: linear-gradient(135deg, var(--brand-navy-950) 0%, var(--brand-navy-800) 100%);
  color: var(--brand-gold);
  border: 1.5px solid var(--brand-gold);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 16, 50, 0.4), 0 0 15px rgba(255, 201, 49, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.btn-merchant-print:hover {
  background: linear-gradient(135deg, var(--brand-navy-900) 0%, var(--brand-navy-700) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 16, 50, 0.5), 0 0 25px rgba(255, 201, 49, 0.35);
}

.btn-merchant-save {
  background: #ffffff;
  color: var(--brand-navy-950);
  border: 1.5px solid var(--slate-300);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.btn-merchant-save:hover {
  background: #f8fafc;
  border-color: var(--slate-400);
}

.manifest-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.manifest-info-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.manifest-qr-wrap {
  width: 110px;
  height: 110px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}

.manifest-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.manifest-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-navy-950);
  margin: 0;
}

.manifest-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-navy-900);
  background: var(--brand-navy-50);
  border: 1px solid var(--brand-navy-100);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.dropoff-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.dropoff-badge.pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.dropoff-badge.accepted {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.demo-chip {
  padding: 6px 12px;
  border: 1px solid var(--slate-200);
  background: #f8fafc;
  border-radius: 8px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.demo-chip:hover {
  background: var(--brand-navy-50);
  border-color: var(--brand-gold);
  color: var(--brand-navy-950);
}

/* ==========================================================================
   Header Role Pill & Logout Button
   ========================================================================== */
.header-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brand-gold);
  color: var(--brand-navy-950);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.btn-header-logout:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

/* ==========================================================================
   GATEKEEPER LOGIN OVERLAY
   ========================================================================== */
.gatekeeper-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: radial-gradient(circle at 50% 30%, rgba(1, 38, 108, 0.96), rgba(0, 16, 50, 0.99));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  box-sizing: border-box;
  animation: gkFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gkFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.gatekeeper-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1.5px rgba(255, 201, 49, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gatekeeper-header {
  background: linear-gradient(135deg, var(--brand-navy-950) 0%, var(--brand-navy-900) 45%, var(--brand-navy-800) 100%);
  padding: 28px 24px 22px;
  text-align: center;
  color: #ffffff;
  position: relative;
  border-bottom: 2px solid var(--brand-gold);
}

.gatekeeper-logo-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background: #ffffff;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 0 2px var(--brand-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gatekeeper-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gatekeeper-title {
  font-family: 'Prompt', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 60%, var(--brand-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gatekeeper-subtitle {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin: 0 0 12px;
}

.gatekeeper-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 201, 49, 0.15);
  border: 1px solid rgba(255, 201, 49, 0.4);
  color: var(--brand-gold);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.gatekeeper-tabs {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid var(--slate-200);
}

.gk-tab-btn {
  flex: 1;
  padding: 13px 10px;
  border: none;
  background: transparent;
  font-family: 'Prompt', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 2.5px solid transparent;
}

.gk-tab-btn:hover {
  color: var(--brand-navy-800);
  background: rgba(255, 255, 255, 0.6);
}

.gk-tab-btn.active {
  color: var(--brand-navy-950);
  background: #ffffff;
  border-bottom-color: var(--brand-gold);
  font-weight: 800;
}

.gk-tab-content {
  padding: 24px 26px 20px;
}

.gk-form-group {
  margin-bottom: 16px;
}

.gk-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.gk-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.gk-input-icon {
  position: absolute;
  left: 12px;
  font-size: 1.1rem;
  pointer-events: none;
}

.gk-input {
  width: 100%;
  padding: 11px 12px 11px 40px;
  border: 1.5px solid var(--slate-300);
  border-radius: 10px;
  font-family: 'Prompt', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--obsidian-950);
  background: #f8fafc;
  transition: all 0.2s ease;
}

.gk-input:focus {
  outline: none;
  border-color: var(--brand-navy-800);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(1, 38, 108, 0.12);
}

.gk-hint {
  font-size: 0.72rem;
  color: var(--slate-500);
  margin-top: 4px;
  display: block;
}

.gk-demo-chips {
  background: #f8fafc;
  border: 1px dashed var(--slate-300);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 18px;
}

.gk-chips-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-500);
  margin-bottom: 6px;
}

.gk-chip {
  padding: 5px 10px;
  border: 1px solid var(--slate-200);
  background: #ffffff;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--brand-navy-800);
  cursor: pointer;
  transition: all 0.15s ease;
}

.gk-chip:hover {
  background: var(--brand-navy-50);
  border-color: var(--brand-gold);
  color: var(--brand-navy-950);
  transform: translateY(-1px);
}

.gk-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 16px;
  animation: gkFadeIn 0.2s ease;
}

.gk-alert.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.gk-alert.success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.gk-btn-submit {
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-navy-950) 0%, var(--brand-navy-800) 100%);
  border: 1.5px solid var(--brand-gold);
  color: var(--brand-gold);
  font-family: 'Prompt', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(1, 38, 108, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gk-btn-submit:hover {
  background: linear-gradient(135deg, #01266c 0%, #08348c 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(255, 201, 49, 0.35);
  transform: translateY(-1px);
}

.gatekeeper-footer {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--slate-200);
  text-align: center;
  font-size: 0.72rem;
  color: var(--slate-500);
}

/* ==========================================================================
   ADMIN BACKOFFICE PORTAL VIEW
   ========================================================================== */
.admin-portal-view {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.admin-portal-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-header-card {
  background: linear-gradient(135deg, var(--brand-navy-950) 0%, var(--brand-navy-900) 45%, var(--brand-navy-800) 100%);
  border: 1.5px solid var(--brand-gold-border);
  border-radius: 16px;
  padding: 24px 28px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0, 16, 50, 0.35);
}

.admin-header-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-role-badge {
  background: var(--brand-gold);
  color: var(--brand-navy-950);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
}

.admin-branch-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
}

.admin-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: 0.2px;
}

.admin-subtitle {
  font-size: 0.84rem;
  color: #cbd5e1;
  margin: 0;
  max-width: 680px;
}

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

.btn-admin-add {
  padding: 10px 18px;
  background: linear-gradient(135deg, #ffc931 0%, #f59e0b 100%);
  color: var(--brand-navy-950);
  border: none;
  border-radius: 10px;
  font-family: 'Prompt', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 201, 49, 0.4);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-admin-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 201, 49, 0.55);
}

.btn-admin-refresh {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-radius: 10px;
  font-family: 'Prompt', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-admin-refresh:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* KPI Cards Grid */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.admin-kpi-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.admin-kpi-card.highlight-profit {
  border-color: rgba(255, 201, 49, 0.4);
  background: linear-gradient(135deg, #ffffff 60%, #fffbeb 100%);
}

.kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.kpi-content {
  flex: 1;
  min-width: 0;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-500);
  margin-bottom: 2px;
}

.kpi-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--obsidian-950);
  line-height: 1.2;
}

.kpi-unit {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-500);
}

.kpi-subtext {
  font-size: 0.72rem;
  color: var(--slate-500);
  margin-top: 4px;
}

/* Toolbar & Table */
.admin-toolbar-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-search-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
}

.admin-search-wrap .search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.95rem;
  color: var(--slate-400);
}

.admin-search-input {
  width: 100%;
  padding: 9px 36px 9px 36px;
  border: 1.5px solid var(--slate-200);
  border-radius: 8px;
  font-family: 'Prompt', sans-serif;
  font-size: 0.88rem;
  background: #f8fafc;
}

.admin-search-input:focus {
  outline: none;
  border-color: var(--brand-navy-800);
  background: #ffffff;
}

.btn-clear-search {
  position: absolute;
  right: 10px;
  border: none;
  background: transparent;
  color: var(--slate-400);
  cursor: pointer;
  font-size: 0.9rem;
}

.admin-filter-pills {
  display: flex;
  gap: 6px;
}

.admin-filter-pill {
  padding: 6px 14px;
  border: 1px solid var(--slate-200);
  background: #f8fafc;
  color: var(--slate-600);
  border-radius: 999px;
  font-family: 'Prompt', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-filter-pill:hover {
  background: var(--brand-navy-50);
  color: var(--brand-navy-950);
}

.admin-filter-pill.active {
  background: var(--brand-navy-950);
  color: var(--brand-gold);
  border-color: var(--brand-navy-950);
}

.admin-table-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.admin-table-header {
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-table-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--obsidian-950);
}

.admin-table-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--slate-500);
}

.admin-table-responsive {
  overflow-x: auto;
}

.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-data-table th {
  background: #f1f5f9;
  padding: 12px 16px;
  font-weight: 800;
  color: var(--slate-700);
  text-align: left;
  border-bottom: 1.5px solid var(--slate-300);
  white-space: nowrap;
}

.admin-data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: middle;
}

.admin-data-table tr:hover td {
  background: #f8fafc;
}

.merchant-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.merchant-initial-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-navy-800), var(--brand-navy-950));
  color: var(--brand-gold);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--brand-gold-border);
}

.merchant-meta-shop {
  font-weight: 800;
  color: var(--obsidian-950);
  font-size: 0.9rem;
}

.merchant-meta-sub {
  font-size: 0.74rem;
  color: var(--slate-500);
  margin-top: 1px;
}

.pin-display-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--slate-200);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--obsidian-950);
}

.btn-action-icon {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-action-icon:hover {
  background: var(--slate-200);
}

.status-badge-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.status-badge-suspended {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.btn-admin-table-action {
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid var(--slate-200);
  background: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-admin-table-action:hover {
  background: var(--brand-navy-50);
  border-color: var(--brand-gold);
  color: var(--brand-navy-950);
}

.btn-admin-table-action.danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.admin-modal-header {
  background: linear-gradient(135deg, var(--brand-navy-950) 0%, var(--brand-navy-900) 45%, var(--brand-navy-800) 100%) !important;
  color: #ffffff !important;
  border-bottom: 2.5px solid var(--brand-gold) !important;
  padding: 16px 20px !important;
  border-radius: 16px 16px 0 0 !important;
}

.admin-modal-header .modal-title {
  color: #ffffff !important;
}

.admin-modal-header .modal-close-btn {
  color: #ffffff !important;
  opacity: 0.85;
}

.admin-modal-header .modal-close-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15) !important;
}

/* ==========================================================================
   Region Picker (Thai Postal Code & Sub-district Autocomplete Dropdown)
   ========================================================================== */

.region-picker-wrapper {
  position: relative;
  width: 100%;
}

.region-input-relative {
  position: relative;
  width: 100%;
}

.region-picker-input {
  width: 100%;
  padding-right: 36px !important;
  cursor: text;
  font-size: 0.92rem;
  line-height: 1.4;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  transition: all 0.15s ease-in-out;
}

/* Highlight green border when active/open matching user screenshot */
.region-picker-wrapper.is-open .region-picker-input,
.region-picker-input:focus {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3.5px rgba(34, 197, 94, 0.18) !important;
  outline: none;
}

.region-picker-wrapper.is-open .input-label {
  color: #15803d !important;
  font-weight: 700;
}

.region-picker-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.72rem;
  color: #64748b;
  transition: transform 0.2s ease, color 0.2s ease;
  user-select: none;
}

.region-picker-wrapper.is-open .region-picker-arrow {
  transform: translateY(-50%) rotate(180deg);
  color: #22c55e;
}

.region-picker-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.16), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  max-height: 290px;
  overflow-y: auto;
  z-index: 2000;
  padding: 6px 0;
  display: none;
}

.region-picker-wrapper.is-open .region-picker-dropdown {
  display: block;
  animation: regionDropdownFadeIn 0.15s ease-out;
}

@keyframes regionDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.region-picker-item {
  padding: 9px 16px;
  font-size: 0.90rem;
  color: #334155;
  cursor: pointer;
  line-height: 1.45;
  transition: background-color 0.1s ease, color 0.1s ease;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.region-picker-item:hover,
.region-picker-item.is-selected {
  background-color: #f1f5f9;
  color: #01266c;
  font-weight: 600;
}

.region-picker-item mark {
  background-color: #fef08a;
  color: #1e3a8a;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 3px;
}

.region-picker-empty {
  padding: 14px 16px;
  color: #94a3b8;
  font-size: 0.86rem;
  text-align: center;
}

.btn-text-edit-toggle {
  background: none;
  border: none;
  font-size: 0.74rem;
  color: var(--brand-navy-800);
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-text-edit-toggle:hover {
  color: var(--brand-gold-dark, #b45309);
  background: var(--brand-navy-50, #f0f5fc);
}



