/* ============================
   Estilos de gestión de usuarios
   ============================ */
.usuarios-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.usuarios-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.usuarios-header h2 {
  margin: 0;
  font-size: 1.7rem;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.usuarios-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.4fr);
  gap: 20px;
  align-items: flex-start;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.form-row label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-main);
}

.form-row input,
.form-row select,
.form-row textarea {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-input-border);
  font-size: 0.9rem;
  background: var(--color-input-bg);
  color: var(--color-text-main);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 1px rgba(25, 118, 210, 0.15);
  outline: none;
}

.form-row.acciones {
  margin-top: 12px;
}

.hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Tabla */
.tabla-usuarios-wrapper {
  width: 100%;
  max-height: 460px;
  overflow-y: auto;
}

.tabla-usuarios-wrapper::-webkit-scrollbar {
  width: 8px;
}

.tabla-usuarios-wrapper::-webkit-scrollbar-track {
  background: var(--color-surface-muted);
  border-radius: 4px;
}

.tabla-usuarios-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

.tabla-usuarios-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

.tabla-usuarios thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.tabla-usuarios th,
.tabla-usuarios td {
  padding: 8px 10px;
}

.input-inline {
  width: 100%;
  min-width: 120px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--color-input-border);
  font-size: 0.85rem;
  background: var(--color-input-bg);
  color: var(--color-text-main);
}

.input-inline:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 1px rgba(25, 118, 210, 0.15);
  outline: none;
}

.acciones-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.inline-status {
  margin-top: 4px;
  font-size: 0.75rem;
}

.inline-status.ok {
  color: var(--color-success);
}

.inline-status.error {
  color: var(--color-error);
}

@media (max-width: 900px) {
  .usuarios-grid {
    grid-template-columns: 1fr;
  }

  .usuarios-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
