.order-module {
  padding-bottom: 2.5rem;
}

.order-module .module-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
}

.order-card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  background: #fff;
}

.order-card .card-body {
  padding: 1rem;
}

.order-card .card-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.5rem 2.25rem;
}

.order-filter-card .form-label {
  font-weight: 600;
  color: #475467;
  margin-bottom: 0.35rem;
}

.order-filter-card .filter-input,
.order-filter-card .form-select {
  border-radius: 0.75rem;
  height: 52px;
  border-color: #e2e8f0;
}

/* Compact Select2 summary for crowded multi-filter rows */
.order-filter-card .select2-container.select2-summary-enabled .select2-selection--multiple {
  min-height: 52px;
  max-height: 52px;
  overflow: hidden;
}

.order-filter-card .select2-container.select2-summary-enabled .select2-selection__choice:not(.select2-selection__choice-summary) {
  display: none !important;
}

.order-filter-card .select2-container.select2-summary-enabled .select2-search--inline {
  display: none !important;
}

.order-filter-card .select2-container .select2-selection__choice.select2-selection__choice-summary {
  background-color: #f04438;
  border-color: #f04438;
  color: #fff;
  border-radius: 6px;
  margin: 0.35rem 0.5rem;
  padding: 0.2rem 0.55rem;
}

.order-btn,
.order-btn-save,
.order-btn-back,
.order-btn-reset,
.order-btn-search,
.order-btn-danger,
.order-btn-success,
.order-btn-secondary,
.order-add-btn {
  border-radius: 8px;
  height: 34px;
  padding-inline: 1rem;
  font-weight: 500;
  border: none;
}

.order-add-btn {
  background: #22c55e;
  color: #fff;
}

.order-add-btn:hover {
  background: #16a34a;
  color: #fff;
}

.order-btn-search,
.order-btn-danger {
  background: #f04438;
  color: #fff;
}

.order-btn-search:hover,
.order-btn-danger:hover {
  background: #dc2626;
  color: #fff;
}

.order-btn-success {
  background: #22c55e;
  color: #fff;
}

.order-btn-success:hover {
  background: #16a34a;
  color: #fff;
}

.order-btn-secondary {
  background: #f4f4f5;
  color: #111827;
}

.order-btn-secondary:hover {
  background: #e4e4e7;
}

.order-btn-reset {
  background: #f4f4f5;
  color: #111827;
}

.order-btn-reset:hover {
  background: #e4e4e7;
}

.order-btn-back {
  background: transparent;
  border: 1px solid #e4e7ec;
  color: #475467;
}

.order-btn-back:hover {
  background: #f4f4f5;
}

.order-btn-save {
  background: #f04438;
  color: #fff;
}

.order-btn-save:hover {
  background: #dc2626;
}

.order-action-buttons {
  margin-bottom: 1.5rem;
}

/* DataTable Layout Styling */
#order-table-wrapper .dataTables_wrapper {
  position: relative;
}

#order-table-wrapper .dataTables_wrapper .dataTables_length {
  float: left;
  margin-bottom: 1rem;
}

#order-table-wrapper .dataTables_wrapper .dataTables_filter {
  float: right;
  margin-bottom: 1rem;
  text-align: right;
}

#order-table-wrapper .dataTables_wrapper .dataTables_filter label {
  margin-bottom: 0;
}

#order-table-wrapper .dataTables_wrapper .dataTables_info {
  float: left;
  padding-top: 0.755em;
  color: #64748b;
  font-size: 0.875rem;
}

#order-table-wrapper .dataTables_wrapper .dataTables_paginate {
  float: right;
  padding-top: 0.25em;
  max-width: 100%;
}

#order-table-wrapper .dataTables_wrapper .dataTables_paginate .paginate_button {
  margin-left: 2px;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475467;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  transition: all 0.2s;
}

#order-table-wrapper .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #f04438;
  color: #fff;
  border-color: #f04438;
}

#order-table-wrapper .dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: #f1f5f9;
  color: #334155;
  border-color: #e2e8f0;
}

#order-table-wrapper .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

#order-table-wrapper .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

