/* mobile-app.css */
:root {
  --primary-color: #2563eb;
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  --secondary-color: #10b981;
  --secondary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --accent-color: #f59e0b;
  --background: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.85);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: rgba(226, 232, 240, 0.8);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --safe-top: env(safe-area-inset-top, 60px);
  --safe-bottom: env(safe-area-inset-bottom, 34px);
  --header-height: 60px;
  --nav-height: 84px;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0f172a;
    --card-bg: #1e293b;
    --surface: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --primary-color: #60a5fa;
    --primary-light: #1e3a8a;
    --success-color: #22c55e;
    --error-color: #f43f5e;
    --warning-color: #fbbf24;
    --info-color: #60a5fa;
    --nav-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
  }

  .bottom-nav {
    background: #0f172a;
    box-shadow: var(--nav-shadow);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .app-header {
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* Comprehensive Dark Mode Coverage */
  .modal,
  .side-menu,
  .cart-drawer,
  .cart-item,
  .cart-footer,
  .card-premium,
  .card,
  .modal-overlay,
  .cart-overlay,
  .results-section,
  .results-header,
  .details-content,
  .file-item,
  .option-card,
  .notification,
  .pdf-viewer-container,
  #manualMixedInput,
  #customBindingArea,
  .courier-item,
  .payment-item,
  .order-info-item,
  .tracking-event,
  .latest-status {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
  }

  .results-header {
    background: var(--primary-light) !important;
  }

  .results-table th {
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: var(--text-secondary) !important;
  }

  .status-message, .cod-notice, .format-hint {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border-color: var(--border-color) !important;
  }

  .btn:not(.btn-primary):not(.btn-success) {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
  }

  input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="file"]),
  select,
  textarea,
  .input-premium {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
  }

  ::placeholder {
    color: #4b5563 !important;
  }

  .pdf-scroll-container {
    background-color: #020617 !important;
  }
}


[data-theme="dark"] {
  --background: #0f172a;
  --card-bg: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --primary-color: #60a5fa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 30px);
  padding-top: calc(var(--header-height) + var(--safe-top) + 20px);
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
  line-height: 1.6;
}

/* Glassmorphism Header */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-height) + var(--safe-top));
  background: var(--card-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding-top: var(--safe-top);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.menu-toggle {
  position: absolute;
  left: 10px;
  top: var(--safe-top);
  width: 44px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-primary);
  cursor: pointer;
  z-index: 2002;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.menu-toggle:active {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(0.9);
}

.header-actions {
  position: absolute;
  right: 10px;
  top: var(--safe-top);
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2002;
}

.header-action-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}


.header-action-btn:active {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(0.9);
}

.app-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--header-height);
  z-index: 2001;
}

.app-logo img {
  height: 38px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}



/* Premium Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0px;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  background: var(--card-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 12px 0 var(--safe-bottom);
  z-index: 9999;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  border-radius: 28px 28px 0 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  gap: 4px;
  position: relative;
  opacity: 0.7;
}

.nav-item i {
  font-size: 20px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item.active {
  color: var(--primary-color);
  opacity: 1;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: -12px;
  width: 20px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}



.nav-item.active i {
  transform: translateY(-2px);
  color: var(--primary-color);
  filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.3));
}


.nav-item.active span {
  font-weight: 800;
  color: var(--primary-color);
}


/* Premium Cards */
.card-premium {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 24px;
  margin: 16px;
  box-shadow: var(--shadow-premium);
}

.btn-premium {
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 24px;
  font-weight: 700;
  font-size: 16px;
  width: 100%;
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-premium:active {
  transform: scale(0.97);
}

/* Animations */
.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Premium Notifications */
.notification-premium {
  position: relative;
  width: 100%;
  margin-bottom: 10px;
  left: 20px;
  right: 20px;
  padding: 16px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-premium);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Fix for existing notification containers in print.html / track.html */
.notification-container,
#notificationContainer,
.modal-overlay,
#menuOverlay,
.side-menu,
#sideMenu,
.cart-overlay,
.cart-drawer {
  z-index: 10000 !important;
}

.notification-container,
#notificationContainer {
  top: var(--safe-top) !important;
  margin-top: 10px !important;
  bottom: auto !important;
  right: 20px !important;
  left: 20px !important;
  max-width: none !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 768px) {

  .notification-container,
  #notificationContainer {
    left: auto !important;
    right: calc(50% - 220px) !important;
    width: 350px !important;
  }
}

