body.dashboard-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  background-color: #f8fafc !important;
  color: #334155;
}

/* Dashboard Layout */
#wrapper {
  overflow-x: hidden;
  display: flex;
}

#sidebar-wrapper {
  min-height: 100vh;
  width: 250px;
  margin-left: 0;
  transition: margin 0.25s ease-out;
  border-right: 1px solid #e2e8f0;
  background-color: #ffffff;
}

#wrapper.toggled #sidebar-wrapper {
  margin-left: -250px;
}

#page-content-wrapper {
  min-width: 0;
  width: 100%;
  transition: min-width 0.25s ease-out;
}

@media (max-width: 767.98px) {
  #sidebar-wrapper {
    margin-left: -250px;
    position: absolute;
    height: 100%;
  }
  #wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
  }
  #wrapper.toggled #page-content-wrapper {
    margin-left: 250px;
  }
}

/* Brand Logo (ECOMLADEN) */
.brand-logo {
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  color: #fff;
  border-radius: 0.5rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #0f172a;
  background: linear-gradient(to right, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Sidebar nav */
#sidebar-wrapper {
  z-index: 1000;
  position: relative;
}

#sidebar-wrapper .list-group-item {
  color: #64748b;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  transition: all 0.2s;
}

#sidebar-wrapper .list-group-item:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

#sidebar-wrapper .list-group-item.active {
  color: #4f46e5;
  background-color: #eef2ff;
  font-weight: 600;
}

/* Navbar top */
.navbar {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

/* General components */
.card {
  border-color: #e2e8f0 !important;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05) !important;
}
.card-header {
  background-color: transparent !important;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  color: #0f172a;
}

.table th {
  color: #64748b;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.table td {
  color: #334155;
  font-size: 0.9rem;
  border-bottom: 1px solid #f1f5f9;
}

.btn-primary {
  background-color: #4f46e5;
  border-color: #4f46e5;
}
.btn-primary:hover {
  background-color: #4338ca;
  border-color: #4338ca;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.order-products-modal {
  border: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.18);
}

.order-products-modal .modal-header {
  background: #fff;
  border-bottom: 1px solid #eef1f5;
  padding: 1.25rem 1.5rem 1rem;
}

.order-products-modal .modal-body {
  background: #f8fafc;
  padding: 1rem 1.5rem 1.25rem;
}

.order-products-modal .modal-footer {
  background: #fff;
  border-top: 1px solid #eef1f5;
  padding: 0.875rem 1.5rem;
}

.order-products-table-wrap {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 0.625rem;
  overflow: hidden;
}

.order-products-table {
  margin-bottom: 0;
}

.order-products-table thead th {
  background: #f3f6fa;
  border-bottom: 1px solid #e8edf3;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1rem;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.order-products-table tbody td {
  border-bottom: 1px solid #eef2f7;
  padding: 1rem;
  vertical-align: top;
}

.order-products-table tbody tr:last-child td {
  border-bottom: 0;
}

.order-products-table .col-qty {
  width: 4.5rem;
}

.order-products-table .col-price {
  width: 7.5rem;
}

.order-product-qty {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #4338ca;
  display: inline-flex;
  font-size: 0.8125rem;
  font-weight: 600;
  height: 1.75rem;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0 0.5rem;
}

.order-product-sku {
  color: #0f172a;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.order-product-title {
  color: #64748b;
  font-size: 0.8125rem;
  line-height: 1.5;
  word-break: break-word;
}

.order-product-price {
  color: #334155;
  font-size: 0.875rem;
  white-space: nowrap;
}

.order-products-summary {
  align-items: center;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 0.625rem;
  display: flex;
  justify-content: space-between;
  margin-top: 0.875rem;
  padding: 0.875rem 1rem;
}

.order-products-total {
  color: #0f172a;
  font-size: 0.9375rem;
  font-weight: 600;
}

.order-items-info {
  line-height: 1;
  vertical-align: middle;
}

.order-items-info svg {
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.order-items-info:hover svg,
.order-items-info:focus svg {
  opacity: 1;
}

.order-article-summary {
  color: #334155;
  line-height: 1.45;
}

.order-sku-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: #334155;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.order-sku-line {
  white-space: nowrap;
}

.order-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.order-status-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.order-status-tab:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.order-status-tab.is-active {
  background: #1e3a5f;
  border-color: #1e3a5f;
  color: #fff;
}

.order-status-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #e8eef7;
  color: #1e3a5f;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.order-status-tab.is-active .order-status-tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.delivery-deadline-panel {
  min-width: 15rem;
  max-width: 22rem;
  padding: 0.35rem 0.15rem;
  color: #334155;
  font-size: 0.875rem;
  line-height: 1.45;
}

