/* Shared page UI styles: badges, buttons base, form controls, input groups, labels, table headers, quick stats, checkboxes */

/* Quick Stats */
.quick-stat-content h6 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.2;
}

.quick-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.2;
  display: block;
  margin-top: 0.25rem;
}

.dark-theme .quick-stat-number {
  color: var(--text-dark);
}

/* Enhanced Form Controls */
.form-control, .form-select {
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: var(--bg-light);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
  background: var(--bg-light);
  transform: translateY(-1px);
}

.dark-theme .form-control,
.dark-theme .form-select {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: var(--text-dark);
}

.dark-theme .form-control:focus,
.dark-theme .form-select:focus {
  background: var(--bg-dark);
  color: var(--text-dark);
}

/* Enhanced Labels */
.form-label.fw-medium {
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.dark-theme .form-label.fw-medium {
  color: var(--text-dark);
}

/* Input Groups */
.input-group-text {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-right: none;
  color: var(--text-muted);
  font-weight: 500;
  border-radius: 12px 0 0 12px;
}

.dark-theme .input-group-text {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: var(--text-muted);
}

.input-group .form-control {
  border-left: none;
  border-radius: 0 12px 12px 0;
}

.input-group .form-control:focus {
  border-left: none;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}

/* Buttons (shared base) */
.btn {
  border-radius: 12px;
  font-weight: 500;
  letter-spacing: 0.025em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Outline Secondary */
.btn-outline-secondary {
  border: 1px solid var(--border-light);
  color: var(--text-light);
  background: transparent;
}

.dark-theme .btn-outline-secondary {
  border-color: var(--border-dark);
  color: var(--text-dark);
}

/* Table headers */
.table-standard thead th {
  background: linear-gradient(135deg, rgba(142, 142, 147, 0.1) 0%, rgba(142, 142, 147, 0.05) 100%);
  border: none;
  font-weight: 600;
  color: var(--text-light);
  padding: 1rem 0.75rem;
  position: relative;
}

.table-standard thead th:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--border-light);
}

.dark-theme .table-standard thead th {
  background: linear-gradient(135deg, rgba(142, 142, 147, 0.15) 0%, rgba(142, 142, 147, 0.08) 100%);
  color: var(--text-dark);
}

.dark-theme .table-standard thead th:not(:last-child)::after {
  background: var(--border-dark);
}

/* Badges */
.badge {
  font-weight: 500;
  letter-spacing: 0.025em;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

/* Checkboxes (base only) */
.form-check-input {
  border-radius: 8px;
  border: 2px solid var(--border-light);
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.dark-theme .form-check-input {
  border-color: var(--border-dark);
}

/* Table body rows (shared) */
.table-standard tbody tr {
  transition: all 0.2s ease;
  position: relative;
}

.table-standard tbody tr:hover {
  background-color: rgba(142, 142, 147, 0.06);
  transform: scale(1.01);
}

.dark-theme .table-standard tbody tr:hover {
  background-color: rgba(142, 142, 147, 0.12);
}

/* Enhanced Focus States (shared) */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 2px solid var(--focus-outline, #5856d6);
  outline-offset: 2px;
}

/* Accessibility Improvements (shared) */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .form-control,
  .form-select,
  .btn::before,
  .pagination .page-link::before,
  .quick-stat-card,
  .quick-stat-icon::before,
  .listing-thumbnail {
    transition: none;
    animation: none;
  }

  .btn:hover,
  .listing-thumbnail:hover {
    transform: none;
  }

  .form-control:focus,
  .form-select:focus {
    transform: none;
  }
}
