/* =========================================================
   SALES PAGE
   ========================================================= */

.sales-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sales-main-card {
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sales-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 320px));
  gap: 16px;
  width: 100%;
  max-width: 656px;
}

.sales-stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;

  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);

  transition: 0.25s ease;
}

.sales-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.sales-stat-card.created {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(124, 58, 237, 0.05));
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.sales-stat-card.paid {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.sales-stat-card.created .sales-stat-icon {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.95), rgba(124, 58, 237, 0.95));
}

.sales-stat-card.paid .sales-stat-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(34, 197, 94, 0.95));
}

.sales-stat-header {
  margin-bottom: 10px;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.65);
}

.sales-stat-card strong {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
}

.sales-stat-icon {
  width: 54px;
  height: 54px;
  min-width: 54px;

  display: grid;
  place-items: center;

  border-radius: 18px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.sales-stat-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-stat-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sales-stat-bottom strong {
  font-size: 36px;
  font-weight: 700;
}

.sales-card {
  width: 100%;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.sales-card-header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.sales-card-header h3 {
  margin: 0;
  font-size: 22px;
}

.sales-card-header span {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.sales-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.sales-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

.sales-table thead th {
  padding: 16px 18px;
  text-align: left;
  white-space: nowrap;

  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);

  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.sales-table tbody td {
  padding: 18px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.sales-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.sales-table tbody tr:last-child td {
  border-bottom: none;
}

.order-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 32px;
  padding: 0 12px;

  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.18);

  color: #ddd6fe;
  font-weight: 700;
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 600;
}

.order-status.paid {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #34d399;
}

.order-status.pending {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #fbbf24;
}

.status-dot-mini {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 960px) {
  .sales-main-card {
    max-width: 100%;
  }

  .sales-stats {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .sales-table {
    min-width: 900px;
  }
}

@media (max-width: 640px) {
  .sales-stat-card {
    padding: 18px 20px;
  }

  .sales-stat-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 16px;
  }

  .sales-stat-bottom strong {
    font-size: 24px;
  }

  .sales-card-header {
    padding: 18px 16px;
  }

  .sales-table {
    min-width: 820px;
  }
}