/* Blue header section */
.breadcrumb {
  background-color: #ef4444;
  padding: 15px 0;
  width: 100%;
}
.breadcrumb-content {
  background-color: white;
  padding: 15px;
  margin: 0 auto;
  max-width: 800px;
  border-radius: 4px;
}
.breadcrumb a {
  color: #ef4444;
  text-decoration: none;
  font-weight: normal;
}
.breadcrumb span {
  color: #666;
  margin-left: 5px;
  margin-right: 5px;
}

/* Orders page specific styles */
.orders-page {
  padding: 20px 40px;
  margin-top: 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  min-height: calc(100vh - 400px);
}

.orders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.orders-title {
  margin: 0;
  color: #333;
  font-size: 2em;
  font-weight: 600;
}

.orders-filters {
  display: flex;
  gap: 15px;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-weight: 500;
  color: #555;
  font-size: 0.9em;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 0.9em;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.no-orders {
  text-align: center;
  padding: 60px 30px;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin: 20px 0;
  display: none;
}

.no-orders h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.5em;
}

.no-orders p {
  color: #666;
  margin-bottom: 25px;
  font-size: 1.1em;
}

.order-list {
  margin-bottom: 40px;
}

.order-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.order-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.order-header-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.order-number {
  font-weight: 600;
  font-size: 1.1em;
  color: #333;
}

.order-sequence {
  color: #6b7280;
  font-size: 0.85em;
}

.order-date {
  color: #666;
  font-size: 0.9em;
}

.order-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-submitted {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-fulfilled {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-cancelled {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.order-body {
  padding: 20px;
  background-color: white;
}

.order-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.order-summary-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.order-item-count {
  font-weight: 500;
  color: #333;
}

.order-store {
  color: #666;
  font-size: 0.9em;
}

.order-summary-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.order-price {
  font-weight: 700;
  font-size: 1.3em;
  color: #333;
}

.order-actions {
  display: flex;
  gap: 10px;
}

.order-action-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9em;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-primary {
  background-color: #ef4444;
  color: white;
}

.btn-primary:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
  transform: translateY(-1px);
}

.btn-danger {
  background-color: #dc2626;
  color: white;
}

.btn-danger:hover {
  background-color: #b91c1c;
  transform: translateY(-1px);
}

.order-details-section {
  margin-top: 20px;
  border-top: 1px solid #eee;
  padding-top: 20px;
  display: none;
}

.order-details-section.active {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fulfillment-group {
  margin-bottom: 25px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}

.fulfillment-header {
  background-color: #f9fafb;
  padding: 15px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fulfillment-method {
  font-weight: 600;
  color: #374151;
  text-transform: capitalize;
}

.fulfillment-cost {
  color: #6b7280;
  font-weight: 500;
}

.fulfillment-items {
  padding: 0;
}

.order-item {
  display: flex;
  padding: 15px 20px;
  border-bottom: 1px solid #f3f4f6;
  align-items: center;
  gap: 15px;
}

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

.order-item-image {
  width: 80px;
  height: 80px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9fafb;
  flex-shrink: 0;
}

.order-item-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.order-item-details {
  flex: 1;
  min-width: 0;
}

.order-item-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 5px;
  line-height: 1.4;
}

.order-item-model {
  color: #6b7280;
  font-size: 0.9em;
  margin-bottom: 5px;
}

.order-item-price {
  font-weight: 600;
  color: #059669;
  margin-bottom: 3px;
}

.order-item-quantity {
  color: #6b7280;
  font-size: 0.9em;
}

.order-item-total {
  text-align: right;
  font-weight: 700;
  color: #111827;
  min-width: 100px;
  flex-shrink: 0;
}

.order-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.order-line-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.order-line-actions button {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  cursor: pointer;
}

.order-line-actions button:hover:not(:disabled) {
  border-color: #ef4444;
  color: #ef4444;
}

.order-line-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.order-detail-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.order-detail-bulk-actions button {
  padding: 10px 16px;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  cursor: pointer;
}

.order-detail-bulk-actions button:hover:not(:disabled) {
  border-color: #ef4444;
  color: #ef4444;
}

.order-payments {
  margin-top: 25px;
  padding: 20px;
  background-color: #f9fafb;
  border-radius: 6px;
}

.order-payments-title {
  font-weight: 600;
  color: #374151;
  margin-bottom: 15px;
  font-size: 1.1em;
}

.payment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.payment-item:last-child {
  border-bottom: none;
}

.payment-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.payment-method {
  font-weight: 600;
  color: #374151;
  text-transform: capitalize;
}

.payment-date {
  color: #6b7280;
  font-size: 0.9em;
}

.payment-amount {
  font-weight: 700;
  color: #059669;
  font-size: 1.1em;
}

.order-totals {
  margin-top: 25px;
  padding: 20px;
  background-color: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
}

.order-total-row:last-child {
  margin-bottom: 0;
  border-top: 2px solid #e2e8f0;
  padding-top: 15px;
  margin-top: 15px;
}

.order-total-label {
  color: #64748b;
  font-weight: 500;
}

.order-total-value {
  font-weight: 600;
  color: #1e293b;
}

.grand-total .order-total-label {
  font-weight: 700;
  color: #1e293b;
  font-size: 1.1em;
}

.grand-total .order-total-value {
  font-weight: 700;
  color: #059669;
  font-size: 1.2em;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border-left-color: #ef4444;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.error-message {
  text-align: center;
  padding: 40px 20px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin: 20px 0;
  display: none;
}

.error-message h3 {
  color: #dc2626;
  margin-bottom: 10px;
}

.error-message p {
  color: #7f1d1d;
  margin-bottom: 20px;
}

.no-items-msg,
.no-payments-msg {
  padding: 20px;
  background-color: #f9fafb;
  border-radius: 6px;
  text-align: center;
  color: #6b7280;
  font-style: italic;
}

/* Order detail modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9fafb;
  border-radius: 12px 12px 0 0;
}

.modal-title {
  font-size: 1.5em;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.close {
  color: #6b7280;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.close:hover {
  color: #374151;
}

.modal-body {
  padding: 25px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .orders-page {
    padding: 15px 20px;
  }

  .orders-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .orders-filters {
    flex-wrap: wrap;
    gap: 10px;
  }

  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .order-status {
    align-self: flex-start;
  }

  .order-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .order-summary-right {
    align-items: flex-start;
    text-align: left;
  }

  .order-actions {
    flex-direction: column;
    width: 100%;
  }

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

  .order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .order-item-image {
    align-self: center;
  }

  .order-item-total {
    align-self: flex-end;
    text-align: right;
  }

  .order-item-right {
    align-self: stretch;
    align-items: flex-start;
    width: 100%;
  }

  .order-line-actions {
    justify-content: flex-start;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
}
    </style>

.orders-auth-panel {
  text-align: center;
  padding: 48px 20px 60px;
  max-width: 720px;
  margin: 0 auto;
}
