/* ===== ADMIN: USUARIOS CERCA DEL LÍMITE ===== */

.limit-warning-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-left: 4px solid #dc2626;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.limit-warning-banner svg {
  stroke: #dc2626;
  flex-shrink: 0;
}

.limit-warning-banner h4 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
  color: #991b1b;
}

.limit-warning-banner p {
  margin: 0;
  font-size: 14px;
  color: #7f1d1d;
}

.users-limit-table tbody tr {
  cursor: pointer;
  transition: background 0.2s ease;
}

.users-limit-table tbody tr:hover {
  background: #fef2f2;
}

/* Modal de detalles de usuario */
.modal-large {
  max-width: 900px !important;
  max-height: 90vh;
  overflow-y: auto;
}

.user-details-body {
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: white;
  padding: 20px;
}

.user-details-section {
  padding: 20px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.user-details-section.danger-section {
  background: white;
  border-color: #fecaca;
  border-left: 4px solid #dc2626;
}

.section-subtitle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.section-subtitle.danger {
  color: #dc2626;
}

.section-subtitle svg {
  stroke: #16a34a;
}

.section-subtitle.danger svg {
  stroke: #dc2626;
}

/* Grid de información */
.user-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.info-label {
  font-size: 12px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

/* Estadísticas en modal */
.stats-grid-modal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card-modal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  text-align: center;
}

.stat-label-modal {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.stat-value-modal {
  font-size: 24px;
  font-weight: 700;
  color: #16a34a;
}

/* Barra de progreso del límite */
.limit-progress-container {
  margin-top: 16px;
}

.limit-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  color: #666;
}

.limit-progress-bar {
  width: 100%;
  height: 24px;
  background: #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.limit-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #16a34a 0%, #15803d 100%);
  transition: width 0.5s ease, background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: white;
  font-weight: 600;
  font-size: 12px;
}

.limit-progress-fill[data-warning="true"] {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.limit-progress-fill[data-danger="true"] {
  background: linear-gradient(90deg, #dc2626 0%, #b91c1c 100%);
}

/* Casino favorito */
.favorite-casino-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
}

.casino-icon {
  font-size: 48px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 12px;
}

.casino-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.casino-label {
  font-size: 12px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
}

.casino-name {
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

.casino-visits {
  font-size: 14px;
  color: #999;
}

/* Opciones de restricción */
.restriction-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.restriction-card {
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
}

.restriction-card.danger-card {
  border-color: #fecaca;
  background: #fef2f2;
}

.restriction-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.restriction-header svg {
  stroke: #f59e0b;
}

.danger-card .restriction-header svg {
  stroke: #dc2626;
}

.restriction-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.restriction-card p {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #666;
}

.restriction-controls {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.restriction-select {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  background: white;
}

.restriction-select:focus {
  outline: none;
  border-color: #f59e0b;
}

.ban-reason-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.ban-reason-input:focus {
  outline: none;
  border-color: #dc2626;
}

.btn-restriction {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-restriction.warning {
  background: #f59e0b;
  color: white;
}

.btn-restriction.warning:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.btn-restriction.danger {
  background: #dc2626;
  color: white;
}

.btn-restriction.danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

/* Estado de restricción actual */
.current-restriction-status {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #fef2f2;
  border: 2px solid #dc2626;
  border-radius: 10px;
  align-items: flex-start;
}

.current-restriction-status svg {
  stroke: #dc2626;
  flex-shrink: 0;
  margin-top: 2px;
}

.current-restriction-status strong {
  display: block;
  color: #991b1b;
  margin-bottom: 4px;
}

.current-restriction-status p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #7f1d1d;
}

.btn-remove-restriction {
  padding: 8px 16px;
  background: #16a34a;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove-restriction:hover {
  background: #15803d;
}

/* Status badges en la tabla */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-badge.danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.status-badge.blocked {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid-modal {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .user-info-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid-modal {
    grid-template-columns: 1fr;
  }

  .modal-large {
    max-width: 95% !important;
    margin: 20px;
  }

  .restriction-controls {
    flex-direction: column;
  }

  .btn-restriction {
    width: 100%;
  }
}