#order-table-wrapper .order-pager-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  white-space: nowrap;
  max-width: 100%;
}

#order-table-wrapper .order-pager-pages {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

#order-table-wrapper .order-pager-btn {
  min-width: 2rem;
  height: 2rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475467;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1;
  padding: 0 0.5rem;
  cursor: pointer;
}

#order-table-wrapper .order-pager-btn:hover:not(.disabled):not(.active) {
  background: #f1f5f9;
  color: #334155;
}

#order-table-wrapper .order-pager-btn.active {
  background: #f04438;
  color: #fff;
  border-color: #f04438;
}

#order-table-wrapper .order-pager-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#order-table-wrapper .order-pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  color: #64748b;
  font-size: 0.875rem;
}

#order-table-wrapper .order-pager-goto {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

#order-table-wrapper .order-pager-goto-label {
  margin: 0;
  font-size: 0.8125rem;
  color: #475467;
}

#order-table-wrapper .order-pager-goto-input {
  width: 4.5rem;
  height: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  color: #334155;
}

#order-table-wrapper .order-pager-go-btn {
  height: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  background: #fff;
  color: #334155;
  padding: 0 0.625rem;
  font-size: 0.8125rem;
  cursor: pointer;
}

#order-table-wrapper .order-pager-go-btn:hover {
  background: #f1f5f9;
}

#order-table-wrapper .dataTables_wrapper .dataTables_length select {
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  height: 38px;
  margin-left: 0.5rem;
}



#order-table-wrapper .dataTables_wrapper .row {
  margin: 0;
}

#order-table-wrapper .dataTables_wrapper .row::after {
  content: "";
  display: table;
  clear: both;
}

.order-table {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.order-table thead th {
  background: #e8efef;
  border-bottom: none;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: #334155;
  text-transform: none;
}

.order-table tbody td {
  border-bottom-color: #f1f5f9;
  padding: 1rem 1.25rem;
  vertical-align: middle;
}

.order-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s;
  margin: 0 2px;
}

.order-action-icon:hover {
  background: #f1f5f9;
  color: #334155;
}

.order-action-icon i {
  font-size: 18px;
}

/* Disabled row actions (e.g. delivered orders): icon greyed out; tooltip on wrapper */
.order-module .order-action-tooltip-wrap {
  display: inline-flex;
  cursor: not-allowed;
  pointer-events: auto;
  outline: none;
}

.order-module .order-action-icon.order-action-icon--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.order-module .order-action-tooltip-wrap:hover .order-action-icon--disabled {
  background: transparent;
  transform: none;
}

.badge-status {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-status-created {
  background: #dcfce7;
  color: #16a34a;
}

.badge-status-picked_up,
.badge-status-in_transit {
  background: #dbeafe;
  color: #2563eb;
}

.badge-status-delivered,
.badge-status-completed {
  background: #dcfce7;
  color: #16a34a;
}

.badge-status-cancelled,
.badge-status-redelivery {
  background: #fee2e2;
  color: #dc2626;
}

.order-form-grid {
  display: grid;
  gap: 2rem;
}

.order-section {
  padding: 1.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.order-section:last-child {
  border-bottom: none;
}

.order-section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.order-input {
  border-radius: 0.75rem;
  border-color: #e2e8f0;
  height: 52px;
}

.order-input:focus {
  border-color: #f04438;
}

.order-select-skeleton {
  position: relative;
}

.order-select-skeleton.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8f0;
  border-top-color: #f04438;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.order-loader {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.order-details-card .order-field-value {
  font-size: 1rem;
  color: #334155;
  padding: 0.5rem 0;
  min-height: 2rem;
}

.order-status-controls {
  gap: 1rem;
}



.order-status-history-item {
  padding-bottom: 1rem;
}

.order-status-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dcfce7;
  border-radius: 50%;
  flex-shrink: 0;
}

.order-status-text {
  font-size: 0.95rem;
  color: #334155;
  margin-bottom: 0.25rem;
}

.order-status-date {
  font-size: 0.85rem;
}

