:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --secondary: #0f172a;
  --success: #16a34a;
  --danger: #dc2626;
  --bg: #ffffff;
  --surface: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, sans-serif;
}

.order-details-page {
  padding: 24px 16px;
  min-height: 100vh;
  margin-top: 0;
}

.order-details-page .container {
  max-width: 900px;
  margin: 0 auto;
}

.order-details-header {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.back-button-wrapper {
  margin-bottom: 12px;
}

.btn-back-to-account {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-back-to-account:hover {
  color: var(--primary);
  background: var(--surface);
}

.order-details-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-details-header h1 i {
  color: var(--primary);
}

.order-details-header p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Order Filters */
.order-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.order-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--surface);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.order-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.order-tab i {
  font-size: 16px;
}

.order-tab:hover {
  background: rgba(249, 115, 22, 0.1);
  color: var(--primary);
}

.order-tab.active {
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.orders-container {
  display: grid;
  gap: 16px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  border: 2px dashed var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  color: var(--muted);
  text-align: center;
  padding: 40px 24px;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: #cbd5e1;
}

.order-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 16px;
  margin-bottom: 12px;
  padding: 16px 16px 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.order-badges {
  display: flex;
  flex-direction: row;
  gap: 4px;
  align-items: center;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}

.order-number {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  grid-column: 1;
  grid-row: 1;
}

.order-date {
  font-size: 12px;
  color: var(--muted);
  grid-column: 1;
  grid-row: 2;
}

.order-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* Status badge colors */
.order-status-badge.to_pay {
  background: #fef3c7;
  color: #d97706;
}
.order-status-badge.to_ship {
  background: #dbeafe;
  color: #2563eb;
}
.order-status-badge.preparing {
  background: #f3e8ff;
  color: #9333ea;
}
.order-status-badge.waiting_courier {
  background: #ffedd5;
  color: #ea580c;
}
.order-status-badge.to_pickup {
  background: #f3e8ff;
  color: #9333ea;
}
.order-status-badge.shipped,
.order-status-badge.to_receive {
  background: #ecfeff;
  color: #0891b2;
}
.order-status-badge.completed,
.order-status-badge.complete {
  background: #ecfdf5;
  color: #059669;
}
.order-status-badge.cancelled {
  background: #fee2e2;
  color: #dc2626;
}

/* Cancellation status badge */
.cancellation-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.cancellation-status-badge.pending {
  background: #fef3c7;
  color: #d97706;
}

.cancellation-status-badge.approved {
  background: #ecfdf5;
  color: #059669;
}

.cancellation-status-badge.rejected {
  background: #fee2e2;
  color: #dc2626;
}

.cancellation-status-badge.completed {
  background: #f3f4f6;
  color: #6b7280;
}

/* Refund status badge */
.refund-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.refund-status-badge.pending {
  background: #fef3c7;
  color: #d97706;
}

.refund-status-badge.approved {
  background: #ecfdf5;
  color: #059669;
}

.refund-status-badge.rejected {
  background: #fee2e2;
  color: #dc2626;
}

.refund-status-badge.completed {
  background: #f3f4f6;
  color: #6b7280;
}

.order-items {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.item-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.item-quantity {
  font-weight: 500;
}

.item-price {
  font-weight: 500;
}

.item-subtotal {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
}

.order-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-total {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.order-payment {
  font-size: 13px;
  color: var(--muted);
}

.order-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-pay,
.btn-cancel,
.btn-receive {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 36px;
  box-sizing: border-box;
}

.btn-pay {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.btn-cancel {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn-receive {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.btn-cancel:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

.btn-receive:hover {
  background: #bbf7d0;
  transform: translateY(-1px);
}

#logoutModal .logout-confirm-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-align: center;
}

.btn-pay i,
.btn-cancel i,
.btn-receive i {
  font-size: 12px;
}

/* ORDER SUMMARY MODAL */
.order-summary-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.order-summary-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 700px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
  margin: auto;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
}

.refund-modal-content .modal-header {
  background: #fff;
  color: #1f2937;
  border-bottom: 1px solid #f0f0f0;
}

.refund-modal-content .modal-header h2 i {
  color: #f97316;
}

.refund-modal-content .modal-header .modal-close {
  background: #f3f4f6;
  border: none;
  color: #6b7280;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.refund-modal-content .modal-header .modal-close:hover {
  background: #e5e7eb;
  color: #4b5563;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: 0;
  max-height: calc(80vh - 140px);
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.btn-close {
  padding: 10px 24px;
  border: none;
  background: #f1f5f9;
  color: #475569;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close:hover {
  background: #e2e8f0;
}

/* Summary Sections */
.summary-section {
  padding: 20px 24px;
}

.summary-title {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.summary-row:last-child {
  margin-bottom: 0;
}

.summary-label {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.summary-value {
  font-size: 14px;
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

.summary-value.status-badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.summary-divider {
  height: 1px;
  background: var(--line);
  margin: 0 24px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.summary-item-info {
  flex: 1;
}

.summary-item-name {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.summary-item-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #64748b;
}

.summary-item-total {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.summary-item-count {
  margin-top: 8px;
  font-size: 13px;
  color: #94a3b8;
  font-style: italic;
}

.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-total-label {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.summary-total-value {
  font-size: 20px;
  font-weight: 800;
  color: #f97316;
}

.loading-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
  color: #64748b;
}

.loading-state i,
.error-state i {
  font-size: 48px;
  margin-bottom: 16px;
}

.loading-state i {
  color: #f97316;
}

.error-state i {
  color: #dc2626;
}

.loading-state p,
.error-state p {
  font-size: 15px;
  margin: 0;
}

/* PRODUCT REVIEW MODAL */
.review-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.review-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
  margin: auto;
}

.review-product-info {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.review-product-info h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 700;
  color: #92400e;
}

.review-product-info p {
  margin: 0;
  font-size: 13px;
  color: #b45309;
}

.star-rating {
  padding: 24px;
  text-align: center;
}

.rating-label {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.star {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease;
}

.star:hover {
  transform: scale(1.1);
}

.star i {
  font-size: 32px;
  color: #d1d5db;
  transition: color 0.2s ease;
}

.star:hover i,
.star.active i {
  color: #fbbf24;
}

.rating-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  min-height: 20px;
}

.review-text-section {
  padding: 0 24px 24px;
}

.review-text-section .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-text-section .field span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.review-text-section textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.review-text-section textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.review-media-section {
  padding: 0 24px 24px;
}

.review-media-section .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-media-section .field span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.media-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.upload-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.media-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.media-preview-item img,
.media-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-media {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.remove-media:hover {
  background: rgba(0, 0, 0, 0.8);
}

.btn-cancel,
.btn-submit {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel {
  background: #f1f5f9;
  color: #475569;
}

.btn-cancel:hover {
  background: #e2e8f0;
}

.btn-submit {
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-rate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
}

.btn-rate:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.btn-rate i {
  font-size: 12px;
}

.btn-refund {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
}

.btn-refund:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-refund i {
  font-size: 12px;
}

/* ================= REFUND MODAL STYLES ================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.refund-modal-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 1200px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
  margin: auto;
}

.refund-modal-content .modal-body {
  padding: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.modal .refund-modal-head {
  padding: 12px 20px;
  background: #fff !important;
  background-image: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}

.modal .refund-modal-head .welcome-block {
  text-align: left;
  flex: 1;
}

.modal .refund-modal-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 500;
  color: #1f2937;
  margin: 0;
  line-height: 1;
}

.modal .refund-modal-head h2 i {
  color: #f97316;
  font-size: 28px;
}

.modal .refund-modal-head .modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
  font-size: 18px;
}

.modal .refund-modal-head .modal-close:hover {
  background: #e5e7eb;
  color: #4b5563;
}

.modal .refund-modal-head .close-button {
  background: #f3f4f6;
  border: none;
  color: #6b7280;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 400;
}

.modal .refund-modal-head .close-button:hover {
  background: #e5e7eb;
  color: #4b5563;
}

.refund-info {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.refund-info p {
  margin: 6px 0;
  font-size: 16px;
  color: #4b5563;
  font-weight: 400;
}

.refund-info p:first-child {
  font-weight: 500;
  color: #1f2937;
  font-size: 18px;
}

.refund-prompt {
  font-size: 15px;
  color: #6b7280;
  margin-top: 4px;
}

.refund-bank-details-section {
  margin-top: 24px;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.refund-bank-prompt {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 16px;
  font-weight: 500;
}

#refundForm label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

#refundForm select,
#refundForm input[type="text"],
#refundForm textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#refundForm select:focus,
#refundForm input[type="text"]:focus,
#refundForm textarea:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

#refundForm input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

#refundForm input[type="file"]::-webkit-file-upload-button {
  padding: 8px 16px;
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-right: 12px;
}

/* Refund modal footer buttons */
.refund-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 32px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.btn-keep-order {
  padding: 10px 24px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #4b5563;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-keep-order:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.btn-confirm-cancel {
  padding: 10px 24px;
  border: none;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-confirm-cancel:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.refund-reasons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 4px;
}

.refund-reason {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.refund-reason:hover {
  border-color: #f97316;
  background: #fff7ed;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
}

.refund-reason input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #f97316;
}

.refund-reason span {
  font-size: 15px;
  color: #374151;
  font-weight: 400;
}

.refund-modal-content .modal-body {
  padding: 24px 28px;
  background: #fff;
  max-height: calc(80vh - 200px);
  overflow-y: auto;
}

.refund-modal-content .modal-body label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.refund-modal-content .modal-body select,
.refund-modal-content .modal-body textarea,
.refund-modal-content .modal-body input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s ease;
  margin-bottom: 16px;
  font-family: inherit;
}

.refund-modal-content .modal-body select:focus,
.refund-modal-content .modal-body textarea:focus,
.refund-modal-content .modal-body input[type="file"]:focus {
  outline: none;
  border-color: #f97316;
}

.refund-modal-content .modal-body textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

.refund-modal-content .modal-body input[type="file"] {
  padding: 8px 12px;
  cursor: pointer;
}

.refund-modal-footer {
  display: flex;
  gap: 12px;
  padding: 20px 28px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.btn-cancel {
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: #e2e8f0;
}

/* Cancellation Chat Modal */
.cancellation-chat-modal .modal-content {
  max-width: 700px;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 auto;
  width: 100%;
}

.cancellation-chat-modal .modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.cancellation-chat-modal .modal-header h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 500;
  color: #1f2937;
  margin: 0;
}

.cancellation-chat-modal .modal-header h2 i {
  color: #f97316;
  font-size: 28px;
}

.cancellation-chat-modal .modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
  font-size: 18px;
}

.cancellation-chat-modal .modal-close:hover {
  background: #e5e7eb;
  color: #4b5563;
}

.cancellation-info {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.cancellation-info p {
  margin: 6px 0;
  font-size: 16px;
  color: #4b5563;
  font-weight: 400;
}

.cancellation-info p:first-child {
  font-weight: 500;
  color: #1f2937;
  font-size: 18px;
}

.cancel-prompt {
  font-size: 15px;
  color: #6b7280;
  margin-top: 4px;
}

.cancel-reasons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 4px;
}

.cancel-reason {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.cancel-reason:hover {
  border-color: #f97316;
  background: #fff7ed;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
}

.cancel-reason input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid #e5e7eb;
  border-radius: 50%;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  display: grid;
  place-content: center;
  background: #fff;
}

.cancel-reason input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  background: #f97316;
}

.cancel-reason input[type="radio"]:checked {
  border-color: #f97316;
}

.cancel-reason input[type="radio"]:checked::before {
  transform: scale(1);
}

.cancel-reason input[type="radio"]:checked + span {
  color: #f97316;
  font-weight: 600;
}

.cancel-reason span {
  font-size: 14px;
  color: #374151;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-footer {
  display: flex;
  gap: 14px;
  padding: 24px 28px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  justify-content: center;
}

.btn-keep-order {
  padding: 8px 28px;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #6b7280;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-keep-order:hover {
  border-color: #9ca3af;
  background: #f3f4f6;
  color: #4b5563;
}

.btn-confirm-cancel {
  padding: 8px 28px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-confirm-cancel:hover {
  background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

/* Summary Actions */
.summary-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 16px 0;
}

.order-actions .btn-cancel.btn-support {
  background: #e0f2fe;
  color: #0284c7;
}

.order-actions .btn-cancel.btn-support:hover {
  background: #bae6fd;
}

.summary-actions .btn-pay,
.summary-actions .btn-cancel {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.summary-actions .btn-pay {
  background: var(--primary);
  color: white;
}

.summary-actions .btn-pay:hover {
  background: var(--primary-dark);
}

.summary-actions .btn-cancel {
  background: #fee2e2;
  color: #dc2626;
}

.summary-actions .btn-cancel:hover {
  background: #fecaca;
}

/* Payment Details Form for Online Payment */
.payment-details-form {
  margin-top: 20px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.payment-details-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.payment-details-form .form-grid.single {
  grid-template-columns: 1fr;
}

.payment-details-form label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.payment-details-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.payment-details-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* QRPh Timer Styles */
.qrph-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #d97706;
  background: #fef3c7;
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 4px;
}

.qrph-timer i {
  font-size: 11px;
}

.qrph-timer .timer-countdown {
  color: #b45309;
}

.qrph-timer.expired {
  color: #dc2626;
  background: #fee2e2;
}

.qrph-timer.expired .timer-countdown {
  color: #991b1b;
}

/* Cancellation Notification Animation */
@keyframes fadeInScale {
  from {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

@keyframes fadeOutScale {
  from {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .order-details-page {
    padding: 16px 12px;
  }
  
  .order-details-page .container {
    max-width: 100%;
  }
  
  .order-details-header h1 {
    font-size: 22px;
  }
  
  .order-details-header p {
    font-size: 13px;
  }
  
  .order-filters {
    gap: 8px;
  }
  
  .filter-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .order-tabs {
    gap: 6px;
    padding: 5px;
    flex-wrap: wrap;
  }
  
  .order-tab {
    flex: 1 1 140px;
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .order-tab i {
    font-size: 14px;
  }
  
  .order-card {
    border-radius: 10px;
  }
  
  .order-header {
    padding: 12px;
    gap: 12px 8px;
  }

  .order-badges {
    flex-direction: row;
  }

  .order-number {
    font-size: 14px;
  }

  .order-date {
    font-size: 11px;
  }

  .order-status-badge {
    font-size: 11px;
    padding: 3px 10px;
  }

  .cancellation-status-badge {
    font-size: 10px;
    padding: 3px 10px;
  }
  
  .order-items {
    padding: 10px 12px;
  }
  
  .order-item {
    gap: 10px;
  }
  
  .item-name {
    font-size: 14px;
  }
  
  .item-meta {
    font-size: 12px;
    gap: 8px;
  }
  
  .item-subtotal {
    font-size: 14px;
  }
  
  .order-footer {
    padding: 12px;
  }
  
  .order-total {
    font-size: 14px;
  }
  
  .order-payment {
    font-size: 12px;
  }
  
  .order-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-pay,
  .btn-cancel {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .order-details-page {
    padding: 12px 8px;
  }
  
  .order-details-header h1 {
    font-size: 18px;
  }
  
  .order-details-header p {
    font-size: 12px;
  }
  
  .btn-back-to-account {
    position: static;
    margin-bottom: 8px;
  }
  
  .order-filters {
    flex-direction: column;
  }
  
  .filter-btn {
    width: 100%;
    justify-content: center;
  }
  
  .order-tabs {
    flex-wrap: wrap;
  }
  
  .order-tab {
    flex: 1 1 auto;
    min-width: calc(50% - 4px);
  }
  
  .order-header {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 8px;
  }
  
  .order-number {
    grid-column: 1;
    grid-row: 1;
  }

  .order-date {
    grid-column: 1;
    grid-row: 2;
  }

  .order-badges {
    grid-column: 1;
    grid-row: 3;
    align-self: flex-start;
  }
  
  .order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .item-meta {
    flex-wrap: wrap;
  }
  
  .order-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .order-actions {
    flex-direction: column;
  }
  
  .modal-content {
    max-width: calc(100% - 32px);
  }
  
  .review-content {
    max-width: calc(100% - 32px);
  }
  
  .cancellation-chat-modal .modal-content {
    max-width: calc(100% - 32px);
  }
  
  .cancel-reason {
    padding: 14px 16px;
  }
  
  .cancel-reason span {
    font-size: 13px;
  }
  
  .modal-footer {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-keep-order,
  .btn-confirm-cancel {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .order-details-page {
    padding: 10px 6px;
  }
  
  .order-details-header h1 {
    font-size: 16px;
  }
  
  .order-details-header p {
    font-size: 11px;
  }
  
  .order-tabs {
    padding: 4px;
    gap: 4px;
  }
  
  .order-tab {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .order-tab i {
    font-size: 12px;
  }
  
  .order-card {
    border-radius: 8px;
  }
  
  .order-header {
    padding: 10px;
  }
  
  .order-items {
    padding: 8px 10px;
  }
  
  .order-footer {
    padding: 10px;
  }
  
  .modal-header {
    padding: 16px 20px;
  }
  
  .modal-header h2 {
    font-size: 16px;
  }
  
  .modal-body {
    padding: 16px 20px;
  }
  
  .modal-footer {
    padding: 12px 20px;
  }
  
  .summary-section {
    padding: 16px 20px;
  }
  
  .cancellation-info {
    padding: 16px;
  }
  
  .cancellation-info p {
    font-size: 14px;
  }
  
  .cancellation-info p:first-child {
    font-size: 16px;
  }

  .payment-details-section {
    padding: 16px;
  }

  .payment-details-form {
    gap: 10px;
  }

  .payment-details-form label {
    font-size: 13px;
  }

  .payment-details-form select,
  .payment-details-form input {
    padding: 8px 10px;
    font-size: 13px;
  }

  #cancellationNotification {
    max-width: calc(100% - 32px);
    padding: 20px 24px;
  }

  #cancellationNotification div:first-child {
    font-size: 36px;
  }

  #cancellationNotification div:nth-child(2) div:first-child {
    font-size: 16px;
  }

  #cancellationNotification div:nth-child(2) div:nth-child(2) {
    font-size: 13px;
  }

  #cancellationNotification div:nth-child(2) div:nth-child(3) {
    font-size: 12px;
  }
}