.notification-premium.success {
  border-left: 4px solid var(--secondary-color);
}

.notification-premium.error {
  border-left: 4px solid var(--error-color);
}

/* Section styling */
.app-section {
  display: none;
}

.app-section.active {
  display: block;
}

/* Premium Form Styles */
.input-premium {
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-primary);
  width: 100%;
  font-size: 16px;
  transition: all 0.2s ease;
}

.input-premium:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Hide desktop specific things on mobile */
@media (max-width: 768px) {

  .logo-container {
    display: none !important;
  }
}

/* Responsive constraints for desktop */
@media (min-width: 768px) {
  body {
    max-width: 480px;
    margin: 0 auto;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
  }

  .app-header,
  .bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Truck Animation */
@keyframes truckRun {
  0% {
    transform: translateX(-100px);
  }

  100% {
    transform: translateX(120%);
    /* Move completely off screen */
  }
}

.truck-animation {
  position: absolute;
  bottom: -2px;
}

/* Share Drawer / Bottom Sheet */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 11000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.share-overlay.show {
  opacity: 1;
  visibility: visible;
}

.share-drawer {
  position: fixed;
  bottom: calc(15px + var(--safe-bottom));
  left: 15px;
  right: 15px;
  background: var(--card-bg);
  border-radius: 24px;
  padding: 24px;
  z-index: 11001;
  transform: translateY(calc(100% + 100px));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.share-overlay.show .share-drawer {
  transform: translateY(0);
}

.share-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.share-drawer-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.share-drawer-close {
  background: var(--background);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.share-item:active {
  transform: scale(0.9);
}

.share-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-item span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.share-copy-area {
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.share-url {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.share-copy-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Specific Social Colors */
.share-wa { background: linear-gradient(135deg, #25D366 0%, #128C7E 100%); }
.share-tg { background: linear-gradient(135deg, #0088cc 0%, #006699 100%); }
.share-fb { background: linear-gradient(135deg, #1877F2 0%, #0C56B7 100%); }
.share-tw { background: linear-gradient(135deg, #1DA1F2 0%, #0D8BD9 100%); }

.truck-animation {
  /* Run along the bottom line of the header */
  left: 0;
  width: 100%;
  height: 30px;
  /* Adjust based on truck icon size */
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.truck-icon {
  position: absolute;
  left: 0;
  font-size: 20px;
  color: var(--primary-color);
  animation: truckRun 8s linear infinite;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Migrated from print.html */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 15px;
  padding-top: var(--header-height);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0px 0;
  margin-bottom: 5px;
}

.header-content {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 0px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.menu-toggle {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  cursor: pointer;
  color: var(--text-primary);
  z-index: 1001;
}

/* Side Menu */
.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.side-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: var(--card-bg);
  z-index: 1002;
  transition: all 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.side-menu.open {
  left: 0;
}

.menu-header, .cart-header {
  padding: calc(10px + var(--safe-top)) 20px 10px 20px !important;
  height: calc(var(--header-height) + var(--safe-top)) !important;
  border-bottom: 1px solid var(--border-color) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: var(--primary-light) !important;
}

.menu-header h3, .cart-header h3 {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
}

.menu-close {
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
}

.menu-items {
  padding: 20px 0;
  list-style: none;
}

.menu-item {
  display: block;
  padding: 12px 24px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item:hover {
  background: var(--background);
  color: var(--primary-color);
}

.menu-user-info {
  padding: 20px;
  background: var(--primary-light, #eff6ff);
  border-bottom: 1px solid var(--border-color);
  display: none;
  /* Shown when logged in */
}

.menu-user-info.active {
  display: block;
}

.logo-container {
  margin-bottom: 0px;
}

.logo-container img {
  max-width: 240px;
  height: auto;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-primary);
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.section-title i {
  color: var(--primary-color);
  font-size: 1.1em;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  background-color: var(--card-bg);
  color: var(--text-primary);
}

.btn:hover {
  background-color: var(--background);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-success {
  background-color: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
}

.btn-success:hover {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-light);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.card-header i {
  font-size: 20px;
  margin-right: 12px;
  color: var(--primary-color);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}

input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="file"]),
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  transition: var(--transition);
  background-color: var(--card-bg);
  color: var(--text-primary);
}

input[type="radio"],
input[type="checkbox"],
input[type="range"],
input[type="file"] {
  width: auto;
  padding: 0;
  margin: 0;
  background: none;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.print-type-toggle {
  display: flex;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
}

.print-type-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: calc(var(--radius) - 4px);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.print-type-btn.active {
  background-color: var(--card-bg);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.input-mode-toggle {
  display: flex;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
}

.mode-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: calc(var(--radius) - 4px);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-size: 14px;
}

.mode-btn.active {
  background-color: var(--card-bg);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.file-upload-section {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  background-color: var(--background);
  transition: var(--transition);
}

.file-upload-section.dragover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.file-upload-section.error {
  border-color: var(--error-color);
  background-color: rgba(220, 38, 38, 0.05);
}

.file-upload-icon {
  font-size: 48px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.file-upload-text {
  margin-bottom: 16px;
}

.file-upload-text h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.file-upload-text p {
  font-size: 14px;
  color: var(--text-secondary);
}

.file-input {
  display: none;
}

.file-list {
  margin-top: 20px;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: var(--transition);
}

.file-item:hover {
  box-shadow: var(--shadow-sm);
}

.file-item.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.file-item i {
  font-size: 20px;
  margin-right: 12px;
  color: var(--error-color);
}

.file-info {
  flex: 1;
}

.file-name {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
}

.file-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.file-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.file-meta-item i {
  font-size: 12px;
  color: var(--text-secondary);
}

.file-remove {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
}

.file-remove:hover {
  color: var(--error-color);
}

.file-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.upload-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: none;
}

.upload-section.show {
  display: block;
}

.upload-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-server-btn {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-server-btn:hover:not(:disabled) {
  background-color: var(--secondary-dark);
}

.upload-server-btn:disabled {
  background-color: var(--text-secondary);
  cursor: not-allowed;
}

.upload-status {
  font-size: 14px;
  color: var(--text-secondary);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
  display: none;
}

.progress-bar.show {
  display: block;
}

.progress-fill {
  height: 100%;
  background-color: var(--secondary-color);
  width: 0%;
  transition: width 0.3s ease;
}

.courier-list {
  margin-top: 16px;
}

.courier-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.courier-item:hover {
  border-color: var(--primary-color);
}

.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.payment-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.payment-item:hover {
  border-color: var(--primary-color);
}

.payment-item.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.payment-item input[type="radio"] {
  margin-right: 12px;
}

.payment-details {
  flex: 1;
}

.payment-name {
  font-weight: 600;
  font-size: 14px;
  display: block;
}

.payment-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.cod-notice {
  margin-top: 10px;
  padding: 10px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  font-size: 12px;
  color: #92400e;
  display: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal {
  background: white;
  padding: 24px;
  border-radius: var(--radius);
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent-color);
}

.modal-body {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

.courier-item.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.courier-radio {
  width: 20px;
  height: 20px;
  margin-right: 16px;
}

.courier-details {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.courier-info {
  flex: 1;
}

.courier-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.courier-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.courier-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.courier-pricing {
  text-align: right;
  min-width: 200px;
}

.courier-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.courier-eta {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.badge-success {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--success-color);
}

.badge-warning {
  background-color: rgba(217, 119, 6, 0.1);
  color: var(--warning-color);
}

.results-section {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  display: none;
}

.results-header {
  background-color: var(--primary-color);
  color: white;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.results-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.results-header button {
  background-color: white;
  color: var(--primary-color);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  padding: 12px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.results-table th {
  background-color: var(--background);
  font-weight: 500;
  color: var(--text-secondary);
  width: 40%;
}

.action-button {
  width: 100%;
  padding: 16px;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.action-button:hover {
  background-color: var(--secondary-dark);
}

.action-button.processing {
  background-color: var(--warning-color);
}

.action-button i {
  font-size: 18px;
}

.status-message {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.status-message i {
  margin-right: 8px;
}

.status-success {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.status-error {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.status-warning {
  background-color: rgba(217, 119, 6, 0.1);
  color: var(--warning-color);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.details-toggle {
  cursor: pointer;
  padding: 12px;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.details-toggle:hover {
  background-color: var(--primary-light);
}

.details-content {
  padding: 16px;
  background-color: var(--background);
  border-radius: var(--radius);
  margin-top: 8px;
  display: none;
}

.details-content.show {
  display: block;
}

.hidden {
  display: none !important;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- SHOPPING CART DRAWER --- */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.show {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100%;
  background: white;
  z-index: 10001;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
}

.cart-drawer.open {
  right: 0;
  visibility: visible;
  opacity: 1;
}

/* Unifying cart header */

.cart-header h3 {
  margin: 0;
  font-size: 18px;
}

.cart-close {
  cursor: pointer;
  font-size: 24px;
  padding: 5px;
}

.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 10px;
  border-radius: 8px;
  background: #fdfdfd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 14px;
}

.cart-item-meta {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.cart-item-price {
  font-weight: 700;
  color: var(--primary-color);
  margin-top: 5px;
  font-size: 14px;
}

.cart-item-remove {
  cursor: pointer;
  color: #ef4444;
  padding: 5px;
  margin-left: 10px;
  font-size: 16px;
}

/* Status Badges */
.status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.status-badge.new,
.status-badge.pending {
  background: var(--info-color);
  color: white;
  opacity: 0.9;
}

.status-badge.processing {
  background: var(--warning-color);
  color: white;
}

.status-badge.shipped,
.status-badge.dispatched,
.status-badge.out-for-delivery,
.status-badge.in-transit {
  background: var(--primary-color);
  color: white;
}

.status-badge.delivered {
  background: var(--success-color);
  color: white;
}

.status-badge.returned,
.status-badge.cancelled,
.status-badge.failed {
  background: var(--error-color);
  color: white;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: #fafafa;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 800;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-bubble {
  position: absolute;
  top: -5px;
  right: -8px;
  background: #ef4444;
  color: white;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 800;
  border: 2px solid white;
}

.btn-cart-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px 15px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-size: 14px;
}

.btn-cart-secondary:hover {
  background: #f0f9ff;
}

.add-to-cart-wrapper {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  align-items: stretch;
}

/* Fix for button loading */
.fa-spinner {
  animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(359deg);
  }
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2999;
  display: none;
  backdrop-filter: blur(2px);
}

.cart-overlay.show {
  display: block;
}

.menu-header, .cart-header {
  padding: calc(10px + var(--safe-top)) 20px 10px 20px !important;
  height: calc(var(--header-height) + var(--safe-top)) !important;
  border-bottom: 1px solid var(--border-color) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: var(--primary-light) !important;
}

.menu-header h3, .cart-header h3 {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
}

/* Unified cart and menu header styles elsewhere */

.cart-header h3 {
  font-size: 18px;
  color: var(--primary-color);
}

.cart-close {
  cursor: pointer;
  font-size: 24px;
  color: var(--text-secondary);
}

.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.cart-item {
  display: flex;
  gap: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 15px;
  position: relative;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-weight: 700;
  margin-bottom: 5px;
  font-size: 14px;
}

.cart-item-meta {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.cart-item-price {
  font-weight: 700;
  color: var(--primary-color);
  margin-top: 8px;
}

.cart-item-remove {
  color: var(--error-color);
  cursor: pointer;
  padding: 5px;
  font-size: 14px;
}

.cart-footer {
  padding: 20px;
  border-top: 2px solid var(--border-color);
  background: #fdfdfd;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.add-to-cart-wrapper {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.btn-cart-secondary {
  background-color: #f59e0b;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
  transition: all 0.2s;
}

.btn-cart-secondary:hover {
  background-color: #d97706;
  transform: translateY(-2px);
}

.btn-cart-secondary:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .cart-drawer {
    width: 100%;
  }
}

.arrow-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
  width: 100%;
  display: none;
}

.action-button.processing .arrow-track {
  display: block;
}

.arrow-fill {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: arrowMove 1.2s linear infinite;
}

@keyframes arrowMove {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(200%);
  }
}

/* PDF Viewer Styles */
.pdf-viewer-container {
  margin-top: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card-bg);
}

.pdf-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: var(--background);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.pdf-viewer-title {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-viewer-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdf-viewer-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.pdf-viewer-content.show {
  max-height: 600px;
  overflow-y: auto;
}

.pdf-scroll-container {
  padding: 20px;
  background-color: #f5f5f5;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.pdf-page {
  background-color: white;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  position: relative;
}

.pdf-page-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.pdf-page-number {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.pdf-file-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background-color: var(--background);
  border-bottom: 1px solid var(--border-color);
}

.pdf-file-selector label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 0;
}

.pdf-file-selector select {
  width: auto;
  min-width: 200px;
}

.pdf-zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background-color: var(--background);
  border-bottom: 1px solid var(--border-color);
  justify-content: center;
}

.pdf-zoom-btn {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.pdf-zoom-btn:hover {
  background-color: var(--background);
}

.pdf-zoom-level {
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 50px;
  text-align: center;
}

.pdf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 16px;
}

.pdf-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

.pdf-loading-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Thank You Page Styles */
/* ===== ORDER SUCCESS PAGE STYLES ===== */
.thank-you-container {
  display: none;
  min-height: 100vh;
  background: linear-gradient(160deg, #f0fdf4 0%, #eff6ff 50%, #faf5ff 100%);
  padding: 20px 16px 100px;
}

.thank-you-container.show {
  display: block;
  animation: tyFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tyFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Banner */
.ty-hero {
  text-align: center;
  padding: 36px 20px 28px;
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  border-radius: 20px;
  color: white;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(5, 150, 105, 0.35);
}

.ty-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.ty-hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.ty-checkmark {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 40px;
  animation: tyBounce 0.8s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  position: relative;
  z-index: 1;
  border: 3px solid rgba(255, 255, 255, 0.4);
}

@keyframes tyBounce {
  0% {
    transform: scale(0) rotate(-10deg);
    opacity: 0;
  }

  60% {
    transform: scale(1.15) rotate(3deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.ty-hero h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ty-hero p {
  font-size: 15px;
  opacity: 0.92;
  position: relative;
  z-index: 1;
}

/* Status Badges */
.ty-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ty-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  animation: tyFadeIn 0.5s ease both;
}

.ty-badge.payment {
  background: #d1fae5;
  color: #065f46;
  border: 1.5px solid #6ee7b7;
  animation-delay: 0.2s;
}

.ty-badge.order {
  background: #dbeafe;
  color: #1e40af;
  border: 1.5px solid #93c5fd;
  animation-delay: 0.35s;
}

/* Order ID Card */
.ty-order-id-card {
  background: white;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  border: 1px solid #e5e7eb;
  animation: tyFadeIn 0.5s 0.4s ease both;
}

.ty-order-id-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 4px;
}

.ty-order-id-value {
  font-size: 18px;
  font-weight: 800;
  color: #1e40af;
  letter-spacing: 0.5px;
}

.ty-copy-btn {
  background: #eff6ff;
  border: none;
  color: #2563eb;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ty-copy-btn:hover {
  background: #dbeafe;
}

/* Details Grid */
.ty-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  animation: tyFadeIn 0.5s 0.5s ease both;
}

@media (max-width: 400px) {
  .ty-details-grid {
    grid-template-columns: 1fr;
  }
}

.ty-detail-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid #f3f4f6;
}

.ty-detail-card .ty-dc-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 10px;
}

.ty-detail-card .ty-dc-icon.green {
  background: #d1fae5;
  color: #059669;
}

.ty-detail-card .ty-dc-icon.blue {
  background: #dbeafe;
  color: #2563eb;
}

.ty-detail-card .ty-dc-icon.purple {
  background: #ede9fe;
  color: #7c3aed;
}

.ty-detail-card .ty-dc-icon.orange {
  background: #ffedd5;
  color: #ea580c;
}

.ty-detail-card .ty-dc-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.ty-detail-card .ty-dc-value {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

/* Transaction ID row */
.ty-txn-row {
  background: white;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid #f3f4f6;
  animation: tyFadeIn 0.5s 0.55s ease both;
}

.ty-txn-row .ty-txn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fef3c7;
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.ty-txn-row .ty-txn-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ty-txn-row .ty-txn-value {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  word-break: break-all;
}

/* Next Steps */
.ty-next-steps {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid #f3f4f6;
  animation: tyFadeIn 0.5s 0.6s ease both;
}

.ty-next-steps h3 {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ty-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.ty-step:last-child {
  margin-bottom: 0;
}

.ty-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.ty-step-text {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

.ty-step-text strong {
  color: #111827;
}

/* WhatsApp Status */
.ty-wa-status {
  background: #d1fae5;
  border: 1.5px solid #6ee7b7;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 12px;
  animation: tyFadeIn 0.4s ease both;
}

.ty-wa-status.show {
  display: flex;
}

.ty-wa-status i {
  font-size: 28px;
  color: #059669;
}

.ty-wa-status .ty-wa-text strong {
  display: block;
  color: #065f46;
  font-size: 14px;
}

.ty-wa-status .ty-wa-text span {
  font-size: 13px;
  color: #047857;
}

/* Action Buttons */
.ty-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: tyFadeIn 0.5s 0.7s ease both;
}

.ty-btn-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transition: all 0.2s;
}

.ty-btn-track:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.ty-btn-row {
  display: flex;
  gap: 10px;
}

.ty-btn-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  background: white;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.ty-btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.ty-btn-wa {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  background: #dcfce7;
  border: 1.5px solid #86efac;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #15803d;
  cursor: pointer;
  transition: all 0.2s;
}

.ty-btn-wa:hover {
  background: #bbf7d0;
}

/* Legacy compat */
.order-summary,
.order-id,
.order-details,
.detail-item,
.detail-icon,
.detail-content,
.next-steps,
.action-buttons {
  display: none !important;
}

.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Notification Popup Styles */
.notification-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.notification {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: relative;
  overflow: hidden;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-icon {
  font-size: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 14px;
}

.notification-message {
  font-size: 14px;
  color: var(--text-secondary);
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
  transition: var(--transition);
}

.notification-close:hover {
  color: var(--text-primary);
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.1);
}

.notification-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(1);
  transition: transform 5s linear;
}

.notification.success {
  border-left: 4px solid var(--success-color);
}

.notification.success .notification-icon {
  color: var(--success-color);
}

.notification.success .notification-progress-bar {
  background-color: var(--success-color);
}

.notification.error {
  border-left: 4px solid var(--error-color);
}

.notification.error .notification-icon {
  color: var(--error-color);
}

.notification.error .notification-progress-bar {
  background-color: var(--error-color);
}

.notification.warning {
  border-left: 4px solid var(--warning-color);
}

.notification.warning .notification-icon {
  color: var(--warning-color);
}

.notification.warning .notification-progress-bar {
  background-color: var(--warning-color);
}

.notification.info {
  border-left: 4px solid var(--primary-color);
}

.notification.info .notification-icon {
  color: var(--primary-color);
}

.notification.info .notification-progress-bar {
  background-color: var(--primary-color);
}

@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  .nav-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .courier-details {
    flex-direction: column;
    align-items: flex-start;
  }

  .courier-pricing {
    margin-top: 8px;
    text-align: left;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .results-header button {
    width: 100%;
  }

  .order-details {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .notification-container {
    left: 10px;
    right: 10px;
    max-width: none;
  }

  .pdf-viewer-controls {
    flex-wrap: wrap;
    gap: 8px;
  }

  .pdf-file-selector {
    flex-direction: column;
    align-items: flex-start;
  }

  .pdf-file-selector select {
    width: 100%;
  }

  .pdf-scroll-container {
    padding: 10px;
  }
}

.pdf-page-remove {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--error-color);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.8;
  transition: var(--transition);
  z-index: 10;
}

.pdf-page-remove:hover {
  opacity: 1;
  transform: scale(1.1);
}

.pdf-page.removed {
  opacity: 0.3;
  pointer-events: none;
  position: relative;
}

.pdf-page.removed::after {
  content: "REMOVED";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 24px;
  font-weight: 700;
  color: var(--error-color);
  border: 2px solid var(--error-color);
  padding: 8px 16px;
  border-radius: 8px;
  z-index: 5;
}

.file-mixed-settings {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.file-mixed-settings input {
  margin-top: 4px;
  font-size: 13px;
  padding: 6px;
}

.file-mixed-settings label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.pdf-page.removed {
  position: relative;
  pointer-events: auto;
}

.pdf-page.removed .pdf-page-canvas {
  opacity: 0.3;
}

.pdf-page.removed .pdf-page-number {
  opacity: 0.3;
}

/* When page is removed, center the restore button */
.pdf-page.removed .pdf-page-remove {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Start centered */
  width: 60px;
  height: 60px;
  font-size: 24px;
  opacity: 1;
  width: 80px;
  height: 80px;
  background-color: var(--success-color);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pdf-page.removed .pdf-page-remove:hover {
  transform: translate(-50%, -50%) scale(1.1);
  /* Keep centered on hover */
  background-color: var(--secondary-dark);
}

/* NORMAL STATE (Trash can) */
.pdf-page-remove {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--error-color);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.2s ease;
  z-index: 10;
  font-size: 14px;
}

.pdf-page-remove:hover {
  opacity: 1;
  transform: scale(1.1);
}

.pdf-page.removed::after {
  content: "REMOVED";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 24px;
  font-weight: 700;
  color: var(--error-color);
  border: 2px solid var(--error-color);
  padding: 8px 16px;
  border-radius: 8px;
  z-index: 5;
  display: none;
}

.file-mixed-settings {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.file-mixed-settings input {
  margin-top: 4px;
  font-size: 13px;
  padding: 6px;
}

.file-mixed-settings label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.pdf-page-canvas.grayscale {
  filter: grayscale(100%);
}

/* Side Menu CSS */
.header-content {
  position: relative;
}

.menu-toggle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  cursor: pointer;
  color: var(--text-primary);
  z-index: 1001;
}

.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.side-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: white;
  z-index: 1002;
  transition: all 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.side-menu.open {
  left: 0;
}

/* Duplicated menu header removed again */

.menu-close {
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
}

.menu-items {
  padding: 20px 0;
  list-style: none;
}

.menu-item {
  display: block;
  padding: 12px 24px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item:hover {
  background: var(--background);
  color: var(--primary-color);
}

.menu-user-info {
  padding: 20px;
  background: #f0f9ff;
  border-bottom: 1px solid #e0f2fe;
  display: none;
}

.menu-user-info.active {
  display: block;
}

/* --- PHOTO PRINT MODE CSS --- */
.mode-tabs {
  display: flex;
  background: #fff;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.mode-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.mode-tab.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.section-title-photo {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.section-title-photo i {
  color: var(--primary-color);
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.option-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.option-card.selected {
  border-color: var(--primary-color);
  background: #eff6ff;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.option-card.selected::after {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--primary-color);
  font-size: 14px;
}

.upload-box-photo {
  border: 2px dashed #94a3b8;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  background: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.upload-box-photo:hover {
  border-color: var(--primary-color);
  background: #f8fafc;
}

/* Passport Preview */
.sheet-preview-container {
  background: #e2e8f0;
  padding: 10px;
  border-radius: 8px;
  overflow: auto;
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.a4-sheet {
  width: 210mm;
  height: 297mm;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 10mm;
  display: grid;
  grid-template-columns: repeat(auto-fill, 35mm);
  grid-template-rows: repeat(auto-fill, 45mm);
  gap: 4mm;
  transform: scale(0.5);
  transform-origin: top center;
  flex-shrink: 0;
  /* Compensate for scale space: 297 * 0.5 = 148.5. 297-150 = 147. Margin -140 leaves ~8mm gap */
  margin-bottom: -140mm;
}

.passport-slot {
  width: 35mm;
  height: 45mm;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.passport-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pagewise-sheets-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 20px;
  background: #e2e8f0;
  border-radius: 12px;
  margin-top: 16px;
  align-items: flex-start;
  scroll-snap-type: x mandatory;
}

.pagewise-sheet-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  scroll-snap-align: center;
}

.a4-sheet-pagewise {
  width: 210mm;
  height: 297mm;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  transform: scale(0.4);
  transform-origin: top center;
  /* 297 * 0.4 = 118.8. Diff ~178. Margin -165 leaves ~13mm gap */
  margin-bottom: -165mm;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 480px) {
  .a4-sheet {
    /* Scale 0.33 to fit ~265px width. Diff H = 297 - 98 = 199. Margin -185 leaves 14mm */
    transform: scale(0.33) !important;
    margin-bottom: -185mm !important;
  }

  .a4-sheet-pagewise {
    transform: scale(0.33) !important;
    margin-bottom: -185mm !important;
  }
}

/* --- END PHOTO PRINT CSS --- */
:root {
  /* Added from print.html to support legacy components */
  --primary-dark: #1e40af;
  --primary-light: #eff6ff;
  --secondary-dark: #047857;
  --success-color: #10b981;
  --error-color: #dc2626;
  --warning-color: #d97706;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --transition: all 0.2s ease;
}

/* ============================================
   COMPREHENSIVE DARK MODE OVERRIDES
   Covers all hardcoded light colors in file
   ============================================ */

@media (prefers-color-scheme: dark) {

  /* All text/form inputs */
  input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="file"]),
  select,
  textarea {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
    color-scheme: dark;
  }

  input::placeholder,
  textarea::placeholder {
    color: #64748b;
  }

  /* Side menu & menus */
  .side-menu {
    background: #1e293b;
  }

  .menu-user-info {
    background: rgba(30, 64, 175, 0.15);
    border-color: #334155;
  }

  /* Notification cards */
  .notification-premium {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155;
  }

  /* Cards and section backgrounds */
  .card {
    background-color: #1e293b;
    border-color: #334155;
  }

  /* Print type toggle buttons */
  .print-type-btn.active,
  .mode-btn.active {
    background-color: #0f172a;
  }

  /* Print type container */
  .print-type-toggle,
  .input-mode-toggle {
    background-color: #0f172a;
    border-color: #334155;
  }

  /* File items */
  .file-item {
    background-color: #0f172a;
    border-color: #334155;
  }

  .file-item.selected {
    background-color: rgba(96, 165, 250, 0.1);
    border-color: #60a5fa;
  }

  /* File upload area */
  .file-upload-section {
    background-color: #0f172a;
    border-color: #334155;
  }

  .file-upload-section.dragover {
    background-color: rgba(96, 165, 250, 0.1);
  }

  /* Primary light overrides */
  .primary-light,
  [class*="primary-light"],
  .btn-outline:hover {
    background-color: rgba(96, 165, 250, 0.1);
  }

  /* Passport and print preview slots */
  .passport-slot {
    background: #0f172a;
    border-color: #334155;
  }

  /* Page wise scroll area */
  .pagewise-sheets-scroll {
    background: #0f172a;
  }

  /* Scrollbar */
  ::-webkit-scrollbar-track {
    background: #0f172a;
  }

  ::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: #475569;
  }
}

/* Also applies when [data-theme="dark"] is set manually */
[data-theme="dark"] input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="file"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background-color: #1e293b;
  color: #f8fafc;
  border-color: #334155;
  color-scheme: dark;
}

[data-theme="dark"] .side-menu {
  background: #1e293b;
}

[data-theme="dark"] .notification-premium {
  background: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}

[data-theme="dark"] .card {
  background-color: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .file-item {
  background-color: #0f172a;
  border-color: #334155;
}

[data-theme="dark"] .file-upload-section {
  background-color: #0f172a;
  border-color: #334155;
}

[data-theme="dark"] .print-type-toggle,
[data-theme="dark"] .input-mode-toggle {
  background-color: #0f172a;
  border-color: #334155;
}

/* Redesigned Cart Bubble */
.cart-bubble {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ef4444;
  color: white !important;
  font-size: 10px;
  min-width: 17px;
  height: 17px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  font-weight: 800;
  border: 1.5px solid var(--card-bg) !important;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
  line-height: 1;
  padding: 0;
  z-index: 10;
}