.order-do-number {
  font-size: 1rem;
  color: #64748b;
  font-weight: 500;
}

.order-view-wrapper .module-title {
  margin-right: 1rem;
}

/* Upload Page Styles */
.order-upload-card {
  max-width: 1500px;
  margin: 0 auto;
}

.order-upload-wrapper {
  padding: 2rem 0;
}

.order-upload-label {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.order-upload-hint {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.order-file-input-wrapper {
  max-width: 400px;
  margin: 0 auto;
}

.order-file-input-simple {
  border-radius: 0.75rem;
  border: 2px dashed #e2e8f0;
  padding: 1.5rem;
  background: #f8fafc;
  transition: all 0.2s;
}

.order-file-input-simple:hover {
  border-color: #f04438;
  background: #fff;
}

.order-file-input-simple:focus {
  border-color: #f04438;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.1);
  background: #fff;
}

.order-upload-error {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.order-upload-actions {
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.order-btn-upload {
  background: #f04438;
  color: #fff;
}

.order-btn-upload:hover {
  background: #dc2626;
  color: #fff;
}

.order-btn-upload:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .order-status-controls {
    flex-direction: column;
    width: 100%;
  }

  .order-status-controls .order-select2 {
    width: 100%;
    min-width: unset;
  }

  .order-action-buttons {
    flex-direction: column;
  }

  .order-action-buttons .order-btn {
    width: 100%;
    justify-content: center;
  }

  .order-upload-card {
    max-width: 100%;
  }

  .order-file-input-wrapper {
    max-width: 100%;
  }
}

.pac-container.pac-hidden {
  display: none !important;
}

/* Required field asterisk */
.order-form-grid .form-label.required::after {
  content: '*';
  color: #dc2626;
  margin-left: 0.25rem;
  font-weight: 600;
}

/* ============================================
   Order View Page Styles
   ============================================ */

/* CSS Variables */
:root {
  --order-primary: #EB3C27;
  --order-secondary: #E2EAEB;
  --order-success: #26A65B;
  --order-warning: #F5A623;
  --order-error: #D0021B;
  --order-bg-light: #F8F9FB;
  --order-text-primary: #27272A;
  --order-text-secondary: #616161;
  --order-border: #EBEBEB;
  --order-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Order View Container */
.order-view-modern {
  background: var(--order-bg-light);
  min-height: 100vh;
  padding: 24px;
  position: relative;
}

/* Breadcrumb Styles */
.order-view-modern .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0 0 16px 0;
}

.order-view-modern .breadcrumb-item a {
  color: var(--order-text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.order-view-modern .breadcrumb-item.active {
  color: var(--order-primary);
  font-weight: 600;
}

/* Order detail spec grid (admin view — replaces header + info cards) */
.order-detail-spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 28px;
  border-top: 1px solid #d1d5db;
  border-left: 1px solid #d1d5db;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.order-detail-spec-grid .spec-grid-cell {
  border-right: 1px solid #d1d5db;
  border-bottom: 1px solid #d1d5db;
  padding: 14px 16px;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.5;
  word-break: break-word;
}

.order-detail-spec-grid .spec-grid-cell strong {
  font-weight: 700;
  color: #111827;
}

.order-detail-spec-grid .spec-grid-cell--full {
  grid-column: 1 / -1;
}

.order-detail-spec-grid .spec-grid-cell--wide-text {
  min-width: 0;
}

/* Status history panel (purple accent + horizontal rows) */
.status-history-panel-modern {
  border-top: 3px solid #7c3aed;
  padding-top: 20px;
  margin: -8px 0 0 0;
}

.status-history-panel-modern__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 18px 0;
  color: #111827;
}

.status-history-panel-modern__empty {
  color: #6b7280;
  font-size: 14px;
  padding: 24px 0;
  text-align: center;
}

.status-history-row-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

.status-history-row-card__top {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.status-history-row-card--with-pod {
  align-items: stretch;
}

.status-history-row-card__pod-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-left: 54px;
}

.status-history-row-card__pod-toggle-btn {
  margin-left: 54px;
  padding: 8px 14px;
  border-radius: 8px;
}

.status-history-row-card__pod-thumb-link {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}

.status-history-row-card__pod-thumb {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
}

.status-history-row-card__pod-thumb-link:focus-visible {
  outline: 2px solid var(--order-primary, #EB3C27);
  outline-offset: 2px;
}

.status-history-row-card:last-child {
  margin-bottom: 0;
}

.status-history-row-card__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.status-history-row-card__main {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: #374151;
}

.status-history-row-card__label {
  font-weight: 700;
  color: #111827;
}

.status-history-row-card__sep {
  font-weight: 400;
  color: #6b7280;
}

.status-history-row-card__desc {
  font-weight: 400;
}

.status-history-row-card__time {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 13px;
  white-space: nowrap;
}

.order-view-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.order-view-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Legacy order header (frontend DO details may still use) */
.order-header-card {
  background: white;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  color: black;
  position: relative;
  overflow: visible;
  z-index: 100;
}

.order-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.order-id-section h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: black;
}

.order-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.order-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.95;
}

.order-meta-item i {
  font-size: 18px;
}

.order-status-badge-wrapper {
  margin-top: 16px;
}

.status-badge-large {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Status Controls */
.status-controls-modern {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  padding: 16px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 10;
  flex: 1;
}

.status-controls-modern .status-select-wrapper {
  position: relative;
  flex: 1;
}

.status-controls-modern select {
  background: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  min-width: 250px;
  width: 100%;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--order-text-primary);
}

.status-controls-modern select:hover {
  border-color: rgba(235, 60, 39, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-controls-modern select option {
  padding: 10px;
  font-weight: 500;
  background: white;
  color: var(--order-text-primary);
}

.status-controls-modern select option:disabled {
  color: #999;
  font-style: italic;
  background: var(--order-bg-light);
}

.status-controls-modern button {
  background: white;
  color: var(--order-primary);
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.status-controls-modern button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #f5f5f5;
}

.status-controls-modern button:active {
  transform: translateY(0);
}

.status-controls-modern button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Delivery Timeline */
.delivery-timeline {
  background: white;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--order-shadow);
}

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

.timeline-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--order-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-progress {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 24px;
}

.timeline-line {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  height: 4px;
  background: var(--order-border);
  z-index: 1;
}

.timeline-line-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--order-success), var(--order-primary));
  transition: width 0.5s ease;
  border-radius: 4px;
  width: 50%;
}

