/* Promotions Page Styles */

/* Promo Stats */
.promo-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.promo-stat-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
}

.promo-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.promo-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
}

.promo-stat-icon.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.promo-stat-icon.used {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.promo-stat-icon.expired {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.promo-stat-content h3 {
  margin: 0 0 4px 0;
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

.promo-stat-content p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

/* Coupons Grid */
.coupons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.coupon-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
  border-left: 4px solid;
  position: relative;
}

.coupon-card.active {
  border-color: #10b981;
}

.coupon-card.expired {
  border-color: #ef4444;
  opacity: 0.7;
}

.coupon-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.coupon-header {
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
}

.coupon-code {
  font-size: 24px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  margin: 0 0 8px 0;
  letter-spacing: 2px;
}

.coupon-discount {
  font-size: 16px;
  opacity: 0.9;
}

.coupon-status {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.coupon-body {
  padding: 20px;
}

.coupon-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.coupon-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #6b7280;
}

.coupon-info-item i {
  width: 20px;
  color: #9ca3af;
}

.coupon-info-item strong {
  color: #1f2937;
}

.coupon-description {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.coupon-stats {
  display: flex;
  gap: 16px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 16px;
}

.coupon-stat {
  flex: 1;
  text-align: center;
}

.coupon-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 4px;
}

.coupon-stat-label {
  font-size: 12px;
  color: #6b7280;
}

.coupon-actions {
  display: flex;
  gap: 8px;
}

.btn-coupon-action {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-coupon-action.edit {
  background: #ede9fe;
  color: #6d28d9;
}

.btn-coupon-action.edit:hover {
  background: #ddd6fe;
}

.btn-coupon-action.delete {
  background: #fee2e2;
  color: #991b1b;
}

.btn-coupon-action.delete:hover {
  background: #fecaca;
}

.btn-coupon-action.copy {
  background: #dbeafe;
  color: #1e40af;
}

.btn-coupon-action.copy:hover {
  background: #bfdbfe;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 600px;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #6b7280;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 18px;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.required {
  color: #ef4444;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.btn-generate {
  position: absolute;
  right: 8px;
  top: 36px;
  padding: 8px 12px;
  border: none;
  background: #667eea;
  color: white;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-generate:hover {
  background: #5568d3;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.btn-secondary {
  padding: 10px 20px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #4a5568;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.btn-primary {
  padding: 10px 20px;
  border: none;
  background: #667eea;
  color: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.empty-state i {
  font-size: 64px;
  color: #d1d5db;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px 0;
}

/* Notification Toast */
.notification-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 16px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease-out;
}

.notification-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-toast.success {
  border-left: 4px solid #48bb78;
}

.notification-toast.success i {
  color: #48bb78;
  font-size: 20px;
}

.notification-toast span {
  font-size: 14px;
  font-weight: 500;
  color: #2d3748;
}

/* Promotions List */
.promotions-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.promotion-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  transition: all 0.3s;
  border-left: 4px solid;
}

.promotion-item.active {
  border-color: #10b981;
}

.promotion-item.scheduled {
  border-color: #3b82f6;
}

.promotion-item.ended {
  border-color: #ef4444;
  opacity: 0.7;
}

.promotion-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.promotion-banner {
  width: 300px;
  height: 200px;
  position: relative;
  flex-shrink: 0;
}

.promotion-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promotion-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
}

.promotion-badge.active {
  background: rgba(16, 185, 129, 0.9);
}

.promotion-badge.scheduled {
  background: rgba(59, 130, 246, 0.9);
}

.promotion-badge.ended {
  background: rgba(239, 68, 68, 0.9);
}

.promotion-content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.promotion-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.promotion-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.promotion-type-badge {
  padding: 6px 12px;
  background: #ede9fe;
  color: #6d28d9;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.promotion-description {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.5;
}

.promotion-details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.promotion-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
}

.promotion-detail-item i {
  color: #9ca3af;
}

.promotion-homepage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  width: fit-content;
}

.promotion-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-promo-action {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-promo-action.view {
  background: #ede9fe;
  color: #6d28d9;
}

.btn-promo-action.view:hover {
  background: #ddd6fe;
}

.btn-promo-action.edit {
  background: #dbeafe;
  color: #1e40af;
}

.btn-promo-action.edit:hover {
  background: #bfdbfe;
}

.btn-promo-action.delete {
  background: #fee2e2;
  color: #991b1b;
}

.btn-promo-action.delete:hover {
  background: #fecaca;
}

.image-preview {
  margin-top: 12px;
  display: none;
}

.image-preview.show {
  display: block;
}

.image-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.image-upload-box {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #f9fafb;
}

.image-upload-box:hover {
  border-color: #667eea;
  background: #f5f7ff;
}

.image-upload-box i {
  font-size: 32px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.image-upload-box p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-label span {
  font-size: 14px;
  color: #374151;
}

/* Responsive */
@media (max-width: 768px) {
  .coupons-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .promo-stats {
    grid-template-columns: 1fr;
  }
  
  .coupon-actions {
    flex-direction: column;
  }
  
  .promotion-item {
    flex-direction: column;
  }
  
  .promotion-banner {
    width: 100%;
    height: 180px;
  }
  
  .promotion-actions {
    flex-direction: column;
  }
}


/* Checkbox Group */
.checkbox-group {
  margin-top: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
  cursor: pointer;
}

.form-hint {
  font-size: 12px;
  color: #9ca3af;
  margin: 6px 0 0 28px;
}
