/**
 * Modern Table & UI Styles
 * Shared across all data pages (summary_report, get_coupons_data, all_users_data)
 */

/* Main Container */
.modern-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 25px 20px;
}

/* Modern Card Design */
.modern-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.modern-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: #667eea;
  font-size: 1.5rem;
}

/* Filter Section */
.filter-section {
    border: 1px solid #dbdbdb;
    border-radius: 5px;
    box-shadow: 2px 2px 2px #eee;
    padding: 25px;
    margin-bottom: 15px;
    background: #ffffff;
}

.filter-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #15164f;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Styling */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
  display: block;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  /* padding: 12px 15px; */
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button Styling */
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  border: 2px solid #667eea;
  color: #667eea;
  padding: 10px 25px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

/* Export Controls */
.export-controls {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.search-box-wrapper {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-box,
.search-input {
  width: 100%;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.3s;
  font-size: 14px;
}

.search-box:focus,
.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
}

.clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6c757d;
  opacity: 0;
  transition: opacity 0.3s;
}

.clear-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6c757d;
  transition: opacity 0.3s;
}

.clear-search.show { opacity: 1; }
.clear-search:hover { color: #dc3545; }
.clear-icon:hover { color: #dc3545; }

.export-btn {
  background: white;
  border: 2px solid #667eea;
  color: #667eea;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.export-btn:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Table Styling */
.vue-data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.vue-data-table thead th {
  background: #495057;
  color: white;
  font-weight: 600;
  padding: 15px 12px;
  text-align: left;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 10;
}

.vue-data-table thead th:hover {
  background: #343a40;
}

.vue-data-table thead th .sort-icon {
  margin-left: 6px;
  font-size: 0.9em;
  opacity: 0.7;
}

.vue-data-table thead th.sorted .sort-icon { opacity: 1; }

.vue-data-table tbody td {
  padding: 12px;
  border-bottom: 1px solid #e9ecef;
}

.vue-data-table tbody tr:hover { 
  background-color: #f8f9fa;
}

.vue-data-table tfoot th {
  background: #f8f9fa;
  font-weight: 700;
  padding: 15px 12px;
  border-top: 3px solid #667eea;
  color: #333;
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.page-btn {
  padding: 8px 14px;
  border: 2px solid #e9ecef;
  background: white;
  color: #495057;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.page-btn:hover:not(:disabled) {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.page-btn:disabled { 
  opacity: 0.4; 
  cursor: not-allowed; 
}

.page-btn.active { 
  background: #667eea; 
  color: white; 
  border-color: #667eea; 
}

.page-size-select {
  padding: 8px 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-weight: 500;
}

.pagination-info {
  color: #666;
  font-size: 0.95rem;
}

/* Badge Styling */
.badge-success {
  background: #d4edda;
  color: #155724;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-danger {
  background: #f8d7da;
  color: #721c24;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-info {
  background: #d1ecf1;
  color: #0c5460;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Statistics Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-left: 4px solid #667eea;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
}

/* Responsive */
@media (max-width: 768px) {
  .modern-container {
    padding: 10px;
  }
  
  .modern-card {
    padding: 15px;
  }
  
  .export-controls {
    flex-direction: column;
  }
  
  .search-box-wrapper {
    min-width: 100%;
  }
  
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .vue-data-table {
    font-size: 0.85rem;
  }
  
  .vue-data-table thead th,
  .vue-data-table tbody td {
    padding: 8px 6px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

[v-cloak] { display: none; }