.timeline-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 100px;
}

.timeline-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: white;
  border: 3px solid var(--order-border);
  transition: all 0.3s;
}

.timeline-step.active .timeline-icon {
  background: var(--order-primary);
  border-color: var(--order-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(235, 60, 39, 0.3);
}

.timeline-step.completed .timeline-icon {
  background: var(--order-success);
  border-color: var(--order-success);
  color: white;
}

.timeline-label {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--order-text-secondary);
  max-width: 100px;
}

.timeline-step.active .timeline-label {
  color: var(--order-primary);
}

.timeline-step.completed .timeline-label {
  color: var(--order-success);
}

.timeline-date {
  font-size: 11px;
  color: var(--order-text-secondary);
  text-align: center;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.info-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--order-shadow);
  transition: all 0.3s;
}

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

.info-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--order-bg-light);
}

.info-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--order-bg-light);
  color: var(--order-primary);
}

.info-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--order-text-primary);
  margin: 0;
}

.info-field {
  margin-bottom: 16px;
}

.info-field:last-child {
  margin-bottom: 0;
}

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

.info-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--order-text-secondary);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--order-text-primary);
}

.info-value i {
  margin-right: 4px;
}

/* Modern Tabs */
.tabs-modern {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--order-shadow);
  margin-bottom: 24px;
}

.tabs-nav-modern {
  display: flex;
  background: var(--order-bg-light);
  padding: 8px;
  gap: 8px;
  border-bottom: none;
  flex-wrap: wrap;
}

.tabs-nav-modern .nav-link {
  flex: 1;
  text-align: center;
  padding: 14px 20px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--order-text-secondary);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 120px;
}