.delivery-deadline-help {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1e3a5f;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.delivery-deadline-help:hover,
.delivery-deadline-help:focus {
  color: #0f2744;
}

.delivery-deadline-help .bi {
  text-decoration: none;
}

.delivery-deadline-heading {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

.delivery-deadline-list {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}

.delivery-deadline-list li {
  margin: 0.05rem 0;
}

.delivery-deadline-list strong {
  font-variant-numeric: tabular-nums;
}

.order-filter-card .form-label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.order-filter-card .form-control,
.order-filter-card .form-select {
  border-color: #e2e8f0;
}

.date-range {
  position: relative;
}

.date-range-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.375rem 0.75rem;
  min-height: calc(1.5em + 0.75rem + 2px);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 1rem;
  color: #212529;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.date-range-toggle:hover {
  border-color: #cbd5e1;
}

.date-range-toggle:focus-visible,
.date-range-toggle[aria-expanded='true'] {
  outline: 0;
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.date-range-toggle.is-active {
  border-color: #b6d4fe;
  background: #f5f9ff;
}

.date-range-icon {
  color: #64748b;
  font-size: 0.9rem;
}

.date-range-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-range-caret {
  font-size: 0.7rem;
  color: #94a3b8;
  transition: transform 0.15s ease;
}

.date-range-toggle[aria-expanded='true'] .date-range-caret {
  transform: rotate(180deg);
}

.date-range-menu {
  padding: 0;
  border: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  min-width: 22rem;
}

.date-range-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.date-range-presets {
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  gap: 0.125rem;
  background: #f8fafc;
  border-right: 1px solid #eef1f5;
}

.date-range-preset {
  border: 0;
  background: transparent;
  border-radius: 0.375rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  color: #334155;
  text-align: left;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.date-range-preset:hover {
  background: #e9eef5;
}

.date-range-preset.is-selected {
  background: #0d6efd;
  color: #fff;
  font-weight: 600;
}

.date-range-custom {
  padding: 0.85rem 1rem 1rem;
}

.date-range-custom-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.65rem;
}

.date-range-field {
  display: block;
  margin-bottom: 0.6rem;
}

.date-range-field span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.date-range-hint {
  font-size: 0.75rem;
  color: #c0392b;
  margin-bottom: 0.5rem;
  min-height: 1rem;
}

@media (max-width: 575.98px) {
  .date-range-menu {
    min-width: 17rem;
  }

  .date-range-panels {
    grid-template-columns: 1fr;
  }

  .date-range-presets {
    border-right: 0;
    border-bottom: 1px solid #eef1f5;
  }
}

.order-state-badge {
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  padding: 0.35em 0.65em;
  border-radius: 999px;
}

.order-country {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #334155;
}

.order-country-flag {
  font-size: 1rem;
  line-height: 1;
}

.order-country-code {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.order-course {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.order-course-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.75rem;
  border: 1px solid transparent;
  transition: transform 0.12s ease;
}

.order-course-step + .order-course-step {
  position: relative;
  margin-left: 0.45rem;
}

.order-course-step + .order-course-step::before {
  content: '';
  position: absolute;
  left: -0.45rem;
  width: 0.45rem;
  height: 1px;
  background: #dfe5ec;
}

.order-course-step:hover {
  transform: translateY(-1px);
}

.order-course-step.is-done {
  background: #e7f6ee;
  border-color: #bfe6d1;
  color: #157347;
}

.order-course-step.is-pending {
  background: #f4f6f9;
  border-color: #e5e9ef;
  color: #aab4c2;
}

.order-course-step.is-danger {
  background: #fdeaea;
  border-color: #f7c9c9;
  color: #c0392b;
}

.shipment-card-header {
  border-bottom: 1px solid #eef2f6;
}

.shipment-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: #e8eef7;
  color: #1e3a5f;
  font-size: 1rem;
}

.shipment-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shipment-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #e8eef5;
  border-radius: 0.65rem;
  background: #f8fafc;
}

.shipment-meta-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.shipment-meta-value-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shipment-meta-value-row .shipment-meta-value {
  flex: 1;
  min-width: 0;
}

.shipment-copy-btn {
  flex-shrink: 0;
  padding: 0.2rem 0.45rem;
  line-height: 1;
}

.shipment-copy-btn.is-copied {
  color: #157347;
  border-color: #bfe6d1;
  background: #e7f6ee;
}

.shipment-actions {
  margin-top: 1.1rem;
}

.shipment-actions-title {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.shipment-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.shipment-danger-zone {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
}

.shipment-danger-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  max-width: 28rem;
  line-height: 1.4;
}

.shipment-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.5rem 0;
  color: #334155;
}

.shipment-empty-icon {
  font-size: 1.5rem;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

@media (max-width: 575.98px) {
  .shipment-action-grid {
    grid-template-columns: 1fr;
  }
}

.annotate-click-hint {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.4;
}

.annotate-viewer-wrap {
  min-height: 280px;
  max-height: min(70vh, 720px);
  overflow: auto;
  border: 1px solid #dbe3ee;
  border-radius: 0.5rem;
  background: #eef2f7;
  padding: 0.75rem;
}

.annotate-viewer-status {
  color: #64748b;
  font-size: 0.9rem;
  padding: 2rem 1rem;
  text-align: center;
}

.annotate-viewer-status.is-error {
  color: #b42318;
}

.annotate-viewer-stage {
  position: relative;
  display: inline-block;
  margin: 0 auto;
  max-width: 100%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  background: #fff;
  cursor: crosshair;
}

.annotate-viewer-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.annotate-text-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #5a5a5a;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  text-shadow:
    0 0 2px #fff,
    0 0 2px #fff;
  user-select: none;
}
