.orders-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 4rem 1.5rem 6rem;
}

.orders-container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.orders-header {
  text-align: center;
  margin-bottom: 3rem;
}

.orders-eyebrow {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-l);
  border: 1px solid #f0cdb8;
  padding: 6px 20px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.orders-header h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.orders-header h1 em {
  font-style: italic;
  color: var(--accent);
}

.orders-header-sub {
  font-size: 0.88rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 0;
}

.orders-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(44, 40, 37, 0.03);
}

.order-card::before {
  content: '';
  display: block;
  width: 4px;
  flex-shrink: 0;
  background: var(--border);
  transition: background 0.3s;
}

.order-card.is-completed::before {
  background: #2d7a4f;
}

.order-card.is-pending::before {
  background: var(--accent);
}

.order-card:hover {
  background: #fdfcfa;
  box-shadow: 0 8px 28px rgba(44, 40, 37, 0.10);
  transform: translateY(-1px);
}

.order-number-gutter {
  width: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px dashed var(--border);
  padding: 1rem 0;
}

.order-number-gutter span {
  font-size: 0.68rem;
  color: rgba(107, 102, 96, 0.45);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  user-select: none;
}

.order-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.order-info {
  padding: 1.1rem 1.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.order-info-left {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

.order-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.order-title-row h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.status-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

.status-completed {
  background: #eef7f2;
  color: #2d7a4f;
  border: 1px solid #c2e2cf;
}

.status-pending {
  background: #fff8f0;
  color: #c8602a;
  border: 1px solid #fce2c8;
}

.status-cancelled {
  background: #fbf0f0;
  color: #a33c3c;
  border: 1px solid #f2c7c7;
}

.status-refunded {
  background: #f0f4fb;
  color: #3b629b;
  border: 1px solid #c7d6f2;
}

.status-warning {
  background: #fff7e6;
  color: #9a6e1d;
  border: 1px solid #f5dda0;
}

.order-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.order-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  transition: background 0.15s;
}

.order-card:hover .order-meta-chip {
  background: #ede8e0;
}

.order-meta-time {
  font-weight: 700;
  color: var(--accent);
}

.order-meta-divider {
  color: var(--border);
  padding: 0 2px;
}

.order-meta-date {
  font-weight: 500;
}

.order-cost-block {
  text-align: right;
  flex-shrink: 0;
}

.order-cost-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.order-cost {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

.order-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border-top: 1px dashed var(--border);
}

.order-action-buttons {
  display: flex;
  flex-direction: row;
  gap: 0;
  flex: 1;
}

.order-action-buttons .btn-action {
  border-radius: 0 !important;
  border: none !important;
  border-right: 1px solid var(--border) !important;
  justify-content: center;
  align-items: center;
  padding: 0.7rem 1.25rem;
  font-size: 0.78rem;
  flex: 1;
  white-space: nowrap;
}

.order-action-buttons .btn-action:first-child {
  border-bottom-left-radius: 11px !important;
}

.order-action-buttons .btn-action:last-child {
  border-right: none !important;
  border-bottom-right-radius: 11px !important;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  border: none;
}

.btn-pay {
  color: var(--white);
  background: var(--accent);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2), 0 4px 12px rgba(200, 96, 42, 0.2);
}

.btn-pay:hover {
  background: #b55524;
  transform: translateY(-2px);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15), 0 8px 20px rgba(200, 96, 42, 0.3);
}

.btn-pay:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.btn-view {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--border) !important;
  box-shadow: none;
}

.btn-view:hover {
  background: var(--cream);
  border-color: #c9bfb3 !important;
  transform: translateY(-1px);
}

.btn-status {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--border) !important;
  box-shadow: none;
}

.btn-status:hover {
  background: var(--cream);
  border-color: #c9bfb3 !important;
  transform: translateY(-1px);
}

.btn-status.is-loading {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.btn-status:disabled:not(.is-loading) {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.status-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: rgba(44, 40, 37, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s, visibility 0.22s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.status-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.status-modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem 1.25rem;
  box-shadow: 0 16px 48px rgba(44, 40, 37, 0.18);
  transform: translateY(8px);
  transition: transform 0.22s;
  margin: auto;
}

.status-modal-backdrop.is-open .status-modal-card {
  transform: translateY(0);
}

.status-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.status-modal-header h2 {
  font-size: 1.25rem;
  margin: 0 0 0.2rem;
  letter-spacing: -0.02em;
}

.status-modal-header p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.status-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0 0 0 0.5rem;
}

.status-modal-close:hover {
  color: var(--ink);
}

.status-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.status-detail-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  font-size: 0.84rem;
  border-bottom: 1px dashed var(--border);
}

.status-detail-list li:last-child {
  border-bottom: none;
}

.status-detail-list li.status-detail-separator {
  display: block;
  padding: 0;
  height: 1px;
  background: var(--border);
  border: none !important;
  border-bottom: none !important;
  margin: 8px 0;
}

.status-detail-list .label {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.status-detail-list .value {
  font-weight: 600;
  text-align: right;
  color: var(--ink);
}

.status-detail-list .value.is-active {
  color: #2d7a4f;
}

.status-detail-list .value.is-wait {
  color: var(--accent);
}

.status-modal-footer {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
}

.status-modal-loading,
.status-modal-error {
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.status-modal-loading {
  color: var(--ink-muted);
}

.status-modal-error {
  color: #a33;
}

.orders-summary {
  display: none;
  padding: 1rem 1.75rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.02em;
  margin-top: 16px;
  box-shadow: 0 4px 12px rgba(44, 40, 37, 0.03);
}

.summary-total {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(44, 40, 37, 0.06);
}

.empty-state::before {
  content: 'NO RECORDS';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  font-size: clamp(1.5rem, 10vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(224, 216, 206, 0.5);
  white-space: nowrap;
  pointer-events: none;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  position: relative;
  z-index: 1;
}

.empty-state h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.empty-state p {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 1;
}

.skeleton-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.35rem 1.75rem 1.35rem 60px;
  display: flex;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 4px 12px rgba(44, 40, 37, 0.03);
}

.skeleton-block {
  flex: 1;
}

.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, var(--cream) 25%, var(--border) 50%, var(--cream) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 3px;
  margin-bottom: 10px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

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

@media (max-width: 600px) {
  .order-number-gutter {
    display: none;
  }

  .order-info {
    padding: 0.9rem 1.1rem;
    gap: 0.75rem;
  }

  .order-action-buttons .btn-action {
    padding: 0.65rem 0.5rem;
    font-size: 0.74rem;
  }

  .orders-summary {
    padding-left: 1.25rem;
  }

  .orders-filter-container {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .filter-group {
    justify-content: space-between;
  }

  .custom-select-wrapper {
    flex: 1;
    max-width: 200px;
  }
}

.orders-filter-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.25rem 1.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(44, 40, 37, 0.03);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filter-group label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.custom-select-wrapper {
  position: relative;
  user-select: none;
  min-width: 160px;
}

.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-select-trigger:hover,
.custom-select-wrapper.open .custom-select-trigger {
  border-color: #c9bfb3;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(44, 40, 37, 0.05);
}

.custom-select-trigger svg {
  transition: transform 0.3s ease;
  color: var(--ink-muted);
}

.custom-select-wrapper.open .custom-select-trigger svg {
  transform: rotate(180deg);
}

.custom-options {
  position: absolute;
  display: block;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(44, 40, 37, 0.1);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition: all 0.2s ease;
  overflow: hidden;
}

.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateY(0);
}

.custom-option {
  display: block;
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease;
}

.custom-option:hover {
  background: var(--cream);
}

.custom-option.selected {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}