.tabs-nav-modern .nav-link:hover {
  background: rgba(235, 60, 39, 0.1);
  color: var(--order-primary);
}

.tabs-nav-modern .nav-link.active {
  background: white;
  color: var(--order-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tabs-nav-modern .badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
}

.tabs-content-modern {
  padding: 32px;
}

/* Status History Timeline */
.status-history-timeline {
  position: relative;
  padding-left: 40px;
}

.status-history-timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--order-primary), var(--order-success));
}

.history-item {
  position: relative;
  margin-bottom: 32px;
  padding-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.history-item.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.history-icon-wrapper {
  position: absolute;
  left: -40px;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--order-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--order-success);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-content {
  background: var(--order-bg-light);
  padding: 16px 20px;
  border-radius: 8px;
  border-left: 3px solid var(--order-primary);
}

.history-status {
  font-weight: 700;
  font-size: 15px;
  color: var(--order-text-primary);
  margin-bottom: 4px;
}

.history-description {
  font-size: 14px;
  color: var(--order-text-secondary);
  margin-bottom: 8px;
}

.history-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--order-text-secondary);
  flex-wrap: wrap;
}

.history-meta i {
  margin-right: 4px;
}

/* Attempt Cards */
.attempt-card {
  background: var(--order-bg-light);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border-left: 4px solid var(--order-warning);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.attempt-card.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.attempt-number {
  font-size: 16px;
  font-weight: 700;
  color: var(--order-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.attempt-date {
  font-size: 13px;
  color: var(--order-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.attempt-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* Exception Cards */
.exception-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 2px solid var(--order-border);
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(20px);
}

.exception-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.exception-card:hover {
  border-color: var(--order-primary);
  box-shadow: 0 4px 12px rgba(235, 60, 39, 0.1);
}

.exception-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.exception-type {
  font-size: 16px;
  font-weight: 700;
  color: var(--order-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.exception-date {
  font-size: 13px;
  color: var(--order-text-secondary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exception-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.exception-badge.pending {
  background: rgba(245, 166, 35, 0.15);
  color: var(--order-warning);
}

.exception-badge.resolved {
  background: rgba(38, 166, 91, 0.15);
  color: var(--order-success);
}

.exception-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

/* Label History */
.label-history-card {
  margin-bottom: 16px;
}

.label-history-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.label-history-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--order-text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-history-date {
  font-size: 13px;
  color: var(--order-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.label-history-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  font-size: 64px;
  color: var(--order-border);
  margin-bottom: 16px;
}

.empty-state-text {
  font-size: 16px;
  color: var(--order-text-secondary);
  font-weight: 500;
}

/* Action Buttons */
.btn-modern {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.btn-modern-primary {
  background: var(--order-primary);
  color: white;
}

.btn-modern-primary:hover {
  background: #C72E1C;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(235, 60, 39, 0.3);
  color: white;
}

.btn-modern-secondary {
  background: var(--order-secondary);
  color: var(--order-text-primary);
}

.btn-modern-secondary:hover {
  background: #d0d9da;
  color: var(--order-text-primary);
}

.btn-modern i {
  font-size: 16px;
}

.btn-modern-margin-top {
  margin-top: 8px;
}

/* Modal Styles */
.order-modal-content {
  border-radius: 12px;
  border: none;
}

.order-modal-header {
  border-bottom: 2px solid var(--order-bg-light);
  padding: 24px;
}

.order-modal-title {
  font-weight: 700;
  color: var(--order-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.order-modal-title i {
  color: var(--order-warning);
}

.order-modal-body {
  padding: 24px;
}

.order-modal-footer {
  border-top: 2px solid var(--order-bg-light);
  padding: 20px 24px;
  gap: 12px;
  display: flex;
  justify-content: flex-end;
}

.order-form-label {
  font-weight: 600;
  color: var(--order-text-primary);
  margin-bottom: 8px;
}

.order-form-label .required-asterisk {
  color: var(--order-error);
}

.order-form-control {
  border-color: var(--order-border);
  padding: 10px 16px;
  border-radius: 8px;
}

.order-form-control:focus {
  border-color: var(--order-primary);
  box-shadow: 0 0 0 3px rgba(235, 60, 39, 0.1);
}

.order-form-textarea {
  border-color: var(--order-border);
  padding: 12px 16px;
  border-radius: 8px;
}

/* Back Button Container */
.order-back-container {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* SweetAlert Custom Styling */
.swal2-popup.swal-modern-popup {
  border-radius: 12px;
  padding: 32px;
  font-family: inherit;
}

.swal2-title {
  color: var(--order-text-primary);
  font-size: 24px;
  font-weight: 700;
}

.swal2-html-container {
  color: var(--order-text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.swal-modern-confirm {
  background: var(--order-primary) !important;
  color: white !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  transition: all 0.3s !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.swal-modern-confirm:hover {
  background: #C72E1C !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(235, 60, 39, 0.3) !important;
}

.swal-modern-cancel {
  background: var(--order-secondary) !important;
  color: var(--order-text-primary) !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  transition: all 0.3s !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.swal-modern-cancel:hover {
  background: #d0d9da !important;
}

.swal2-icon {
  margin: 0 auto 24px;
}

.swal2-timer-progress-bar {
  background: var(--order-primary) !important;
}



/* Loading spinner animation */
@keyframes spin-loader {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.ri-loader-4-line {
  animation: spin-loader 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .order-detail-spec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .order-view-modern {
    padding: 16px;
  }

  .order-header-card {
    padding: 24px;
  }

  .status-history-row-card__top {
    flex-wrap: wrap;
  }

  .status-history-row-card__time {
    width: 100%;
    padding-left: 54px;
    white-space: normal;
  }

  .status-history-row-card__pod-photos {
    padding-left: 0;
  }

  .status-history-row-card__pod-toggle-btn {
    margin-left: 0;
  }

  .order-id-section h1 {
    font-size: 24px;
  }

  .tabs-content-modern {
    padding: 24px;
  }

  .delivery-timeline {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .order-header-content {
    flex-direction: column;
  }

  .status-controls-modern {
    flex-direction: column;
    width: 100%;
  }

  .status-controls-modern .status-select-wrapper {
    width: 100%;
  }

  .status-controls-modern select {
    width: 100%;
    min-width: unset;
  }

  .status-controls-modern button {
    width: 100%;
    justify-content: center;
  }

  .timeline-progress {
    flex-direction: column;
    gap: 24px;
    padding: 0;
  }

  .timeline-line {
    display: none;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .order-detail-spec-grid {
    grid-template-columns: 1fr;
  }

  .tabs-nav-modern .nav-link {
    flex: 1 1 100%;
    min-width: unset;
  }

  .tabs-content-modern {
    padding: 16px;
  }

  .exception-details-grid,
  .attempt-details,
  .label-history-details {
    grid-template-columns: 1fr;
  }

  .order-meta {
    flex-direction: column;
    gap: 12px;
  }

  .history-meta {
    flex-direction: column;
    gap: 8px;
  }

  .exception-header,
  .attempt-header,
  .label-history-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 576px) {
  .order-view-modern {
    padding: 12px;
  }

  .order-header-card {
    padding: 16px;
  }

  .order-id-section h1 {
    font-size: 20px;
  }

  .delivery-timeline {
    padding: 16px;
  }

  .info-card {
    padding: 16px;
  }

  .tabs-content-modern {
    padding: 12px;
  }

  .btn-modern {
    padding: 10px 16px;
    font-size: 13px;
  }
}

/* ============================================
   SweetAlert2 Modern Theme
   ============================================ */

.swal-modern-popup {
  border-radius: 16px !important;
  padding: 0 0 24px 0 !important;
  border: none !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  font-family: inherit !important;
  overflow: hidden !important;
}

.swal-modern-popup .swal2-title {
  padding: 24px 24px 0 24px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin-bottom: 8px !important;
}

.swal-modern-popup .swal2-html-container {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  color: #4b5563 !important;
}

.swal-modern-popup .swal2-actions {
  padding: 24px 24px 0 24px !important;
  margin: 0 !important;
  gap: 12px !important;
  width: 100% !important;
  justify-content: flex-end !important;
}

.swal-modern-confirm {
  background-color: #EB3C27 !important;
  color: white !important;
  border-radius: 8px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  border: none !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.swal-modern-confirm:hover {
  background-color: #dc2626 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 6px -1px rgba(235, 60, 39, 0.2) !important;
}

.swal-modern-confirm:focus {
  box-shadow: 0 0 0 2px white, 0 0 0 4px rgba(235, 60, 39, 0.2) !important;
}

.swal-modern-cancel {
  background-color: white !important;
  color: #374151 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  transition: all 0.2s !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.swal-modern-cancel:hover {
  background-color: #f9fafb !important;
  border-color: #9ca3af !important;
  color: #111827 !important;
}

/* Custom HTML Content Styles */
.swal-custom-content {
  text-align: left;
  padding: 16px 24px;
}

.swal-field-group {
  margin-bottom: 16px;
}

.swal-field-group:last-child {
  margin-bottom: 0;
}

.swal-field-label {
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.swal-field-value {
  color: #111827;
  font-size: 16px;
  font-weight: 600;
}

.swal-status-badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
}

.swal-status-badge.current {
  background-color: #f3f4f6;
  color: #374151;
}

.swal-status-badge.new {
  background-color: #EB3C27;
  color: white;
}

/* Custom animations for better user experience */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

@keyframes progressShine {
  0% {
    background-position: -100% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.4s ease-out;
}

.pulse-once {
  animation: pulse 0.6s ease-in-out;
}

.shake-error {
  animation: shake 0.5s ease-in-out;
}

/* Drag and drop styles */
.drag-over {
  background-color: #f0f8ff !important;
  border: 2px dashed #007bff !important;
  transform: scale(1.02);
  transition: all 0.3s ease;
}

.order-upload-wrapper {
  border: 2px dashed #dee2e6;
  border-radius: 6px;
  padding: 2rem;
  transition: all 0.3s ease;
  background: #fafbfc;
  position: relative;
}

.order-upload-wrapper:hover {
  border-color: #007bff;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.order-upload-wrapper.drag-over {
  background: linear-gradient(45deg, #f0f8ff 0%, #e6f3ff 100%);
}

/* File info display */
.file-info-display {
  border-left: 4px solid #28a745;
  background: #f8fff9;
  padding: 0.75rem;
  margin-top: 1rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.875rem;
}

/* Upload progress */
.upload-progress-bar .progress {
  height: 18px;
  border-radius: 3px;
  overflow: hidden;
}

.upload-progress-bar .progress-bar {
  background: linear-gradient(90deg, #007bff 0%, #28a745 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Stats cards */
.stats-card {
  border: 1px solid #e9ecef;
  border-radius: 6px;
  transition: all 0.2s ease;
  background: #ffffff;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #007bff;
}

.stats-card .card-body {
  padding: 1.25rem;
}

/* Progress animations */
.progress-animated {
  background: linear-gradient(90deg, #007bff 0%, #28a745 50%, #007bff 100%);
  background-size: 200% 100%;
  animation: progressShine 2s linear infinite;
}

/* Status badges */
.batch-status-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-weight: 500;
}

/* Error and success messages */
.order-upload-error {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 4px;
  padding: 0.75rem;
  margin-top: 1rem;
  color: #c53030;
}

.order-upload-success {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: 4px;
  padding: 0.75rem;
  margin-top: 1rem;
  color: #22543d;
}

/* Button enhancements */
.order-btn {
  transition: all 0.2s ease;
  border-radius: 4px;
  font-weight: 500;
}

.order-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

/* Table enhancements */
.table-hover tbody tr:hover {
  background-color: #f8f9fa;
}

/* Loading states */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  z-index: 10;
}

/* Success icon animation */
.import-success-icon {
  animation: pulse 1s ease-in-out;
  color: #28a745;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .order-upload-wrapper {
    padding: 1.5rem;
  }

  .stats-card .card-body {
    padding: 1rem;
  }

  .stats-card h4 {
    font-size: 1.25rem;
  }
}