.customer-order-panel {
  --customer-order-text: #172033;
  --customer-order-muted: #64748b;
  --customer-order-line: #d9e2ec;
  --customer-order-surface: #ffffff;
  --customer-order-soft: #f6f8fb;
  --customer-order-blue: #2563eb;
  --customer-order-green: #15803d;
  --customer-order-red: #b91c1c;
  --customer-order-amber: #b45309;
  color: var(--customer-order-text);
  background: var(--customer-order-surface);
  border: 1px solid var(--customer-order-line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  margin: 16px;
  overflow: hidden;
}

.customer-order-panel *,
.customer-order-empty * {
  box-sizing: border-box;
}

.customer-order-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #edf1f5;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.customer-order-panel__eyebrow {
  color: var(--customer-order-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.customer-order-panel h3 {
  color: var(--customer-order-text);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.25;
  margin: 4px 0 0;
}

.customer-order-panel__count {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 68px;
}

.customer-order-panel__count span {
  color: var(--customer-order-blue);
  font-size: 24px;
  font-weight: 780;
  line-height: 1;
}

.customer-order-panel__count small,
.customer-order-muted {
  color: var(--customer-order-muted);
}

.customer-order-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  padding: 16px 20px;
  background: #fbfcfe;
}

.customer-order-summary__item {
  background: #ffffff;
  border: 1px solid #e4ebf2;
  border-radius: 8px;
  padding: 12px 14px;
}

.customer-order-summary__item span {
  color: var(--customer-order-muted);
  display: block;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  margin-bottom: 8px;
}

.customer-order-summary__item strong {
  color: var(--customer-order-text);
  display: block;
  font-size: 19px;
  font-weight: 780;
  line-height: 1.1;
}

.customer-order-summary__item.is-primary {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: inset 3px 0 0 var(--customer-order-blue);
}

.customer-order-summary__item.is-primary strong {
  color: var(--customer-order-blue);
}

.customer-order-table-wrap {
  max-height: 560px;
  overflow: auto;
  padding: 0 20px 20px;
}

.customer-order-table,
.customer-order-items__table {
  border-collapse: separate;
  border-spacing: 0;
  color: var(--customer-order-text);
  min-width: 980px;
  width: 100%;
}

.customer-order-table thead th,
.customer-order-items__table thead th {
  background: #eef3f8;
  border-bottom: 1px solid #d9e2ec;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
  padding: 11px 12px;
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 1;
}

.customer-order-table tbody td {
  background: #ffffff;
  border-bottom: 1px solid #edf1f5;
  color: var(--customer-order-text);
  font-size: 13px;
  padding: 13px 12px;
  vertical-align: middle;
}

.customer-order-row:hover td {
  background: #f8fbff;
}

.customer-order-table__toggle {
  width: 44px;
}

.customer-order-toggle,
.customer-order-view {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  width: 32px;
}

.customer-order-toggle {
  background: #f8fafc;
  border: 1px solid #d7e0ea;
  color: #475569;
}

.customer-order-toggle:hover,
.customer-order-toggle.is-active {
  background: #e8f0ff;
  border-color: #bfd0ff;
  color: var(--customer-order-blue);
}

.customer-order-view {
  background: #ffffff;
  border: 1px solid #cbd8e6;
  color: #2563eb;
}

.customer-order-view:hover {
  background: #eff6ff;
  border-color: #93b4ff;
  color: #1d4ed8;
  text-decoration: none;
}

.customer-order-number {
  color: #111827;
  font-weight: 780;
  white-space: nowrap;
}

.customer-order-date,
.customer-order-note {
  color: #475569;
  white-space: nowrap;
}

.customer-order-price {
  color: #0f766e;
  font-size: 14px;
  font-weight: 780;
  white-space: nowrap;
}

.customer-order-status {
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.1;
  padding: 6px 9px;
  white-space: nowrap;
}

.customer-order-status.is-success {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: var(--customer-order-green);
}

.customer-order-status.is-danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: var(--customer-order-red);
}

.customer-order-status.is-warning {
  background: #fef3c7;
  border-color: #fde68a;
  color: var(--customer-order-amber);
}

.customer-order-status.is-info {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.customer-order-status.is-neutral {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

.customer-order-items-row > td {
  background: #f8fafc !important;
  border-bottom: 1px solid #dbe4ee !important;
  padding: 0 !important;
}

.customer-order-items {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin: 12px 16px 16px 56px;
  overflow: hidden;
}

.customer-order-items__table {
  min-width: 720px;
}

.customer-order-items__table thead th {
  position: static;
}

.customer-order-items__table tbody td {
  border-bottom: 1px solid #edf1f5;
  color: var(--customer-order-text);
  font-size: 12px;
  padding: 10px 12px;
  vertical-align: middle;
}

.customer-order-items__table tbody tr:last-child td {
  border-bottom: none;
}

.customer-order-product-image,
.customer-order-product-placeholder {
  border-radius: 8px;
  height: 44px;
  width: 44px;
}

.customer-order-product-image {
  object-fit: cover;
}

.customer-order-product-placeholder {
  align-items: center;
  background: #eef2f7;
  color: #94a3b8;
  display: flex;
  justify-content: center;
}

.customer-order-product-link {
  color: #1d4ed8;
  font-weight: 650;
  text-decoration: none;
}

.customer-order-product-link:hover {
  color: #1e40af;
  text-decoration: underline;
}

.customer-order-discount {
  color: var(--customer-order-red);
  font-size: 12px;
  font-weight: 750;
  padding: 10px 12px 12px;
  text-align: right;
}

.customer-order-empty {
  align-items: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px;
  min-height: 92px;
  padding: 20px;
}

.customer-order-empty.is-compact {
  border: none;
  margin: 0;
  min-height: 76px;
}

.customer-order-empty i {
  color: #94a3b8;
  font-size: 20px;
}

.customer-order-panel .text-end {
  text-align: right;
}

@media (max-width: 1024px) {
  .customer-order-summary {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 768px) {
  .customer-order-panel {
    margin: 12px 0;
  }

  .customer-order-panel__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-order-panel__count {
    align-items: flex-start;
  }

  .customer-order-summary {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .customer-order-table-wrap {
    padding: 0 12px 12px;
  }

  .customer-order-items {
    margin-left: 12px;
    margin-right: 12px;
  }
}
