/* ===== ORDERS PAGE ENHANCEMENTS ===== */

/* Tab Content Display */
.tab-content {
  display: none;
  animation: fadeInUp 0.3s ease-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Tab Navigation */
.tab-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.tab-button {
  flex: 1;
  min-width: 120px;
  padding: 0.75rem 1rem;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  background: transparent;
  color: #1e40af;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.tab-button:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.tab-button.active {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Orders Table Enhancements */
.orders-table-container {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
}

.orders-table th {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #1e40af;
  font-weight: 700;
  padding: 1rem;
  text-align: left;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.orders-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  font-size: 0.875rem;
  color: #cbd5e1;
}

.orders-table tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.orders-table tr:last-child td {
  border-bottom: none;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.pending {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #1e40af;
  border: 1px solid #3b82f6;
}

.status-badge.completed {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border: 1px solid #10b981;
}

.status-badge.failed {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 1px solid #ef4444;
}

.status-badge.processing {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border: 1px solid #3b82f6;
}

/* Order Cards for Mobile */
.order-card {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.order-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e40af;
  margin: 0;
}

.order-card-date {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

.order-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.order-detail-item {
  display: flex;
  flex-direction: column;
}

.order-detail-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.order-detail-value {
  font-size: 0.875rem;
  color: #cbd5e1;
  font-weight: 600;
}

.order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(229, 231, 235, 0.5);
}

.order-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1d4ed8;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 2px dashed rgba(59, 130, 246, 0.3);
}

.empty-state-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #1e293b, #334155);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d4ed8;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 0.5rem;
}

.empty-state-description {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Loading States */
.loading-skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

.loading-skeleton.table-row {
  height: 3rem;
  margin-bottom: 0.5rem;
}

.loading-skeleton.card {
  height: 8rem;
  margin-bottom: 1rem;
}

/* Responsive Design - Mobile First */
@media (max-width: 767px) {
  .orders-table-container {
    display: none;
  }

  .order-cards-container {
    display: block;
  }

  .tab-navigation {
    padding: 0.75rem;
    gap: 0.25rem;
  }

  .tab-button {
    min-width: 80px;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .order-card-details {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (min-width: 768px) {
  .orders-table-container {
    display: block;
  }

  .order-cards-container {
    display: none;
  }

  .tab-navigation {
    justify-content: center;
  }

  .tab-button {
    flex: none;
    min-width: 140px;
  }
}

/* DataTables Customization */
.dataTables_wrapper {
  font-family: inherit;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin: 0 0.125rem;
  padding: 0.5rem 0.75rem;
  color: #374151;
  background: white;
  transition: all 0.2s;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #3b82f6;
  color: white;
  border-color: #1d4ed8;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border-color: #1d4ed8;
}

/* Print Styles */
@media print {
  .tab-navigation,
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_paginate {
    display: none;
  }

  .orders-table {
    border-collapse: collapse;
  }

  .orders-table th,
  .orders-table td {
    border: 1px solid #000;
    padding: 0.5rem;
  }
}
