/**
 * Modern Dashboard Enhancements
 * Styles for statistics cards and dashboard components
 */

/* Modern Statistics Cards */
.statistics .card2 {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: none;
  border-radius: 1rem;
  padding: 1.5rem !important;
  box-shadow: 0 8px 24px rgba(26, 46, 85, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.statistics .card2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 100%);
}

.statistics .card2:hover {
  box-shadow: 0 12px 32px rgba(26, 46, 85, 0.15);
  transform: translateY(-4px);
}

/* Icon Stamps with Modern Gradients */
.statistics .stamp {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.statistics .card2:hover .stamp {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.bg-success-gradient {
  background: linear-gradient(135deg, #5eba00 0%, #7bd235 100%) !important;
}

.bg-info-gradient {
  background: linear-gradient(135deg, #45aaf2 0%, #2bcbba 100%) !important;
}

.bg-warning-gradient {
  background: linear-gradient(135deg, #f1c40f 0%, #fd9644 100%) !important;
}

.bg-danger-gradient {
  background: linear-gradient(135deg, #cd201f 0%, #f66d9b 100%) !important;
}

.bg-primary-gradient {
  background: linear-gradient(135deg, #467fcf 0%, #5d92e0 100%) !important;
}

/* Card Numbers */
.statistics .number {
  font-size: 2rem !important;
  font-weight: 800 !important;
  line-height: 1.2;
  color: #343a40 !important;
  background: linear-gradient(135deg, #343a40 0%, #495057 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.statistics .text-muted {
  color: #6c757d !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Summary Cards (Profit, Sell, etc.) */
.summary-card {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  border: none;
  border-radius: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 8px 24px rgba(26, 46, 85, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

#total-profit-card::before {
  background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
}

#total-sell-card::before {
  background: linear-gradient(90deg, #f39c12 0%, #f1c40f 100%);
}

#profit-today-card::before {
  background: linear-gradient(90deg, #2980b9 0%, #3498db 100%);
}

#total-provider-price-card::before {
  background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
}

.summary-card:hover {
  box-shadow: 0 12px 32px rgba(26, 46, 85, 0.15);
  transform: translateY(-2px);
}

.summary-card h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #343a40;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-card h4 small {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
}

.summary-value {
  font-size: 2.125rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

/* Order Status Buttons */
.order_btn_group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.order_btn_group .btn {
  border-radius: 0.5rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  color: #495057;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.order_btn_group .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.order_btn_group .btn.active1,
.order_btn_group .btn-info {
  background: linear-gradient(135deg, #45aaf2 0%, #2bcbba 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(69, 170, 242, 0.3);
}

.order_btn_group .btn.active1:hover,
.order_btn_group .btn-info:hover {
  box-shadow: 0 6px 16px rgba(69, 170, 242, 0.4);
}

/* Badge for Error Orders */
.badge-error-orders {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #cd201f 0%, #f66d9b 100%);
  box-shadow: 0 2px 8px rgba(205, 32, 31, 0.3);
  margin-left: 0.5rem;
}

/* Order Status Buttons - Enhanced Custom Styling */
.order_btn_group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  /* background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); */
}

.order_btn_group .btn {
  position: relative;
  border-radius: 0.5rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  background: #ffffff;
  color: #495057;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  text-transform: capitalize;
  font-size: 0.875rem;
}

.order_btn_group .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: transparent;
  border-radius: 0.5rem 0 0 0.5rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.order_btn_group .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

/* All Status */
.order_btn_group .btn.active1,
.order_btn_group .btn-info {
  background: linear-gradient(135deg, #467fcf 0%, #5d92e0 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(70, 127, 207, 0.3);
}

.order_btn_group .btn.active1::before {
  background: linear-gradient(to bottom, #ffffff 0%, rgba(255, 255, 255, 0.5) 100%);
}

/* Status-specific custom colors */
/* Pending Status */
.order_btn_group .btn[href*="/pending"] {
  border-left: 4px solid #f1c40f;
}

.order_btn_group .btn[href*="/pending"].active1,
.order_btn_group .btn[href*="/pending"]:hover {
  background: linear-gradient(135deg, #f1c40f 0%, #fd9644 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(241, 196, 15, 0.3);
}

/* Processing Status */
.order_btn_group .btn[href*="/processing"] {
  border-left: 4px solid #45aaf2;
}

.order_btn_group .btn[href*="/processing"].active1,
.order_btn_group .btn[href*="/processing"]:hover {
  background: linear-gradient(135deg, #45aaf2 0%, #2bcbba 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(69, 170, 242, 0.3);
}

/* In Progress Status */
.order_btn_group .btn[href*="/inprogress"],
.order_btn_group .btn[href*="/progress"] {
  border-left: 4px solid #17a2b8;
}

.order_btn_group .btn[href*="/inprogress"].active1,
.order_btn_group .btn[href*="/progress"].active1,
.order_btn_group .btn[href*="/inprogress"]:hover,
.order_btn_group .btn[href*="/progress"]:hover {
  background: linear-gradient(135deg, #17a2b8 0%, #20c9dd 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

/* Completed Status */
.order_btn_group .btn[href*="/completed"],
.order_btn_group .btn[href*="/complete"] {
  border-left: 4px solid #5eba00;
}

.order_btn_group .btn[href*="/completed"].active1,
.order_btn_group .btn[href*="/complete"].active1,
.order_btn_group .btn[href*="/completed"]:hover,
.order_btn_group .btn[href*="/complete"]:hover {
  background: linear-gradient(135deg, #5eba00 0%, #7bd235 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(94, 186, 0, 0.3);
}

/* Partial Status */
.order_btn_group .btn[href*="/partial"] {
  border-left: 4px solid #fd9644;
}

.order_btn_group .btn[href*="/partial"].active1,
.order_btn_group .btn[href*="/partial"]:hover {
  background: linear-gradient(135deg, #fd9644 0%, #f1c40f 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(253, 150, 68, 0.3);
}

/* Canceled/Cancelled Status */
.order_btn_group .btn[href*="/canceled"],
.order_btn_group .btn[href*="/cancelled"] {
  border-left: 4px solid #868e96;
}

.order_btn_group .btn[href*="/canceled"].active1,
.order_btn_group .btn[href*="/cancelled"].active1,
.order_btn_group .btn[href*="/canceled"]:hover,
.order_btn_group .btn[href*="/cancelled"]:hover {
  background: linear-gradient(135deg, #868e96 0%, #6c757d 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(134, 142, 150, 0.3);
}

/* Error/Failed Status */
.order_btn_group .btn[href*="/error"],
.order_btn_group .btn[href*="/fail"] {
  border-left: 4px solid #cd201f;
}

.order_btn_group .btn[href*="/error"].active1,
.order_btn_group .btn[href*="/fail"].active1,
.order_btn_group .btn[href*="/error"]:hover,
.order_btn_group .btn[href*="/fail"]:hover {
  background: linear-gradient(135deg, #cd201f 0%, #f66d9b 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(205, 32, 31, 0.3);
}

/* Refunded Status */
.order_btn_group .btn[href*="/refund"] {
  border-left: 4px solid #a55eea;
}

.order_btn_group .btn[href*="/refund"].active1,
.order_btn_group .btn[href*="/refund"]:hover {
  background: linear-gradient(135deg, #a55eea 0%, #c77bff 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(165, 94, 234, 0.3);
}

.order_btn_group .btn.active1:hover,
.order_btn_group .btn-info:hover {
  box-shadow: 0 6px 16px rgba(70, 127, 207, 0.4);
  transform: translateY(-3px);
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
  .statistics .card2 {
    margin-bottom: 1rem;
  }
  
  .statistics .stamp {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
  }
  
  .statistics .number {
    font-size: 1.75rem !important;
  }
}

@media (max-width: 575.98px) {
  .statistics .card2 {
    padding: 1.25rem !important;
    border-radius: 0.75rem;
  }
  
  .statistics .stamp {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.125rem;
  }
  
  .statistics .number {
    font-size: 1.5rem !important;
  }
  
  .summary-card {
    padding: 1.25rem;
    border-radius: 0.75rem;
  }
  
  .summary-value {
    font-size: 1.75rem;
  }
  
  .order_btn_group {
    gap: 0.375rem;
  }
  
  .order_btn_group .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* Animation for Dashboard Cards */
.statistics .item {
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
}

.statistics .item:nth-child(1) {
  animation-delay: 0.1s;
}

.statistics .item:nth-child(2) {
  animation-delay: 0.2s;
}

.statistics .item:nth-child(3) {
  animation-delay: 0.3s;
}

.statistics .item:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
