:root {
  --primary: #4361ee;
  --primary-light: #4895ef;
  --secondary: #3f37c9;
  --success: #4cc9f0;
  --warning: #f8961e;
  --danger: #f72585;
  --light: #f8f9ff;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;
}

.payment-container {
  display: flex;
  max-width: 1600px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  gap: 1.5rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.payment-sidebar {
  flex: 0 0 300px;
  position: sticky;
  top: 2rem;
  align-self: flex-start;
}

.payment-main {
  flex: 1;
  min-width: 0;
}

.payment-card {
  background: white;
  border-radius: 16px;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.payment-card:hover {
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.04);
}

.pey-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  position: relative;
}

.pey-card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(67, 97, 238, 0.2), transparent);
}

.title-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
  letter-spacing: -0.3px;
}

.card-title i {
  color: var(--warning);
  animation: pulse 2s infinite;
  font-size: 1.1rem;
}

.subtitle {
  color: var(--gray);
  margin: 0;
  font-size: 0.85rem;
  font-weight: 400;
}

.header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.filter-group {
  display: flex;
  gap: 4px;
  background: var(--light);
  padding: 4px;
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  color: var(--gray);
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.filter-btn.active {
  background: white;
  color: #99bc85;
  box-shadow:
    0 1px 4px rgba(153, 188, 133, 0.15),
    0 1px 1px rgba(153, 188, 133, 0.1);
}

.filter-count {
  background: rgba(0, 0, 0, 0.08);
  color: var(--dark);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
}

.filter-btn.active .filter-count {
  background: #99bc85;
  color: white;
}

.search-box {
  position: relative;
  min-width: 180px;
  flex: 1;
  max-width: 240px;
}

.search-box i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  opacity: 0.7;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.2s;
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.search-box input:focus {
  border-color: #99bc85;
  box-shadow:
    0 1px 4px rgba(153, 188, 133, 0.15),
    0 1px 1px rgba(153, 188, 133, 0.1);
  outline: none;
}

.empty-state {
  padding: 4rem 2rem;
  text-align: center;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" fill="none" stroke="%23e9ecef" stroke-width="1.5"><path d="M30 30L70 70M70 30L30 70"/></svg>') center no-repeat;
  background-size: 120px;
}

.empty-icon {
  font-size: 3.5rem;
  color: var(--light-gray);
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  color: var(--dark);
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.empty-state p {
  color: var(--gray);
  margin-bottom: 2rem;
  font-size: 1.05rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.beten {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.05);
}

.beten:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 15px rgba(0, 0, 0, 0.1),
    0 3px 6px rgba(0, 0, 0, 0.05);
}

.beten:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--secondary);
}

.btn-sm {
  padding: 10px 16px;
  font-size: 0.9rem;
  gap: 8px;
}

.order-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.order-table th {
  padding: 12px 16px;
  text-align: left;
  background: var(--light);
  color: var(--dark);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.order-table th:first-child {
  border-radius: 8px 0 0 0;
}

.order-table th:last-child {
  border-radius: 0 8px 0 0;
}

.order-table td {
  padding: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.order-row {
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.order-row:hover {
  background: #eef4ec;
}

.order-row.active-row {
  background: #eef4ec;
}

.order-row.active-row::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary);
  border-radius: 2px 0 0 2px;
}

.order-cell {
  padding: 12px 16px;
}

.order-id {
  font-weight: 600;
  color: var(--dark);
  font-family: 'SF Mono', monospace;
  letter-spacing: -0.3px;
  font-size: 0.85rem;
}

.date-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.order-date {
  font-weight: 500;
  color: var(--dark);
  font-size: 0.85rem;
}

.order-time {
  color: var(--gray);
  font-size: 0.75rem;
  opacity: 0.75;
}

.order-amount {
  font-weight: 700;
  color: var(--dark);
  font-family: 'SF Mono', monospace;
  font-size: 0.9rem;
}

.shipping-method {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray);
  font-size: 0.95rem;
}

.shipping-method i {
  color: var(--primary);
  font-size: 1.1rem;
}

.status-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  width: fit-content;
}

.status-badge .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-pending {
  background: rgba(248, 150, 30, 0.1);
  color: var(--warning);
}

.status-pending .status-dot {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(248, 150, 30, 0.2);
}

.status-failed {
  background: rgba(247, 37, 133, 0.1);
  color: var(--danger);
}

.status-failed .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(247, 37, 133, 0.2);
}

.countdown-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--warning);
  font-weight: 500;
}

.countdown-timer i {
  font-size: 0.9rem;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.btn-group {
  display: flex;
  gap: 8px;
}

.btn-pay {
  background: rgba(46, 204, 113, 0.1); /* Warna hijau transparan */
  color: #2ecc71; /* Warna hijau solid */
  padding: 10px;
  min-width: 40px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-pay:hover {
  background: #2ecc71; /* Warna hijau solid saat hover */
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(46, 204, 113, 0.2);
}

.btn-pay i {
  font-size: 1rem;
}

.btn-pay.btn-sm {
  padding: 8px 12px;
  font-size: 0.85rem;
}

.btn-cancel {
  background: rgba(247, 37, 133, 0.1);
  color: var(--danger);
  padding: 10px;
  min-width: 40px;
}

.btn-cancel:hover {
  background: var(--danger);
  color: white;
}

.btn-retry {
  background: var(--primary);
  color: white;
  padding: 10px 16px;
}

.btn-retry:hover {
  background: var(--secondary);
}

.order-details-row {
  display: none;
  background: rgba(248, 249, 255, 0.5);
}

.order-details-row.show-details {
  display: table-row;
  animation: fadeIn 0.3s ease-out;
}

.order-details {
  padding: 24px;
  display: flex;
  gap: 3rem;
}

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

.details-section h4 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--dark);
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
}

.details-section h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-light);
  border-radius: 3px;
}

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

.product-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.product-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.product-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: white;
  padding: 4px;
}

.product-info h5 {
  margin: 0 0 6px 0;
  font-size: 1rem;
  color: var(--dark);
  font-weight: 500;
}

.product-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray);
  font-family: 'SF Mono', monospace;
}

.payment-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row span:first-child {
  color: var(--gray);
  font-weight: 400;
}

.info-row span:last-child {
  color: var(--dark);
  font-weight: 500;
}

.total-amount {
  font-weight: 700 !important;
  color: var(--danger) !important;
  font-size: 1.1rem;
}

.deadline {
  color: var(--warning) !important;
  font-weight: 600 !important;
}

.pagination-wrapper {
  padding: 1.75rem 2.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  justify-content: center;
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

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

/* Mobile styles */
@media (max-width: 1200px) {
  .payment-container {
    flex-direction: column;
    padding: 1rem;
  }

  .payment-sidebar {
    width: 100%;
    position: static;
    margin-bottom: 1.5rem;
  }

  .order-details {
    flex-direction: column;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .pey-card-header {
    padding: 1.5rem;
  }

  .header-actions {
    flex-direction: column;
    gap: 1rem;
  }

  .filter-group {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .search-box {
    max-width: 100%;
  }

  .order-table th {
    display: none;
  }

  .order-table td {
    display: block;
    padding: 16px;
  }

  .order-row {
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  .order-row td:first-child {
    padding-top: 20px;
  }

  .order-row td:last-child {
    padding-bottom: 20px;
    border-bottom: none;
  }

  .mobile-label {
    display: inline-block;
    min-width: 100px;
    font-size: 0.8rem;
    color: var(--gray);
    margin-right: 8px;
  }

  .action-buttons {
    justify-content: flex-end;
    margin-top: 16px;
  }
}
